getSchema method

Future<GetSchemaResponse> getSchema({
  1. required SchemaId schemaId,
})

Describes the specified schema in detail.

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

Parameter schemaId : This is a wrapper structure to contain schema identity fields. The structure contains:

  • SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either SchemaArn or SchemaName and RegistryName has to be provided.
  • SchemaId$SchemaName: The name of the schema. Either SchemaArn or SchemaName and RegistryName has to be provided.

Implementation

Future<GetSchemaResponse> getSchema({
  required SchemaId schemaId,
}) async {
  ArgumentError.checkNotNull(schemaId, 'schemaId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.GetSchema'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SchemaId': schemaId,
    },
  );

  return GetSchemaResponse.fromJson(jsonResponse.body);
}