Getting Information About Your Net Peerings
You can get information about one or more Net peerings.
By default, this action describes all your Net peerings. Connections that are in the failed
, expired
, or deleted
states remain visible for 1 hour. For more information, see About Net Peerings > Lifecycle.
Getting Information About Your Net Peerings Using OSC CLI
The ReadNetPeerings command lists one or more peering connections between two Nets.
$ osc-cli api ReadNetPeerings --profile "default" \
--Filters '{
"NetPeeringIds": ["pcx-12345678"],
}'
$ osc-cli api ReadNetPeerings --profile "default" \
--Filters '{
"SourceNetNetIds": ["vpc-12345678"],
"StateNames": ["active", "pending-acceptance"],
}'
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. -
Filters
: (optional) One or more filters. -
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1`and `1000
, both included). By default,100
.
The ReadNetPeerings command returns the following elements:
-
NetPeerings
: Information about one or more Net peerings. -
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"NetPeerings": [
{
"Tags": [],
"State": {
"Name": "active",
"Message": "Active"
},
"AccepterNet": {
"NetId": "vpc-12345678",
"IpRange": "172.16.0.0/16",
"AccountId": "123456789012"
},
"SourceNet": {
"NetId": "vpc-12345678",
"IpRange": "10.0.0.0/16",
"AccountId": "123456789012"
},
"NetPeeringId": "pcx-12345678"
}
]
}
Getting Information About Your VPC Peering Connections Using AWS CLI
To get information about one or more VPC peering connections, use the describe-vpc-peering-connections command following this syntax:
$ aws ec2 describe-vpc-peering-connections \
--profile YOUR_PROFILE \
--vpc-peering-connection-ids pcx-111aaa11 \
--filters Name=status-code,Values=pending-acceptance \
--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. -
(optional)
vpc-peering-connection-ids
: The IDs of one or more VPC peering connections you want to get information about. -
(optional)
filters
: One or more filters, in the "Name=X,Values=Y" format.You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.
The following filters are available:
-
accepter-vpc-info.cidr-block
: The range of IPs of the accepter VPC, in CIDR notation. -
accepter-vpc-info.owner-id
: The account ID of the owner of the accepter VPC. -
accepter-vpc-info.vpc-id
: The ID of the accepter VPC. -
expiration-time
: The date after which the connection expires (for example, 2016-01-23T18:45:30.000Z). -
requester-vpc-info.cidr-block
: The range of IPs of the requester VPC, in CIDR notation. -
requester-vpc-info.owner-id
: The account ID of the owner of the requester VPC. -
requester-vpc-info.vpc-id
: The ID of the requester VPC. -
status-code
: The state of the VPC peering connection (pending-acceptance
|active
|rejected
|failed
|expired
|deleted
).To view all VPC peering connection requests in the
pending-acceptance
state for your VPCs, use thestatus-code
filter with thepending-acceptance
value. -
status-message: Additional information about the state of the VPC peering connection.
-
vpc-peering-connection-id
: The ID of the VPC peering connection. -
tag-key
: The key of a tag associated with the resource. -
tag-value
: The value of a tag associated with the resource. -
tag:XXXX
: The value of a tag associated with the resource, whereXXXX
is the key of the tag.To filter a tag whose key is
XXXX
and value isYYYY
, you can therefore use either of the following two formats:-
--filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY
-
--filters Name=tag:XXXX,Values=YYYY
-
-
-
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The describe-vpc-peering-connections command returns the following elements:
-
VpcPeeringConnections
: Information about one or more VPC peering connections. This element contains the following information:-
AccepterVpcInfo
: Information about the accepter VPC. This element contains the following information:-
CidrBlock
: The range of IPs of the VPC, in CIDR notation. -
OwnerID
: The account ID of the owner of the VPC. -
VpcId
: The ID of the VPC.
-
-
ExpirationTime
: The date after which a VPC peering connection request in thepending-acceptance
state expires. -
RequesterVpcInfo
: Information about the requester VPC. This element contains the following information:-
CidrBlock
: The range of IPs of the VPC, in CIDR notation. -
OwnerID
: The account ID of the owner of the VPC. -
VpcId
: The ID of the VPC.
-
-
Status
: Information about the state of the VPC peering connection. This element contains the following information:-
Code
: The state of the VPC peering connection (pending-acceptance
|active
|rejected
|failed
|expired
|deleted
). -
Message
: Additional information about the state of the VPC peering connection.
-
-
Tags
: One or more associated with the VPC peering connection. This element contains the following information:-
Key
: The key of the tag. -
Value
: The value of the tag.
-
-
VpcPeeringConnectionId
: The ID of the VPC peering connection.
-
{
"VpcPeeringConnections": [
{
"AccepterVpcInfo": {
"CidrBlock": "172.16.0.0/28",
"OwnerId": "888877776666",
"VpcId": "vpc-11122233"
},
"RequesterVpcInfo": {
"CidrBlock": "10.0.0.0/28",
"OwnerId": "444455556666",
"VpcId": "vpc-1a2b3c4d"
}
"Status": {
"Code": "pending-acceptance",
"Message": "Pending acceptance by 888877776666"
},
"Tags": [],
"VpcPeeringConnectionId": "pcx-111aaa11"
}
]
}
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.