Skip to main content

v2_logging_options

Creates, updates, deletes, gets or lists a v2_logging_options resource.

Overview

Namev2_logging_options
TypeResource
Idaws.iot.v2_logging_options

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
default_log_levelstringThe default log level. (DEBUG, INFO, ERROR, WARN, DISABLED)
disable_all_logsbooleanDisables all logs.
event_configurationsarrayThe list of event configurations that override account-level logging.
role_arnstringThe IAM role ARN IoT uses to write to your CloudWatch logs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_v2_logging_optionsselectregionverboseGets the fine grained logging options. Requires permission to access the GetV2LoggingOptions action.
set_v2_logging_optionsupdateregionSets the logging options for the V2 logging service. Requires permission to access the SetV2LoggingOptions action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
verbosebooleanThe flag is used to get all the event types and their respective configuration that event-based logging supports.

SELECT examples

Gets the fine grained logging options. Requires permission to access the GetV2LoggingOptions action.

SELECT
default_log_level,
disable_all_logs,
event_configurations,
role_arn
FROM aws.iot.v2_logging_options
WHERE region = '{{ region }}' -- required
AND verbose = '{{ verbose }}'
;

UPDATE examples

Sets the logging options for the V2 logging service. Requires permission to access the SetV2LoggingOptions action.

UPDATE aws.iot.v2_logging_options
SET
roleArn = '{{ roleArn }}',
defaultLogLevel = '{{ defaultLogLevel }}',
disableAllLogs = {{ disableAllLogs }},
eventConfigurations = '{{ eventConfigurations }}'
WHERE
region = '{{ region }}' --required;