All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::VpcPeerConnection

Last Updated:Jun 23, 2026

Creates a peering connection between virtual private clouds (VPCs).

Syntax

{
  "Type": "ALIYUN::VPC::VpcPeerConnection",
  "Properties": {
    "Description": String,
    "DeletionForce": Boolean,
    "AcceptingVpcId": String,
    "VpcId": String,
    "AcceptingRegionId": String,
    "AcceptingAliUid": Integer,
    "Name": String,
    "ResourceGroupId": String,
    "Bandwidth": Integer,
    "LinkType": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Description

String

No

Yes

The description of the VPC peering connection.

The description must be 2 to 256 characters long. It must start with a letter or a Chinese character and must not start with http:// or https://.

DeletionForce

Boolean

No

Yes

Specifies whether to forcibly delete the VPC peering connection.

Valid values:

  • true

  • false

AcceptingVpcId

String

Yes

No

The ID of the acceptor VPC.

The ID of the acceptor VPC must be different from the ID of the requester VPC.

VpcId

String

Yes

No

The ID of the requester VPC.

None.

AcceptingRegionId

String

No

No

The region ID of the acceptor VPC.

Valid values:

  • For an intra-region VPC peering connection, specify the same region ID as the requester VPC.

  • For an inter-region VPC peering connection, specify a region ID that is different from the region ID of the requester VPC.

AcceptingAliUid

Integer

No

No

The ID of the Alibaba Cloud account to which the acceptor VPC belongs.

Valid values:

  • For a same-account peering connection, specify your own Alibaba Cloud account ID.

  • For a cross-account peering connection, specify the peer Alibaba Cloud account ID.

Note

If the acceptor VPC belongs to a Resource Access Management (RAM) user, specify the ID of the Alibaba Cloud account to which the RAM user belongs.

Name

String

No

Yes

The name of the VPC peering connection.

The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.

ResourceGroupId

String

No

No

The resource group ID.

None

Bandwidth

Integer

No

No

The bandwidth of the VPC peering connection.

Unit: Mbps. The value must be an integer greater than 0.

Note

This parameter applies only to inter-region VPC peering connections.

LinkType

String

No

No

The link type.

Valid values:

  • Platinum

  • Gold (default)

Return values

Fn::GetAtt

InstanceId: the ID of the VPC peering connection instance.

Examples

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 instance ID of the VPC peering connection.
    Value:
      Fn::GetAtt:
        - VpcPeerConnection
        - InstanceId
{
  "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 instance ID of the VPC peering connection.",
      "Value": {
        "Fn::GetAtt": [
          "VpcPeerConnection",
          "InstanceId"
        ]
      }
    }
  }
}