Available in VPC
Specify a VPC peering instance number to accept or reject the VPC peering request.
Syntax
The acceptOrRejectVpcPeering syntax is as follows:
./ncloud vpc acceptOrRejectVpcPeering \
--vpcPeeringInstanceNo <vpc-peering-instance-no> \
--isAccept <true|false> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running acceptOrRejectVpcPeering.
Required options
The following options are required for acceptOrRejectVpcPeering.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcPeeringInstanceNo |
String | Required | VPC peering instance number |
--isAccept |
Boolean | Required | Whether to accept or reject VPC peering request
|
Common options
For information about the options common to all vpc subcommands, see VPC options.
Examples
If the request to accept or reject a VPC peering request is successful, the instance's configuration information and status are returned.
Command
The command example is as follows:
./ncloud vpc acceptOrRejectVpcPeering \
--vpcPeeringInstanceNo 67890123 \
--isAccept true \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"acceptOrRejectVpcPeeringResponse": {
"totalRows": 1,
"vpcPeeringInstanceList": [
{
"vpcPeeringInstanceNo": "67890123",
"vpcPeeringName": "test-peering",
"regionCode": "KR",
"createDate": "2026-07-07T16:41:47+0900",
"lastModifyDate": "2026-07-07T16:41:47+0900",
"vpcPeeringInstanceStatus": {
"code": "INIT",
"codeName": "Under preparation"
},
"vpcPeeringInstanceStatusName": "Creating",
"vpcPeeringInstanceOperation": {
"code": "CREAT",
"codeName": "CREAT OP"
},
"sourceVpcNo": "12345678",
"sourceVpcName": "test-vpc-01",
"sourceVpcIpv4CidrBlock": "10.0.0.0/16",
"sourceVpcLoginId": "user@example.com",
"targetVpcNo": "12345679",
"targetVpcName": "test-vpc-02",
"targetVpcIpv4CidrBlock": "172.31.0.0/16",
"targetVpcLoginId": "user2@example.com",
"vpcPeeringDescription": "VPC peering example",
"hasReverseVpcPeering": false,
"isBetweenAccounts": true,
"reverseVpcPeeringInstanceNo": ""
}
],
"requestId": "e5f6a7b8-c9d0-1234-efab-567890123456",
"returnCode": "0",
"returnMessage": "success"
}
}