DATASOURCE::ECS::DiskCategories is used to query the type and the category of a disk.

Syntax

{
  "Type": "DATASOURCE::ECS::DiskCategories",
  "Properties": {
    "Type": String,
    "ZoneId": String,
    "DataDiskCategory": String,
    "InstanceType": String,
    "SystemDiskCategory": String
  }
}

Properties

Property Type Required Editable Description Constraint
Type String Yes Yes The type of the disk that you want to query. Valid values:
  • system: system disk
  • data: data disk
ZoneId String Yes Yes The ID of the zone. None.
DataDiskCategory String No Yes The category of the data disk. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: enhanced SSD (ESSD)
Note This property takes effect when you set the Type property to data.
InstanceType String No Yes The type of the Elastic Compute Service (ECS) instance. For more information, see Instance family and DescribeInstanceTypes.
SystemDiskCategory String No Yes The category of the system disk. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: ESSD
Note This property takes effect when you set the Type property to system.

Return values (Fn::GetAtt)

Property Type Description Constraint
DiskCategoryIds List The disk categories. Example: ["cloud_ssd", "cloud_essd", "cloud_efficiency"].
DiskCategories List The details of the disk. The details include the type and the category of the disk.
Type String The type of the disk. Valid values:
  • system: system disk
  • data: data disk
DiskCategory String The category of the disk. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: ESSD

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": "The resource type to query.\nIf you set Type to data,you can specify the InstanceType parameter to disk.\nIf you set Type to system, you must specify the InstanceType parameter.\nValid values:\nsystem: system disk\ndata: data disk",
      "AllowedValues": [
        "system",
        "data"
      ]
    },
    "ZoneId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Description": "The ID of the zone for which to query resources."
    },
    "DataDiskCategory": {
      "Type": "String",
      "Description": "The category of the data disk. Valid values: \ncloud: basic disk\ncloud_efficiency: ultra disk\ncloud_ssd: standard SSD\nephemeral_ssd: local SSD\ncloud_essd: ESSD",
      "AllowedValues": [
        "cloud",
        "cloud_efficiency",
        "cloud_ssd",
        "ephemeral_ssd",
        "cloud_essd"
      ]
    },
    "SystemDiskCategory": {
      "Type": "String",
      "Description": "The category of the system disk. Valid values: \ncloud: basic disk\ncloud_efficiency: ultra disk\ncloud_ssd: standard SSD\nephemeral_ssd: local SSD\ncloud_essd: ESSD",
      "AllowedValues": [
        "cloud",
        "cloud_efficiency",
        "cloud_ssd",
        "ephemeral_ssd",
        "cloud_essd"
      ]
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::DiskCategories",
      "Properties": {
        "Type": {
          "Ref": "Type"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DataDiskCategory": {
          "Ref": "DataDiskCategory"
        },
        "SystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        }
      }
    }
  },
  "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"
        ]
      }
    }
  }
}