All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::Zones

Last Updated:Nov 26, 2024

DATASOURCE::ECS::Zones is used to query zones.

Syntax

{
  "Type": "DATASOURCE::ECS::Zones",
  "Properties": {
    "IoOptimized": String,
    "InstanceChargeType": String,
    "ResourceType": String,
    "DataDiskCategory": String,
    "InstanceType": String,
    "SystemDiskCategory": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

IoOptimized

String

No

Yes

Specifies whether the instance is I/O optimized.

Valid values:

  • none: The instance is not I/O optimized.

  • optimized (default): The instance is I/O optimized.

InstanceChargeType

String

No

Yes

The billing method of the resource that resides in the zone.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

ResourceType

String

No

Yes

The resource type.

Valid values:

  • instance: Elastic Compute Service (ECS) instance

  • ddh: dedicated host

  • reservedinstance: reserved instance

  • disk: disk

DataDiskCategory

String

No

Yes

The category of the data disk.

Valid values:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • ephemeral_ssd: local SSD

  • cloud_essd: Enterprise SSD (ESSD)

InstanceType

String

No

Yes

The ECS instance type.

None.

SystemDiskCategory

String

No

Yes

The category of the system disk.

Valid values:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • ephemeral_ssd: local SSD

  • cloud_essd: ESSD

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)

  • ZoneIds: the IDs of the zones.

  • Zones: details of the zones.

Property

Type

Description

Constraint

ZoneIds

List

The IDs of the zones.

Example: ['cn-hangzhou-k','cn-hangzhou-i'].

Zones

List

Details of the zones.

None.

ZoneId

String

The zone ID.

None.

Status

String

The status of the resource.

Valid values:

  • Available

  • SoldOut

StatusCategory

String

The inventory status of the resource.

Valid values:

  • WithStock: The resource is in sufficient stock.

  • ClosedWithStock: The resource is in low stock.

  • WithoutStock: The resource is sold out and will be replenished.

  • ClosedWithoutStock: The resource is sold out and will not be replenished.

RegionId

String

The region ID of the zone.

None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceChargeType": {
      "Type": "String",
      "Description": "The billing method of the resource. For more information, see Billing overview. Valid values:\nPrePaid: subscription\nPostPaid: pay-as-you-go\nDefault value: PostPaid.",
      "Default": "PostPaid"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::Zones",
      "Properties": {
        "InstanceChargeType": {
          "Ref": "InstanceChargeType"
        }
      }
    }
  },
  "Outputs": {
    "ZoneIds": {
      "Description": "The list of zone IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ZoneIds"
        ]
      }
    },
    "Zones": {
      "Description": "The list of zones.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Zones"
        ]
      }
    }
  }
}