PrometheusService / Client / create_logging_configuration

create_logging_configuration#

PrometheusService.Client.create_logging_configuration(**kwargs)#

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

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

  • 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 logging configuration.

      • statusReason (string) –

        If failed, the reason for the failure.

Exceptions

  • PrometheusService.Client.exceptions.ValidationException

  • PrometheusService.Client.exceptions.ResourceNotFoundException

  • PrometheusService.Client.exceptions.AccessDeniedException

  • PrometheusService.Client.exceptions.InternalServerException