问题描述
以下操作将创建一个等待确认的订阅.
Following creates a subscription waiting to be confirmed.
aws_client.subscribe(TopicArn=topic_arn, Protocol=protocol, Endpoint=endpoint)
对此的响应类似于:
{'ResponseMetadata': {'HTTPHeaders': {'content-length': '298',
'content-type': 'text/xml',
'date': 'Fri, 13 Oct 2017 10:15:47 GMT',
'x-amzn-requestid': '7a0a40fb-ab72-5584-94f0-12a13fe11das'},
'HTTPStatusCode': 200,
'RequestId': '7a0a40fb-ab72-5584-94f0-12a13fe11das',
'RetryAttempts': 0},
u'SubscriptionArn': 'pending confirmation'}
以上响应未发送任何令牌.如何获得可以如所述此处
above response did not send any token.How to get the token which can be passed to confirm_subscription as stated here
推荐答案
似乎,在subscribe
命令本身的响应内部,令牌不可用.相反,正如Boto 3文档中提到的 ,令牌是
It seems, the Token is not available from inside the response of the subscribe
command itself. Rather, as mentioned in the Boto 3 documentation, the token is
AWS CLI命令参考指出同样的事情,但也许更清楚一点:
The AWS CLI Command Reference states the same thing, but a little bit more clearly perhaps:
换句话说,对于电子邮件端点,令牌位于电子邮件本身中.如果您查看确认订阅"链接的URL,就可以看到它.
In other words, for an Email Endpoint, the Token is in the email itself. You can see it if you look at the URL for the "Confirm subscription" Link.
在此示例中,您可以看到令牌为 abc123 .
Here in this example, you can see the Token would be abc123.
这篇关于Amazon SNS:如何获取令牌以确认订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!