【发布时间】:2022-12-15 07:18:59
【问题描述】:
如何使用 Boto3 为 AWS SSO 用户获取 UserId。
我想使用它为使用以下代码的特定 aws 帐户的用户分配权限,但是,这需要 PrincipalId 这是与每个用户关联的一些 16-20 位数字,在 AWS 控制台中称为 User ID。
你可以阅读它 - here
response = client.create_account_assignment(
InstanceArn='string',
TargetId='string',
TargetType='AWS_ACCOUNT',
PermissionSetArn='string',
PrincipalType='USER'|'GROUP',
PrincipalId='string'
)
【问题讨论】:
标签: python amazon-web-services boto3 botocore aws-sso