DATASOURCE::ECS::Images is used to query available images.
Syntax
{
"Type": "DATASOURCE::ECS::Images",
"Properties": {
"Status": String,
"ImageOwnerAlias": String,
"Usage": String,
"ActionType": String,
"ResourceGroupId": String,
"Architecture": String,
"ImageFamily": String,
"IsSupportIoOptimized": Boolean,
"IsSupportCloudinit": Boolean,
"ImageName": String,
"SnapshotId": String,
"IsPublic": Boolean,
"OSType": String,
"ImageId": String,
"InstanceType": String,
"Tags": List,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Status | String | No | Yes | The status of the image. | Valid values:
Note You can specify multiple values for this property. Separate multiple values with commas (,). |
ImageOwnerAlias | String | No | Yes | The source of the image. | Valid values:
Note If you leave this property empty, the results that match the system, self, and others values are returned by default. |
Usage | String | No | Yes | Specifies whether the image is used by an Elastic Compute Service (ECS) instance. | Valid values:
|
ActionType | String | No | Yes | The scenario in which you want to use the image. | Valid values:
|
ResourceGroupId | String | No | Yes | The ID of the resource group to which the custom image belongs. | If you use this property to query resources, up to 1,000 resources that belong to the specified resource group are returned. Note This property takes effect when ImageOwnerAlias is set to self. |
Architecture | String | No | Yes | The architecture of the image. | Valid values:
|
ImageFamily | String | No | Yes | The name of the image family. You can use this property to query images that belong to the specified image family. | None. |
IsSupportIoOptimized | Boolean | No | Yes | Specifies whether the image can be used by an I/O optimized instance. | Valid values:
|
IsSupportCloudinit | Boolean | No | Yes | Specifies whether the image supports cloud-init. | Valid values:
|
ImageName | String | No | Yes | The image name. | The wildcard character ( |
SnapshotId | String | No | Yes | The ID of the snapshot that is used by the custom image. | None. |
IsPublic | Boolean | No | Yes | Specifies whether to query published community images. | Valid values:
|
OSType | String | No | Yes | The OS type of the image. | Valid values:
|
ImageId | String | No | Yes | The image ID. | None. |
InstanceType | String | No | Yes | The type of the instance for which the image is used. | None. |
Tags | List | No | Yes | The tags of the image. | You can add up to 20 tags. For more information, see Tags properties. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Value | String | No | No | The tag value of the image. | The tag value can be up to 128 characters in length, and cannot contain |
Key | String | Yes | No | The tag key of the image. | The tag key must be 1 to 128 characters in length, and cannot contain |
Return values (Fn::GetAtt)
ImageIds: the IDs of the images.
Images: details of the images.
Property | Type | Description | Constraint |
ImageIds | List | The IDs of the images. | Example: |
Images | List | Details of the images. | None. |
Status | String | The status of the image. | Valid values:
|
ImageFamily | String | The name of the image family. | None. |
Progress | String | The progress of the operation that is performed on the image. | Unit: percentage. |
IsCopied | Boolean | Indicates whether the image is a copy of another image. | Valid values:
|
IsSupportIoOptimized | Boolean | Indicates whether the image can be used by an I/O optimized instance. | Valid values:
|
ImageOwnerAlias | String | The source of the image. | Valid values:
|
IsSupportCloudinit | Boolean | Indicates whether cloud-init is supported by the image. | Valid values:
|
ImageVersion | String | The version of the image. | None. |
Usage | String | Indicates whether the image is used by an ECS instance. | Valid values:
|
IsSelfShared | String | Indicates whether the custom image is shared with other Alibaba Cloud accounts. | Valid values:
|
Description | String | The description. | None. |
Size | Integer | The image size. | Unit: GiB. |
ResourceGroupId | String | The ID of the resource group to which the image belongs. | Example: |
Platform | String | The OS platform. | Example: Windows Server 2016. |
OSNameEn | String | The display name of the OS in English. | Example: |
ImageName | String | The image name. | None. |
OSName | String | The display name of the OS in Chinese. |
|
ImageId | String | The image ID. | Example: |
OSType | String | The OS type of the image. | Valid values:
|
IsSubscribed | Boolean | Indicates whether the terms of the image service that corresponds to the product code are accepted. | Valid values:
|
ProductCode | String | The product code of the Alibaba Cloud Marketplace image. | None. |
Architecture | String | The OS architecture of the image. | Valid values:
|
DiskDeviceMappings | List | The mappings between disks and snapshots in the image. | None. |
Tags | List | The tags of the image. | None. |
IsPublic | Boolean | Indicates whether the image that is queried is a published community image. | Valid values:
|
ImageOwnerId | String | The ID of the Alibaba Cloud account to which the image belongs. | This property is returned only when shared images are queried. |
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
Images:
Type: DATASOURCE::ECS::Images
Properties:
ImageName: centos_8_5*
Outputs:
ImageIds:
Value:
Ref: Images
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"Images": {
"Type": "DATASOURCE::ECS::Images",
"Properties": {
"ImageName": "centos_8_5*"
}
}
},
"Outputs": {
"ImageIds": {
"Value": {
"Ref": "Images"
}
}
}
}