---
title: "POST /v2LoggingOptions"
method: POST
path: "/v2LoggingOptions"
---

# POST /v2LoggingOptions

`POST /v2LoggingOptions`

Sets the logging options for the V2 logging service.

Requires permission to access the [SetV2LoggingOptions](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request body

- object
  - `roleArn` string — The ARN of the role that allows IoT to write to Cloudwatch logs.
  - `defaultLogLevel` 'DEBUG' | 'INFO' | 'ERROR' | 'WARN' | 'DISABLED' — The default logging level.
  - `disableAllLogs` boolean — If true all logs are disabled. The default is false.

## Response `200`

Success

## Other responses

- `480` — InternalException
- `481` — InvalidRequestException
- `482` — ServiceUnavailableException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/revisions/deef5c4b09f0/schema)
