Amazon Prometheus Service

2022/08/12 - Amazon Prometheus Service - 4 new api methods

Changes  This release adds log APIs that allow customers to manage logging for their Amazon Managed Service for Prometheus workspaces.

CreateLoggingConfiguration (new) Link ¶

Create logging configuration.

See also: AWS API Documentation

Request Syntax

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

string

param logGroupArn

[REQUIRED]

The ARN of the CW log group to which the vended log data will be published.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace to vend logs to.

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 CreateLoggingConfiguration operation.

    • status (dict) --

      The status of the logging configuration.

      • statusCode (string) --

        Status code of the logging configuration.

      • statusReason (string) --

        The reason for failure if any.

UpdateLoggingConfiguration (new) Link ¶

Update logging configuration.

See also: AWS API Documentation

Request Syntax

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

string

param logGroupArn

[REQUIRED]

The ARN of the CW log group to which the vended log data will be published.

type workspaceId

string

param workspaceId

[REQUIRED]

The ID of the workspace to vend logs to.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    Represents the output of an UpdateLoggingConfiguration operation.

    • status (dict) --

      The status of the logging configuration.

      • statusCode (string) --

        Status code of the logging configuration.

      • statusReason (string) --

        The reason for failure if any.

DescribeLoggingConfiguration (new) Link ¶

Describes logging configuration.

See also: AWS API Documentation

Request Syntax

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

string

param workspaceId

[REQUIRED]

The ID of the workspace to vend logs to.

rtype

dict

returns

Response Syntax

{
    'loggingConfiguration': {
        'createdAt': datetime(2015, 1, 1),
        'logGroupArn': 'string',
        'modifiedAt': datetime(2015, 1, 1),
        'status': {
            'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
            'statusReason': 'string'
        },
        'workspace': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeLoggingConfiguration operation.

    • loggingConfiguration (dict) --

      Metadata object containing information about the logging configuration of a workspace.

      • createdAt (datetime) --

        The time when the logging configuration was created.

      • logGroupArn (string) --

        The ARN of the CW log group to which the vended log data will be published.

      • modifiedAt (datetime) --

        The time when the logging configuration was modified.

      • status (dict) --

        The status of the logging configuration.

        • statusCode (string) --

          Status code of the logging configuration.

        • statusReason (string) --

          The reason for failure if any.

      • workspace (string) --

        The workspace where the logging configuration exists.

DeleteLoggingConfiguration (new) Link ¶

Delete logging configuration.

See also: AWS API Documentation

Request Syntax

client.delete_logging_configuration(
    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 vend logs to.

returns

None