官术网_书友最值得收藏!

Querying

The CLI tool supports transforming the response from the API with the --query option. This option takes a JMESPath query as a parameter and returns the query result.

JMESPath is a query language for JSON. For more information, visit http://jmespath.org/.

As the query is processed as part of the command, it takes place on the server, not the client. By offloading work to the server, you can reduce the size of the resulting payload and improve response times.

JMESPath can be used to transform the response that you receive:

$ aws ec2 describe-availability-zones \
--output json \
--query 'AvailabilityZones[].ZoneName'
[
"us-east-1a",
"us-east-1c",
"us-east-1d",
"us-east-1e"
]

It can also be used to filter the data that is received:

$ aws ec2 describe-availability-zones 
--output json
--query "AvailabilityZones[?ZoneName == 'us-east-1a'].State"
[
"available"
]
主站蜘蛛池模板: 舟曲县| 华容县| 延边| 靖安县| 鄂伦春自治旗| 安泽县| 木兰县| 临邑县| 崇文区| 莒南县| 迁安市| 龙岩市| 北海市| 上蔡县| 工布江达县| 林甸县| 牡丹江市| 中牟县| 眉山市| 富川| 六安市| 南漳县| 昭平县| 洛隆县| 临海市| 白河县| 赣榆县| 临海市| 云浮市| 湘潭市| 简阳市| 东至县| 康定县| 石门县| 永善县| 抚宁县| 尼勒克县| 中方县| 三台县| 信宜市| 长武县|