ALIYUN::PAI::DatasetVersion类型用于创建数据集版本。
语法
{
"Type": "ALIYUN::PAI::DatasetVersion",
"Properties": {
"DataSourceType": String,
"DatasetId": String,
"Property": String,
"Uri": String,
"Description": String,
"DataSize": Integer,
"DataCount": Integer,
"Labels": List,
"Options": String,
"SourceType": String,
"SourceId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DataSourceType | String | 是 | 否 | 数据源类型。 | 多项之间使用半角逗号分隔。支持以下取值:
当前的策略是版本的DataSourceType需要与数据集DataSourceType保持一致,创建版本时,与数据集进行校验。 |
DatasetId | String | 是 | 否 | 数据集 ID。 | 无 |
Property | String | 是 | 否 | 数据集的属性。 | 支持以下取值:
|
Uri | String | 是 | 否 | Uri 配置。 |
|
Description | String | 否 | 否 | 对数据集版本进行自定义描述。 | 以区分不同的数据集版本。 |
DataSize | Integer | 否 | 否 | 数据集文件占据空间的大小。 | 单位 Byte 。 |
DataCount | Integer | 否 | 否 | 数据集文件数量。 | 单位个。 |
Labels | List | 否 | 否 | 数据集版本标签列表。 | 更多信息,请参见Labels属性。 |
Options | String | 否 | 是 | 扩展字段。 | JsonString 类型。 当 DLC 使用数据集时,可通过配置 mountPath 字段指定数据集默认挂载路径。 |
SourceType | String | 否 | 否 | 数据来源类型。 | 默认为 USER。支持以下取值:
枚举值:
|
SourceId | String | 否 | 否 | 数据来源 ID。 |
|
Labels语法
"Labels": [
{
"Value": String,
"Key": String
}
]
Labels属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 标签键。 | 长度为1~128个字符,不能以 |
Value | String | 否 | 否 | 标签值。 | 长度为0~128个字符,不能以 |
返回值
Fn::GetAtt
VersionName:数据集版本名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DataSourceType:
Type: String
Description:
en: |-
The data source type. The following values are supported:
- OSS: Alibaba Cloud Object Storage (OSS).
- NAS: Alibaba cloud file storage (NAS).
- CPFS
AllowedValues:
- OSS
- NAS
- CPFS
Required: true
Uri:
Type: String
Description:
en: |-
The Uri configuration sample is as follows:
- The data source type is OSS:'oss://bucket.endpoint/object'
- The data source type is NAS:
The general NAS format is: 'nas://<nasfisid>.region/subpath/to/dir/';
CPFS1.0:'nas://<cpfs-fsid>.region/subpath/to/dir /';
CPFS2.0:'nas://<cpfs-fsid>.region/<protocolserviceid>/'.
CPFS1.0 and CPFS2.0 are distinguished by the format of fsid: CPFS1.0 is cpfs-<8-bit ascii characters>;CPFS2.0 is cpfs-<16 ascii characters>.
AllowedPattern: ^(oss://|nas://).*
Required: true
Property:
Type: String
Description:
en: |-
The properties of the dataset. The following values are supported:
- FILE: FILE.
- DIRECTORY: folder.
AllowedValues:
- FILE
- DIRECTORY
Required: true
DatasetId:
Type: String
Description:
en: The ID of the dataset.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::PAI::DatasetVersion
Properties:
DataSourceType:
Ref: DataSourceType
Uri:
Ref: Uri
Property:
Ref: Property
DatasetId:
Ref: DatasetId
Outputs:
VersionName:
Description: Dataset version name.
Value:
Fn::GetAtt:
- ExtensionResource
- VersionName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DataSourceType": {
"Type": "String",
"Description": {
"en": "The data source type. The following values are supported:\n- OSS: Alibaba Cloud Object Storage (OSS).\n- NAS: Alibaba cloud file storage (NAS).\n- CPFS"
},
"AllowedValues": [
"OSS",
"NAS",
"CPFS"
],
"Required": true
},
"Uri": {
"Type": "String",
"Description": {
"en": "The Uri configuration sample is as follows:\n- The data source type is OSS:'oss://bucket.endpoint/object'\n- The data source type is NAS:\nThe general NAS format is: 'nas://<nasfisid>.region/subpath/to/dir/';\nCPFS1.0:'nas://<cpfs-fsid>.region/subpath/to/dir /';\nCPFS2.0:'nas://<cpfs-fsid>.region/<protocolserviceid>/'.\nCPFS1.0 and CPFS2.0 are distinguished by the format of fsid: CPFS1.0 is cpfs-<8-bit ascii characters>;CPFS2.0 is cpfs-<16 ascii characters>."
},
"AllowedPattern": "^(oss://|nas://).*",
"Required": true
},
"Property": {
"Type": "String",
"Description": {
"en": "The properties of the dataset. The following values are supported:\n- FILE: FILE.\n- DIRECTORY: folder."
},
"AllowedValues": [
"FILE",
"DIRECTORY"
],
"Required": true
},
"DatasetId": {
"Type": "String",
"Description": {
"en": "The ID of the dataset."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PAI::DatasetVersion",
"Properties": {
"DataSourceType": {
"Ref": "DataSourceType"
},
"Uri": {
"Ref": "Uri"
},
"Property": {
"Ref": "Property"
},
"DatasetId": {
"Ref": "DatasetId"
}
}
}
},
"Outputs": {
"VersionName": {
"Description": "Dataset version name.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VersionName"
]
}
}
}
}
- 本页导读 (1)
- 语法
- 属性
- Labels语法
- Labels属性
- 返回值
- 示例