Skip to main content

studio_session_mappings

Creates, updates, deletes or gets a studio_session_mapping resource or lists studio_session_mappings in a region

Overview

Namestudio_session_mappings
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idaws.emr.studio_session_mappings

Fields

NameDatatypeDescription
identity_namestringThe name of the user or group. For more information, see UserName and DisplayName in the AWS SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.
identity_typestringSpecifies whether the identity to map to the Studio is a user or a group.
session_policy_arnstringThe Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. Session policies refine Studio user permissions without the need to use multiple IAM user roles.
studio_idstringThe ID of the Amazon EMR Studio to which the user or group will be mapped.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTStudioId, IdentityName, IdentityType, SessionPolicyArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all studio_session_mappings in a region.

SELECT
region,
identity_name,
identity_type,
session_policy_arn,
studio_id
FROM aws.emr.studio_session_mappings
WHERE region = 'us-east-1';

Gets all properties from an individual studio_session_mapping.

SELECT
region,
identity_name,
identity_type,
session_policy_arn,
studio_id
FROM aws.emr.studio_session_mappings
WHERE region = 'us-east-1' AND data__Identifier = '<StudioId>|<IdentityType>|<IdentityName>';

INSERT example

Use the following StackQL query and manifest file to create a new studio_session_mapping resource, using stack-deploy.

/*+ create */
INSERT INTO aws.emr.studio_session_mappings (
IdentityName,
IdentityType,
SessionPolicyArn,
StudioId,
region
)
SELECT
'{{ IdentityName }}',
'{{ IdentityType }}',
'{{ SessionPolicyArn }}',
'{{ StudioId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.emr.studio_session_mappings
WHERE data__Identifier = '<StudioId|IdentityType|IdentityName>'
AND region = 'us-east-1';

Permissions

To operate on the studio_session_mappings resource, the following permissions are required:

Create

elasticmapreduce:CreateStudioSessionMapping,
sso-directory:SearchUsers,
sso-directory:SearchGroups,
sso-directory:DescribeUser,
sso-directory:DescribeGroup,
sso:GetManagedApplicationInstance,
sso:ListDirectoryAssociations,
sso:GetProfile,
sso:ListProfiles,
sso:AssociateProfile

Read

elasticmapreduce:GetStudioSessionMapping,
sso-directory:SearchUsers,
sso-directory:SearchGroups,
sso-directory:DescribeUser,
sso-directory:DescribeGroup,
sso:GetManagedApplicationInstance,
sso:DescribeInstance

Update

elasticmapreduce:GetStudioSessionMapping,
elasticmapreduce:UpdateStudioSessionMapping,
sso-directory:SearchUsers,
sso-directory:SearchGroups,
sso-directory:DescribeUser,
sso-directory:DescribeGroup,
sso:GetManagedApplicationInstance,
sso:DescribeInstance

Delete

elasticmapreduce:GetStudioSessionMapping,
elasticmapreduce:DeleteStudioSessionMapping,
sso-directory:SearchUsers,
sso-directory:SearchGroups,
sso-directory:DescribeUser,
sso-directory:DescribeGroup,
sso:GetManagedApplicationInstance,
sso:DescribeInstance,
sso:ListDirectoryAssociations,
sso:GetProfile,
sso:ListProfiles,
sso:DisassociateProfile

List

elasticmapreduce:ListStudioSessionMappings