Skip to content

delete_partition_index

delete_partition_index(
    database_name: NameString,
    table_name: NameString,
    index_name: NameString,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> DeletePartitionIndexResponse

Deletes a specified partition index from an existing table.

Parameters:

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

    The catalog ID where the table resides.

  • database_name (NameString) –

    Specifies the name of a database from which you want to delete a partition index.

  • table_name (NameString) –

    Specifies the name of a table from which you want to delete a partition index.

  • index_name (NameString) –

    The name of the partition index to be deleted.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def delete_partition_index(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    index_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_glue.types.delete_partition_index_response.DeletePartitionIndexResponse":
    """<p>Deletes a specified partition index from an existing table.</p>

    Args:
        catalog_id: <p>The catalog ID where the table resides.</p>
        database_name: <p>Specifies the name of a database from which you want to delete a partition index.</p>
        table_name: <p>Specifies the name of a table from which you want to delete a partition index.</p>
        index_name: <p>The name of the partition index to be deleted.</p>

    Raises:
        capo_glue.errors.conflict_exception.ConflictException: <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.glue_encryption_exception.GlueEncryptionException: <p>An encryption operation failed.</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.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.delete_partition_index_request.DeletePartitionIndexRequest]",
    ) -> OperationResponse[
        "capo_glue.types.delete_partition_index_response.DeletePartitionIndexResponse"
    ]:
        import capo_glue._operations.aws_glue.delete_partition_index

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePartitionIndex")
    )
    input_: capo_glue.types.delete_partition_index_request.DeletePartitionIndexRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "index_name": index_name,
    }
    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