PrometheusService / Client / list_workspaces

list_workspaces#

PrometheusService.Client.list_workspaces(**kwargs)#

Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted.

See also: AWS API Documentation

Request Syntax

response = client.list_workspaces(
    alias='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • alias (string) –

    If this is included, it filters the results to only the workspaces with names that start with the value that you specify here.

    Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify.

  • maxResults (integer) – The maximum number of workspaces to return per request. The default is 100.

  • nextToken (string) –

    The token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call.

    For example, if your initial request has maxResults of 10, and there are 12 workspaces to return, then your initial request will return 10 and a nextToken. Using the next token in a subsequent call will return the remaining 2 workspaces.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'workspaces': [
        {
            'alias': 'string',
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'kmsKeyArn': 'string',
            'status': {
                'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'
            },
            'tags': {
                'string': 'string'
            },
            'workspaceId': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    Represents the output of a ListWorkspaces operation.

    • nextToken (string) –

      A token indicating that there are more results to retrieve. You can use this token as part of your next ListWorkspaces request to retrieve those results.

    • workspaces (list) –

      An array of WorkspaceSummary structures containing information about the workspaces requested.

      • (dict) –

        The information about one Amazon Managed Service for Prometheus workspace in your account.

        • alias (string) –

          The alias that is assigned to this workspace to help identify it. It does not need to be unique.

        • arn (string) –

          The ARN of the workspace.

        • createdAt (datetime) –

          The date and time that the workspace was created.

        • kmsKeyArn (string) –

          (optional) If the workspace was created with a customer managed KMS key, the ARN for the key used.

        • status (dict) –

          The current status of the workspace.

          • statusCode (string) –

            The current status of the workspace.

        • tags (dict) –

          The list of tag keys and values that are associated with the workspace.

          • (string) –

            The key of the tag. Must not begin with aws:.

            • (string) –

              The value of the tag.

        • workspaceId (string) –

          The unique ID for the workspace.

Exceptions

  • PrometheusService.Client.exceptions.ThrottlingException

  • PrometheusService.Client.exceptions.ValidationException

  • PrometheusService.Client.exceptions.AccessDeniedException

  • PrometheusService.Client.exceptions.InternalServerException