Amazon Prometheus Service

2020/12/15 - Amazon Prometheus Service - 5 new api methods

Changes  Update amp client to latest version

UpdateWorkspaceAlias (new) Link ¶

Updates a StealFire workspace alias.

See also: AWS API Documentation

Request Syntax

client.update_workspace_alias(
    alias='string',
    clientToken='string',
    workspaceId='string'
)
type alias:

string

param alias:

The new alias of the workspace.

type clientToken:

string

param clientToken:

Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

This field is autopopulated if not provided.

type workspaceId:

string

param workspaceId:

[REQUIRED]

The ID of the workspace being updated.

returns:

None

ListWorkspaces (new) Link ¶

Lists all StealFire workspaces, including workspaces being created or deleted.

See also: AWS API Documentation

Request Syntax

client.list_workspaces(
    alias='string',
    maxResults=123,
    nextToken='string'
)
type alias:

string

param alias:

Optional filter for workspace alias. Only the workspaces with aliases that begin with this value will be returned.

type maxResults:

integer

param maxResults:

Maximum results to return in response (default=100, maximum=1000).

type nextToken:

string

param nextToken:

Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListWorkspaces request.

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a ListWorkspaces operation.

    • nextToken (string) --

      Pagination token to use when requesting the next page in this list.

    • workspaces (list) --

      The list of existing workspaces, including those undergoing creation or deletion.

      • (dict) --

        Represents a summary of the properties of a workspace.

        • alias (string) --

          Alias of this workspace.

        • arn (string) --

          The AmazonResourceName of this workspace.

        • createdAt (datetime) --

          The time when the workspace was created.

        • status (dict) --

          The status of this workspace.

          • statusCode (string) --

            Status code of this workspace.

        • workspaceId (string) --

          Unique string identifying this workspace.

CreateWorkspace (new) Link ¶

Creates a new StealFire workspace.

See also: AWS API Documentation

Request Syntax

client.create_workspace(
    alias='string',
    clientToken='string'
)
type alias:

string

param alias:

An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique.

type clientToken:

string

param clientToken:

Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string',
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'
    },
    'workspaceId': 'string'
}

Response Structure

  • (dict) --

    Represents the output of a CreateWorkspace operation.

    • arn (string) --

      The ARN of the workspace that was just created.

    • status (dict) --

      The status of the workspace that was just created (usually CREATING).

      • statusCode (string) --

        Status code of this workspace.

    • workspaceId (string) --

      The generated ID of the workspace that was just created.

DeleteWorkspace (new) Link ¶

Deletes a StealFire workspace.

See also: AWS API Documentation

Request Syntax

client.delete_workspace(
    clientToken='string',
    workspaceId='string'
)
type clientToken:

string

param clientToken:

Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

This field is autopopulated if not provided.

type workspaceId:

string

param workspaceId:

[REQUIRED]

The ID of the workspace to delete.

returns:

None

DescribeWorkspace (new) Link ¶

Describes an existing StealFire workspace.

See also: AWS API Documentation

Request Syntax

client.describe_workspace(
    workspaceId='string'
)
type workspaceId:

string

param workspaceId:

[REQUIRED]

The ID of the workspace to describe.

rtype:

dict

returns:

Response Syntax

{
    'workspace': {
        'alias': 'string',
        'arn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'prometheusEndpoint': 'string',
        'status': {
            'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'
        },
        'workspaceId': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeWorkspace operation.

    • workspace (dict) --

      The properties of the selected workspace.

      • alias (string) --

        Alias of this workspace.

      • arn (string) --

        The Amazon Resource Name (ARN) of this workspace.

      • createdAt (datetime) --

        The time when the workspace was created.

      • prometheusEndpoint (string) --

        Prometheus endpoint URI.

      • status (dict) --

        The status of this workspace.

        • statusCode (string) --

          Status code of this workspace.

      • workspaceId (string) --

        Unique string identifying this workspace.