DATASOURCE::ENS::Image is used to query the information about a custom image.
Syntax
{
"Type": "DATASOURCE::ENS::Image",
"Properties": {
"ImageId": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Property | Type | Required | Editable | Description | Constraint |
ImageId | String | Yes | Yes | The ID of the image. | None. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
ImageOwnerAlias: the alias of the image owner.
ImageName: the name of the image.
SnapshotId: the ID of the snapshot.
Platform: the platform.
Architecture: the architecture of the image.
ImageSize: the size of the image. Unit: GiB.
InstanceId: the ID of the instance.
OsVersion: the version of the operating system.
CreateTime: the time when the image was created.
ImageId: the ID of the image.
ComputeType: the computing property.
Examples
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"
]
}
}
}
}