2022/02/02 - AWS IoT - 3 updated api methods
Changes This release adds support for configuring AWS IoT logging level per client ID, source IP, or principal ID.
{'targetType': {'SOURCE_IP', 'CLIENT_ID', 'PRINCIPAL_ID'}}
Deletes a logging level.
Requires permission to access the DeleteV2LoggingLevel action.
See also: AWS API Documentation
Request Syntax
client.delete_v2_logging_level(
targetType='DEFAULT'|'THING_GROUP'|'CLIENT_ID'|'SOURCE_IP'|'PRINCIPAL_ID',
targetName='string'
)
string
[REQUIRED]
The type of resource for which you are configuring logging. Must be THING_Group.
string
[REQUIRED]
The name of the resource for which you are configuring logging.
None
{'targetType': {'SOURCE_IP', 'CLIENT_ID', 'PRINCIPAL_ID'}}
Response {'logTargetConfigurations': {'logTarget': {'targetType': {'CLIENT_ID',
'PRINCIPAL_ID',
'SOURCE_IP'}}}}
Lists logging levels.
Requires permission to access the ListV2LoggingLevels action.
See also: AWS API Documentation
Request Syntax
client.list_v2_logging_levels(
targetType='DEFAULT'|'THING_GROUP'|'CLIENT_ID'|'SOURCE_IP'|'PRINCIPAL_ID',
nextToken='string',
maxResults=123
)
string
The type of resource for which you are configuring logging. Must be THING_Group.
string
To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
integer
The maximum number of results to return at one time.
dict
Response Syntax
{
'logTargetConfigurations': [
{
'logTarget': {
'targetType': 'DEFAULT'|'THING_GROUP'|'CLIENT_ID'|'SOURCE_IP'|'PRINCIPAL_ID',
'targetName': 'string'
},
'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
logTargetConfigurations (list) --
The logging configuration for a target.
(dict) --
The target configuration.
logTarget (dict) --
A log target
targetType (string) --
The target type.
targetName (string) --
The target name.
logLevel (string) --
The logging level.
nextToken (string) --
The token to use to get the next set of results, or null if there are no additional results.
{'logTarget': {'targetType': {'SOURCE_IP', 'CLIENT_ID', 'PRINCIPAL_ID'}}}
Sets the logging level.
Requires permission to access the SetV2LoggingLevel action.
See also: AWS API Documentation
Request Syntax
client.set_v2_logging_level(
logTarget={
'targetType': 'DEFAULT'|'THING_GROUP'|'CLIENT_ID'|'SOURCE_IP'|'PRINCIPAL_ID',
'targetName': 'string'
},
logLevel='DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
)
dict
[REQUIRED]
The log target.
targetType (string) -- [REQUIRED]
The target type.
targetName (string) --
The target name.
string
[REQUIRED]
The log level.
None