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.
Idawscc.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.

For more information, see AWS::EMR::StudioSessionMapping.

Methods

NameResourceAccessible byRequired Params
create_resourcestudio_session_mappingsINSERTStudioId, IdentityName, IdentityType, SessionPolicyArn, region
delete_resourcestudio_session_mappingsDELETEIdentifier, region
update_resourcestudio_session_mappingsUPDATEIdentifier, PatchDocument, region
list_resourcesstudio_session_mappings_list_onlySELECTregion
get_resourcestudio_session_mappingsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual studio_session_mapping.

SELECT
region,
identity_name,
identity_type,
session_policy_arn,
studio_id
FROM awscc.emr.studio_session_mappings
WHERE
region = 'us-east-1' AND
Identifier = '{{ studio_id }}|{{ identity_type }}|{{ identity_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.emr.studio_session_mappings (
IdentityName,
IdentityType,
SessionPolicyArn,
StudioId,
region
)
SELECT
'{{ identity_name }}',
'{{ identity_type }}',
'{{ session_policy_arn }}',
'{{ studio_id }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.emr.studio_session_mappings
SET PatchDocument = string('{{ {
"SessionPolicyArn": session_policy_arn
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ studio_id }}|{{ identity_type }}|{{ identity_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.emr.studio_session_mappings
WHERE
Identifier = '{{ studio_id }}|{{ identity_type }}|{{ identity_name }}' AND
region = 'us-east-1';

Permissions

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

elasticmapreduce:CreateStudioSessionMapping,
sso-directory:SearchUsers,
sso-directory:SearchGroups,
sso-directory:DescribeUser,
sso-directory:DescribeGroup,
sso:GetManagedApplicationInstance,
sso:ListDirectoryAssociations,
sso:GetProfile,
sso:ListProfiles,
sso:AssociateProfile,
sso:CreateApplication,
sso:PutApplicationAuthenticationMethod,
sso:PutApplicationGrant,
sso:PutApplicationAccessScope,
sso:PutApplicationAssignmentConfiguration,
sso:DescribeApplication,
sso:DeleteApplication,
sso:DeleteApplicationAuthenticationMethod,
sso:DeleteApplicationAccessScope,
sso:DeleteApplicationGrant,
sso:ListInstances,
sso-directory:CreateUser,
sso-directory:CreateGroup,
sso:CreateApplicationAssignment,
sso:DescribeInstance,
sso:DeleteApplicationAssignment,
sso:ListApplicationAssignments