过滤 AWS CLI Route53 的输出

问题描述 投票:0回答:1

当我运行

aws route53domains list-domains --region us-east-1 --output text --no-cli-pager
时,输出是我的域列表,但它包含我不想要的其他数据,包括“AutoRenew”、“Expiry”和“TransferLock”。我正在寻找一个简单的平面域名列表,每行一个,没有其他信息

尝试使用 --query:

aws route53domains list-domains \
    --region us-east-1 \
    --output table \
    --no-cli-pager \
    --query 'DomainName'

但我无法找到/理解我正在查找的文档。我只是想要:

domain1.com
domain2.com
domain3.com
etc
amazon-web-services aws-cli amazon-route53
1个回答
1
投票

让你试试

aws --profile bmd route53 list-hosted-zones --query "HostedZones[*].Name "

aws --profile bmd route53 list-hosted-zones --output text --query "HostedZones[*].Name "

如果这两者之一符合您的需求。

© www.soinside.com 2019 - 2024. All rights reserved.