全部产品
Search
文档中心

资源编排:DATASOURCE::PAI::Dataset

更新时间:Aug 23, 2024

DATASOURCE::PAI::Dataset类型用于获取单个数据集。

语法

{
  "Type": "DATASOURCE::PAI::Dataset",
  "Properties": {
    "DatasetId": String,
    "WorkspaceId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DatasetId

String

数据集 ID。

WorkspaceId

String

数据集所在工作空间 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • Options:扩展字段。

  • Description:描述。

  • Accessibility:工作空间可见度。

  • SourceId:来源ID。

  • CreateTime:创建时间。

  • SourceType:来源类型。

  • WorkspaceId:数据集所在工作空间ID。

  • Uri:URI配置。

  • GmtModifiedTime:更新时间。

  • DatasetId:数据集ID。

  • OwnerId:主账户ID。

  • DatasetName:数据集名称。

  • UserId:用户ID。

  • DataSourceType:数据源类型。

  • DataType:数据类型。

  • Property:数据集属性。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      WorkspaceId:
        Type: String
        Description:
          en: |-
            The ID of the workspace where the dataset is located. For details about how to obtain the workspace ID, see [ListWorkspaces].
            If this parameter is not configured, the default workspace is used. If the default workspace does not exist, an error is reported.
        Required: true
      DatasetId:
        Type: String
        Description:
          en: The first ID of the resource.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::PAI::Dataset
        Properties:
          WorkspaceId:
            Ref: WorkspaceId
          DatasetId:
            Ref: DatasetId
    Outputs:
      Options:
        Description: The extended field, which is of the JsonString type.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Options
      Description:
        Description: Custom descriptions of datasets to distinguish between different datasets.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Description
      Accessibility:
        Description: Workspace visibility.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Accessibility
      SourceId:
        Description: The data source ID.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SourceId
      CreateTime:
        Description: The creation time of the resource.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - CreateTime
      SourceType:
        Description: The data source type. The default value is USER.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SourceType
      WorkspaceId:
        Description: The ID of the workspace where the dataset is located.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - WorkspaceId
      Uri:
        Description: The Uri configuration sample is as follows:.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Uri
      GmtModifiedTime:
        Description: Update time.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - GmtModifiedTime
      DatasetId:
        Description: The first ID of the resource.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DatasetId
      OwnerId:
        Description: The ID of the primary account.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - OwnerId
      DatasetName:
        Description: The name of the dataset.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DatasetName
      UserId:
        Description: The ID of the user to which the dataset belongs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - UserId
      DataSourceType:
        Description: The data source type.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DataSourceType
      DataType:
        Description: The dataset type. The default value is COMMON.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - DataType
      Property:
        Description: The properties of the dataset.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Property
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "WorkspaceId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the workspace where the dataset is located. For details about how to obtain the workspace ID, see [ListWorkspaces].\nIf this parameter is not configured, the default workspace is used. If the default workspace does not exist, an error is reported."
          },
          "Required": true
        },
        "DatasetId": {
          "Type": "String",
          "Description": {
            "en": "The first ID of the resource."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::PAI::Dataset",
          "Properties": {
            "WorkspaceId": {
              "Ref": "WorkspaceId"
            },
            "DatasetId": {
              "Ref": "DatasetId"
            }
          }
        }
      },
      "Outputs": {
        "Options": {
          "Description": "The extended field, which is of the JsonString type.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Options"
            ]
          }
        },
        "Description": {
          "Description": "Custom descriptions of datasets to distinguish between different datasets.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Description"
            ]
          }
        },
        "Accessibility": {
          "Description": "Workspace visibility.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Accessibility"
            ]
          }
        },
        "SourceId": {
          "Description": "The data source ID.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SourceId"
            ]
          }
        },
        "CreateTime": {
          "Description": "The creation time of the resource.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        },
        "SourceType": {
          "Description": "The data source type. The default value is USER.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SourceType"
            ]
          }
        },
        "WorkspaceId": {
          "Description": "The ID of the workspace where the dataset is located.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "WorkspaceId"
            ]
          }
        },
        "Uri": {
          "Description": "The Uri configuration sample is as follows:.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Uri"
            ]
          }
        },
        "GmtModifiedTime": {
          "Description": "Update time.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "GmtModifiedTime"
            ]
          }
        },
        "DatasetId": {
          "Description": "The first ID of the resource.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DatasetId"
            ]
          }
        },
        "OwnerId": {
          "Description": "The ID of the primary account.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "OwnerId"
            ]
          }
        },
        "DatasetName": {
          "Description": "The name of the dataset.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DatasetName"
            ]
          }
        },
        "UserId": {
          "Description": "The ID of the user to which the dataset belongs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "UserId"
            ]
          }
        },
        "DataSourceType": {
          "Description": "The data source type.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DataSourceType"
            ]
          }
        },
        "DataType": {
          "Description": "The dataset type. The default value is COMMON.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "DataType"
            ]
          }
        },
        "Property": {
          "Description": "The properties of the dataset.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Property"
            ]
          }
        }
      }
    }