Skip to content

list_schema_versions

list_schema_versions(
    schema_id: SchemaId,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    max_results: Optional[MaxResultsNumber] = None,
    next_token: Optional[SchemaRegistryTokenString] = None,
) -> ListSchemaVersionsResponse

Returns a list of schema versions that you have created, with minimal information. Schema versions in Deleted status will not be included in the results. Empty results will be returned if there are no schema versions available.

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. 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.

  • max_results (Optional[MaxResultsNumber], default: None ) –

    Maximum number of results required per page. If the value is not supplied, this will be defaulted to 25 per page.

  • next_token (Optional[SchemaRegistryTokenString], default: None ) –

    A continuation token, if this is a continuation call.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def list_schema_versions(
    self,
    schema_id: "capo_glue.types.schema_id.SchemaId",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    max_results: Optional[
        "capo_glue.types.max_results_number.MaxResultsNumber"
    ] = None,
    next_token: Optional[
        "capo_glue.types.schema_registry_token_string.SchemaRegistryTokenString"
    ] = None,
) -> "capo_glue.types.list_schema_versions_response.ListSchemaVersionsResponse":
    """<p>Returns a list of schema versions that you have created, with minimal information. Schema versions in Deleted status will not be included in the results. Empty results will be returned if there are no schema versions available.</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>
        max_results: <p>Maximum number of results required per page. If the value is not supplied, this will be defaulted to 25 per page.</p>
        next_token: <p>A continuation token, if this is a continuation call.</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.list_schema_versions_input.ListSchemaVersionsInput]",
    ) -> OperationResponse[
        "capo_glue.types.list_schema_versions_response.ListSchemaVersionsResponse"
    ]:
        import capo_glue._operations.aws_glue.list_schema_versions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSchemaVersions")
    )
    input_: capo_glue.types.list_schema_versions_input.ListSchemaVersionsInput = {
        "schema_id": schema_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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