setV2LoggingOptions method
Sets the logging options for the V2 logging service.
May throw InternalException. May throw InvalidRequestException. May throw ServiceUnavailableException.
Parameter defaultLogLevel
:
The default logging level.
Parameter disableAllLogs
:
If true all logs are disabled. The default is false.
Parameter roleArn
:
The ARN of the role that allows IoT to write to Cloudwatch logs.
Implementation
Future<void> setV2LoggingOptions({
LogLevel? defaultLogLevel,
bool? disableAllLogs,
String? roleArn,
}) async {
final $payload = <String, dynamic>{
if (defaultLogLevel != null) 'defaultLogLevel': defaultLogLevel.toValue(),
if (disableAllLogs != null) 'disableAllLogs': disableAllLogs,
if (roleArn != null) 'roleArn': roleArn,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2LoggingOptions',
exceptionFnMap: _exceptionFns,
);
}