Menu
AWS IoT
Developer Guide

SetV2LoggingOptions

Sets the logging options for the V2 logging service.

Request syntax:

POST /v2LoggingOptions Content-type: application/json { "roleArn": "string", "defaultLogLevel": "string", "disableAllLogs": "boolean" }

Request Body Parameters:

Name

Type

Req?

Description

roleArn

AwsArn

no

The role ARN that allows IoT to write to Cloudwatch logs.

defaultLogLevel

LogLevel

no

The default logging level.

disableAllLogs

DisableAllLogs

no

Set to true to disable all logs, otherwise set to false.

Errors:

InternalException

An unexpected error has occurred.

HTTP response code: 500

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

CLI

Synopsis:

aws iot set-v2-logging-options \ [--role-arn <value>] \ [--default-log-level <value>] \ [--disable-all-logs | --no-disable-all-logs] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "roleArn": "string", "defaultLogLevel": "string", "disableAllLogs": "boolean" }

cli-input-json fields:

Name

Type

Description

roleArn

string

The role ARN that allows IoT to write to Cloudwatch logs.

defaultLogLevel

string

enum: DEBUG | INFO | ERROR | WARN | DISABLED

java class: iot.goldeneye.service.LogLevel

The default logging level.

disableAllLogs

boolean

Set to true to disable all logs, otherwise set to false.

Output:

None

On this page: