我有以下查询:
aws route53 list-resource-record-sets --hosted-zone-id ZJDMYXXXX --profile london | jq ".ResourceRecordSets[].Type"
按预期返回
"A"
"A"
"A"
"A"
"A"
"A"
"A"
"A"
"A"
"A"
"CNAME"
"CNAME"
...
但是如何从输出中返回Name
,就像这样:
{
"ResourceRecordSets": [
{
"ResourceRecords": [
{
"Value": "123.123.123.123"
}
],
"TTL": 21600,
"Type": "A",
"Name": "www.domain.tld."
},
...
]
}
任何建议都值得赞赏
答案 0 :(得分:0)
这将返回每个条目的Name
和Type
属性。
aws route53 .... | jq '.ResourceRecordSets[] | [.Name, .Type]'