Amazon Prometheus Service

2023/12/21 - Amazon Prometheus Service - 3 updated api methods

Changes  This release updates Amazon Managed Service for Prometheus APIs to support customer managed KMS keys.

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

Creates a new AMP workspace.

See also: AWS API Documentation

Request Syntax

client.create_workspace(
    alias='string',
    clientToken='string',
    tags={
        'string': 'string'
    },
    kmsKeyArn='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: _ . : / = + - @

type kmsKeyArn

string

param kmsKeyArn

Optional, customer managed KMS key used to encrypt data for this workspace

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a CreateWorkspace operation.

    • workspaceId (string) --

      The generated ID of the workspace that was just created.

    • 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: _ . : / = + - @

    • kmsKeyArn (string) --

      Customer managed KMS key ARN for this workspace

DescribeWorkspace (updated) Link ¶
Changes (response)
{'workspace': {'kmsKeyArn': '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': {
        'workspaceId': 'string',
        'alias': 'string',
        'arn': 'string',
        'status': {
            'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'
        },
        'prometheusEndpoint': 'string',
        'createdAt': datetime(2015, 1, 1),
        'tags': {
            'string': 'string'
        },
        'kmsKeyArn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeWorkspace operation.

    • workspace (dict) --

      The properties of the selected workspace.

      • workspaceId (string) --

        Unique string identifying this workspace.

      • alias (string) --

        Alias of this workspace.

      • arn (string) --

        The Amazon Resource Name (ARN) of this workspace.

      • status (dict) --

        The status of this workspace.

        • statusCode (string) --

          Status code of this workspace.

      • prometheusEndpoint (string) --

        Prometheus endpoint URI.

      • createdAt (datetime) --

        The time when the workspace was created.

      • 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: _ . : / = + - @

      • kmsKeyArn (string) --

        The customer managed KMS key of this workspace.

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

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

See also: AWS API Documentation

Request Syntax

client.list_workspaces(
    nextToken='string',
    alias='string',
    maxResults=123
)
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.

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).

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of a ListWorkspaces operation.

    • workspaces (list) --

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

      • (dict) --

        Represents a summary of the properties of a workspace.

        • workspaceId (string) --

          Unique string identifying this workspace.

        • alias (string) --

          Alias of this workspace.

        • arn (string) --

          The AmazonResourceName of this workspace.

        • status (dict) --

          The status of this workspace.

          • statusCode (string) --

            Status code of this workspace.

        • createdAt (datetime) --

          The time when the workspace was created.

        • 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: _ . : / = + - @

        • kmsKeyArn (string) --

          Customer managed KMS key ARN for this workspace

    • nextToken (string) --

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