Queries the Elastic Block Storage (EBS) devices that you created, including 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,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Status |
String |
No |
Yes |
The status of the cloud disk. |
Valid values:
|
|
DiskIds |
List |
No |
Yes |
The IDs of the cloud disks or local disks. |
You can specify up to 100 IDs. Separate multiple IDs with commas (,). Example: |
|
EnableShared |
String |
No |
Yes |
Whether the disk is a Shared Block Storage device. |
Valid values:
|
|
Category |
String |
No |
Yes |
The category of the cloud disk or local disk. |
Valid values:
|
|
KMSKeyId |
String |
No |
Yes |
The ID of the Key Management Service (KMS) key used for the cloud disk. |
None. |
|
ResourceGroupId |
String |
No |
Yes |
The ID of the resource group to which the cloud disk or local disk belongs. |
None. |
|
ZoneId |
String |
No |
Yes |
The zone ID. |
None. |
|
InstanceId |
String |
No |
Yes |
The ID of the instance to which the cloud disk or local disk is attached. |
None. |
|
Encrypted |
Boolean |
No |
Yes |
Whether the disk is encrypted. |
Valid values:
|
|
DeleteWithInstance |
Boolean |
No |
Yes |
Whether to release the cloud disk when the associated instance is released. |
Valid values:
|
|
DeleteAutoSnapshot |
String |
No |
Yes |
Whether to delete the automatic snapshots of the cloud disk when the disk is released. |
Valid values:
|
|
EnableAutomatedSnapshotPolicy |
Boolean |
No |
Yes |
Whether an automatic snapshot policy is configured for the cloud disk. |
Valid values:
|
|
DiskChargeType |
String |
No |
Yes |
The billing method of the cloud disk or local disk. |
Valid values:
|
|
EnableAutoSnapshot |
Boolean |
No |
Yes |
Whether the automatic snapshot policy feature is enabled for the cloud disk. |
Valid values:
|
|
AutoSnapshotPolicyId |
String |
No |
Yes |
The ID of the automatic snapshot policy applied to the cloud disk. |
None. |
|
DiskName |
String |
No |
Yes |
The name of the cloud disk or local disk. |
None. |
|
MultiAttach |
String |
No |
Yes |
Whether the multi-attach feature is enabled. |
Valid values:
|
|
DiskType |
String |
No |
Yes |
The type of the cloud disk or local disk to query. |
Valid values:
|
|
SnapshotId |
String |
No |
Yes |
The ID of the snapshot used to create the cloud disk. |
None. |
|
Portable |
String |
No |
Yes |
Whether the cloud disk or local disk is removable. |
Valid values:
|
|
Filters |
List |
No |
Yes |
The filters used to query resources. |
You can specify one to two filters. For more information, see Filters properties. |
|
AdditionalAttributes |
List |
No |
Yes |
The additional attributes. |
Set the value to IOPS to query the maximum IOPS of the disk. |
|
Tags |
List |
No |
Yes |
The tags of the cloud disk or local disk. |
For more information, see Tags properties. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Filters syntax
"Filters": [
{
"Value": String,
"Key": String
}
]
Filters properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Value |
String |
No |
No |
The filter value. |
Example: |
|
Key |
String |
Yes |
No |
The filter key. |
Example: |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Value |
String |
No |
No |
The tag value. |
None. |
|
Key |
String |
Yes |
No |
The tag key. |
None. |
Return values (Fn::GetAtt)
-
DiskIds: the IDs of the cloud disks or local disks.
-
Disks: details of the cloud disks or local disks.
|
Property |
Type |
Description |
Constraint |
|
DiskIds |
List |
The IDs of the cloud disks or local disks. |
Example: |
|
Disks |
List |
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: |
|
PerformanceLevel |
String |
The performance level (PL) of the ESSD. |
Valid values:
|
|
EnableAutoSnapshot |
Boolean |
Indicates whether the automatic snapshot policy feature is enabled for the cloud disk. |
None. |
|
StorageSetId |
String |
The ID of the storage set. |
Example: |
|
DiskId |
String |
The ID of the cloud disk or local disk. |
Example: |
|
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 the disk is released. |
None. |
|
Encrypted |
Boolean |
Indicates whether the disk is an encrypted cloud disk. |
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. |
This property is returned if Status is set to In_use. This property is empty for cloud disks that have the multi-attach feature 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. |
This property is empty if your cloud disk belongs to a public block storage cluster. |
|
ImageId |
String |
The ID of the image 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 the associated instance is released. |
None. |
|
KMSKeyId |
String |
The ID of the KMS key that is used for the cloud disk. |
None. |
|
DetachedTime |
String |
The most recent time when the cloud disk was detached. The time is displayed in UTC. |
Example: |
|
SourceSnapshotId |
String |
The ID of the snapshot used to create the cloud disk. |
This property is empty if the cloud disk is not created from a snapshot. |
|
AutoSnapshotPolicyId |
String |
The ID of the automatic snapshot policy 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 read and write operations per second. |
|
|
ExpiredTime |
String |
The expiration time of the subscription cloud disk. The time is displayed in UTC. |
Example: |
|
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 zone ID of the cloud disk or local disk. |
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 most recent time when the cloud disk was attached. The time is displayed in UTC. |
Example: |
|
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. |
Example:
|
|
Attachments |
List |
The attachment information about the cloud disk. |
The value is a list of Attachment values and is not returned for 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"
]
}
}
}
}
YAML 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