DATASOURCE::ECS::DiskCategories is used to query the information about disk categories.
Syntax
{
"Type": "DATASOURCE::ECS::DiskCategories",
"Properties": {
"Type": String,
"ZoneId": String,
"DataDiskCategory": String,
"InstanceType": String,
"SystemDiskCategory": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Type | String | Yes | Yes | The disk type that you want to query. | Valid values:
|
ZoneId | String | Yes | Yes | The zone ID. | None. |
DataDiskCategory | String | No | Yes | The data disk category. | Valid values:
Note This property takes effect when Type is set to data. |
InstanceType | String | No | Yes | The instance type of the Elastic Compute Service (ECS) instance. | For more information, see Overview of instance families and DescribeInstanceTypes. |
SystemDiskCategory | String | No | Yes | The system disk category. | Valid values:
Note This property takes effect when Type is set to system. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values (Fn::GetAtt)
DiskCategoryIds: the disk categories.
DiskCategories: details of the disk categories.
Property | Type | Description | Constraint |
DiskCategoryIds | List | The disk categories. | Example: |
DiskCategories | List | Details of the disk categories. | The value of DiskCategories consists of the values of Type and DiskCategory. |
Type | String | The disk type. | Valid values:
|
DiskCategory | String | The disk category. | Valid values:
|
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ZoneId:
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Type: String
Description: The ID of the zone for which to query resources.
Resources:
ExtensionDataSource:
Type: DATASOURCE::ECS::DiskCategories
Properties:
SystemDiskCategory: cloud_essd
Type: data
ZoneId:
Ref: ZoneId
Outputs:
DiskCategoryIds:
Description: The list of disk category IDs.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DiskCategoryIds
DiskCategories:
Description: The list of disk categories.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DiskCategories
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ZoneId": {
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"Type": "String",
"Description": "The ID of the zone for which to query resources."
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ECS::DiskCategories",
"Properties": {
"SystemDiskCategory": "cloud_essd",
"Type": "data",
"ZoneId": {
"Ref": "ZoneId"
}
}
}
},
"Outputs": {
"DiskCategoryIds": {
"Description": "The list of disk category IDs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DiskCategoryIds"
]
}
},
"DiskCategories": {
"Description": "The list of disk categories.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DiskCategories"
]
}
}
}
}