Skip to main content

v2_logging_levels

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

Overview

Namev2_logging_levels
TypeResource
Idaws.iot.v2_logging_levels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
log_levelstringThe logging level. (DEBUG, INFO, ERROR, WARN, DISABLED)
log_targetobjectA log target

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_v2_logging_levelsselectregiontargetType, nextToken, maxResultsLists logging levels. Requires permission to access the ListV2LoggingLevels action.
set_v2_logging_levelupdateregion, logTarget, logLevelSets the logging level. Requires permission to access the SetV2LoggingLevel action.
delete_v2_logging_leveldeletetargetType, targetName, regionDeletes a logging level. Requires permission to access the DeleteV2LoggingLevel 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)
targetNamestringThe name of the resource for which you are configuring logging.
targetTypestringThe type of resource for which you are configuring logging. Must be THING_Group.
maxResultsintegerThe maximum number of results to return at one time.
nextTokenstringTo retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
targetTypestringThe type of resource for which you are configuring logging. Must be THING_Group.

SELECT examples

Lists logging levels. Requires permission to access the ListV2LoggingLevels action.

SELECT
log_level,
log_target
FROM aws.iot.v2_logging_levels
WHERE region = '{{ region }}' -- required
AND targetType = '{{ targetType }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

UPDATE examples

Sets the logging level. Requires permission to access the SetV2LoggingLevel action.

UPDATE aws.iot.v2_logging_levels
SET
logTarget = '{{ logTarget }}',
logLevel = '{{ logLevel }}'
WHERE
region = '{{ region }}' --required
AND logTarget = '{{ logTarget }}' --required
AND logLevel = '{{ logLevel }}' --required;

DELETE examples

Deletes a logging level. Requires permission to access the DeleteV2LoggingLevel action.

DELETE FROM aws.iot.v2_logging_levels
WHERE targetType = '{{ targetType }}' --required
AND targetName = '{{ targetName }}' --required
AND region = '{{ region }}' --required
;