studio_session_mappings
Creates, updates, deletes, gets or lists a studio_session_mappings resource.
Overview
| Name | studio_session_mappings |
| Type | Resource |
| Id | aws.emr.studio_session_mappings |
Fields
The following fields are returned by SELECT queries:
- get_studio_session_mapping
- list_studio_session_mappings
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time the session mapping was created. |
identity_id | string | The globally unique identifier (GUID) of the user or group. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
identity_name | string | The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
identity_type | string | Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group. (USER, GROUP) |
last_modified_time | string (date-time) | The time the session mapping was last modified. |
session_policy_arn | string | The Amazon Resource Name (ARN) of the session policy associated with the user or group. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
studio_id | string | The ID of the Amazon EMR Studio. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The time the session mapping was created. |
identity_id | string | The globally unique identifier (GUID) of the user or group from the IAM Identity Center Identity Store. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
identity_name | string | The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
identity_type | string | Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group. (USER, GROUP) |
session_policy_arn | string | The Amazon Resource Name (ARN) of the session policy associated with the user or group. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
studio_id | string | The ID of the Amazon EMR Studio. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_studio_session_mapping | select | region | Fetches mapping details for the specified Amazon EMR Studio and identity (user or group). | |
list_studio_session_mappings | select | region | Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId. | |
create_studio_session_mapping | insert | region, StudioId, IdentityType, SessionPolicyArn | Maps a user or group to the Amazon EMR Studio specified by StudioId, and applies a session policy to refine Studio permissions for that user or group. Use CreateStudioSessionMapping to assign users to a Studio when you use IAM Identity Center authentication. For instructions on how to assign users to a Studio when you use IAM authentication, see Assign a user or group to your EMR Studio. | |
update_studio_session_mapping | update | region, StudioId, IdentityType, SessionPolicyArn | Updates the session policy attached to the user or group for the specified Amazon EMR Studio. | |
delete_studio_session_mapping | delete | region | Removes a user or group from an Amazon EMR Studio. |
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
- get_studio_session_mapping
- list_studio_session_mappings
Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).
SELECT
creation_time,
identity_id,
identity_name,
identity_type,
last_modified_time,
session_policy_arn,
studio_id
FROM aws.emr.studio_session_mappings
WHERE region = '{{ region }}' -- required
;
Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.
SELECT
creation_time,
identity_id,
identity_name,
identity_type,
session_policy_arn,
studio_id
FROM aws.emr.studio_session_mappings
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_studio_session_mapping
- Manifest
Maps a user or group to the Amazon EMR Studio specified by StudioId, and applies a session policy to refine Studio permissions for that user or group. Use CreateStudioSessionMapping to assign users to a Studio when you use IAM Identity Center authentication. For instructions on how to assign users to a Studio when you use IAM authentication, see Assign a user or group to your EMR Studio.
INSERT INTO aws.emr.studio_session_mappings (
StudioId,
IdentityId,
IdentityName,
IdentityType,
SessionPolicyArn,
region
)
SELECT
'{{ StudioId }}' /* required */,
'{{ IdentityId }}',
'{{ IdentityName }}',
'{{ IdentityType }}' /* required */,
'{{ SessionPolicyArn }}' /* required */,
'{{ region }}'
;
# Description fields are for documentation purposes
- name: studio_session_mappings
props:
- name: region
value: "{{ region }}"
description: Required parameter for the studio_session_mappings resource.
- name: StudioId
value: "{{ StudioId }}"
description: |
The ID of the Amazon EMR Studio to which the user or group will be mapped.
- name: IdentityId
value: "{{ IdentityId }}"
description: |
The globally unique identifier (GUID) of the user or group from the IAM Identity Center Identity Store. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.
- name: IdentityName
value: "{{ IdentityName }}"
description: |
The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.
- name: IdentityType
value: "{{ IdentityType }}"
description: |
Specifies whether the identity to map to the Amazon EMR Studio is a user or a group.
valid_values: ['USER', 'GROUP']
- name: SessionPolicyArn
value: "{{ SessionPolicyArn }}"
description: |
The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role. For more information, see Create an Amazon EMR Studio User Role with Session Policies.
UPDATE examples
- update_studio_session_mapping
Updates the session policy attached to the user or group for the specified Amazon EMR Studio.
UPDATE aws.emr.studio_session_mappings
SET
StudioId = '{{ StudioId }}',
IdentityId = '{{ IdentityId }}',
IdentityName = '{{ IdentityName }}',
IdentityType = '{{ IdentityType }}',
SessionPolicyArn = '{{ SessionPolicyArn }}'
WHERE
region = '{{ region }}' --required
AND StudioId = '{{ StudioId }}' --required
AND IdentityType = '{{ IdentityType }}' --required
AND SessionPolicyArn = '{{ SessionPolicyArn }}' --required;
DELETE examples
- delete_studio_session_mapping
Removes a user or group from an Amazon EMR Studio.
DELETE FROM aws.emr.studio_session_mappings
WHERE region = '{{ region }}' --required
;