> 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.

# Update Backup Posture Control

PUT https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/backup-posture-controls/{controlId}
Content-Type: application/json

Updates a backup posture control.

The update is a full replacement, not a partial
update.
Omitted fields are reset and are no longer enforced as part of the control.


Reference: https://docs.eon.io/api/api-reference/backup-management/backup-posture-controls/update-backup-posture-control

## 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 whose backup posture control you want to update. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `controlId` (string, required) — ID of the backup posture control to update.

### Body (application/json)

This endpoint expects an UpdateBackupPostureControlRequest.

- `name` (string, required) — Display name of the control.
- `severity` (enum, required) — Severity assigned to violations of the control.
  - Allowed values: `HIGH`, `MEDIUM`, `LOW`
- `resourceSelector` (BackupPostureControlResourceSelector, required) — Resource selector determining which resources the control applies to.
- `rules` (BackupPostureControlRules, required) — Backup requirements a matching resource must satisfy.

## Response

### 200

Backup posture control updated.

- `id` (string, required) — ID of the backup posture control.
- `name` (string, required) — Display name of the control.
- `severity` (enum, required) — Severity assigned to control violations.
  - Allowed values: `HIGH`, `MEDIUM`, `LOW`
- `resourceSelector` (BackupPostureControlResourceSelector, required) — Determines which resources the control applies to.
- `rules` (BackupPostureControlRules, required) — Backup requirements a matching resource must satisfy.

## Errors

### 404 Not Found Error

Backup posture control wasn't found.

- `any`

## Types

### BackupPostureControlResourceSelector

- `resourceSelectionMode` (enum, required) — How the control selects the resources it applies to. Use `ALL` to apply to all resources or `NONE` to apply to none. To select resources by condition, use `CONDITIONAL` and provide an `expression`.
  - Allowed values: `ALL`, `NONE`, `CONDITIONAL`
- `expression` (BackupPostureControlExpression, optional) — Condition selecting the resources the control applies to. Required when resource selection mode is `CONDITIONAL`. Ignored when resource selection mode is `ALL` or `NONE`.

### BackupPostureControlRules

Backup requirements a resource must satisfy.

- `minimumRetention` (list of MinRetentionRule, optional) — Minimum retention required per backup frequency (daily, weekly, monthly, annual).
- `maximumRetention` (MaxRetentionRule, optional) — Maximum retention a backup may keep before it's considered non-compliant.
- `numberOfCopies` (NumberOfCopiesRule, optional) — Minimum number of backup copies that must exist.
- `crossRegion` (boolean, optional) — Whether at least one backup copy must be stored in a different region.
- `crossAccount` (boolean, optional) — Whether at least one backup copy must be stored in a different cloud account.
- `crossCloudProvider` (boolean, optional) — Whether at least one backup copy must be stored in a different cloud provider.

### BackupPostureControlExpression

Resource selector expression that determines which resources a backup posture control applies to. Set exactly one of the properties below. For AND/OR logic across multiple conditions, use `group`; groups can be nested.

- `group` (BackupPostureControlGroupCondition, optional) — Group of expressions to evaluate using the logical operator specified in `operator`. Each item in the `operands` list can be either a single expression or a nested `group` expression.
- `resourceType` (ResourceTypeCondition, optional)
- `dataClasses` (DataClassesCondition, optional)
- `environment` (EnvironmentCondition, optional)
- `apps` (AppsCondition, optional)
- `cloudProvider` (CloudProviderCondition, optional)
- `accountId` (AccountIdCondition, optional)
- `sourceRegion` (RegionCondition, optional)
- `vpc` (VpcCondition, optional)
- `subnets` (SubnetsCondition, optional)
- `resourceGroupName` (ResourceGroupNameCondition, optional)
- `resourceName` (ResourceNameCondition, optional)
- `resourceId` (ResourceIdCondition, optional)
- `tagKeys` (TagKeysCondition, optional)
- `tagKeyValues` (TagKeyValuesCondition, optional)

### MinRetentionRule

