ALIYUN::CEN::TransitRouterVpnAttachment类型用于创建VPN连接。
语法
{
"Type": "ALIYUN::CEN::TransitRouterVpnAttachment",
"Properties": {
"AutoPublishRouteEnabled": Boolean,
"RouteTableAssociationEnabled": Boolean,
"VpnOwnerId": String,
"DeletionForce": Boolean,
"ZoneId": String,
"RouteTablePropagationEnabled": Boolean,
"CenId": String,
"TransitRouterAttachmentName": String,
"Tags": List,
"TransitRouterAttachmentDescription": String,
"TransitRouterId": String,
"VpnId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
VpnId | String | 是 | 否 | IPsec连接ID。 | 无 |
ZoneId | String | 是 | 否 | 可用区ID。 | 无 |
AutoPublishRouteEnabled | Boolean | 否 | 是 | 是否允许转发路由器实例自动向IPsec连接发布路由条目。 | 取值:
|
CenId | String | 否 | 否 | 云企业网实例ID。 | 无 |
DeletionForce | Boolean | 否 | 是 | 是否强制删除VPN连接。 | 取值:
|
RouteTableAssociationEnabled | Boolean | 否 | 否 | 是否启动路由关联转发关系。 | 取值:
|
RouteTablePropagationEnabled | Boolean | 否 | 否 | 是否启用路由学习关系。 | 取值:
|
Tags | List | 否 | 否 | 标签信息列表。 | 一次最多支持输入20个标签信息。更多信息,请参见Tags属性。 |
TransitRouterAttachmentDescription | String | 否 | 是 | VPN连接的描述信息。 | 描述长度为2~256个字符,必须以字母或中文开头,但不能以 |
TransitRouterAttachmentName | String | 否 | 是 | VPN连接的名称。 | 名称长度为2~128个字符,以大小写字母或中文开头,可包含数字、下划线(_)和短划线(-)。 |
TransitRouterId | String | 否 | 是 | 转发路由器实例ID。 | 无 |
VpnOwnerId | String | 否 | 否 | IPsec连接所属的阿里云账号(主账号)ID。 | 参数要求:
|
Tags语法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 资源的标签键。 | 一旦传入该值,则不允许为空字符串。最多支持64个字符,不能以 |
Value | String | 否 | 否 | 资源的标签值。 | 标签值可以为空或输入不超过128个字符的字符串,不能以 |
返回值
Fn::GetAtt
TransitRouterAttachmentId:VPN连接ID。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ZoneId:
AssociationProperty: ZoneId
Type: String
Description:
en: Availability zone ID in the current region.
VpnOwnerId:
Type: String
Description:
en: Alibaba Cloud account (main account) ID to which the IPsec connection belongs.
CenId:
Type: String
Description:
en: The ID of the CEN instance.
TransitRouterAttachmentName:
Type: String
Description:
en: The name of the VPN connection.
TransitRouterId:
Type: String
Description:
en: Forwarding router instance ID
VpnId:
Type: String
Description:
en: IPsec connection ID
Resources:
TransitRouterVpnAttachment:
Type: ALIYUN::CEN::TransitRouterVpnAttachment
Properties:
VpnOwnerId:
Ref: VpnOwnerId
ZoneId:
Ref: ZoneId
CenId:
Ref: CenId
TransitRouterAttachmentName:
Ref: TransitRouterAttachmentName
TransitRouterId:
Ref: TransitRouterId
VpnId:
Ref: VpnId
Outputs:
TransitRouterAttachmentId:
Description: The ID of the VPN connection.
Value:
Fn::GetAtt:
- TransitRouterVpnAttachment
- TransitRouterAttachmentId
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ZoneId": {
"AssociationProperty": "ZoneId",
"Type": "String",
"Description": {
"en": "Availability zone ID in the current region."
}
},
"VpnOwnerId": {
"Type": "String",
"Description": {
"en": "Alibaba Cloud account (main account) ID to which the IPsec connection belongs."
}
},
"CenId": {
"Type": "String",
"Description": {
"en": "The ID of the CEN instance."
}
},
"TransitRouterAttachmentName": {
"Type": "String",
"Description": {
"en": "The name of the VPN connection."
}
},
"TransitRouterId": {
"Type": "String",
"Description": {
"en": "Forwarding router instance ID"
}
},
"VpnId": {
"Type": "String",
"Description": {
"en": "IPsec connection ID"
}
}
},
"Resources": {
"TransitRouterVpnAttachment": {
"Type": "ALIYUN::CEN::TransitRouterVpnAttachment",
"Properties": {
"VpnOwnerId": {
"Ref": "VpnOwnerId"
},
"ZoneId": {
"Ref": "ZoneId"
},
"CenId": {
"Ref": "CenId"
},
"TransitRouterAttachmentName": {
"Ref": "TransitRouterAttachmentName"
},
"TransitRouterId": {
"Ref": "TransitRouterId"
},
"VpnId": {
"Ref": "VpnId"
}
}
}
},
"Outputs": {
"TransitRouterAttachmentId": {
"Description": "The ID of the VPN connection.",
"Value": {
"Fn::GetAtt": [
"TransitRouterVpnAttachment",
"TransitRouterAttachmentId"
]
}
}
}
}