- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.SetLogsCollectionResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.integrations.connectors.connectorInstances/setLogsCollection#body.aspect_1)

**Full name**: projects.locations.instances.integrations.connectors.connectorInstances.setLogsCollection

Enables or disables debug log collection for a connector instance. When enabled field is set to true, existing logs are cleared and a new collection period is started.

### HTTP request

`POST https://{endpoint}/v1alpha/{name}:setLogsCollection`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The connector instance identifier (from route) |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "enabled": boolean } ``` |

| Fields ||
|---|---|
| `enabled` | `boolean` Required. Whether logs collection is enabled for the connector instance. |

### Response body

Response for connectorInstances.setLogsCollection.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "logEnableExpirationTime": string } ``` |

| Fields ||
|---|---|
| `logEnableExpirationTime` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The connector instance logging enabled time until unix ms |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `chronicle.connectorInstances.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).