All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::DiskCategories

最終更新日:Nov 19, 2024

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:

  • system: system disk

  • data: data disk

ZoneId

String

Yes

Yes

The zone ID.

None.

DataDiskCategory

String

No

Yes

The data disk category.

Valid values:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • ephemeral_ssd: local SSD

  • cloud_essd: Enterprise SSD (ESSD)

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:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • ephemeral_ssd: local SSD

  • cloud_essd: ESSD

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:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values (Fn::GetAtt)

  • DiskCategoryIds: the disk categories.

  • DiskCategories: details of the disk categories.

Property

Type

Description

Constraint

DiskCategoryIds

List

The disk categories.

Example: ["cloud_ssd", "cloud_essd", "cloud_efficiency"].

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:

  • system: system disk

  • data: data disk

DiskCategory

String

The disk category.

Valid values:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • ephemeral_ssd: local SSD

  • cloud_essd: ESSD

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"
        ]
      }
    }
  }
}