ALIYUN::PVTZ::Zone用于创建PrivateZone。

关于PrivateZone的更多信息,请参见什么是PrivateZone

语法

{
  "Type": "ALIYUN::PVTZ::Zone",
  "Properties": {
    "ProxyPattern": String,
    "Remark": String,
    "ZoneName": String,
    "ZoneTag": String,
    "ZoneType": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
ProxyPattern String 代理模式。 取值:
  • ZONE:当前可用区不进行递归解析。
  • RECORD:不完全劫持,进行递归解析代理。
Remark String 备注信息。
ZoneName String 可用区名称。
ZoneTag String 可用区标签。 若ZoneType取值为AUTH_ZONE时,则忽略此属性。
ZoneType String 可用区类型。 取值:
  • AUTH_ZONE(默认值):从权威可用区列表中查询可用区类型。
  • CLOUD_PRODUCT_ZONE:从使用的云产品可用区列表中查询可用区类型。

返回值

Fn::GetAtt

  • ZoneName:可用区名称。
  • ZoneId:可用区ID。
  • ZoneType:可用区类型。
  • ZoneTag:可用区标签。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneName": {
      "Type": "String",
      "Description": "Zone name"
    },
    "ProxyPattern": {
      "Type": "String",
      "Description": "ZONE: completely hijack the entire zone.\nRECORD: Incomplete hijacking, recursive resolution agent.\nDefault to ZONE.",
      "AllowedValues": [
        "RECORD",
        "ZONE"
      ],
      "Default": "ZONE"
    },
    "ZoneTag": {
      "Type": "String",
      "Description": "Zone label. It will be ignored when ZoneType is AUTH_ZONE."
    },
    "ZoneType": {
      "Type": "String",
      "Description": "Zone type. For instance: AUTH_ZONE, CLOUD_PRODUCT_ZONE."
    },
    "Remark": {
      "Type": "String",
      "Description": "50 characters at most. It can only contain numbers, Chinese, English and special characters: \"_-,.,。\".",
      "AllowedPattern": "^[-_,.\\uff0c\\u3002a-zA-Z0-9\\u4e00-\\u9fa5]{0,50}$",
      "MaxLength": 50
    }
  },
  "Resources": {
    "Zone": {
      "Type": "ALIYUN::PVTZ::Zone",
      "Properties": {
        "ZoneName": {
          "Ref": "ZoneName"
        },
        "ProxyPattern": {
          "Ref": "ProxyPattern"
        },
        "ZoneTag": {
          "Ref": "ZoneTag"
        },
        "ZoneType": {
          "Ref": "ZoneType"
        },
        "Remark": {
          "Ref": "Remark"
        }
      }
    }
  },
  "Outputs": {
    "ZoneName": {
      "Description": "Zone name.",
      "Value": {
        "Fn::GetAtt": [
          "Zone",
          "ZoneName"
        ]
      }
    },
    "ZoneId": {
      "Description": "Zone ID.",
      "Value": {
        "Fn::GetAtt": [
          "Zone",
          "ZoneId"
        ]
      }
    },
    "ZoneTag": {
      "Description": "Zone label.",
      "Value": {
        "Fn::GetAtt": [
          "Zone",
          "ZoneTag"
        ]
      }
    },
    "ZoneType": {
      "Description": "Zone type.",
      "Value": {
        "Fn::GetAtt": [
          "Zone",
          "ZoneType"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ProxyPattern:
    AllowedValues:
    - RECORD
    - ZONE
    Default: ZONE
    Description: 'ZONE: completely hijack the entire zone.

      RECORD: Incomplete hijacking, recursive resolution agent.

      Default to ZONE.'
    Type: String
  Remark:
    AllowedPattern: ^[-_,.\uff0c\u3002a-zA-Z0-9\u4e00-\u9fa5]{0,50}$
    Description: "50 characters at most. It can only contain numbers, Chinese, English\
      \ and special characters: \"_-,.\uFF0C\u3002\"."
    MaxLength: 50
    Type: String
  ZoneName:
    Description: Zone name
    Type: String
  ZoneTag:
    Description: Zone label. It will be ignored when ZoneType is AUTH_ZONE.
    Type: String
  ZoneType:
    Description: 'Zone type. For instance: AUTH_ZONE, CLOUD_PRODUCT_ZONE.'
    Type: String
Resources:
  Zone:
    Properties:
      ProxyPattern:
        Ref: ProxyPattern
      Remark:
        Ref: Remark
      ZoneName:
        Ref: ZoneName
      ZoneTag:
        Ref: ZoneTag
      ZoneType:
        Ref: ZoneType
    Type: ALIYUN::PVTZ::Zone
Outputs:
  ZoneId:
    Description: Zone ID.
    Value:
      Fn::GetAtt:
      - Zone
      - ZoneId
  ZoneName:
    Description: Zone name.
    Value:
      Fn::GetAtt:
      - Zone
      - ZoneName
  ZoneTag:
    Description: Zone label.
    Value:
      Fn::GetAtt:
      - Zone
      - ZoneTag
  ZoneType:
    Description: Zone type.
    Value:
      Fn::GetAtt:
      - Zone
      - ZoneType

更多示例,请参见创建PrivateZone、添加PrivateZone解析记录和绑定或解绑Zone与专有网络列表的组合示例:JSON示例YAML示例