Skip to content

get_schema_versions_diff

get_schema_versions_diff(
    schema_id: SchemaId,
    first_schema_version_number: SchemaVersionNumber,
    second_schema_version_number: SchemaVersionNumber,
    schema_diff_type: SchemaDiffType,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> GetSchemaVersionsDiffResponse

Fetches the schema version difference in the specified difference type between two stored schema versions in the Schema Registry.

This API allows you to compare two schema versions between two schema definitions under the same schema.

Parameters:

  • schema_id (SchemaId) –

    This is a wrapper structure to contain schema identity fields. The structure contains:

    • SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.

    • SchemaId$SchemaName: The name of the schema. One of SchemaArn or SchemaName has to be provided.

  • first_schema_version_number (SchemaVersionNumber) –

    The first of the two schema versions to be compared.

  • second_schema_version_number (SchemaVersionNumber) –

    The second of the two schema versions to be compared.

  • schema_diff_type (SchemaDiffType) –

    Refers to SYNTAX_DIFF, which is the currently supported diff type.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def get_schema_versions_diff(
    self,
    schema_id: "capo_glue.types.schema_id.SchemaId",
    first_schema_version_number: "capo_glue.types.schema_version_number.SchemaVersionNumber",
    second_schema_version_number: "capo_glue.types.schema_version_number.SchemaVersionNumber",
    schema_diff_type: "capo_glue.types.schema_diff_type.SchemaDiffType",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.get_schema_versions_diff_response.GetSchemaVersionsDiffResponse":
    """<p>Fetches the schema version difference in the specified difference type between two stored schema versions in the Schema Registry.</p> <p>This API allows you to compare two schema versions between two schema definitions under the same schema.</p>

    Args:
        schema_id: <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p> <ul> <li> <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p> </li> <li> <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p> </li> </ul>
        first_schema_version_number: <p>The first of the two schema versions to be compared.</p>
        second_schema_version_number: <p>The second of the two schema versions to be compared.</p>
        schema_diff_type: <p>Refers to <code>SYNTAX_DIFF</code>, which is the currently supported diff type.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</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.get_schema_versions_diff_input.GetSchemaVersionsDiffInput]",
    ) -> OperationResponse[
        "capo_glue.types.get_schema_versions_diff_response.GetSchemaVersionsDiffResponse"
    ]:
        import capo_glue._operations.aws_glue.get_schema_versions_diff

        output, http_response = (
            capo_glue._operations.aws_glue.get_schema_versions_diff.get_schema_versions_diff(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSchemaVersionsDiff")
    )
    input_: capo_glue.types.get_schema_versions_diff_input.GetSchemaVersionsDiffInput = {
        "schema_id": schema_id,
        "first_schema_version_number": first_schema_version_number,
        "second_schema_version_number": second_schema_version_number,
        "schema_diff_type": schema_diff_type,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output