IoT / Client / get_v2_logging_options

get_v2_logging_options

IoT.Client.get_v2_logging_options(**kwargs)

Gets the fine grained logging options.

Requires permission to access the GetV2LoggingOptions action.

See also: AWS API Documentation

Request Syntax

response = client.get_v2_logging_options(
    verbose=True|False
)
Parameters:

verbose (boolean) – The flag is used to get all the event types and their respective configuration that event-based logging supports.

Return type:

dict

Returns:

Response Syntax

{
    'roleArn': 'string',
    'defaultLogLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
    'disableAllLogs': True|False,
    'eventConfigurations': [
        {
            'eventType': 'string',
            'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
            'logDestination': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • roleArn (string) –

      The IAM role ARN IoT uses to write to your CloudWatch logs.

    • defaultLogLevel (string) –

      The default log level.

    • disableAllLogs (boolean) –

      Disables all logs.

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

          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.

Exceptions

  • IoT.Client.exceptions.InternalException

  • IoT.Client.exceptions.NotConfiguredException

  • IoT.Client.exceptions.ServiceUnavailableException