studio_session_mappings
Creates, updates, deletes or gets a studio_session_mapping
resource or lists studio_session_mappings
in a region
Overview
Name | studio_session_mappings |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.emr.studio_session_mappings |
Fields
Name | Datatype | Description |
---|---|---|
identity_name | string | The 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_type | string | Specifies whether the identity to map to the Studio is a user or a group. |
session_policy_arn | string | The 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_id | string | The ID of the Amazon EMR Studio to which the user or group will be mapped. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | StudioId, IdentityName, IdentityType, SessionPolicyArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.emr.studio_session_mappings (
IdentityName,
IdentityType,
SessionPolicyArn,
StudioId,
region
)
SELECT
'{{ IdentityName }}',
'{{ IdentityType }}',
'{{ SessionPolicyArn }}',
'{{ StudioId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.emr.studio_session_mappings (
IdentityName,
IdentityType,
SessionPolicyArn,
StudioId,
region
)
SELECT
'{{ IdentityName }}',
'{{ IdentityType }}',
'{{ SessionPolicyArn }}',
'{{ StudioId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: studio_session_mapping
props:
- name: IdentityName
value: '{{ IdentityName }}'
- name: IdentityType
value: '{{ IdentityType }}'
- name: SessionPolicyArn
value: '{{ SessionPolicyArn }}'
- name: StudioId
value: '{{ StudioId }}'
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