ALIYUN::PAI::Image类型用于添加自定义镜像到工作空间。
语法
{
"Type": "ALIYUN::PAI::Image",
"Properties": {
"ImageName": String,
"ImageUri": String,
"Accessibility": String,
"Labels": List,
"WorkspaceId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ImageName |
String |
是 |
否 |
镜像名称。 |
无 |
|
ImageUri |
String |
是 |
否 |
镜像地址. |
包含版本号。 |
|
Accessibility |
String |
否 |
是 |
镜像可见性。 |
取值:
|
|
Labels |
List |
否 |
是 |
标签。 |
最小长度:0,最大长度:20。更多信息,请参考Labels属性。 |
|
WorkspaceId |
String |
否 |
否 |
镜像所属工作空间的ID。 |
无 |
Labels语法
"Labels": [
{
"Value": String,
"Key": String
}
]
Labels属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Key |
String |
是 |
是 |
自定义键。 |
无 |
|
Value |
String |
否 |
是 |
自定义键值。 |
无 |
返回值
Fn::GetAtt
-
ImageName:镜像名称。
-
Accessibility:镜像可见性。
-
WorkspaceId:镜像所属工作空间的ID。
-
Labels:标签。
-
ImageUri:镜像地址,包含版本号。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
WorkspaceId:
Type: String
Description:
en: The ID of the workspace to which the image belongs.
Default: Null
Required: false
ImageName:
Type: String
Description:
en: The image name.
Required: true
Labels:
Description:
en: Labels.
Required: false
Default: Null
Type: Json
MinLength: 0
MaxLength: 20
AssociationProperty: List[Parameters]
AssociationPropertyMetadata:
Parameters:
Key:
Type: String
Description:
en: Key.
Required: true
Value:
Type: String
Description:
en: value.
Default: Null
Required: false
Accessibility:
Type: String
Description:
en: |-
Visibility of the mirror, possible values:
- PUBLIC: all members of the current workspace can operate.
- PRIVATE: Only the creator can operate.
AllowedValues:
- PUBLIC
- PRIVATE
Default: Null
Required: false
ImageUri:
Type: String
Description:
en: The Image address, which contains the version number.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::PAI::Image
Properties:
WorkspaceId:
Ref: WorkspaceId
ImageName:
Ref: ImageName
Labels:
Ref: Labels
Accessibility:
Ref: Accessibility
ImageUri:
Ref: ImageUri
Outputs:
WorkspaceId:
Value:
Fn::GetAtt:
- ExtensionResource
- WorkspaceId
Description: The ID of the workspace to which the image belongs.
ImageName:
Value:
Fn::GetAtt:
- ExtensionResource
- ImageName
Description: The image name.
Labels:
Value:
Fn::GetAtt:
- ExtensionResource
- Labels
Description: Labels.
Accessibility:
Value:
Fn::GetAtt:
- ExtensionResource
- Accessibility
Description: Visibility of the mirror.
ImageUri:
Value:
Fn::GetAtt:
- ExtensionResource
- ImageUri
Description: The Image address, which contains the version number.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"WorkspaceId": {
"Type": "String",
"Description": {
"en": "The ID of the workspace to which the image belongs."
},
"Default": null,
"Required": false
},
"ImageName": {
"Type": "String",
"Description": {
"en": "The image name."
},
"Required": true
},
"Labels": {
"Description": {
"en": "Labels."
},
"Required": false,
"Default": null,
"Type": "Json",
"MinLength": 0,
"MaxLength": 20,
"AssociationProperty": "List[Parameters]",
"AssociationPropertyMetadata": {
"Parameters": {
"Key": {
"Type": "String",
"Description": {
"en": "Key."
},
"Required": true
},
"Value": {
"Type": "String",
"Description": {
"en": "value."
},
"Default": null,
"Required": false
}
}
}
},
"Accessibility": {
"Type": "String",
"Description": {
"en": "Visibility of the mirror, possible values:\n- PUBLIC: all members of the current workspace can operate.\n- PRIVATE: Only the creator can operate."
},
"AllowedValues": [
"PUBLIC",
"PRIVATE"
],
"Default": null,
"Required": false
},
"ImageUri": {
"Type": "String",
"Description": {
"en": "The Image address, which contains the version number."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PAI::Image",
"Properties": {
"WorkspaceId": {
"Ref": "WorkspaceId"
},
"ImageName": {
"Ref": "ImageName"
},
"Labels": {
"Ref": "Labels"
},
"Accessibility": {
"Ref": "Accessibility"
},
"ImageUri": {
"Ref": "ImageUri"
}
}
}
},
"Outputs": {
"WorkspaceId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"WorkspaceId"
]
},
"Description": "The ID of the workspace to which the image belongs."
},
"ImageName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ImageName"
]
},
"Description": "The image name."
},
"Labels": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Labels"
]
},
"Description": "Labels."
},
"Accessibility": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Accessibility"
]
},
"Description": "Visibility of the mirror."
},
"ImageUri": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ImageUri"
]
},
"Description": "The Image address, which contains the version number."
}
}
}该文章对您有帮助吗?