removeSchemaVersionMetadata method

Future<RemoveSchemaVersionMetadataResponse> removeSchemaVersionMetadata({
  1. required MetadataKeyValuePair metadataKeyValue,
  2. SchemaId? schemaId,
  3. String? schemaVersionId,
  4. SchemaVersionNumber? schemaVersionNumber,
})

Removes a key value pair from the schema version metadata for the specified schema version ID.

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

Parameter metadataKeyValue : The value of the metadata key.

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

Parameter schemaVersionId : The unique version ID of the schema version.

Parameter schemaVersionNumber : The version number of the schema.

Implementation

Future<RemoveSchemaVersionMetadataResponse> removeSchemaVersionMetadata({
  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.RemoveSchemaVersionMetadata'
  };
  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 RemoveSchemaVersionMetadataResponse.fromJson(jsonResponse.body);
}