gpt4 book ai didi

amazon-web-services - 使用 aws cli 过滤导出的数据 cloudFormation

转载 作者:行者123 更新时间:2023-12-03 07:17:55 25 4
gpt4 key购买 nike

我想使用 jqquery 过滤此命令 aws cloudformation list-exports 导出的输出值。

数据示例:

     {
"Exports": [
{
"ExportingStackId": "arn:aws...",
"Name": "RSC-NAME-2",
"Value": "RSC-VALUE-2"
},
{
"ExportingStackId": "arn:aws...",
"Name": "My-RSC-NAME",
"Value": "My-RSC-VALUE"
}
]
}

我正在寻找一个可以返回并按名称过滤的命令

示例:如果我按名称搜索等于My-RSC-NAME,结果将为My-RSC-VALUE

最佳答案

我们可以轻松地使用 native --query

aws cloudformation list-exports --query"Exports[?Name=='ThisIsNameOfExport'].Value" --output text

关于amazon-web-services - 使用 aws cli 过滤导出的数据 cloudFormation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66990112/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com