IoT / Client / set_v2_logging_options

set_v2_logging_options

IoT.Client.set_v2_logging_options(**kwargs)

Sets the logging options for the V2 logging service.

Requires permission to access the SetV2LoggingOptions action.

See also: AWS API Documentation

Request Syntax

response = client.set_v2_logging_options(
    roleArn='string',
    defaultLogLevel='DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
    disableAllLogs=True|False,
    eventConfigurations=[
        {
            'eventType': 'string',
            'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
            'logDestination': 'string'
        },
    ]
)
Parameters:
  • roleArn (string) – The ARN of the role that allows IoT to write to Cloudwatch logs.

  • defaultLogLevel (string) – The default logging level.

  • disableAllLogs (boolean) – If true all logs are disabled. The default is false.

  • eventConfigurations (list) –

    The list of event configurations that override account-level logging.

    • (dict) –

      Configuration for event-based logging that specifies which event types to log and their logging settings. Used for account-level logging overrides.

      • eventType (string) – [REQUIRED]

        The type of event to log. These include event types like Connect, Publish, and Disconnect.

      • logLevel (string) –

        The logging level for the specified event type. Determines the verbosity of log messages generated for this event type.

      • logDestination (string) –

        CloudWatch Log Group for event-based logging. Specifies where log events should be sent. The log destination for event-based logging overrides default Log Group for the specified event type and applies to all resources associated with that event.

Returns:

None

Exceptions