listNamespaces method

Future<ListNamespacesResponse> listNamespaces({
  1. required String awsAccountId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the namespaces for the specified Amazon Web Services account. This operation doesn't list deleted namespaces.

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

Parameter awsAccountId : The ID for the Amazon Web Services account that contains the Quick Sight namespaces that you want to list.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : A unique pagination token that can be used in a subsequent request. You will receive a pagination token in the response body of a previous ListNameSpaces API call if there is more data that can be returned. To receive the data, make another ListNamespaces API call with the returned token to retrieve the next page of data. Each token is valid for 24 hours. If you try to make a ListNamespaces API call with an expired token, you will receive a HTTP 400 InvalidNextTokenException error.

Implementation

Future<ListNamespacesResponse> listNamespaces({
  required String awsAccountId,
  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',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListNamespacesResponse.fromJson(response);
}