Skip to content

get_schema_version async

get_schema_version(
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    schema_id: Optional[SchemaId] = None,
    schema_version_id: Optional[SchemaVersionIdString] = None,
    schema_version_number: Optional[SchemaVersionNumber] = None,
) -> GetSchemaVersionResponse

Get the specified schema by its unique ID assigned when a version of the schema is created or registered. Schema versions in Deleted status will not be included in the results.

Parameters:

  • schema_id (Optional[SchemaId], default: None ) –

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

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

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

  • schema_version_id (Optional[SchemaVersionIdString], default: None ) –

    The SchemaVersionId of the schema version. This field is required for fetching by schema ID. Either this or the SchemaId wrapper has to be provided.

  • schema_version_number (Optional[SchemaVersionNumber], default: None ) –

    The version number of the schema.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def get_schema_version(
    self,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    schema_id: Optional["capo_glue.types.schema_id.SchemaId"] = None,
    schema_version_id: Optional[
        "capo_glue.types.schema_version_id_string.SchemaVersionIdString"
    ] = None,
    schema_version_number: Optional[
        "capo_glue.types.schema_version_number.SchemaVersionNumber"
    ] = None,
) -> "capo_glue.types.get_schema_version_response.GetSchemaVersionResponse":
    """<p>Get the specified schema by its unique ID assigned when a version of the schema is created or registered. Schema versions in Deleted status will not be included in the results.</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. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p> </li> <li> <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p> </li> </ul>
        schema_version_id: <p>The <code>SchemaVersionId</code> of the schema version. This field is required for fetching by schema ID. Either this or the <code>SchemaId</code> wrapper has to be provided.</p>
        schema_version_number: <p>The version number of the schema.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.get_schema_version_input.GetSchemaVersionInput]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.get_schema_version_response.GetSchemaVersionResponse"
    ]:
        import capo_glue._operations.aws_glue.get_schema_version

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.get_schema_version.async_get_schema_version(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSchemaVersion")
    )
    input_: capo_glue.types.get_schema_version_input.GetSchemaVersionInput = {}
    if schema_id is not None:
        input_["schema_id"] = schema_id
    if schema_version_id is not None:
        input_["schema_version_id"] = schema_version_id
    if schema_version_number is not None:
        input_["schema_version_number"] = schema_version_number

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output