Getting Information About Prefix Lists

You can get information about one or more prefix lists that you can use:

  • In outbound security group rules to allow traffic to the corresponding service.

  • In route tables, to route traffic to the corresponding service using Net access points.

Prefix lists are only available for virtual machines (VMs) in a Net. Each prefix list is composed of an ID, a name to identify the service it is associated with and a list of network prefixes used by this service, in CIDR notation. These network prefixes correspond to the range of IPs used by the service.

Getting Information About Prefix Lists Using OSC CLI

The ReadNetAccessPointServices command lists OUTSCALE services available to create Net access points.
For more information, see CreateNetAccessPoint.

Request sample: Listing one or more services according to their service IDs
$ osc-cli api ReadNetAccessPointServices --profile "default" \
    --Filters '{
        "ServiceIds": ["pl-12345678", "pl-87654321"],
      }'
Request sample: Listing one or more services according to their service names
$ osc-cli api ReadNetAccessPointServices --profile "default" \
    --Filters '{
        "ServiceNames": ["com.outscale.eu-west-2.api"],
      }'

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 ReadNetAccessPointServices command returns the following elements:

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

  • Services: The names of the services you can use for Net access points.

Result sample: Listing one or more services according to their service IDs
{
  "Services": [
    {
      "ServiceName": "com.outscale.eu-west-2.api",
      "ServiceId": "pl-12345678",
      "IpRanges": [
        "192.0.2.0"
      ]
    },
    {
      "ServiceName": "com.outscale.eu-west-2.oos",
      "ServiceId": "pl-87654321",
      "IpRanges": [
        "198.51.100.0",
        "203.0.113.0",
        "203.0.113.1"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample: Listing one or more services according to their service names
{
  "Services": [
    {
      "ServiceName": "com.outscale.eu-west-2.api",
      "ServiceId": "pl-12345678",
      "IpRanges": [
        "192.0.2.0"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Prefix Lists Using AWS CLI

To get information about one or more prefix lists, use the describe-prefix-lists command following this syntax:

Request sample
$ aws ec2 describe-prefix-lists \
    --profile YOUR_PROFILE \
    --filters Name=prefix-list-id,Values=pl-12345678 \
    [--prefix-list-ids 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) filters: One or more filters. The following filters are available:

    • prefix-list-id: The ID of a prefix list.

    • prefix-list-name: The name of a prefix list.

  • (optional) prefix-list-ids: One or more prefix list IDs.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-prefix-lists command returns the following elements:

  • PrefixLists: Information about one or more prefix lists.

    • PrefixListName: The name of the prefix list.

    • Cidrs: One or more ranges of IPs used by the service, in CIDR notation.

    • PrefixListId: The ID of the prefix list.

Result sample
{
  "PrefixLists": [
    {
      "PrefixListName": "com.outscale.eu-west-2.oos",
      "Cidrs": [
        "5.104.99.16/32",
        "148.253.118.30/32",
        "148.253.68.122/32",
        "148.253.110.148/32"
      ],
      "PrefixListId": "pl-a14a8cdc"
    }
  ]
}

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.