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
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Status | String | No | Yes | The state of the image. | Default value: Available. 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 do not specify this property, the results that match system, self, and others are returned. |
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. | Default value: CreateEcs. Valid values:
|
ResourceGroupId | String | No | Yes | The ID of the resource group to which the custom image belongs. | When you use this property to query resources, the number of resources that are contained in the specified resource group cannot exceed 1,000. Note This property takes effect when you set the ImageOwnerAlias property 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 name of the image. | You can use the wild character (∗ ) to query image names. Example: centos_8_5*. |
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. | Default value: false. Valid values:
|
OSType | String | No | Yes | The OS type of the image. | Valid values:
|
ImageId | String | No | Yes | The ID of an image. | 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 specify up to 20 tags. For more information, see Tags properties. |
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 value can be up to 128 characters in length, and cannot contain http:// or https:// . The value cannot start with aliyun or acs: . |
Key | String | Yes | No | The tag key of the image. | The key must be 1 to 128 characters in length, and cannot contain http:// or https:// . The key cannot start with aliyun or acs: . |
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: ['centos_8_5_x64_20G_alibase_20211228.vhd'] . |
Images | List | Details of the images. | None. |
Status | String | The state 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: %. |
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 of the image. | None. |
Size | Integer | The size of the image. | Unit: GiB. |
ResourceGroupId | String | The ID of the resource group to which the image belongs. | Example: rg-bp67acfmxazb4p**** . |
Platform | String | The OS. | Example: Windows Server 2016 . |
OSNameEn | String | The display name of the OS. | Example: Windows Server 2016 Data Center Edition 64bit Chinese Edition . |
ImageName | String | The name of the image. | None. |
OSName | String | None. | None. |
ImageId | String | The ID of an image. | Example: m-bp1g7004ksh0oeuc**** . |
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 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 images that are queried are published community images. | 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
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "Images": { "Type": "DATASOURCE::ECS::Images", "Properties": { "ImageName": "centos_8_5*" } } }, "Outputs": { "ImageIds": { "Value": { "Ref": "Images" } } } }