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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.emr.studio_session_mappings
WHERE
Identifier = '{{ studio_id }}|{{ identity_type }}|{{ identity_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

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