> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Exclude Resource from Backup

PATCH https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/resources/{id}/exclude

Prevents a resource from being backed up by Eon and suppresses scanning and violations.

You can cancel this action by calling [Cancel Resource Backup Exclusion](cancel-resource-backup-exclusion) for the same resource.


Reference: https://docs.eon.io/api/api-reference/resources/backup-exclusion/exclude-resource-from-backup

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the resource is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `id` (string, required) — Eon-assigned ID of the resource to exclude from backup.

## Response

### 200

Resource excluded from backup.

- `isExcluded` (boolean, required) — Whether the resource is excluded from backup. Expected to be `true`.

## Errors

### 404 Not Found Error

Resource not found

- `any`

## Examples

**Response**

```json
{
  "isExcluded": true
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/exclude"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/exclude';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://{account-domain}.console.eon.io/api/v1/projects/043090df-9fe5-4f89-9859-45db589c2936/resources/1ee34dc5-0a7c-4e56-a820-917371e05c8d/exclude")
  .header("Authorization", "Bearer <token>")
  .asString();
```