Getting Information About Your Internet Services

You can get information about one or more of your Internet services, like its attachment state or the Net it is attached to.

Getting Information About Your Internet Services Using Cockpit v2

See the Internet Services dashboard.

Getting Information About Your Internet Services Using OSC CLI

The ReadInternetServices command lists one or more of your Internet services.
An Internet service enables your virtual machines (VMs) launched in a Net to connect to the Internet. By default, a Net includes an Internet service, and each Subnet is public. Every VM launched within a default Subnet has a private IP and a public IP.

Request sample
$ osc-cli api ReadInternetServices --profile "default" \
    --Filters '{
        "InternetServiceIds": ["igw-12345678"],
      }'
Request sample
$ osc-cli api ReadInternetServices --profile "default" \
    --Filters '{
        "TagKeys": ["env"],
        "TagValues": ["prod", "test"],
      }'

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

The ReadInternetServices command returns the following elements:

  • InternetServices: Information about one or more Internet services.

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

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "InternetServices": [
    {
      "Tags": [
        {
          "Value": "prod",
          "Key": "env"
        }
      ],
      "State": "available",
      "NetId": "vpc-12345678",
      "InternetServiceId": "igw-12345678"
    }
  ]
}

Getting Information About Your Internet Gateways Using AWS CLI

To get information about one or more Internet gateways, use the describe-internet-gateways command following this syntax:

Request sample
$ aws ec2 describe-internet-gateways \
    --profile YOUR_PROFILE \
    [--internet-gateway-ids NOT_SPECIFIED] \
    --filters "Name=attachment.state,values=available" \
    --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) internet-gateway-ids: One or more IDs of Internet gateways.

  • (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:

    • attachment.state: The current state of the attachment between the Internet gateway and the VPC (only available, if the Internet gateway is attached to a VPC).

    • attachment.vpc-id: The ID of the VPC the Internet gateway is attached to.

    • internet-gateway-id: The ID of the Internet gateway.

    • 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-internet-gateways command returns the following elements:

  • InternetGateways: Information about one or more Internet gateways. This element contains the following information:

    • Tags: One or more tags associated with the Internet gateway. This element contains the following information:

      • Value: The value of the tag.

      • Key: The key of the tag.

    • InternetGatewayId: The ID of the Internet gateway.

    • Attachments: Information about the attachment to a VPC. This element contains the following information:

      • State: The state of the attachment (only available, if the Internet gateway is attached to a VPC).

      • VpcId: The ID of the VPC the Internet gateway is attached to.

Result sample
{
    "InternetGateways": [
        {
            "Tags":[
                    {
                     "Value": "VPC1",
                     "Key": "Name"
                 }
               ],
            "InternetGatewayId": "igw-12345678",
            "Attachments": [
                {
                    "State": "available",
                    "VpcId": "vpc-12345678"
                }
            ]
        }
    ]
}

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.