deleteApplicationAssignment method

Future<void> deleteApplicationAssignment({
  1. required String applicationArn,
  2. required String principalId,
  3. required PrincipalType principalType,
})

Revoke application access to an application by deleting application assignments for a user or group.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter applicationArn : Specifies the ARN of the application.

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

Implementation

Future<void> deleteApplicationAssignment({
  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.DeleteApplicationAssignment'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationArn': applicationArn,
      'PrincipalId': principalId,
      'PrincipalType': principalType.value,
    },
  );
}