Amazon Prometheus Service

2021/09/29 - Amazon Prometheus Service - 9 new api methods

Changes  This release adds alert manager and rule group namespace APIs

ListRuleGroupsNamespaces (new) Link ¶

Lists rule groups namespaces.

See also: AWS API Documentation

Request Syntax

client.list_rule_groups_namespaces(
    maxResults=123,
    name='string',
    nextToken='string',
    workspaceId='string'
)
type maxResults

integer

param maxResults

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

type name

string

param name

Optional filter for rule groups namespace name. Only the rule groups namespace that begin with this value will be returned.

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 ListRuleGroupsNamespaces request.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'ruleGroupsNamespaces': [
        {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'modifiedAt': datetime(2015, 1, 1),
            'name': 'string',
            'status': {
                'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
                'statusReason': 'string'
            },
            'tags': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a ListRuleGroupsNamespaces operation.

    • nextToken (string) --

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

    • ruleGroupsNamespaces (list) --

      The list of the selected rule groups namespaces.

      • (dict) --

        Represents a summary of the rule groups namespace.

        • arn (string) --

          The Amazon Resource Name (ARN) of this rule groups namespace.

        • createdAt (datetime) --

          The time when the rule groups namespace was created.

        • modifiedAt (datetime) --

          The time when the rule groups namespace was modified.

        • name (string) --

          The rule groups namespace name.

        • status (dict) --

          The status of rule groups namespace.

          • statusCode (string) --

            Status code of this namespace.

          • statusReason (string) --

            The reason for failure if any.

        • tags (dict) --

          The tags of this rule groups namespace.

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

CreateRuleGroupsNamespace (new) Link ¶

Create a rule group namespace.

See also: AWS API Documentation

Request Syntax

client.create_rule_groups_namespace(
    clientToken='string',
    data=b'bytes',
    name='string',
    tags={
        'string': '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 data

bytes

param data

[REQUIRED]

The namespace data that define the rule groups.

type name

string

param name

[REQUIRED]

The rule groups namespace name.

type tags

dict

param tags

Optional, user-provided tags for this rule groups namespace.

  • (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 workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace in which to create the rule group namespace.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'name': 'string',
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
        'statusReason': 'string'
    },
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a CreateRuleGroupsNamespace operation.

    • arn (string) --

      The Amazon Resource Name (ARN) of this rule groups namespace.

    • name (string) --

      The rule groups namespace name.

    • status (dict) --

      The status of rule groups namespace.

      • statusCode (string) --

        Status code of this namespace.

      • statusReason (string) --

        The reason for failure if any.

    • tags (dict) --

      The tags of this rule groups namespace.

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

CreateAlertManagerDefinition (new) Link ¶

Create an alert manager definition.

See also: AWS API Documentation

Request Syntax

client.create_alert_manager_definition(
    clientToken='string',
    data=b'bytes',
    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 data

bytes

param data

[REQUIRED]

The alert manager definition data.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace in which to create the alert manager definition.

rtype

dict

returns

Response Syntax

{
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
        'statusReason': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a CreateAlertManagerDefinition operation.

    • status (dict) --

      The status of alert manager definition.

      • statusCode (string) --

        Status code of this definition.

      • statusReason (string) --

        The reason for failure if any.

DescribeAlertManagerDefinition (new) Link ¶

Describes an alert manager definition.

See also: AWS API Documentation

Request Syntax

client.describe_alert_manager_definition(
    workspaceId='string'
)
type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace to describe.

rtype

dict

returns

Response Syntax

{
    'alertManagerDefinition': {
        'createdAt': datetime(2015, 1, 1),
        'data': b'bytes',
        'modifiedAt': datetime(2015, 1, 1),
        'status': {
            'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
            'statusReason': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeAlertManagerDefinition operation.

    • alertManagerDefinition (dict) --

      The properties of the selected workspace's alert manager definition.

      • createdAt (datetime) --

        The time when the alert manager definition was created.

      • data (bytes) --

        The alert manager definition.

      • modifiedAt (datetime) --

        The time when the alert manager definition was modified.

      • status (dict) --

        The status of alert manager definition.

        • statusCode (string) --

          Status code of this definition.

        • statusReason (string) --

          The reason for failure if any.

PutRuleGroupsNamespace (new) Link ¶

Update a rule groups namespace.

See also: AWS API Documentation

Request Syntax

client.put_rule_groups_namespace(
    clientToken='string',
    data=b'bytes',
    name='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 data

bytes

param data

[REQUIRED]

The namespace data that define the rule groups.

type name

string

param name

[REQUIRED]

The rule groups namespace name.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace in which to update the rule group namespace.

rtype

dict

returns

Response Syntax

{
    'arn': 'string',
    'name': 'string',
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
        'statusReason': 'string'
    },
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a PutRuleGroupsNamespace operation.

    • arn (string) --

      The Amazon Resource Name (ARN) of this rule groups namespace.

    • name (string) --

      The rule groups namespace name.

    • status (dict) --

      The status of rule groups namespace.

      • statusCode (string) --

        Status code of this namespace.

      • statusReason (string) --

        The reason for failure if any.

    • tags (dict) --

      The tags of this rule groups namespace.

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

DeleteRuleGroupsNamespace (new) Link ¶

Delete a rule groups namespace.

See also: AWS API Documentation

Request Syntax

client.delete_rule_groups_namespace(
    clientToken='string',
    name='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 name

string

param name

[REQUIRED]

The rule groups namespace name.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace to delete rule group definition.

returns

None

DescribeRuleGroupsNamespace (new) Link ¶

Describe a rule groups namespace.

See also: AWS API Documentation

Request Syntax

client.describe_rule_groups_namespace(
    name='string',
    workspaceId='string'
)
type name

string

param name

[REQUIRED]

The rule groups namespace.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace to describe.

rtype

dict

returns

Response Syntax

{
    'ruleGroupsNamespace': {
        'arn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'data': b'bytes',
        'modifiedAt': datetime(2015, 1, 1),
        'name': 'string',
        'status': {
            'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
            'statusReason': 'string'
        },
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeRuleGroupsNamespace operation.

    • ruleGroupsNamespace (dict) --

      The selected rule groups namespace.

      • arn (string) --

        The Amazon Resource Name (ARN) of this rule groups namespace.

      • createdAt (datetime) --

        The time when the rule groups namespace was created.

      • data (bytes) --

        The rule groups namespace data.

      • modifiedAt (datetime) --

        The time when the rule groups namespace was modified.

      • name (string) --

        The rule groups namespace name.

      • status (dict) --

        The status of rule groups namespace.

        • statusCode (string) --

          Status code of this namespace.

        • statusReason (string) --

          The reason for failure if any.

      • tags (dict) --

        The tags of this rule groups namespace.

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

DeleteAlertManagerDefinition (new) Link ¶

Deletes an alert manager definition.

See also: AWS API Documentation

Request Syntax

client.delete_alert_manager_definition(
    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 in which to delete the alert manager definition.

returns

None

PutAlertManagerDefinition (new) Link ¶

Update an alert manager definition.

See also: AWS API Documentation

Request Syntax

client.put_alert_manager_definition(
    clientToken='string',
    data=b'bytes',
    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 data

bytes

param data

[REQUIRED]

The alert manager definition data.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace in which to update the alert manager definition.

rtype

dict

returns

Response Syntax

{
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
        'statusReason': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a PutAlertManagerDefinition operation.

    • status (dict) --

      The status of alert manager definition.

      • statusCode (string) --

        Status code of this definition.

      • statusReason (string) --

        The reason for failure if any.