Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use DescribePrefixLists
with a CLI
The following code examples show how to use DescribePrefixLists
.
- CLI
-
- Amazon CLI
-
To describe prefix lists
This example lists all available prefix lists for the region.
Command:
aws ec2 describe-prefix-lists
Output:
{
"PrefixLists": [
{
"PrefixListName": "com.amazonaws.us-east-1.s3",
"Cidrs": [
"54.231.0.0/17"
],
"PrefixListId": "pl-63a5400a"
}
]
}
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example fetches the available Amazon Web Services services in a prefix list format for the region
Get-EC2PrefixList
Output:
Cidrs PrefixListId PrefixListName
----- ------------ --------------
{52.94.5.0/24, 52.119.240.0/21, 52.94.24.0/23} pl-6fa54006 com.amazonaws.eu-west-1.dynamodb
{52.218.0.0/17, 54.231.128.0/19} pl-6da54004 com.amazonaws.eu-west-1.s3
For a complete list of Amazon SDK developer guides and code examples, see
Create Amazon EC2 resources using an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.