Rejecting a Net Peering
You can reject a Net peering requested between one of your Nets and another Net.
This action updates the state of the connection from pending-acceptance
to rejected
. For more information, see About Net Peerings > Lifecycle.
Rejecting a Net Peering Using Cockpit v2
-
In the Net Peerings dashboard, check the box of the Net peering you want to reject.
The Net peering is selected. -
Click Reject.
A confirmation dialog box appears. -
Click Reject.
The Net peering is rejected.A rejected Net peering remains visible for 1 hour.
Rejecting a Net Peering Using OSC CLI
The RejectNetPeering command rejects a Net peering request.
The Net peering must be in the pending-acceptance
state to be rejected. The rejected Net peering is then in the rejected
state.
$ osc-cli api RejectNetPeering --profile "default" \
--NetPeeringId "pcx-12345678"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
NetPeeringId
: The ID of the Net peering you want to reject.
The RejectNetPeering command returns the following elements:
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Rejecting a VPC Peering Connection Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To reject a VPC peering connection, use the reject-vpc-peering-connection command following this syntax:
$ aws ec2 reject-pc-peering-connection \
--profile YOUR_PROFILE \
--vpc-peering-connection-id pcx-111aaa11 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
vpc-peering-connection-id
: The ID of the VPC peering connection you want to reject. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The reject-vpc-peering-connection command returns a boolean result:
-
Return
: Iftrue
, the specified VPC peering connection is rejected. Otherwise, an error has occurred.
A rejected VPC peering connection remains visible for 1 hour. |
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.