ListGroupMembershipsForMember - Identity Store

ListGroupMembershipsForMember

Request Syntax

{ "IdentityStoreId": "string", "MaxResults": number, "MemberId": { ... }, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

IdentityStoreId

The globally unique identifier for the identity store.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 36.

Pattern: d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Required: Yes

MaxResults

The maximum number of results to be returned per request. This parameter is used in the ListUsers and ListGroups requests to specify how many results to return in one page. The length limit is 50 characters.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

MemberId

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.

Type: MemberId object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

NextToken

The pagination token used for the ListUsers, ListGroups, and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65535.

Pattern: [-a-zA-Z0-9+=/:_]*

Required: No

Response Syntax

{ "GroupMemberships": [ { "GroupId": "string", "IdentityStoreId": "string", "MemberId": { ... }, "MembershipId": "string" } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

GroupMemberships

A list of GroupMembership objects in the group for a specified member.

Type: Array of GroupMembership objects

NextToken

The pagination token used for the ListUsers, ListGroups, and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65535.

Pattern: [-a-zA-Z0-9+=/:_]*

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

RequestId

The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.

HTTP Status Code: 400

InternalServerException

The request processing has failed because of an unknown error, exception or failure with an internal server.

RequestId

The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.

RetryAfterSeconds

The number of seconds to wait before retrying the next request.

HTTP Status Code: 500

ResourceNotFoundException

Indicates that a requested resource is not found.

RequestId

The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.

ResourceId

The identifier for a resource in the identity store that can be used as UserId or GroupId. The format for ResourceId is either UUID or 1234567890-UUID, where UUID is a randomly generated value for each resource when it is created and 1234567890 represents the IdentityStoreId string value. In the case that the identity store is migrated from a legacy SSO identity store, the ResourceId for that identity store will be in the format of UUID. Otherwise, it will be in the 1234567890-UUID format.

ResourceType

An enum object indicating the type of resource in the identity store service. Valid values include USER, GROUP, and IDENTITY_STORE.

HTTP Status Code: 400

ThrottlingException

Indicates that the principal has crossed the throttling limits of the API operations.

RequestId

The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.

RetryAfterSeconds

The number of seconds to wait before retrying the next request.

HTTP Status Code: 400

ValidationException

The request failed because it contains a syntax error.

RequestId

The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.

HTTP Status Code: 400

Examples

Example

This example lists the two group memberships for the specified user.

Sample Request

{ "IdentityStoreId": "d-1234567890", "MemberId": { "UserId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }, "MaxResults": 100, "NextToken": "" }

Sample Response

{ "GroupMemberships": [ { "IdentityStoreId": "d-1234567890", "MembershipId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "GroupId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MemberId": { "UserId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" } }, { "IdentityStoreId": "d-1234567890", "MembershipId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "GroupId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MemberId": { "UserId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" } } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: