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.

If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

This procedure uses AWS CLI only. Information about your VPCs is also available:

Getting General Information About Your VPCs

To get general information about one or more of your VPCs, use the describe-vpcs command following this syntax:

Request sample
$ 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 (pending | available). For more information, see About VPCs.

    • cidr: The exact CIDR block of the VPC.

    • cidr-block: The exact CIDR block of the VPC (similar to cidr and cidrBlock).

    • cidrBlock: The exact CIDR block of the VPC (similar to cidr and cidr-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 (always false, as 3DS OUTSCALE does not provide default VPCs.)

    • isDefault: Alias to the is-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, where XXXX is the key of the tag.

      To filter a tag whose key is XXXX and value is YYYY, 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: Always false, as 3DS OUTSCALE does not provide default VPCs.

Result sample
     "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:

Request sample
$ 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: If true, the DNS servers for the VPC resolve DNS hostnames for your instances to the corresponding IPs. If false, they do not.

  • EnableDnsHostName, if you specified it as the attribute to describe. This element contains the following information:

    • Value: If true, instances launched in the VPC get DNS hostnames. If false, they do not.

Result sample
{
    "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.