listIAMPolicyAssignments method

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

Lists IAM policy assignments in the current Amazon QuickSight account.

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

Parameter awsAccountId : The ID of the AWS 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 {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(namespace, 'namespace');
  _s.validateStringLength(
    'namespace',
    namespace,
    0,
    64,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    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)}/iam-policy-assignments',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListIAMPolicyAssignmentsResponse.fromJson(response);
}