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 Services Using oapi-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
$ oapi-cli --profile "default" ReadInternetServices \
    --Filters '{
        "InternetServiceIds": ["igw-12345678"]
      }'
Request sample
$ oapi-cli --profile "default" ReadInternetServices \
    --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

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring 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. For more information, see Installing and Configuring AWS CLI.

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.