Skip to content

update_table_storage_optimizer

update_table_storage_optimizer(
    database_name: NameString,
    table_name: NameString,
    storage_optimizer_config: StorageOptimizerConfigMap,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> UpdateTableStorageOptimizerResponse

Updates the configuration of the storage optimizers for a 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 for which to enable the storage optimizer.

  • storage_optimizer_config (StorageOptimizerConfigMap) –

    Name of the configuration for the storage optimizer.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def update_table_storage_optimizer(
    self,
    database_name: "capo_lakeformation.types.name_string.NameString",
    table_name: "capo_lakeformation.types.name_string.NameString",
    storage_optimizer_config: "capo_lakeformation.types.storage_optimizer_config_map.StorageOptimizerConfigMap",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_lakeformation.types.update_table_storage_optimizer_response.UpdateTableStorageOptimizerResponse":
    """<p>Updates the configuration of the storage optimizers for a 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 for which to enable the storage optimizer.</p>
        storage_optimizer_config: <p>Name of the configuration for the storage optimizer.</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.
    """

    def _handler(
        req: "OperationRequest[capo_lakeformation.types.update_table_storage_optimizer_request.UpdateTableStorageOptimizerRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.update_table_storage_optimizer_response.UpdateTableStorageOptimizerResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.update_table_storage_optimizer

        output, http_response = (
            capo_lakeformation._operations.aws_lake_formation.update_table_storage_optimizer.update_table_storage_optimizer(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTableStorageOptimizer")
    )
    input_: capo_lakeformation.types.update_table_storage_optimizer_request.UpdateTableStorageOptimizerRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "storage_optimizer_config": storage_optimizer_config,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

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