Getting Information About Your VPCs
You can get information about one or more of your Virtual Private Clouds (VPCs), like their CIDR block or their tenancy option.
Information about your VPCs is also available from within the associated instances themselves. For more information, see Accessing the Metadata and User Data of an Instance.
Getting Information About Your VPCs Using Cockpit v1
See VPC User Interface. |
Getting Information About Your Nets Using OSC CLI
See the ReadNets command sample in the documentation of the OUTSCALE API. |
Getting Information About Your VPCs Using AWS CLI
Getting General Information About A VPC
To get general information about one or more of your VPCs, use the describe-vpcs command following this syntax:
$ aws ec2 describe-vpcs \
--profile YOUR_PROFILE \
--vpc-ids vpc-12345678 \
[--filters NOT_SPECIFIED] \
--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-ids
: One or more IDs of VPCs. -
(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:
-
vpc-id
: The ID of the VPC. -
state
: The state of the VPC. For more information, see About VPCs. -
cidr
: The exact CIDR block of the VPC. -
cidr-block
: The exact CIDR block of the VPC (similar tocidr
andcidrBlock
). -
cidrBlock
: The exact CIDR block of the VPC (similar tocidr
andcidr-block
). -
dhcp-options-id
: The ID of a DHCP options set associated with the VPC. For more information, see About DHCP Options. -
is-default
: Indicates whether the VPC is the default one (alwaysfalse
, as 3DS OUTSCALE does not provide default VPCs.) -
isDefault
: Alias to theis-default
filter. -
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-vpcs command returns the following elements:
-
Vpcs
: Information about one or more VPCs. This element contains the following information:-
VpcId
: The ID of the VPC. -
InstanceTenancy
: The tenancy option for the instances launched into the VPC. For more information, see About Instances > Instance Tenancy and Dedicated Instances. -
Tags
: One or more tags associated with the VPC. This element contains the following information:-
Value
: The value of the tag. -
Key
: The key of the tag.
-
-
State
: The state of the VPC. For more information, see About VPCs. -
DhcpOptionsId
: The ID of the DHCP options set associated with the VPC. For more information, see About DHCP Options. -
CidrBlock
: The range of IPs for the VPC, in CIDR notation. -
IsDefault
: Alwaysfalse
, as 3DS OUTSCALE does not provide default VPCs.
-
"Vpcs": [
{
"VpcId": "vpc-12345678",
"InstanceTenancy": "default",
"Tags": [
{
"Value": "VPC1",
"Key": "Name"
}
],
"State": "available",
"DhcpOptionsId": "dopt-1234abcd",
"CidrBlock": "10.0.0.0/16",
"IsDefault": false
}
]
}
Getting Information About an Attribute of a VPC
To get information about an attribute of a specified VPC, use the describe-vpc-attribute command following this syntax:
$ aws ec2 describe-vpc-attribute \
--profile YOUR_PROFILE \
--vpc-id vpc-123456789 \
--attribute enableDnsSupport \
--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-id
: The ID of the VPC. -
attribute
: The name of the attribute (enableDnsSupport
|enableDnsHostnames
).You can specify only one attribute at a time.
-
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The describe-vpc-attribute command returns the following elements:
-
VpcId
: The ID of the VPC. -
EnableDnsSupport
, if you specified it as the attribute to describe. This element contains the following information:-
Value
: Iftrue
, the DNS servers for the VPC resolve DNS hostnames for your instances to the corresponding IPs. Iffalse
, they do not.
-
-
EnableDnsHostName
, if you specified it as the attribute to describe. This element contains the following information:-
Value
: Iftrue
, instances launched in the VPC get DNS hostnames. Iffalse
, they do not.
-
{
"VpcId": "vpc-a01106c2",
"EnableDnsSupport": {
"Value": true
}
}
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.