All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::SLB::Zones

Last Updated:Mar 30, 2023

DATASOURCE::SLB::Zones is used to query the zones in which Server Load Balancer (SLB) instances are deployed.

Syntax

{
  "Type": "DATASOURCE::SLB::Zones",
  "Properties": {
    "AddressIPVersion": String,
    "AddressType": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AddressIPVersion

String

No

Yes

The type of the IP address.

Valid values:

  • ipv4

  • ipv6

AddressType

String

No

Yes

The network type of a specific instance.

Valid values:

  • vpc: an internal-facing SLB instance that is deployed in a virtual private cloud (VPC)

  • classic_internet: an Internet-facing SLB instance that is deployed in the classic network

  • classic_intranet: an internal-facing SLB instance that is deployed in the classic network

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.

None.

Zones

List

Details of the zones.

None.

ZoneId

String

The ID of the zone.

Example: cn-hangzhou-b.

SlaveZoneId

String

The ID of the secondary zone.

Example: cn-hangzhou-g.

SupportResources

List

The supported resource properties.

Example: [ { "AddressIPVersion": "ipv4", "AddressType": "classic_internet" }, {"AddressIPVersion": "ipv4", "AddressType": "classic_intranet"}, {"AddressIPVersion": "ipv4", "AddressType": "vpc" }].

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AddressIPVersion": {
      "Type": "String",
      "Description": "The type of IP address.\nValid values: ipv4 and ipv6.",
      "Default": "ipv4"
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::SLB::Zones",
      "Properties": {
        "AddressIPVersion": {
          "Ref": "AddressIPVersion"
        }
      }
    }
  },
  "Outputs": {
    "ZoneIds": {
      "Description": "The list of The primary zone Ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ZoneIds"
        ]
      }
    },
    "Zones": {
      "Description": "The list of The Zones.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Zones"
        ]
      }
    }
  }
}