我有一堆 AWS SSO 组,我想通过 API 列出,以便获取名称和 GroupID。 API 调用 ListGroups (https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_ListGroups.html) 非常无用。它必须根据 DisplayName 进行过滤,并且当前需要一个值。据我通过旧的 AWS 论坛得知,不允许通配符搜索和公正搜索。我自己用 boto3 SDK 尝试过(公正和通配符),但没有。之后,我想使用现有的 API 调用将权限集分配给所述组。
AWS 不是认真的,因为他们没有 API 调用来列出存在的组?
指定您拥有 aws sso 的区域:
aws identitystore list-groups --identity-store-id=d-123456789 --region us-east-1
这会给你输出:
{
"Groups": [
{
"GroupId": "123456789-aa-bb-cc-dd-ee",
"DisplayName": "this-it-team",
"IdentityStoreId": "d-123456789"
},
aws Identitystore 列表组 --identity-store-id=d-xxxxxxxx
https://github.com/aws/aws-sdk/issues/629
如果我们的 IdentityStore 是 IAM Identity Center 默认的,那么如果没有 --filter 参数,它就无法工作