Skip to content

check_schema_version_validity async

check_schema_version_validity(
    data_format: DataFormat,
    schema_definition: SchemaDefinitionString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> CheckSchemaVersionValidityResponse

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/async_glue.py
async 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[AsyncGlueClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.check_schema_version_validity_input.CheckSchemaVersionValidityInput]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.check_schema_version_validity_response.CheckSchemaVersionValidityResponse"
    ]:
        import capo_glue._operations.aws_glue.check_schema_version_validity

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.check_schema_version_validity.async_check_schema_version_validity(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output