Amazon Prometheus Service

2021/09/07 - Amazon Prometheus Service - 3 new 3 updated api methods

Changes  This release adds tagging support for Amazon Managed Service for Prometheus workspace.

ListTagsForResource (new) Link ¶

Lists the tags you have assigned to the resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The list of tags assigned to the resource.

      • (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

        • (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

UntagResource (new) Link ¶

Deletes tags from the specified resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type tagKeys

list

param tagKeys

[REQUIRED]

One or more tag keys

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

TagResource (new) Link ¶

Creates tags for the specified resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type tags

dict

param tags

[REQUIRED]

The list of tags assigned to the resource.

  • (string) --

    The key of the tag.

    Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

    • (string) --

      The value of the tag.

      Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateWorkspace (updated) Link ¶
Changes (both)
{'tags': {'string': 'string'}}

Creates a new AMP workspace.

See also: AWS API Documentation

Request Syntax

client.create_workspace(
    alias='string',
    clientToken='string',
    tags={
        'string': '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.

type tags

dict

param tags

Optional, user-provided tags for this workspace.

  • (string) --

    The key of the tag.

    Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

    • (string) --

      The value of the tag.

      Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'
    },
    'tags': {
        'string': 'string'
    },
    '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.

    • tags (dict) --

      The tags of this workspace.

      • (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

        • (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

    • workspaceId (string) --

      The generated ID of the workspace that was just created.

DescribeWorkspace (updated) Link ¶
Changes (response)
{'workspace': {'tags': {'string': 'string'}}}

Describes an existing AMP 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'
        },
        'tags': {
            'string': 'string'
        },
        '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.

      • tags (dict) --

        The tags of this workspace.

        • (string) --

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

          • (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

      • workspaceId (string) --

        Unique string identifying this workspace.

ListWorkspaces (updated) Link ¶
Changes (response)
{'workspaces': {'tags': {'string': 'string'}}}

Lists all AMP 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'
            },
            'tags': {
                'string': 'string'
            },
            '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.

        • tags (dict) --

          The tags of this workspace.

          • (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .

            • (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

        • workspaceId (string) --

          Unique string identifying this workspace.