Skip to content

create_table_optimizer async

create_table_optimizer(
    catalog_id: CatalogIdString,
    database_name: NameString,
    table_name: NameString,
    type: TableOptimizerType,
    table_optimizer_configuration: TableOptimizerConfiguration,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> CreateTableOptimizerResponse

Creates a new table optimizer for a specific function.

Parameters:

  • catalog_id (CatalogIdString) –

    The Catalog ID of the table.

  • database_name (NameString) –

    The name of the database in the catalog in which the table resides.

  • table_name (NameString) –

    The name of the table.

  • type (TableOptimizerType) –

    The type of table optimizer.

  • table_optimizer_configuration (TableOptimizerConfiguration) –

    A TableOptimizerConfiguration object representing the configuration of a table optimizer.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def create_table_optimizer(
    self,
    catalog_id: "capo_glue.types.catalog_id_string.CatalogIdString",
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    type: "capo_glue.types.table_optimizer_type.TableOptimizerType",
    table_optimizer_configuration: "capo_glue.types.table_optimizer_configuration.TableOptimizerConfiguration",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.create_table_optimizer_response.CreateTableOptimizerResponse":
    """<p>Creates a new table optimizer for a specific function. </p>

    Args:
        catalog_id: <p>The Catalog ID of the table.</p>
        database_name: <p>The name of the database in the catalog in which the table resides.</p>
        table_name: <p>The name of the table.</p>
        type: <p>The type of table optimizer.</p>
        table_optimizer_configuration: <p>A <code>TableOptimizerConfiguration</code> object representing the configuration of a table optimizer.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.already_exists_exception.AlreadyExistsException: <p>A resource to be created or added already exists.</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.throttling_exception.ThrottlingException: <p>The throttling threshhold was exceeded.</p>
        capo_glue.errors.validation_exception.ValidationException: <p>A value could not be validated.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.create_table_optimizer_request.CreateTableOptimizerRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.create_table_optimizer_response.CreateTableOptimizerResponse"
    ]:
        import capo_glue._operations.aws_glue.create_table_optimizer

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateTableOptimizer")
    )
    input_: capo_glue.types.create_table_optimizer_request.CreateTableOptimizerRequest = {
        "catalog_id": catalog_id,
        "database_name": database_name,
        "table_name": table_name,
        "type": type,
        "table_optimizer_configuration": table_optimizer_configuration,
    }

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