IdentityStore / Client / create_group_membership

create_group_membership

IdentityStore.Client.create_group_membership(**kwargs)

Creates a relationship between a member and a group. The following identifiers must be specified: GroupId, IdentityStoreId, and MemberId.

See also: AWS API Documentation

Request Syntax

response = client.create_group_membership(
    IdentityStoreId='string',
    GroupId='string',
    MemberId={
        'UserId': 'string'
    }
)
Parameters:
  • IdentityStoreId (string) –

    [REQUIRED]

    The globally unique identifier for the identity store.

    You can specify the identity store by ID or by Amazon Resource Name (ARN). For example, identity store ID d-1234567890 or identity store ARN arn:aws:identitystore::111122223333:identitystore/d-1234567890.

  • GroupId (string) –

    [REQUIRED]

    The identifier for a group in the identity store.

    You can specify the group by ID or by Amazon Resource Name (ARN). For example, group ID a1b2c3d4-5678-90ab-cdef-EXAMPLE22222 or group ARN arn:aws:identitystore:::group/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222.

  • MemberId (dict) –

    [REQUIRED]

    An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: UserId.

    • UserId (string) –

      The identifier for a user in the identity store.

      You can specify the user by ID or by Amazon Resource Name (ARN). For example, user ID a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 or user ARN arn:aws:identitystore:::user/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.

Return type:

dict

Returns:

Response Syntax

{
    'IdentityStoreId': 'string',
    'MembershipId': 'string',
    'MembershipArn': 'string'
}

Response Structure

  • (dict) –

    • IdentityStoreId (string) –

      The globally unique identifier for the identity store.

    • MembershipId (string) –

      The identifier for a newly created GroupMembership in an identity store.

    • MembershipArn (string) –

      The Amazon Resource Name (ARN) of the newly created group membership in the identity store. For example, arn:aws:identitystore:::membership/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333.

Exceptions

  • IdentityStore.Client.exceptions.ResourceNotFoundException

  • IdentityStore.Client.exceptions.ThrottlingException

  • IdentityStore.Client.exceptions.AccessDeniedException

  • IdentityStore.Client.exceptions.ConflictException

  • IdentityStore.Client.exceptions.InternalServerException

  • IdentityStore.Client.exceptions.ValidationException

  • IdentityStore.Client.exceptions.ServiceQuotaExceededException