AWS IoT Wireless

2021/06/01 - AWS IoT Wireless - 6 new api methods

Changes  Added six new public customer logging APIs to allow customers to set/get/reset log levels at resource type and resource id level. The log level set from the APIs will be used to filter log messages that can be emitted to CloudWatch in customer accounts.

ResetAllResourceLogLevels (new) Link ¶

Remove log-level overrides if any for all resources (both wireless devices and wireless gateways).

See also: AWS API Documentation

Request Syntax

client.reset_all_resource_log_levels()
rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateLogLevelsByResourceTypes (new) Link ¶

Set default log level, or log levels by resource types, could be for wireless device log options or wireless gateways log options. This is to control the log messages that will be displayed in CloudWatch.

See also: AWS API Documentation

Request Syntax

client.update_log_levels_by_resource_types(
    DefaultLogLevel='INFO'|'ERROR'|'DISABLED',
    WirelessDeviceLogOptions=[
        {
            'Type': 'Sidewalk'|'LoRaWAN',
            'LogLevel': 'INFO'|'ERROR'|'DISABLED',
            'Events': [
                {
                    'Event': 'Join'|'Rejoin'|'Uplink_Data'|'Downlink_Data'|'Registration',
                    'LogLevel': 'INFO'|'ERROR'|'DISABLED'
                },
            ]
        },
    ],
    WirelessGatewayLogOptions=[
        {
            'Type': 'LoRaWAN',
            'LogLevel': 'INFO'|'ERROR'|'DISABLED',
            'Events': [
                {
                    'Event': 'CUPS_Request'|'Certificate',
                    'LogLevel': 'INFO'|'ERROR'|'DISABLED'
                },
            ]
        },
    ]
)
type DefaultLogLevel:

string

param DefaultLogLevel:

The log level for a log message.

type WirelessDeviceLogOptions:

list

param WirelessDeviceLogOptions:

The list of wireless device log options.

  • (dict) --

    The log option for wireless devices. Can be used to set log level for a specific type of wireless device.

    • Type (string) -- [REQUIRED]

      The wireless device type.

    • LogLevel (string) -- [REQUIRED]

      The log level for a log message.

    • Events (list) --

      The list of wireless device event log options.

      • (dict) --

        The log option for a wireless device event. Can be used to set log level for a specific wireless device event. For a LoRaWAN device, the possible events for a log messsage are: Join, Rejoin, Downlink_Data, Uplink_Data. For a Sidewalk device, the possible events for a log message are: Registration, Downlink_Data, Uplink_Data.

        • Event (string) -- [REQUIRED]

          The event for a log message, if the log message is tied to a wireless device.

        • LogLevel (string) -- [REQUIRED]

          The log level for a log message.

type WirelessGatewayLogOptions:

list

param WirelessGatewayLogOptions:

The list of wireless gateway log options.

  • (dict) --

    The log option for wireless gateways. Can be used to set log level for a specific type of wireless gateway.

    • Type (string) -- [REQUIRED]

      The wireless gateway type.

    • LogLevel (string) -- [REQUIRED]

      The log level for a log message.

    • Events (list) --

      The list of wireless gateway event log options.

      • (dict) --

        The log option for a wireless gateway event. Can be used to set log level for a specific wireless gateway event. For a LoRaWAN gateway, the possible events for a log message are: CUPS_Request, Certificate.

        • Event (string) -- [REQUIRED]

          The event for a log message, if the log message is tied to a wireless gateway.

        • LogLevel (string) -- [REQUIRED]

          The log level for a log message.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

PutResourceLogLevel (new) Link ¶

Sets the log-level override for a resource-ID and resource-type, could be a wireless gateway or a wireless device.

See also: AWS API Documentation

Request Syntax

client.put_resource_log_level(
    ResourceIdentifier='string',
    ResourceType='string',
    LogLevel='INFO'|'ERROR'|'DISABLED'
)
type ResourceIdentifier:

string

param ResourceIdentifier:

[REQUIRED]

The identifier of the resource. For a Wireless Device, it is the wireless device id. For a wireless gateway, it is the wireless gateway id.

type ResourceType:

string

param ResourceType:

[REQUIRED]

The type of the resource, currently support WirelessDevice and WirelessGateway.

type LogLevel:

string

param LogLevel:

[REQUIRED]

The log level for a log message.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ResetResourceLogLevel (new) Link ¶

Remove log-level override if any for a specific resource-ID and resource-type, could be a wireless device or a wireless gateway.

See also: AWS API Documentation

Request Syntax

client.reset_resource_log_level(
    ResourceIdentifier='string',
    ResourceType='string'
)
type ResourceIdentifier:

string

param ResourceIdentifier:

[REQUIRED]

The identifier of the resource. For a Wireless Device, it is the wireless device id. For a wireless gateway, it is the wireless gateway id.

type ResourceType:

string

param ResourceType:

[REQUIRED]

The type of the resource, currently support WirelessDevice and WirelessGateway.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetResourceLogLevel (new) Link ¶

Fetches the log-level override if any for a given resource-ID and resource-type, coulde be a wireless device or a wireless gateway.

See also: AWS API Documentation

Request Syntax

client.get_resource_log_level(
    ResourceIdentifier='string',
    ResourceType='string'
)
type ResourceIdentifier:

string

param ResourceIdentifier:

[REQUIRED]

The identifier of the resource. For a Wireless Device, it is the wireless device id. For a wireless gateway, it is the wireless gateway id.

type ResourceType:

string

param ResourceType:

[REQUIRED]

The type of the resource, currently support WirelessDevice and WirelessGateway.

rtype:

dict

returns:

Response Syntax

{
    'LogLevel': 'INFO'|'ERROR'|'DISABLED'
}

Response Structure

  • (dict) --

    • LogLevel (string) --

      The log level for a log message.

GetLogLevelsByResourceTypes (new) Link ¶

Returns current default log-levels, or log levels by resource types, could be for wireless device log options or wireless gateway log options.

See also: AWS API Documentation

Request Syntax

client.get_log_levels_by_resource_types()
rtype:

dict

returns:

Response Syntax

{
    'DefaultLogLevel': 'INFO'|'ERROR'|'DISABLED',
    'WirelessGatewayLogOptions': [
        {
            'Type': 'LoRaWAN',
            'LogLevel': 'INFO'|'ERROR'|'DISABLED',
            'Events': [
                {
                    'Event': 'CUPS_Request'|'Certificate',
                    'LogLevel': 'INFO'|'ERROR'|'DISABLED'
                },
            ]
        },
    ],
    'WirelessDeviceLogOptions': [
        {
            'Type': 'Sidewalk'|'LoRaWAN',
            'LogLevel': 'INFO'|'ERROR'|'DISABLED',
            'Events': [
                {
                    'Event': 'Join'|'Rejoin'|'Uplink_Data'|'Downlink_Data'|'Registration',
                    'LogLevel': 'INFO'|'ERROR'|'DISABLED'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • DefaultLogLevel (string) --

      The log level for a log message.

    • WirelessGatewayLogOptions (list) --

      The list of wireless gateway log options.

      • (dict) --

        The log option for wireless gateways. Can be used to set log level for a specific type of wireless gateway.

        • Type (string) --

          The wireless gateway type.

        • LogLevel (string) --

          The log level for a log message.

        • Events (list) --

          The list of wireless gateway event log options.

          • (dict) --

            The log option for a wireless gateway event. Can be used to set log level for a specific wireless gateway event. For a LoRaWAN gateway, the possible events for a log message are: CUPS_Request, Certificate.

            • Event (string) --

              The event for a log message, if the log message is tied to a wireless gateway.

            • LogLevel (string) --

              The log level for a log message.

    • WirelessDeviceLogOptions (list) --

      The list of wireless device log options.

      • (dict) --

        The log option for wireless devices. Can be used to set log level for a specific type of wireless device.

        • Type (string) --

          The wireless device type.

        • LogLevel (string) --

          The log level for a log message.

        • Events (list) --

          The list of wireless device event log options.

          • (dict) --

            The log option for a wireless device event. Can be used to set log level for a specific wireless device event. For a LoRaWAN device, the possible events for a log messsage are: Join, Rejoin, Downlink_Data, Uplink_Data. For a Sidewalk device, the possible events for a log message are: Registration, Downlink_Data, Uplink_Data.

            • Event (string) --

              The event for a log message, if the log message is tied to a wireless device.

            • LogLevel (string) --

              The log level for a log message.