- `minimumRetention` (integer, required) — Minimum backup retention period, in days.
- `frequency` (enum, required) — Backup cadence the minimum retention applies to.
  - Allowed values: `DAILY`, `WEEKLY`, `MONTHLY`, `ANNUAL`

### MaxRetentionRule

- `maximumRetention` (integer, required) — Maximum backup retention period, in days.

### NumberOfCopiesRule

- `minCopies` (integer, required) — Minimum number of backup copies that must exist.

### BackupPostureControlGroupCondition

Group of expressions to evaluate using the logical operator specified in `operator`. Each item in the `operands` list can be either a single expression or a nested `group` expression.

- `operator` (enum, required) — Logical operator to apply to the list of `operands`. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `AND`, `OR`, `UNSPECIFIED`
- `operands` (list of BackupPostureControlExpression, required) — List of expressions to evaluate using the logical operator specified in `operator`. Each item in the list can be either a single expression or a nested `group` expression. Must contain at least 2 items.

### ResourceTypeCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `resourceTypes` (list of enum, required) — Resource types to evaluate. `RESOURCE_TYPE_UNSPECIFIED` is supported only in responses.
  - Allowed values: `AWS_EC2`, `AWS_RDS`, `AWS_S3`, `AWS_EFS`, `AWS_FSX`, `AWS_EKS_NAMESPACE`, `AWS_DYNAMO_DB`, `AZURE_VIRTUAL_MACHINE`, `AZURE_FILE_SHARE`, `AZURE_STORAGE_ACCOUNT`, `AZURE_DISK`, `AZURE_SQL_DATABASE`, `AZURE_SQL_MANAGED_INSTANCE`, `AZURE_SQL_VIRTUAL_MACHINE`, `AZURE_MYSQL`, `AZURE_POSTGRESQL`, `AZURE_COSMOSDB_MONGODB`, `AZURE_COSMOSDB_NOSQL`, `ATLAS_MONGODB_CLUSTER`, `GCP_COMPUTE_ENGINE_INSTANCE`, `GCP_CLOUD_SQL_INSTANCE`, `GCP_CLOUD_STORAGE_BUCKET`, `RESOURCE_TYPE_UNSPECIFIED`

### DataClassesCondition

- `operator` (enum, required) — Evaluates whether the original list constains any, all, or none of the values in this list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `CONTAINS_ANY_OF`, `CONTAINS_NONE_OF`, `CONTAINS_ALL_OF`, `UNSPECIFIED`
- `dataClasses` (list of string, required)

### EnvironmentCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `environments` (list of enum, required)
  - Allowed values: `PROD`, `PROD_INTERNAL`, `STAGE`, `ENVIRONMENT_UNSPECIFIED`

### AppsCondition

- `operator` (enum, required) — Evaluates whether the original list constains any, all, or none of the values in this list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `CONTAINS_ANY_OF`, `CONTAINS_NONE_OF`, `CONTAINS_ALL_OF`, `UNSPECIFIED`
- `apps` (list of string, required)

### CloudProviderCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `cloudProviders` (list of enum, required)
  - Allowed values: `AWS`, `AZURE`, `GCP`, `MONGO_ATLAS`, `PROVIDER_UNSPECIFIED`

### AccountIdCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `accountIds` (list of string, required)

### RegionCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `regions` (list of string, required)

### VpcCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `vpcs` (list of string, required)

### SubnetsCondition

- `operator` (enum, required) — Evaluates whether the original list constains any, all, or none of the values in this list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `CONTAINS_ANY_OF`, `CONTAINS_NONE_OF`, `CONTAINS_ALL_OF`, `UNSPECIFIED`
- `subnets` (list of string, required)

### ResourceGroupNameCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `resourceGroupNames` (list of string, required)

### ResourceNameCondition

- `operator` (enum, required) — Evaluates string values. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `CONTAINS`, `NOT_CONTAINS`, `STARTS_WITH`, `NOT_STARTS_WITH`, `ENDS_WITH`, `NOT_ENDS_WITH`, `UNSPECIFIED`
- `resourceNames` (list of string, required)

### ResourceIdCondition

- `operator` (enum, required) — Evaluates whether the value is in the list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `IN`, `NOT_IN`, `UNSPECIFIED`
- `resourceIds` (list of string, required)

