Skip to content

update_table_objects

update_table_objects(
    database_name: NameString,
    table_name: NameString,
    write_operations: WriteOperationList,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    transaction_id: Optional[TransactionIdString] = None,
) -> UpdateTableObjectsResponse

Updates the manifest of Amazon S3 objects that make up the specified governed table.

Parameters:

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

    The catalog containing the governed table to update. Defaults to the caller’s account ID.

  • database_name (NameString) –

    The database containing the governed table to update.

  • table_name (NameString) –

    The governed table to update.

  • transaction_id (Optional[TransactionIdString], default: None ) –

    The transaction at which to do the write.

  • write_operations (WriteOperationList) –

    A list of WriteOperation objects that define an object to add to or delete from the manifest for a governed table.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def update_table_objects(
    self,
    database_name: "capo_lakeformation.types.name_string.NameString",
    table_name: "capo_lakeformation.types.name_string.NameString",
    write_operations: "capo_lakeformation.types.write_operation_list.WriteOperationList",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
    transaction_id: Optional[
        "capo_lakeformation.types.transaction_id_string.TransactionIdString"
    ] = None,
) -> "capo_lakeformation.types.update_table_objects_response.UpdateTableObjectsResponse":
    """<p>Updates the manifest of Amazon S3 objects that make up the specified governed table.</p>

    Args:
        catalog_id: <p>The catalog containing the governed table to update. Defaults to the caller’s account ID.</p>
        database_name: <p>The database containing the governed table to update.</p>
        table_name: <p>The governed table to update.</p>
        transaction_id: <p>The transaction at which to do the write.</p>
        write_operations: <p>A list of <code>WriteOperation</code> objects that define an object to add to or delete from the manifest for a governed table.</p>

    Raises:
        capo_lakeformation.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</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.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_lakeformation.errors.resource_not_ready_exception.ResourceNotReadyException: <p>Contains details about an error related to a resource which is not ready for a transaction.</p>
        capo_lakeformation.errors.transaction_canceled_exception.TransactionCanceledException: <p>Contains details about an error related to a transaction that was cancelled.</p>
        capo_lakeformation.errors.transaction_commit_in_progress_exception.TransactionCommitInProgressException: <p>Contains details about an error related to a transaction commit that was in progress.</p>
        capo_lakeformation.errors.transaction_committed_exception.TransactionCommittedException: <p>Contains details about an error where the specified transaction has already been committed and cannot be used for <code>UpdateTableObjects</code>.</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_objects_request.UpdateTableObjectsRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.update_table_objects_response.UpdateTableObjectsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.update_table_objects

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTableObjects")
    )
    input_: capo_lakeformation.types.update_table_objects_request.UpdateTableObjectsRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "write_operations": write_operations,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if transaction_id is not None:
        input_["transaction_id"] = transaction_id

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