updateStudioSessionMapping method
Updates the session policy attached to the user or group for the specified Amazon EMR Studio.
May throw InternalServerError.
May throw InvalidRequestException.
Parameter identityType :
Specifies whether the identity to update is a user or a group.
Parameter sessionPolicyArn :
The Amazon Resource Name (ARN) of the session policy to associate with the
specified user or group.
Parameter studioId :
The ID of the Amazon EMR Studio.
Parameter identityId :
The globally unique identifier (GUID) of the user or group. For more
information, see UserId
and GroupId
in the IAM Identity Center Identity Store API Reference. Either
IdentityName or IdentityId must be specified.
Parameter identityName :
The name of the user or group to update. For more information, see UserName
and DisplayName
in the IAM Identity Center Identity Store API Reference. Either
IdentityName or IdentityId must be specified.
Implementation
Future<void> updateStudioSessionMapping({
required IdentityType identityType,
required String sessionPolicyArn,
required String studioId,
String? identityId,
String? identityName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ElasticMapReduce.UpdateStudioSessionMapping'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IdentityType': identityType.value,
'SessionPolicyArn': sessionPolicyArn,
'StudioId': studioId,
if (identityId != null) 'IdentityId': identityId,
if (identityName != null) 'IdentityName': identityName,
},
);
}