All Products
Search
Document Center

Cloud Backup:UpdatePolicyV2

Last Updated:Mar 03, 2024

Modifies a backup policy.

Operation description

If you modify a backup policy, the modification takes effect on all data sources that are bound to the backup policy. Proceed with caution.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PolicyIdstringNo

The ID of the backup policy.

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

The name of the backup policy.

Daily Local Backup + Remote Backup
PolicyDescriptionstringNo

The description of the backup policy.

Data is backed up at 10:00:00 every day and replicated to the China (Shanghai) region for geo-redundancy.
Rulesobject []No

The rules in the backup policy.

RuleIdstringNo

The rule ID.

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

The type of the rule. Each backup policy must have at least one rule of the BACKUP type and only one rule of the TRANSITION type.

  • BACKUP: backup rule
  • TRANSITION: lifecycle rule
  • REPLICATION: replication rule
BACKUP
SchedulestringNo

This parameter is required only if the RuleType parameter is set to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day.

  • startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds.
  • interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
I|1648647166|P1D
BackupTypestringNo

This parameter is required only if the RuleType parameter is set to BACKUP. This parameter specifies the backup type. Valid value: COMPLETE, which indicates full backup.

COMPLETE
RetentionlongNo

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

  • If the RuleType parameter is set to TRANSITION, this parameter specifies the retention period of the backup data. Minimum value: 1. Unit: days.
  • If the RuleType parameter is set to REPLICATION, this parameter specifies the retention period of remote backups. Minimum value: 1. Unit: days.
7
ReplicationRegionIdstringNo

This parameter is required only if the RuleType parameter is set to REPLICATION. This parameter specifies the ID of the destination region.

cn-shanghai
ArchiveDayslongNo

This parameter is required only if the RuleType parameter is set to TRANSITION. This parameter specifies the time when data is dumped from a backup vault to an archive vault. Unit: days.

90
ColdArchiveDayslongNo

This parameter is required only if the RuleType parameter is set to TRANSITION. This parameter specifies the time when data is dumped from a backup vault to a cold archive vault. Unit: days.

365
RetentionRulesobject []No

This parameter is required only if the RuleType parameter is set to TRANSITION. This parameter specifies the special retention rules.

AdvancedRetentionTypestringNo

The type of the special retention rule. Valid values:

  • WEEKLY: weekly backups
  • MONTHLY: monthly backups
  • YEARLY: yearly backups
YEARLY
WhichSnapshotlongNo

Specifies which backup is retained based on the special retention rule. Only the first backup can be retained.

1
RetentionlongNo

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

365
KeepLatestSnapshotslongNo

Specifies whether to enable the feature of keeping at least one backup version. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
1

Response parameters

ParameterTypeDescriptionExample
object

UpdatePolicyResponse

Successboolean

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
true
Codestring

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned.

successful
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-21The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-03-29The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.