listUserGroups method

Future<ListUserGroupsResponse> listUserGroups({
  1. required String awsAccountId,
  2. required String namespace,
  3. required String userName,
  4. int? maxResults,
  5. String? nextToken,
})

Lists the Amazon Quick Sight groups that an Amazon Quick Sight user is a member of.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw PreconditionNotMetException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw ThrottlingException.

Parameter awsAccountId : The Amazon Web Services account ID that the user is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.

Parameter namespace : The namespace. Currently, you should set this to default.

Parameter userName : The Amazon Quick Sight user name that you want to list group memberships for.

Parameter maxResults : The maximum number of results to return from this request.

Parameter nextToken : A pagination token that can be used in a subsequent request.

Implementation

Future<ListUserGroupsResponse> listUserGroups({
  required String awsAccountId,
  required String namespace,
  required String userName,
  int? maxResults,
  String? nextToken,
}) async {
  _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)}/users/${Uri.encodeComponent(userName)}/groups',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListUserGroupsResponse.fromJson(response);
}