listIAMPolicyAssignments method

Future<ListIAMPolicyAssignmentsResponse> listIAMPolicyAssignments({
  1. required String awsAccountId,
  2. required String namespace,
  3. AssignmentStatus? assignmentStatus,
  4. int? maxResults,
  5. String? nextToken,
})

Lists the IAM policy assignments in the current Amazon Quick Sight account.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidNextTokenException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains these IAM policy assignments.

Parameter namespace : The namespace for the assignments.

Parameter assignmentStatus : The status of the assignments.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token for the next set of results, or null if there are no more results.

Implementation

Future<ListIAMPolicyAssignmentsResponse> listIAMPolicyAssignments({
  required String awsAccountId,
  required String namespace,
  AssignmentStatus? assignmentStatus,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (assignmentStatus != null)
      'assignment-status': [assignmentStatus.value],
    if (maxResults != null) 'max-results': [maxResults.toString()],
    if (nextToken != null) 'next-token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/namespaces/${Uri.encodeComponent(namespace)}/v2/iam-policy-assignments',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListIAMPolicyAssignmentsResponse.fromJson(response);
}