PrometheusService / Client / create_logging_configuration

create_logging_configuration

PrometheusService.Client.create_logging_configuration(**kwargs)

The CreateLoggingConfiguration operation creates rules and alerting logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to.

Note

These logging configurations are only for rules and alerting logs.

See also: AWS API Documentation

Request Syntax

response = client.create_logging_configuration(
    clientToken='string',
    logGroupArn='string',
    workspaceId='string'
)
Parameters:
  • clientToken (string) –

    A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

    This field is autopopulated if not provided.

  • logGroupArn (string) –

    [REQUIRED]

    The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation.

  • workspaceId (string) –

    [REQUIRED]

    The ID of the workspace to create the logging configuration for.

Return type:

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

      A structure that displays the current status of the logging configuration.

      • statusCode (string) –

        The current status of the current rules and alerting logging configuration.

        Note

        These logging configurations are only for rules and alerting logs.

      • statusReason (string) –

        If failed, the reason for the failure.

Exceptions