createApplicationAssignment method
Grant application access to a user or group.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationArn :
The ARN of the application for which the assignment is created.
Parameter principalId :
An identifier for an object in IAM Identity Center, such as a user or
group. PrincipalIds are GUIDs (For example,
f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about
PrincipalIds in IAM Identity Center, see the IAM
Identity Center Identity Store API Reference.
Parameter principalType :
The entity type for which the assignment will be created.
Implementation
Future<void> createApplicationAssignment({
required String applicationArn,
required String principalId,
required PrincipalType principalType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SWBExternalService.CreateApplicationAssignment'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationArn': applicationArn,
'PrincipalId': principalId,
'PrincipalType': principalType.value,
},
);
}