ALIYUN::CEN::TransitRouterVpcAttachment類型用於在企業版轉寄路由器下建立Virtual Private Cloud(Virtual Private Cloud)串連。
文法
{
"Type": "ALIYUN::CEN::TransitRouterVpcAttachment",
"Properties": {
"VpcId": String,
"ChargeType": String,
"CenId": String,
"TransitRouterAttachmentName": String,
"ZoneMappings": List,
"VpcOwnerId": Integer,
"TransitRouterAttachmentDescription": String,
"TransitRouterId": String,
"AutoCreateVpcRoute": Boolean,
"DeletionForce": Boolean,
"RouteTablePropagationEnabled": Boolean,
"RouteTableAssociationEnabled": Boolean
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
VpcId | String | 是 | 否 | VPC執行個體ID。 | 無 |
ZoneMappings | List | 是 | 否 | 企業版轉寄路由器的主可用性區域和備可用性區域,您需要分別在企業版轉寄路由器的主備可用性區域中選擇一個交換器執行個體。 | 更多資訊,請參見ZoneMappings屬性。 |
AutoCreateVpcRoute | Boolean | 否 | 否 | 是否自動建立VPC路由條目。 | 取值:
|
CenId | String | 否 | 否 | 雲企業網執行個體ID。 | 無 |
ChargeType | String | 否 | 否 | 付費方式。 | 預設值:POSTPAY,表示隨用隨付。 |
DeletionForce | Boolean | 否 | 否 | 是否強制移除VPC串連。 | 取值:
|
RouteTableAssociationEnabled | Boolean | 否 | 否 | 是否啟動路由關聯轉寄關係。 | 取值:
|
RouteTablePropagationEnabled | Boolean | 否 | 否 | 是否啟用路由學習關係。 | 取值:
|
TransitRouterAttachmentDescription | String | 否 | 是 | VPC串連的描述資訊。 | 長度為2~256個字元,必須以英文字母或漢字開頭,但不能以 |
TransitRouterAttachmentName | String | 否 | 是 | VPC串連的名稱。 | 長度為2~128個字元,以英文字母或漢字開頭,可包含英文字母、漢字、數字、底線(_)或短劃線(-)。 |
TransitRouterId | String | 否 | 否 | 企業版轉寄路由器執行個體ID。 | 無 |
VpcOwnerId | Integer | 否 | 否 | VPC執行個體所屬帳號ID。 | 預設值為當前登入帳號ID。 |
ZoneMappings文法
"ZoneMappings": [
{
"ZoneId": String,
"VSwitchId": String
}
]
ZoneMappings屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
VSwitchId | String | 是 | 否 | 企業版轉寄路由器的主可用性區域或備可用性區域中的交換器執行個體ID。 | 無 |
ZoneId | String | 是 | 否 | 企業版轉寄路由器的主可用性區域或備可用性區域ID。 | 您可以調用DescribeZones介面查詢可用性區域ID。 |
傳回值
Fn::GetAtt
TransitRouterAttachmentId:VPC串連ID。
VpcId:VPC執行個體ID。
CenId:雲企業網執行個體ID。
TransitRouterAttachmentName:VPC串連的名稱。
ResourceType:資源類型。
ClientToken:用戶端Token,用於保證請求的等冪性。
VpcOwnerId:VPC執行個體所屬帳號ID。預設值為當前登入帳號ID。
TransitRouterAttachmentDescription:VPC串連的描述資訊。
TransitRouterId:企業版轉寄路由器執行個體ID。
樣本
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CenId:
Description: CenId
Type: String
ChargeType:
Description: ''
Type: String
TransitRouterAttachmentDescription:
Description: TransitRouterAttachmentDescription
Type: String
TransitRouterAttachmentName:
Description: TransitRouterAttachmentName
Type: String
TransitRouterId:
Description: TransitRouterId
Type: String
VpcId:
Description: VpcId
Type: String
VpcOwnerId:
Description: VpcOwnerId
Type: Number
ZoneMappings:
Description: ZoneMappingss
MaxLength: 3
Type: Json
Resources:
CENTransitRouterVpcAttachment:
Properties:
CenId:
Ref: CenId
ChargeType:
Ref: ChargeType
TransitRouterAttachmentDescription:
Ref: TransitRouterAttachmentDescription
TransitRouterAttachmentName:
Ref: TransitRouterAttachmentName
TransitRouterId:
Ref: TransitRouterId
VpcId:
Ref: VpcId
VpcOwnerId:
Ref: VpcOwnerId
ZoneMappings:
Ref: ZoneMappings
Type: ALIYUN::CEN::TransitRouterVpcAttachment
Outputs:
CenId:
Description: CenId
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- CenId
ClientToken:
Description: ClientToken
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- ClientToken
ResourceType:
Description: ResourceType
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- ResourceType
TransitRouterAttachmentDescription:
Description: TransitRouterAttachmentDescription
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- TransitRouterAttachmentDescription
TransitRouterAttachmentId:
Description: The first ID of the resource
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- TransitRouterAttachmentId
TransitRouterAttachmentName:
Description: TransitRouterAttachmentName
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- TransitRouterAttachmentName
TransitRouterId:
Description: TransitRouterId
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- TransitRouterId
VpcId:
Description: VpcId
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- VpcId
VpcOwnerId:
Description: VpcOwnerId
Value:
Fn::GetAtt:
- CENTransitRouterVpcAttachment
- VpcOwnerId
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcId": {
"Type": "String",
"Description": "VpcId"
},
"ChargeType": {
"Type": "String",
"Description": ""
},
"CenId": {
"Type": "String",
"Description": "CenId"
},
"TransitRouterAttachmentName": {
"Type": "String",
"Description": "TransitRouterAttachmentName"
},
"ZoneMappings": {
"Type": "Json",
"Description": "ZoneMappingss",
"MaxLength": 3
},
"VpcOwnerId": {
"Type": "Number",
"Description": "VpcOwnerId"
},
"TransitRouterAttachmentDescription": {
"Type": "String",
"Description": "TransitRouterAttachmentDescription"
},
"TransitRouterId": {
"Type": "String",
"Description": "TransitRouterId"
}
},
"Resources": {
"CENTransitRouterVpcAttachment": {
"Type": "ALIYUN::CEN::TransitRouterVpcAttachment",
"Properties": {
"VpcId": {
"Ref": "VpcId"
},
"ChargeType": {
"Ref": "ChargeType"
},
"CenId": {
"Ref": "CenId"
},
"TransitRouterAttachmentName": {
"Ref": "TransitRouterAttachmentName"
},
"ZoneMappings": {
"Ref": "ZoneMappings"
},
"VpcOwnerId": {
"Ref": "VpcOwnerId"
},
"TransitRouterAttachmentDescription": {
"Ref": "TransitRouterAttachmentDescription"
},
"TransitRouterId": {
"Ref": "TransitRouterId"
}
}
}
},
"Outputs": {
"TransitRouterAttachmentId": {
"Description": "The first ID of the resource",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"TransitRouterAttachmentId"
]
}
},
"VpcId": {
"Description": "VpcId",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"VpcId"
]
}
},
"CenId": {
"Description": "CenId",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"CenId"
]
}
},
"TransitRouterAttachmentName": {
"Description": "TransitRouterAttachmentName",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"TransitRouterAttachmentName"
]
}
},
"ResourceType": {
"Description": "ResourceType",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"ResourceType"
]
}
},
"ClientToken": {
"Description": "ClientToken",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"ClientToken"
]
}
},
"VpcOwnerId": {
"Description": "VpcOwnerId",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"VpcOwnerId"
]
}
},
"TransitRouterAttachmentDescription": {
"Description": "TransitRouterAttachmentDescription",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"TransitRouterAttachmentDescription"
]
}
},
"TransitRouterId": {
"Description": "TransitRouterId",
"Value": {
"Fn::GetAtt": [
"CENTransitRouterVpcAttachment",
"TransitRouterId"
]
}
}
}
}