v2_logging_options
Creates, updates, deletes, gets or lists a v2_logging_options resource.
Overview
| Name | v2_logging_options |
| Type | Resource |
| Id | aws.iot.v2_logging_options |
Fields
The following fields are returned by SELECT queries:
- get_v2_logging_options
| Name | Datatype | Description |
|---|---|---|
default_log_level | string | The default log level. (DEBUG, INFO, ERROR, WARN, DISABLED) |
disable_all_logs | boolean | Disables all logs. |
event_configurations | array | The list of event configurations that override account-level logging. |
role_arn | string | The IAM role ARN IoT uses to write to your CloudWatch logs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_v2_logging_options | select | region | verbose | Gets the fine grained logging options. Requires permission to access the GetV2LoggingOptions action. |
set_v2_logging_options | update | region | Sets 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
verbose | boolean | The flag is used to get all the event types and their respective configuration that event-based logging supports. |
SELECT examples
- get_v2_logging_options
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
- set_v2_logging_options
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;