createVpcPeeringInstance

Prev Next

Available in VPC

Create a VPC peering instance through the peering request.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET | POST /vpc/v2/createVpcPeeringInstance
Note

This guide is based on the GET method. POST method call tests can be performed through Swagger in the API Gateway service of the NAVER Cloud Platform console.

Request headers

For information about the headers common to all VPC APIs, see VPC common headers.

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
regionCode String Optional Region code where you want to create a VPC peering instance
vpcPeeringName String Optional Name of the VPC peering to create
  • Granted automatically by NAVER Cloud Platform (default)
  • 3 to 30 characters, including letters, numbers, and the special character "-". It must begin with an English letter and end with an English letter or number.
sourceVpcNo String Required VPC number sending the peering request
targetVpcNo String Required VPC number receiving the peering request
  • See getVpcList on the account receiving the request.
  • If the VPC sending the peering request and the VPC receiving the request have overlapping IPv4 CIDR blocks, then they can't be connected via VPC peering.
targetVpcName String Conditional Name of the VPC receiving the peering request
  • If the account receiving the peering request is different from the sending account, you must enter the name of the VPC receiving the request.
targetVpcLoginId String Conditional VPC owner ID (in email format) receiving the peering request
  • If the account receiving the request is different from the account sending the request, you must enter the account receiving the request.
vpcPeeringDescription String Optional Description of VPC peering you want to create (byte)
  • 0-1000
responseFormatType String Optional Format of the response result
  • xml (default) | json

Request example

The request example is as follows:

curl --location 'https://ncloud.apigw.ntruss.com/vpc/v2/createVpcPeeringInstance?regionCode=KR
&vpcPeeringName=test-***
&sourceVpcNo=***05
&targetVpcNo=***06' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

See VpcPeeringInstanceList for the response body.

Response status codes

For information about the HTTP status codes common to all VPC APIs, see VPC response status codes.

Response example

The response example is as follows:

<createVpcPeeringInstanceResponse>
  <requestId>450c98e2-dca5-46f7-9f35-5ec1a1728213</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <vpcPeeringInstanceList>
    <vpcPeeringInstance>
      <vpcPeeringInstanceNo>***6212</vpcPeeringInstanceNo>
      <vpcPeeringName>test-***</vpcPeeringName>
      <regionCode>KR</regionCode>
      <createDate>2020-08-07T17:53:06+0900</createDate>
      <lastModifyDate>2020-08-05T20:53:16+0900</lastModifyDate>
      <vpcPeeringInstanceStatus>
        <code>INIT</code>
        <codeName>init</codeName>
      </vpcPeeringInstanceStatus>
      <vpcPeeringInstanceStatusName>Creating</vpcPeeringInstanceStatusName>
      <vpcPeeringInstanceOperation>
        <code>NULL</code>
        <codeName>NULL OP</codeName>
      </vpcPeeringInstanceOperation>
      <sourceVpcNo>***05</sourceVpcNo>
      <sourceVpcName>test-***</sourceVpcName>
      <sourceVpcIpv4CidrBlock>***.**1.0.0/16</sourceVpcIpv4CidrBlock>
      <sourceVpcLoginId>test-***@naver.com</sourceVpcLoginId>
      <targetVpcNo>***06</targetVpcNo>
      <targetVpcName>test-***</targetVpcName>
      <targetVpcIpv4CidrBlock>***.**2.0.0/16</targetVpcIpv4CidrBlock>
      <targetVpcLoginId>test-***@naver.com</targetVpcLoginId>
      <vpcPeeringDescription></vpcPeeringDescription>
      <hasReverseVpcPeering>false</hasReverseVpcPeering>
      <isBetweenAccounts>false</isBetweenAccounts>
      <reverseVpcPeeringInstanceNo></reverseVpcPeeringInstanceNo>
    </vpcPeeringInstance>
  </vpcPeeringInstanceList>
</createVpcPeeringInstanceResponse>