OpenSearchMemory / Client / list_spaces

list_spaces

OpenSearchMemory.Client.list_spaces(**kwargs)

Lists the spaces in your account in the current Region.

See also: AWS API Documentation

Request Syntax

response = client.list_spaces(
    maxResults=123,
    nextToken='string'
)
Parameters:
  • maxResults (integer) – The maximum number of spaces to return, from 1 to 100. The default is 100.

  • nextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Return type:

dict

Returns:

Response Syntax

{
    'spaces': [
        {
            'spaceId': 'string',
            'arn': 'string',
            'name': 'string',
            'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
            'createdAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • spaces (list) –

      The spaces.

      • (dict) –

        A summary of a space, as returned by ListSpaces.

        • spaceId (string) –

          The ID of the space.

        • arn (string) –

          The Amazon Resource Name (ARN) of the space.

        • name (string) –

          The name of the space.

        • status (string) –

          The status of the space.

        • createdAt (datetime) –

          When the space was created.

    • nextToken (string) –

      The token for the next set of results. Absent when there are no more results.

Exceptions

  • OpenSearchMemory.Client.exceptions.AccessDeniedException

  • OpenSearchMemory.Client.exceptions.ThrottlingException

  • OpenSearchMemory.Client.exceptions.InternalServerException

  • OpenSearchMemory.Client.exceptions.ValidationException