AWS IoT

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.

DeleteV2LoggingLevel (updated) Link ¶
Changes (request)
{'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'
)
type targetType:

string

param targetType:

[REQUIRED]

The type of resource for which you are configuring logging. Must be THING_Group.

type targetName:

string

param targetName:

[REQUIRED]

The name of the resource for which you are configuring logging.

returns:

None

ListV2LoggingLevels (updated) Link ¶
Changes (request, response)
Request
{'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
)
type targetType:

string

param targetType:

The type of resource for which you are configuring logging. Must be THING_Group.

type nextToken:

string

param nextToken:

To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return at one time.

rtype:

dict

returns:

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.

SetV2LoggingLevel (updated) Link ¶
Changes (request)
{'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'
)
type logTarget:

dict

param logTarget:

[REQUIRED]

The log target.

  • targetType (string) -- [REQUIRED]

    The target type.

  • targetName (string) --

    The target name.

type logLevel:

string

param logLevel:

[REQUIRED]

The log level.

returns:

None