Skip to content

delete_kx_database

delete_kx_database(
    environment_id: EnvironmentId,
    database_name: DatabaseName,
    client_token: ClientTokenString,
    *,
    config_overrides: Optional[finspaceClientConfig] = None,
) -> DeleteKxDatabaseResponse

Deletes the specified database and all of its associated data. This action is irreversible. You must copy any data out of the database before deleting it if the data is to be retained.

Parameters:

  • environment_id (EnvironmentId) –

    A unique identifier for the kdb environment.

  • database_name (DatabaseName) –

    The name of the kdb database that you want to delete.

  • client_token (ClientTokenString) –

    A token that ensures idempotency. This token expires in 10 minutes.

Raises:

Source code in docs_src/capo_finspace/_services/finspace.py
def delete_kx_database(
    self,
    environment_id: "capo_finspace.types.environment_id.EnvironmentId",
    database_name: "capo_finspace.types.database_name.DatabaseName",
    client_token: "capo_finspace.types.client_token_string.ClientTokenString",
    *,
    config_overrides: Optional[finspaceClientConfig] = None,
) -> "capo_finspace.types.delete_kx_database_response.DeleteKxDatabaseResponse":
    """<p>Deletes the specified database and all of its associated data. This action is irreversible. You must copy any data out of the database before deleting it if the data is to be retained.</p>

    Args:
        environment_id: <p>A unique identifier for the kdb environment.</p>
        database_name: <p>The name of the kdb database that you want to delete.</p>
        client_token: <p>A token that ensures idempotency. This token expires in 10 minutes.</p>

    Raises:
        capo_finspace.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_finspace.errors.conflict_exception.ConflictException: <p>There was a conflict with this action, and it could not be completed.</p>
        capo_finspace.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_finspace.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_finspace.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_finspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_finspace.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_finspace.types.delete_kx_database_request.DeleteKxDatabaseRequest]",
    ) -> OperationResponse[
        "capo_finspace.types.delete_kx_database_response.DeleteKxDatabaseResponse"
    ]:
        import capo_finspace._operations.aws_habanero_management_service.delete_kx_database

        output, http_response = (
            capo_finspace._operations.aws_habanero_management_service.delete_kx_database.delete_kx_database(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteKxDatabase")
    )
    input_: capo_finspace.types.delete_kx_database_request.DeleteKxDatabaseRequest = {
        "environment_id": environment_id,
        "database_name": database_name,
        "client_token": client_token,
    }

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