DATASOURCE::ENS::Image类型用于查询单个自定义镜像详情。
语法
{
"Type": "DATASOURCE::ENS::Image",
"Properties": {
"ImageId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ImageId | String | 是 | 是 | 镜像 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 取值:
|
返回值
Fn::GetAtt
ImageOwnerAlias:镜像所有者的别名。
ImageName:镜像名称。
SnapshotId:快照 ID。
Platform:平台。
Architecture:镜像的体系架构。
ImageSize:镜像大小,单位:GiB。
InstanceId:实例 ID。
OsVersion:系统版本。
CreateTime:镜像创建时间。
ImageId:镜像 ID。
ComputeType:计算属性。
示例
YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ImageId:
Type: String
Description:
en: The ID of the image. Fuzzy search is supported.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::ENS::Image
Properties:
ImageId:
Ref: ImageId
Outputs:
ImageOwnerAlias:
Description: |-
The source of the image. Valid values:
- **others**: a custom image that is shared by other Alibaba Cloud accounts.
- **self**: your own custom image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ImageOwnerAlias
ImageName:
Description: The name of the image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ImageName
SnapshotId:
Description: The ID of the snapshot corresponding to the image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- SnapshotId
Platform:
Description: |-
The type of operating system used by the image. Valid values:
- **centos**
- **ubuntu**
- **alios**
- **debian**
- **rhel**
- **windows**
Value:
Fn::GetAtt:
- ExtensionDataSource
- Platform
Architecture:
Description: |-
The image architecture. Valid values:
- **i386**
- **x86_64**
Value:
Fn::GetAtt:
- ExtensionDataSource
- Architecture
ImageSize:
Description: 'The size of the image. Unit: GiB.'
Value:
Fn::GetAtt:
- ExtensionDataSource
- ImageSize
InstanceId:
Description: The ID of the instance corresponding to the image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- InstanceId
OsVersion:
Description: The operating system version.
Value:
Fn::GetAtt:
- ExtensionDataSource
- OsVersion
CreateTime:
Description: The image creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreateTime
ImageId:
Description: The ID of the image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ImageId
ComputeType:
Description: 'Computing type. ens_vm/ens: x86 computing. bare_metal: x86 bare machine or x86 bare metal. arm_vm: ARM computing. arm_bare_metal: ARM bare machine or ARM bare metal. pcfarm: heterogeneous computing.'
Value:
Fn::GetAtt:
- ExtensionDataSource
- ComputeType
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ImageId": {
"Type": "String",
"Description": {
"en": "The ID of the image. Fuzzy search is supported."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ENS::Image",
"Properties": {
"ImageId": {
"Ref": "ImageId"
}
}
}
},
"Outputs": {
"ImageOwnerAlias": {
"Description": "The source of the image. Valid values:\n- **others**: a custom image that is shared by other Alibaba Cloud accounts.\n- **self**: your own custom image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ImageOwnerAlias"
]
}
},
"ImageName": {
"Description": "The name of the image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ImageName"
]
}
},
"SnapshotId": {
"Description": "The ID of the snapshot corresponding to the image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"SnapshotId"
]
}
},
"Platform": {
"Description": "The type of operating system used by the image. Valid values:\n- **centos**\n- **ubuntu**\n- **alios**\n- **debian**\n- **rhel**\n- **windows**",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Platform"
]
}
},
"Architecture": {
"Description": "The image architecture. Valid values:\n- **i386**\n- **x86_64**",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Architecture"
]
}
},
"ImageSize": {
"Description": "The size of the image. Unit: GiB.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ImageSize"
]
}
},
"InstanceId": {
"Description": "The ID of the instance corresponding to the image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceId"
]
}
},
"OsVersion": {
"Description": "The operating system version.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"OsVersion"
]
}
},
"CreateTime": {
"Description": "The image creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreateTime"
]
}
},
"ImageId": {
"Description": "The ID of the image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ImageId"
]
}
},
"ComputeType": {
"Description": "Computing type. ens_vm/ens: x86 computing. bare_metal: x86 bare machine or x86 bare metal. arm_vm: ARM computing. arm_bare_metal: ARM bare machine or ARM bare metal. pcfarm: heterogeneous computing.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ComputeType"
]
}
}
}
}
该文章对您有帮助吗?
- 本页导读 (1)
- 语法
- 属性
- 返回值
- 示例