OpenSearchMemory / Client / delete_space

delete_space

OpenSearchMemory.Client.delete_space(**kwargs)

Deletes a space and its memories. Deletion can’t be undone. After you delete the space, you can’t retrieve its events, and the service removes them when they reach their expiry.

The operation returns with status DELETING. When deletion finishes, GetSpace returns ResourceNotFoundException. If deletion fails, the status becomes FAILED. A space that is CREATING or UPDATING can’t be deleted until that finishes: the request fails with ConflictException. Deleting a space that is already DELETING returns DELETING again.

See also: AWS API Documentation

Request Syntax

response = client.delete_space(
    spaceId='string'
)
Parameters:

spaceId (string) –

[REQUIRED]

The ID of the space to delete.

Return type:

dict

Returns:

Response Syntax

{
    'spaceId': 'string',
    'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED'
}

Response Structure

  • (dict) –

    • spaceId (string) –

      The ID of the space.

    • status (string) –

      The status of the space: DELETING.

Exceptions

  • OpenSearchMemory.Client.exceptions.ConflictException

  • OpenSearchMemory.Client.exceptions.ResourceNotFoundException

  • OpenSearchMemory.Client.exceptions.AccessDeniedException

  • OpenSearchMemory.Client.exceptions.ThrottlingException

  • OpenSearchMemory.Client.exceptions.InternalServerException

  • OpenSearchMemory.Client.exceptions.ValidationException