Validates the supplied schema. This call has no side effects, it simply validates using the supplied schema using DataFormat as the format. Since it does not take a schema set name, no compatibility checks are performed.
Parameters:
-
data_format
(DataFormat)
–
The data format of the schema definition. Currently AVRO, JSON and PROTOBUF are supported.
-
schema_definition
(SchemaDefinitionString)
–
The definition of the schema that has to be validated.
Raises:
Source code in docs_src/capo_glue/_services/glue.py
| def check_schema_version_validity(
self,
data_format: "capo_glue.types.data_format.DataFormat",
schema_definition: "capo_glue.types.schema_definition_string.SchemaDefinitionString",
*,
config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.check_schema_version_validity_response.CheckSchemaVersionValidityResponse":
"""<p>Validates the supplied schema. This call has no side effects, it simply validates using the supplied schema using <code>DataFormat</code> as the format. Since it does not take a schema set name, no compatibility checks are performed.</p>
Args:
data_format: <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
schema_definition: <p>The definition of the schema that has to be validated.</p>
Raises:
capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_glue.types.check_schema_version_validity_input.CheckSchemaVersionValidityInput]",
) -> OperationResponse[
"capo_glue.types.check_schema_version_validity_response.CheckSchemaVersionValidityResponse"
]:
import capo_glue._operations.aws_glue.check_schema_version_validity
output, http_response = (
capo_glue._operations.aws_glue.check_schema_version_validity.check_schema_version_validity(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CheckSchemaVersionValidity")
)
input_: capo_glue.types.check_schema_version_validity_input.CheckSchemaVersionValidityInput = {
"data_format": data_format,
"schema_definition": schema_definition,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|