All Products
Search
Document Center

Cloud Backup:UpdatePolicyV2

Last Updated:Aug 21, 2026

Modifies a policy.

Operation description

Modifications to a policy take effect on all associated data sources. Proceed with caution.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

PolicyId

string

No

The policy ID.

po-000************viy

PolicyName

string

No

The policy name.

Daily backup + geo-redundancy

PolicyDescription

string

No

The policy description.

Back up once every day at 10:00 AM, with cross-region backup to Shanghai.

Rules

array<object>

No

The list of policy rules.

array<object>

No

The policy rule.

RuleId

string

No

The rule ID.

rule-000************rof

RuleType

string

No

The rule type. Each policy must have at least one BACKUP rule and exactly one TRANSITION rule. Valid values:

  • BACKUP: backup rule.

  • TRANSITION: lifecycle rule.

  • REPLICATION: replication rule.

BACKUP

Schedule

string

No

This parameter is required only when RuleType is set to BACKUP. The backup schedule settings. Supported formats:

  • I|{startTime}|{interval}: specifies that a backup job is run at the {interval} from the {startTime}. Example: I|1631685600|P1D specifies that a backup job is run once a day starting from 2021-09-15 14:00:00.

    • startTime: the start time of the backup. This value is a UNIX timestamp. Unit: seconds.

    • interval: the ISO 8601 time interval. Example: PT1H specifies an interval of one hour. P1D specifies an interval of one day.

  • C|{startTime}|{crontab}: specifies that a backup job is run based on the {crontab} expression from the {startTime}. Example: C|1631685600|0 0 2 ? * 3,5,7 specifies that a backup job is run at 02:00:00 every Tuesday, Thursday, and Saturday starting from 2021-09-15 14:00:00.

    • startTime: the start time of the backup. This value is a UNIX timestamp. Unit: seconds.

    • crontab: the crontab expression. Example: 0 0 2 ? * 3,5,7 specifies every Tuesday, Thursday, and Saturday at 02:00:00.

Backup jobs for elapsed time periods are not compensated. If the previous backup job is not completed, the next backup job is not triggered.

I|1648647166|P1D

BackupType

string

No

This parameter is required only when RuleType is set to BACKUP. The backup type. Set the value to COMPLETE, which indicates full backup.

COMPLETE

Retention

integer

No

This parameter is required only when RuleType is set to TRANSITION or REPLICATION.

  • If RuleType is set to TRANSITION: the retention period of the backup. Minimum value: 1. Unit: days.

  • If RuleType is set to REPLICATION: the retention period of the cross-region backup. Minimum value: 1. Unit: days.

7

ReplicationRegionId

string

No

This parameter is required only when RuleType is set to REPLICATION. The ID of the destination region for replication.

cn-shanghai

ArchiveDays

integer

No

This parameter is required only when RuleType is set to TRANSITION. The number of days after which the backup is converted to archive storage. Unit: days.

90

ColdArchiveDays

integer

No

This parameter is required only when RuleType is set to TRANSITION. The number of days after which the backup is converted to cold archive storage. Unit: days.

365

VaultId

string

No

This parameter is required only when RuleType is set to BACKUP. The backup vault ID.

v-0001************aseg

RetentionRules

array<object>

No

This parameter is required only when RuleType is set to TRANSITION. The special retention rules.

object

No

The special retention rule.

AdvancedRetentionType

string

No

The type of the special retention rule. Valid values:

  • WEEKLY: weekly backup.

  • MONTHLY: monthly backup.

  • YEARLY: yearly backup.

YEARLY

WhichSnapshot

integer

No

The backup to which the rule applies. Currently, only the first backup is supported. Set the value to 1.

1

Retention

integer

No

The special retention period of the backup. Minimum value: 1. Unit: days.

365

KeepLatestSnapshots

integer

No

Specifies whether to retain at least one backup version. Valid values:

  • 0: do not retain.

  • 1: retain.

1

DataSourceFilters

array<object>

No

This parameter is required only when RuleType is set to TAG. The data source filter rules.

object

No

SourceType

string

No

The data source type. Valid values:

  • UDM_ECS: ECS instance backup. This data source type is supported only when RuleType is set to UDM_ECS_ONLY.

  • OSS: OSS backup. This data source type is supported only when RuleType is set to STANDARD.

  • NAS: Alibaba Cloud NAS backup. This data source type is supported only when RuleType is set to STANDARD.

  • ECS_FILE: ECS File Backup Essential Edition. This data source type is supported only when RuleType is set to STANDARD.

  • OTS: Tablestore backup. This data source type is supported only when RuleType is set to STANDARD.

UDM_ECS

DataSourceIds deprecated

array

No

Deprecated.

deprecated

string

No

Deprecated.

Deprecated

TagFilters

array<object>

No

This parameter is required only when RuleType is set to TAG. The resource tag filter rules.

object

No

Key

string

No

The tag key.

env

Value

string

No

The tag value. An empty value indicates any value.

prod

Operator

string

No

The tag matching rule. Valid values:

  • EQUAL: matches both the tag key and tag value.

  • NOT: matches the tag key but not the tag value.

EQUAL

Immutable

boolean

No

This parameter is required only when PolicyType is set to UDM_ECS_ONLY and RuleType is set to SECURITY. Specifies whether to enable backup locking.

true

Response elements

Element

Type

Description

Example

object

UpdatePolicyResponse

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Code

string

The return code. A value of 200 indicates success.

200

Message

string

The returned message. The value "successful" is returned for a successful request. An error message is returned for a failed request.

successful

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

{
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.