group_memberships
Creates, updates, deletes, gets or lists a group_memberships resource.
Overview
| Name | group_memberships |
| Type | Resource |
| Id | aws.identitystore.group_memberships |
Fields
The following fields are returned by SELECT queries:
- describe_group_membership
- list_group_memberships
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the group membership was created. |
created_by | string | The identifier of the user or system that created the group membership. |
group_id | string | The identifier for a group in the identity store. (pattern: <code>([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}</code>) |
identity_store_id | string | The globally unique identifier for the identity store. (pattern: <code>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}</code>) |
member_id | object | An object containing the identifier of a group member. |
membership_id | string | The identifier for a GroupMembership in an identity store. (pattern: <code>([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}</code>) |
updated_at | string (date-time) | The date and time the group membership was last updated. |
updated_by | string | The identifier of the user or system that last updated the group membership. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time the group membership was created. |
created_by | string | The identifier of the user or system that created the group membership. |
group_id | string | The identifier for a group in the identity store. (pattern: <code>([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}</code>) |
identity_store_id | string | The globally unique identifier for the identity store. (pattern: <code>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}</code>) |
member_id | object | An object containing the identifier of a group member. |
membership_id | string | The identifier for a GroupMembership object in an identity store. (pattern: <code>([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}</code>) |
updated_at | string (date-time) | The date and time the group membership was last updated. |
updated_by | string | The identifier of the user or system that last updated the group membership. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_group_membership | select | region | Retrieves membership metadata and attributes from MembershipId in an identity store. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide. | |
list_group_memberships | select | region | For the specified group in the specified identity store, returns the list of all GroupMembership objects and returns results in paginated form. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide. | |
create_group_membership | insert | region, IdentityStoreId, GroupId, MemberId | Creates a relationship between a member and a group. The following identifiers must be specified: GroupId, IdentityStoreId, and MemberId. | |
delete_group_membership | delete | region | Delete a membership within a group given MembershipId. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_group_membership
- list_group_memberships
Retrieves membership metadata and attributes from MembershipId in an identity store. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.
SELECT
created_at,
created_by,
group_id,
identity_store_id,
member_id,
membership_id,
updated_at,
updated_by
FROM aws.identitystore.group_memberships
WHERE region = '{{ region }}' -- required
;
For the specified group in the specified identity store, returns the list of all GroupMembership objects and returns results in paginated form. If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.
SELECT
created_at,
created_by,
group_id,
identity_store_id,
member_id,
membership_id,
updated_at,
updated_by
FROM aws.identitystore.group_memberships
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_group_membership
- Manifest
Creates a relationship between a member and a group. The following identifiers must be specified: GroupId, IdentityStoreId, and MemberId.
INSERT INTO aws.identitystore.group_memberships (
IdentityStoreId,
GroupId,
MemberId,
region
)
SELECT
'{{ IdentityStoreId }}' /* required */,
'{{ GroupId }}' /* required */,
'{{ MemberId }}' /* required */,
'{{ region }}'
RETURNING
identity_store_id,
membership_id
;
# Description fields are for documentation purposes
- name: group_memberships
props:
- name: region
value: "{{ region }}"
description: Required parameter for the group_memberships resource.
- name: IdentityStoreId
value: "{{ IdentityStoreId }}"
description: |
The globally unique identifier for the identity store.
- name: GroupId
value: "{{ GroupId }}"
description: |
The identifier for a group in the identity store.
- name: MemberId
description: |
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.
value:
UserId: "{{ UserId }}"
DELETE examples
- delete_group_membership
Delete a membership within a group given MembershipId.
DELETE FROM aws.identitystore.group_memberships
WHERE region = '{{ region }}' --required
;