【发布时间】:2019-03-23 17:35:11
【问题描述】:
我想通过 Python 开发工具包更改一个设置,以保护 AWS Cognito。我可以通过“Cognito -> User Pools -> App Client Settings -> Cognito User Pool”更改 AWS Web 控制台中的设置(见图)
这是我的代码
client = boto3.client('cognito-idp')
client.update_user_pool_client(
UserPoolId=USER_POOL_ID,
ClientId=user_pool_client_id,
SupportedIdentityProviders=[
'CognitoUserPool'
]
)
我收到的错误是
An error occurred (InvalidParameterException) when calling the
UpdateUserPoolClient operation: The provider CognitoUserPool
does not exist for User Pool xxxxxx
目前还不清楚我应该为SupportedIdentityProviders 传递什么字符串值。我看到的唯一提示来自https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html
--supported-identity-providers '["MySAMLIdP", "LoginWithAmazon"]'
我什至不能 100% 确定 SupportedIdentityProviders 是否与我要更改的设置有关,但在文档中找不到任何说明。
【问题讨论】:
标签: amazon-web-services boto3 amazon-cognito