listSchemas method

Future<ListSchemasResponse> listSchemas({
  1. int? maxResults,
  2. String? nextToken,
  3. RegistryId? registryId,
})

Returns a list of schemas with minimal details. Schemas in Deleting status will not be included in the results. Empty results will be returned if there are no schemas available.

When the RegistryId is not provided, all the schemas across registries will be part of the API response.

May throw InvalidInputException. May throw AccessDeniedException. May throw EntityNotFoundException. May throw InternalServiceException.

Parameter maxResults : Maximum number of results required per page. If the value is not supplied, this will be defaulted to 25 per page.

Parameter nextToken : A continuation token, if this is a continuation call.

Parameter registryId : A wrapper structure that may contain the registry name and Amazon Resource Name (ARN).

Implementation

Future<ListSchemasResponse> listSchemas({
  int? maxResults,
  String? nextToken,
  RegistryId? registryId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.ListSchemas'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (registryId != null) 'RegistryId': registryId,
    },
  );

  return ListSchemasResponse.fromJson(jsonResponse.body);
}