updateLogLevelsByResourceTypes method

Future<void> updateLogLevelsByResourceTypes({
  1. LogLevel? defaultLogLevel,
  2. List<FuotaTaskLogOption>? fuotaTaskLogOptions,
  3. List<WirelessDeviceLogOption>? wirelessDeviceLogOptions,
  4. List<WirelessGatewayLogOption>? wirelessGatewayLogOptions,
})

Set default log level, or log levels by resource types. This can be for wireless device, wireless gateway, or FUOTA task log options, and is used to control the log messages that'll be displayed in CloudWatch.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Implementation

Future<void> updateLogLevelsByResourceTypes({
  LogLevel? defaultLogLevel,
  List<FuotaTaskLogOption>? fuotaTaskLogOptions,
  List<WirelessDeviceLogOption>? wirelessDeviceLogOptions,
  List<WirelessGatewayLogOption>? wirelessGatewayLogOptions,
}) async {
  final $payload = <String, dynamic>{
    if (defaultLogLevel != null) 'DefaultLogLevel': defaultLogLevel.value,
    if (fuotaTaskLogOptions != null)
      'FuotaTaskLogOptions': fuotaTaskLogOptions,
    if (wirelessDeviceLogOptions != null)
      'WirelessDeviceLogOptions': wirelessDeviceLogOptions,
    if (wirelessGatewayLogOptions != null)
      'WirelessGatewayLogOptions': wirelessGatewayLogOptions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/log-levels',
    exceptionFnMap: _exceptionFns,
  );
}