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 virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.

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.

    • InternetServiceIds: (optional) The IDs of the Internet services.

    • LinkNetIds: (optional) The IDs of the Nets the Internet services are attached to.

    • LinkStates: (optional) The current states of the attachments between the Internet services and the Nets (only available, if the Internet gateway is attached to a Net).

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

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

    • Tags: (optional) The key/value combination of the tags associated with the Internet services, 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 ReadInternetServices command returns the following elements:

  • InternetServices: Information about one or more Internet services.

    • InternetServiceId: The ID of the Internet service.

    • NetId: The ID of the Net attached to the Internet service.

    • State: The state of the attachment of the Internet service to the Net (always available).

    • Tags: One or more tags associated with the Internet service.

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

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

  • 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"
  },
  "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.