Getting Information About Your Nets

You can get information about one or more of your Nets, like their CIDR block or their tenancy option.

Information about your Nets is also available from within the associated virtual machines (VMs) themselves. For more information, see Accessing the Metadata and User Data of a VM.

Getting Information About Your Nets Using Cockpit v2

See the Nets dashboard.

Getting Information About Your Nets Using OSC CLI

The ReadNets command lists one or more Nets.

Request sample
$ osc-cli api ReadNets --profile "default" \
    --Filters '{
        "NetIds": ["vpc-12345678"],
      }'
Request sample
$ osc-cli api ReadNets --profile "default" \
    --Filters '{
        "States": ["available"],
      }'

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.

    • DhcpOptionsSetIds: (optional) The IDs of the DHCP options sets.

    • IpRanges: (optional) The IP ranges for the Nets, in CIDR notation (for example, 10.0.0.0/16).

    • IsDefault: (optional) If true, the Net used is the default one.

    • NetIds: (optional) The IDs of the Nets.

    • States: (optional) The states of the Nets (pending | available | deleting).

    • TagKeys: (optional) The keys of the tags associated with the Nets.

    • TagValues: (optional) The values of the tags associated with the Nets.

    • Tags: (optional) The key/value combination of the tags associated with the Nets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

  • 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 (between 1`and `1000, both included). By default, 100.

The ReadNets command returns the following elements:

  • Nets: Information about the described Nets.

    • DhcpOptionsSetId: The ID of the DHCP options set (or default if you want to associate the default one).

    • IpRange: The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).

    • NetId: The ID of the Net.

    • State: The state of the Net (pending | available | deleting).

    • Tags: One or more tags associated with the Net.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • Tenancy: The VM tenancy in a Net.

  • 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.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nets": [
    {
      "Tags": [],
      "DhcpOptionsSetId": "dopt-12345678",
      "IpRange": "10.0.0.0/16",
      "Tenancy": "default",
      "NetId": "vpc-12345678",
      "State": "available"
    }
  ]
}

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:

Request sample
$ aws ec2 describe-vpcs \
    --profile YOUR_PROFILE \
    --vpc-ids vpc-12345678 \
    --filters Name=X,Values=Y \
    --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 Nets.

    • 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 VMs > VM Tenancy and Dedicated VMs.

    • 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 Nets.

    • 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.