Skip to main content

studio_session_mappings

Creates, updates, deletes, gets or lists a studio_session_mappings resource.

Overview

Namestudio_session_mappings
TypeResource
Idaws.emr.studio_session_mappings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The time the session mapping was created.
identity_idstringThe globally unique identifier (GUID) of the user or group. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>)
identity_namestringThe 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_typestringSpecifies whether the identity mapped to the Amazon EMR Studio is a user or a group. (USER, GROUP)
last_modified_timestring (date-time)The time the session mapping was last modified.
session_policy_arnstringThe 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_idstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_studio_session_mappingselectregionFetches mapping details for the specified Amazon EMR Studio and identity (user or group).
list_studio_session_mappingsselectregionReturns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.
create_studio_session_mappinginsertregion, StudioId, IdentityType, SessionPolicyArnMaps 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_mappingupdateregion, StudioId, IdentityType, SessionPolicyArnUpdates the session policy attached to the user or group for the specified Amazon EMR Studio.
delete_studio_session_mappingdeleteregionRemoves 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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 }}'
;

UPDATE examples

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

Removes a user or group from an Amazon EMR Studio.

DELETE FROM aws.emr.studio_session_mappings
WHERE region = '{{ region }}' --required
;