putSchemaVersionMetadata method
Future<PutSchemaVersionMetadataResponse>
putSchemaVersionMetadata({
- required MetadataKeyValuePair metadataKeyValue,
- SchemaId? schemaId,
- String? schemaVersionId,
- SchemaVersionNumber? schemaVersionNumber,
Puts the metadata key value pair for a specified schema version ID. A maximum of 10 key value pairs will be allowed per schema version. They can be added over one or more calls.
May throw InvalidInputException. May throw AccessDeniedException. May throw AlreadyExistsException. May throw EntityNotFoundException. May throw ResourceNumberLimitExceededException.
Parameter metadataKeyValue
:
The metadata key's corresponding value.
Parameter schemaId
:
The unique ID for the schema.
Parameter schemaVersionId
:
The unique version ID of the schema version.
Parameter schemaVersionNumber
:
The version number of the schema.
Implementation
Future<PutSchemaVersionMetadataResponse> putSchemaVersionMetadata({
required MetadataKeyValuePair metadataKeyValue,
SchemaId? schemaId,
String? schemaVersionId,
SchemaVersionNumber? schemaVersionNumber,
}) async {
ArgumentError.checkNotNull(metadataKeyValue, 'metadataKeyValue');
_s.validateStringLength(
'schemaVersionId',
schemaVersionId,
36,
36,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.PutSchemaVersionMetadata'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MetadataKeyValue': metadataKeyValue,
if (schemaId != null) 'SchemaId': schemaId,
if (schemaVersionId != null) 'SchemaVersionId': schemaVersionId,
if (schemaVersionNumber != null)
'SchemaVersionNumber': schemaVersionNumber,
},
);
return PutSchemaVersionMetadataResponse.fromJson(jsonResponse.body);
}