DATASOURCE::ECS::Disks is used to query the Elastic Block Storage (EBS) devices that you created. The following EBS devices are supported: cloud disks and local disks.
Syntax
{
"Type": "DATASOURCE::ECS::Disks",
"Properties": {
"Status": String,
"DiskIds": List,
"EnableShared": String,
"Category": String,
"KMSKeyId": String,
"ResourceGroupId": String,
"ZoneId": String,
"InstanceId": String,
"Encrypted": Boolean,
"DeleteWithInstance": Boolean,
"DeleteAutoSnapshot": String,
"EnableAutomatedSnapshotPolicy": Boolean,
"DiskChargeType": String,
"EnableAutoSnapshot": Boolean,
"AutoSnapshotPolicyId": String,
"DiskName": String,
"MultiAttach": String,
"DiskType": String,
"SnapshotId": String,
"Portable": String,
"Filters": List,
"AdditionalAttributes": List,
"Tags": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Status | String | No | Yes | The status of the cloud disk. | Default value: All. Valid values:
|
DiskIds | List | No | Yes | The IDs of the cloud disks or local disks. | You can specify up to 100 IDs. Separate the IDs with commas (,).
Example: |
EnableShared | String | No | Yes | Specifies whether the disk is a Shared Block Storage device. | Default value: false. Valid values:
|
Category | String | No | Yes | The category of the cloud disk or the local disk. | Valid values:
|
KMSKeyId | String | No | Yes | The ID of the Key Management Service (KMS) key that is used by the cloud disk. | None. |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the cloud disk or the local disk belongs. | None. |
ZoneId | String | No | Yes | The ID of the zone. | None. |
InstanceId | String | No | Yes | The ID of the instance to which you attach the cloud disk or the local disk. | None. |
Encrypted | Boolean | No | Yes | Specifies whether the cloud disk is encrypted. | Default value: false. Valid values:
|
DeleteWithInstance | Boolean | No | Yes | Specifies whether to release the cloud disk when you release the instance to which the disk is attached. | Default value: false. Valid values:
|
DeleteAutoSnapshot | String | No | Yes | Specifies whether to delete the automatic snapshot of the cloud disk when you release the cloud disk. | Default value: false. Valid values:
|
EnableAutomatedSnapshotPolicy | Boolean | No | Yes | Specifies whether an automatic snapshot policy is configured for the cloud disk. | Default value: false. Valid values:
|
DiskChargeType | String | No | Yes | The billing method of the cloud disk or local disk. | Valid values:
|
EnableAutoSnapshot | Boolean | No | Yes | Specifies whether to enable the automatic snapshot policy for the cloud disk. | Default value: false. Valid values:
|
AutoSnapshotPolicyId | String | No | Yes | The ID of the automatic snapshot policy that is applied to the cloud disk. | None. |
DiskName | String | No | Yes | The name of the cloud disk or local disk. | None. |
MultiAttach | String | No | Yes | Specifies whether to enable the multi-attach feature. | Valid values:
|
DiskType | String | No | Yes | The type of the cloud disk or local disk that you want to query. | Default value: all. Valid values:
|
SnapshotId | String | No | Yes | The ID of the snapshot from which you create the cloud disk. | None. |
Portable | String | No | Yes | Specifies whether the cloud disk or the local disk is removable. | Valid values:
|
Filters | List | No | Yes | The filters that are used to query resources. | Valid values: 1 and 2.
For more information, see Filters properties. |
AdditionalAttributes | List | No | Yes | The additional attributes of the disk. | Set the value of this property to IOPS, which specifies the maximum IOPS of the disk that you want to query. |
Tags | List | No | Yes | The tags of the cloud disk or local disk. | For more information, see Tags properties. |
Filters syntax
"Filters": [
{
"Value": String,
"Key": String
}
]
Filters properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | No | No | The value of the filter. | Example: 2021-12-12T12:12Z .
|
Key | String | Yes | No | The key of the filter. | Example: CreationStartTime .
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Value | String | No | No | The value of the tag. | None. |
Key | String | Yes | No | The key of the tag. | None. |
Return values (Fn::GetAtt)
- DiskIds: the IDs of cloud disks or local disks.
- Disks: the details of the cloud disks or local disks.
Property | Type | Description | Constraint |
---|---|---|---|
DiskIds | List | The IDs of cloud disks or local disks. | Example: ['d-bp180bogui4ky7o4****','d-bp180bogui4ky7o4****'] .
|
Disks | List | The details of the cloud disks or local disks. | None. |
Type | String | The type of the cloud disk or local disk. | None. |
Status | String | The status of the cloud disk. | None. |
SerialNumber | String | The serial number of the cloud disk or local disk. | Example: bp18um4r4f2fve2**** .
|
PerformanceLevel | String | The performance level (PL) of the ESSD. | Valid values:
|
EnableAutoSnapshot | Boolean | Indicates whether the automatic snapshot policy is enabled for the cloud disk. | None. |
StorageSetId | String | The ID of the storage set. | Example: ss-i-bp1j4i2jdf3owlhe**** .
|
DiskId | String | The ID of the cloud disk or local disk. | Example: d-bp18um4r4f2fve24**** .
|
StorageSetPartitionNumber | Integer | The maximum number of partitions in the storage set. | None. |
MultiAttach | String | Indicates whether the multi-attach feature is enabled. | None. |
DeleteAutoSnapshot | Boolean | Indicates whether the automatic snapshot of the cloud disk is deleted when you release the disk. | None. |
Encrypted | Boolean | Indicates whether the cloud disk is encrypted. | None. |
IOPSRead | Integer | The number of read operations per second. | |
MountInstanceNum | Integer | The number of instances to which the Shared Block Storage device is attached. | None. |
Description | String | The description of the cloud disk or local disk. | None. |
Device | String | The device name of the instance to which the cloud disk or local disk is attached. | If you set the Status property to In_use, this property is returned. This property
is empty for cloud disks for which the multi-attach feature is enabled.
Example: |
DiskName | String | The name of the cloud disk or local disk. | None. |
Portable | Boolean | Indicates whether the cloud disk or local disk is removable. | None. |
StorageClusterId | String | The ID of the dedicated block storage cluster to which the cloud disk belongs. | If your cloud disk belongs to a public block storage cluster, this property is empty. |
ImageId | String | The ID of the image that is used to create the Elastic Compute Service (ECS) instance. | This property is returned only if cloud disks are created from images. Otherwise, this property is empty. |
DeleteWithInstance | Boolean | Indicates whether the cloud disk is released when you release the instance to which the disk is attached. | None. |
KMSKeyId | String | The ID of the KMS key that is used by the cloud disk. | None. |
DetachedTime | String | The time when the cloud disk was last detached. The time is displayed in UTC. | Example: 2021-06-07T21:01:22Z .
|
SourceSnapshotId | String | The ID of the snapshot from which the cloud disk is created. | If the cloud disk is not created from a snapshot, this property is empty. |
AutoSnapshotPolicyId | String | The ID of the automatic snapshot policy that is applied to the cloud disk. | None. |
EnableAutomatedSnapshotPolicy | Boolean | Indicates whether an automatic snapshot policy is configured for the cloud disk. | None. |
IOPSWrite | Integer | The number of write operations per second. | |
InstanceId | String | The ID of the instance to which the cloud disk or local disk is attached. | None. |
IOPS | Integer | The number of I/O per second. | |
ExpiredTime | String | The time when the subscription cloud disk expired. The time is displayed in UTC. | Example: 2021-07-07T16:00Z .
|
Size | Integer | The size of the cloud disk or local disk. | Example: 60. |
ResourceGroupId | String | The ID of the resource group to which the cloud disk or local disk belongs. | None. |
ZoneId | String | The ID of the zone to which the cloud disk or local disk belongs. | None. |
DiskChargeType | String | The billing method of the cloud disk or local disk. | None. |
Category | String | The category of the cloud disk or local disk. | None. |
AttachedTime | String | The time when the cloud disk was last attached. The time is displayed in UTC. | Example: 2021-06-05T21:01:22Z .
|
ProductCode | String | The product code of the disk in Alibaba Cloud Marketplace. | None. |
OperationLocks | List | The reasons why the cloud disk or local disk is locked. | None. |
Tags | List | The tags of the cloud disk or local disk. | Sample value:
|
Attachments | List | The attachment information about the cloud disk. | The value is a list that consists of the values in Attachment. This value is not returned
when you query Shared Block Storage devices.
Example:
|
Examples
-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Resources": { "Disks": { "Type": "DATASOURCE::ECS::Disks", "Properties": { "Filters": [ { "Key": "CreationStartTime", "Value": "2021-12-12T12:12Z" } ] } } }, "Outputs": { "Disks": { "Value": { "Fn::GetAtt": [ "Disks", "Disks" ] } }, "DisksIds": { "Value": { "Fn::GetAtt": [ "Disks", "DiskIds" ] } } } }