我正在尝试将我的所有SNS点与我的应用相关联,但是Boto3功能无效:
response = client.list_endpoints_by_platform_application(
PlatformApplicationArn='string',
NextToken='string'
)
但是我遇到了以下错误:
ListEndpointsByPlatformApplication operation: Invalid parameter: NextToken Reason: token is invalid or expired"
它不会接受NextToken作为在前100个之后获取下一组端点所需的参数。
答案 0 :(得分:0)
Boto3可以为您处理分页。这样的事情应该有效:
paginator = client.get_paginator('list_endpoints_by_platform_application')
page_iterator = pagination.paginate(PlatformApplicationArn='string')
for page in page_iterator:
print(page['Contents'])