Skip to content

list_table_storage_optimizers async

list_table_storage_optimizers(
    database_name: NameString,
    table_name: NameString,
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    storage_optimizer_type: Optional[OptimizerType] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[Token] = None,
) -> ListTableStorageOptimizersResponse

Returns the configuration of all storage optimizers associated with a specified table.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The Catalog ID of the table.

  • database_name (NameString) –

    Name of the database where the table is present.

  • table_name (NameString) –

    Name of the table.

  • storage_optimizer_type (Optional[OptimizerType], default: None ) –

    The specific type of storage optimizers to list. The supported value is compaction.

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

    The number of storage optimizers to return on each call.

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

    A continuation token, if this is a continuation call.

Raises:

Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
async def list_table_storage_optimizers(
    self,
    database_name: "capo_lakeformation.types.name_string.NameString",
    table_name: "capo_lakeformation.types.name_string.NameString",
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
    storage_optimizer_type: Optional[
        "capo_lakeformation.types.optimizer_type.OptimizerType"
    ] = None,
    max_results: Optional["capo_lakeformation.types.page_size.PageSize"] = None,
    next_token: Optional["capo_lakeformation.types.token.Token"] = None,
) -> "capo_lakeformation.types.list_table_storage_optimizers_response.ListTableStorageOptimizersResponse":
    """<p>Returns the configuration of all storage optimizers associated with a specified table.</p>

    Args:
        catalog_id: <p>The Catalog ID of the table.</p>
        database_name: <p>Name of the database where the table is present.</p>
        table_name: <p>Name of the table.</p>
        storage_optimizer_type: <p>The specific type of storage optimizers to list. The supported value is <code>compaction</code>.</p>
        max_results: <p>The number of storage optimizers to return on each call.</p>
        next_token: <p>A continuation token, if this is a continuation call.</p>

    Raises:
        capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</p>
        capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lakeformation.types.list_table_storage_optimizers_request.ListTableStorageOptimizersRequest]",
    ) -> AsyncOperationResponse[
        "capo_lakeformation.types.list_table_storage_optimizers_response.ListTableStorageOptimizersResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.list_table_storage_optimizers

        (
            output,
            http_response,
        ) = await capo_lakeformation._operations.aws_lake_formation.list_table_storage_optimizers.async_list_table_storage_optimizers(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTableStorageOptimizers")
    )
    input_: capo_lakeformation.types.list_table_storage_optimizers_request.ListTableStorageOptimizersRequest = {
        "database_name": database_name,
        "table_name": table_name,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if storage_optimizer_type is not None:
        input_["storage_optimizer_type"] = storage_optimizer_type
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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