ALIYUN::VPC::VpcPeerConnection类型用于创建VPC对等连接。
语法
{
"Type": "ALIYUN::VPC::VpcPeerConnection",
"Properties": {
"Description": String,
"DeletionForce": Boolean,
"AcceptingVpcId": String,
"VpcId": String,
"AcceptingRegionId": String,
"AcceptingAliUid": Integer,
"Name": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Description | String | 否 | 是 | 需要创建的VPC对等连接描述信息。 | 长度为2~256个字符,必须以字母或中文开头,但不能以http:// 或https:// 开头。 |
DeletionForce | Boolean | 否 | 是 | 是否强制删除VPC对等连接。 | 取值:
|
AcceptingVpcId | String | 是 | 否 | 需要创建的VPC对等连接接收端的VPC ID。 | 输入与发起端的VPC ID不同的VPC ID。 |
VpcId | String | 是 | 否 | 需要创建的VPC对等连接发起端的VPC ID。 | 无 |
AcceptingRegionId | String | 否 | 否 | 需要创建的VPC对等连接接收端的地域ID。 | 取值:
|
AcceptingAliUid | Integer | 否 | 否 | 需要创建的VPC对等连接接收端的阿里云账号(主账号)ID。 | 取值:
说明 如果接收端的账号为RAM用户(子账号),则AcceptingAliUid需要输入该RAM用户对应的阿里云账号ID。 |
Name | String | 否 | 是 | 需要创建的VPC对等连接名称。 | 名称长度为2~128个字符,以英文字母或中文开头,可包含数字、下划线(_)和短划线(-)。 |
返回值
Fn::GetAtt
InstanceId:VPC实例ID。
示例
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "AcceptingVpcId": { "Type": "String", "Description": "The ID of the acceptor VPC." }, "VpcId": { "Type": "String", "Description": "The ID of the requester VPC." } }, "Resources": { "VpcPeerConnection": { "Type": "ALIYUN::VPC::VpcPeerConnection", "Properties": { "AcceptingVpcId": { "Ref": "AcceptingVpcId" }, "VpcId": { "Ref": "VpcId" } } } }, "Outputs": { "InstanceId": { "Description": "The ID of the VPC peering connection.", "Value": { "Fn::GetAtt": [ "VpcPeerConnection", "InstanceId" ] } } } }