我正在尝试使用python代码创建cognito的“CfnUserPoolResourceServer”。根据https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_cognito/CfnUserPoolResourceServer.html,我试图设置“scopes”参数。 根据https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolresourceserver.html#cfn-cognito-userpoolresourceserver-scopes文档,作用域的类型是“ResourceServerScopeType”列表。所以我尝试初始化ResourceServerScopeType对象如下-
_rs = _cognito.UserPoolResourceServer()
_rs1 = _rs.ResourceServerScopeType
_rs1.Scopes.ScopeName = "access_db_data"
_rs1.Scopes.ScopeDescription = "access data from table"
但我的错误是-
AttributeError: module 'aws_cdk.aws_cognito' has no attribute 'UserPoolResourceServer'
我无法理解如何为CfnUserPoolResourceServer设置“scopes”参数。请帮帮我
您需要直接使用
CfnUserPoolResourceServer
相关问题 更多 >
编程相关推荐