listFacetNames method

Future<ListFacetNamesResponse> listFacetNames({
  1. required String schemaArn,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves the names of facets that exist in a schema.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw InvalidNextTokenException.

Parameter schemaArn : The Amazon Resource Name (ARN) to retrieve facet names from.

Parameter maxResults : The maximum number of results to retrieve.

Parameter nextToken : The pagination token.

Implementation

Future<ListFacetNamesResponse> listFacetNames({
  required String schemaArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(schemaArn, 'schemaArn');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'x-amz-data-partition': schemaArn.toString(),
  };
  final $payload = <String, dynamic>{
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/amazonclouddirectory/2017-01-11/facet/list',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ListFacetNamesResponse.fromJson(response);
}