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

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"
]
主站蜘蛛池模板: 赤壁市| 综艺| 襄汾县| 湘乡市| 沙田区| 靖江市| 建始县| 崇阳县| 南雄市| 临澧县| 九龙县| 桑日县| 车致| 通州市| 汶上县| 朔州市| 铜山县| 徐汇区| 永丰县| 滨海县| 阿克| 河北区| 蒙自县| 德阳市| 化州市| 乌什县| 日喀则市| 琼海市| 高青县| 阿拉尔市| 郯城县| 酒泉市| 汝南县| 扎鲁特旗| 巴楚县| 禹州市| 喀喇| 十堰市| 承德县| 大足县| 宁远县|