ALIYUN::PVTZ::Zone用于创建PrivateZone。
关于PrivateZone的更多信息,请参见什么是PrivateZone。
语法
{
"Type": "ALIYUN::PVTZ::Zone",
"Properties": {
"ProxyPattern": String,
"Remark": String,
"ZoneName": String,
"ZoneTag": String,
"ZoneType": String,
"ResourceGroupId": String,
"Tags": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
ProxyPattern | String | 否 | 是 | 代理模式。 | 取值:
|
Remark | String | 否 | 是 | 备注信息。 | 无 |
ResourceGroupId | String | 否 | 是 | PrivateZone所属的资源组ID。 | 无 |
ZoneName | String | 是 | 否 | 可用区名称。 | 无 |
ZoneTag | String | 否 | 否 | 可用区标签。 | 若ZoneType取值为AUTH_ZONE时,则忽略此属性。 |
ZoneType | String | 否 | 否 | 可用区类型。 | 取值:
|
Tags | List | 否 | 是 | 自定义标签。 | 更多信息,请参见Tags属性。 |
Tags语法
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Key | String | 是 | 否 | 标签键。 | 长度为1~128个字符,不能以aliyun 和acs: 开头,不能包含http:// 或https:// 。
|
Value | String | 否 | 否 | 标签值。 | 长度为0~128个字符,不能以aliyun 和acs: 开头,不能包含http:// 或https:// 。
|
返回值
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示例。