### TagKeysCondition

- `operator` (enum, required) — Evaluates whether the original list constains any, all, or none of the values in this list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `CONTAINS_ANY_OF`, `CONTAINS_NONE_OF`, `CONTAINS_ALL_OF`, `UNSPECIFIED`
- `tagKeys` (list of string, required)

### TagKeyValuesCondition

- `operator` (enum, required) — Evaluates whether the original list constains any, all, or none of the values in this list. `UNSPECIFIED` is supported only in responses.
  - Allowed values: `CONTAINS_ANY_OF`, `CONTAINS_NONE_OF`, `CONTAINS_ALL_OF`, `UNSPECIFIED`
- `tagKeyValues` (list of TagKeyValue, required)

### TagKeyValue

- `key` (string, required)
- `value` (string, optional)

## Examples

**Request**

```json
{
  "name": "string",
  "severity": "HIGH",
  "resourceSelector": {
    "resourceSelectionMode": "CONDITIONAL"
  }
}
```

**Response**

```json
{
  "id": "02025ea8-13f1-58d2-a7e8-2e533c9d6574",
  "name": "EU PII retained in EU only",
  "severity": "HIGH",
  "resourceSelector": {
    "resourceSelectionMode": "CONDITIONAL",
    "expression": {
      "group": {
        "operator": "AND",
        "operands": [
          null
        ]
      },
      "resourceType": {
        "operator": "IN",
        "resourceTypes": [
          "AWS_EC2"
        ]
      },
      "dataClasses": {
        "operator": "CONTAINS_ANY_OF",
        "dataClasses": [
          "PII"
        ]
      },
      "environment": {
        "operator": "IN",
        "environments": [
          "PROD"
        ]
      },
      "apps": {
        "operator": "CONTAINS_ANY_OF",
        "apps": [
          "string"
        ]
      },
      "cloudProvider": {
        "operator": "IN",
        "cloudProviders": [
          "AWS"
        ]
      },
      "accountId": {
        "operator": "IN",
        "accountIds": [
          "string"
        ]
      },
      "sourceRegion": {
        "operator": "IN",
        "regions": [
          "string"
        ]
      },
      "vpc": {
        "operator": "IN",
        "vpcs": [
          "string"
        ]
      },
      "subnets": {
        "operator": "CONTAINS_ANY_OF",
        "subnets": [
          "string"
        ]
      },
      "resourceGroupName": {
        "operator": "IN",
        "resourceGroupNames": [
          "string"
        ]
      },
      "resourceName": {
        "operator": "CONTAINS",
        "resourceNames": [
          "string"
        ]
      },
      "resourceId": {
        "operator": "IN",
        "resourceIds": [
          "string"
        ]
      },
      "tagKeys": {
        "operator": "CONTAINS_ANY_OF",
        "tagKeys": [
          "string"
        ]
      },
      "tagKeyValues": {
        "operator": "CONTAINS_ANY_OF",
        "tagKeyValues": [
          {
            "key": "string",
            "value": "string"
          }
        ]
      }
    }
  },
  "rules": {
    "minimumRetention": [
      {
        "minimumRetention": 1,
        "frequency": "DAILY"
      }
    ],
    "maximumRetention": {
      "maximumRetention": 1
    },
    "numberOfCopies": {
      "minCopies": 1
    },
    "crossRegion": true,
    "crossAccount": true,
    "crossCloudProvider": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/projectId/backup-posture-controls/controlId"

payload = {
    "name": "string",
    "severity": "HIGH",
    "resourceSelector": { "resourceSelectionMode": "CONDITIONAL" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/projectId/backup-posture-controls/controlId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"string","severity":"HIGH","resourceSelector":{"resourceSelectionMode":"CONDITIONAL"}}'
};

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.put("https://{account-domain}.console.eon.io/api/v1/projects/projectId/backup-posture-controls/controlId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"string\",\n  \"severity\": \"HIGH\",\n  \"resourceSelector\": {\n    \"resourceSelectionMode\": \"CONDITIONAL\"\n  }\n}")
  .asString();
```