【问题标题】:List Pending Subscriptions in AWS SNS topic列出 AWS SNS 主题中的待处理订阅
【发布时间】:2021-06-08 08:10:22
【问题描述】:

我已通过多封电子邮件订阅了 SNS,但很少有电子邮件是错误的,我看到状态为“等待确认”。我正在寻找一个命令来列出只有 PendingConfirmation subscriptedARns 的订阅数组。

通过使用以下命令,我得到了所有订阅列表,但我只需要待确认订阅: aws sns list-subscriptions-by-topic --topic-arn arn:aws:sns:us-east-1:xxxxx:qwertyuuyt

{
    "Subscriptions": [
        {
            "SubscriptionArn": "arn:aws:sns:us-east-1:xxxxxxx:qwertyuuyt:ccffgv-e904-4f68-9a8f-vvggbb",
            "Owner": "xxxxxxx",
            "Protocol": "email",
            "Endpoint": "qwerty@amazon.com",
            "TopicArn": "arn:aws:sns:us-east-1:xxxxxxx:qwertyuuyt"
        },
        {
            "SubscriptionArn": "PendingConfirmation",
            "Owner": "xxxxxxx",
            "Protocol": "email",
            "Endpoint": "qwer@amazo.com",
            "TopicArn": "arn:aws:sns:us-east-1:xxxxxxx:qwertyuuyt"
        },
        {
            "SubscriptionArn": "PendingConfirmation",
            "Owner": "xxxxxxx",
            "Protocol": "email",
            "Endpoint": "qwettet@amazn.com",
            "TopicArn": "arn:aws:sns:us-east-1:xxxxxxx:qwertyuuyt"
        }`cv`
    ]
}

【问题讨论】:

    标签: amazon-web-services command-line-interface amazon-sns


    【解决方案1】:

    您应该可以使用以下--query

    aws sns list-subscriptions-by-topic --topic-arn arn:aws:sns:us-east-1:xxxxx:qwertyuuyt --query "Subscriptions[?SubscriptionArn=='PendingConfirmation']"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-27
      • 1970-01-01
      • 2015-09-26
      • 1970-01-01
      • 2021-11-25
      • 2016-06-27
      • 1970-01-01
      • 2015-05-29
      相关资源
      最近更新 更多