getSchemaVersion method
Future<GetSchemaVersionResponse>
getSchemaVersion({
- SchemaId? schemaId,
- String? schemaVersionId,
- SchemaVersionNumber? schemaVersionNumber,
Get the specified schema by its unique ID assigned when a version of the schema is created or registered. Schema versions in Deleted status will not be included in the results.
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
orSchemaName
andRegistryName
has to be provided. -
SchemaId$SchemaName: The name of the schema. Either
SchemaArn
orSchemaName
andRegistryName
has to be provided.
Parameter schemaVersionId
:
The SchemaVersionId
of the schema version. This field is
required for fetching by schema ID. Either this or the
SchemaId
wrapper has to be provided.
Parameter schemaVersionNumber
:
The version number of the schema.
Implementation
Future<GetSchemaVersionResponse> getSchemaVersion({
SchemaId? schemaId,
String? schemaVersionId,
SchemaVersionNumber? schemaVersionNumber,
}) async {
_s.validateStringLength(
'schemaVersionId',
schemaVersionId,
36,
36,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.GetSchemaVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (schemaId != null) 'SchemaId': schemaId,
if (schemaVersionId != null) 'SchemaVersionId': schemaVersionId,
if (schemaVersionNumber != null)
'SchemaVersionNumber': schemaVersionNumber,
},
);
return GetSchemaVersionResponse.fromJson(jsonResponse.body);
}