All Products
Search
Document Center

Security Center:ModifyBackupPolicy

Last Updated:Nov 30, 2022

Modifies an anti-ransomware policy.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongYes

The ID of the anti-ransomware policy that you want to modify.

11
NamestringYes

The name of the anti-ransomware policy that you want to modify.

policy_name_A
PolicyobjectYes

The new configurations of the anti-ransomware policy that you want to modify. The value is a JSON string that contains the following fields:

  • Source: the directory that you want to protect. If you want to protect all directories, set this field to brackets [].

  • Include: the format of the file that you want to protect. Examples: "*.jpg" and "*.doc".

  • Exclude: the directory that you want to exclude from the anti-ransomware policy. You can call the DescribeExcludeSystemPath operation to query all directories before you specify the directory that you want to exclude. Example: "/home/user".

  • Schedule: the start time and interval of a data backup task. We recommend that you specify a start time that begins during off-peak hours but does not start on the hour.

    • If you set this field to I|1583216092|P21D, the data backup task starts from 2020-03-03 14:14:52, and the task is run at an interval of three weeks.
    • If you set this field to I|1583216092|PT24H, the data backup task starts from 2020-03-03 14:14:52, and the task is run at an interval of 24 hours.
  • Retention: the period during which backup data is retained. Unit: days. If you set this field to 7, backup data is retained for a week. If you set this field to 365, backup data is retained for a year. If you set this field to -1, backup data is permanently retained.

  • SpeedLimiter: the limit on the network bandwidth for data backup tasks. If you set this field to 12:15:15360|6:12:5120, the maximum bandwidth for a data backup task is 15 Mbit/s from 12:00 to 15:00 and 5 Mbit/s from 06:00 to 12:00.

If you back up data on an Elastic Compute Service (ECS) instance that is connected over an internal network, we recommend that you leave this field empty. If this field is left empty, the bandwidth for data backup tasks is unlimited.

PolicyVersionstringNo

The version of the anti-ransomware policy. You can call the DescribeBackupPolicies operation to query the versions of anti-ransomware policies.

  • 1.0.0
  • 2.0.0
2.0.0
PolicyRegionIdstringNo

The region ID of the server to which the anti-ransomware policy is applied.

You can call the DescribeSupportRegion operation to query the regions in which the anti-ransomware feature is supported.

cn-hangzhou
UuidListarrayYes

The UUIDs of the servers to which the anti-ransomware policy is applied.

stringNo

The UUIDs of the servers to which the anti-ransomware policy is applied.

1587bedb-fdb4-48c4-9330-****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

D0D6E6E4-CB8C-4897-B852-46AEFDA04B21

Example

Normal return example

JSONFormat

{
  "RequestId": "D0D6E6E4-CB8C-4897-B852-46AEFDA04B21"
}

Error codes

Http codeError codeError message
403NoPermissioncaller has no permission
500ServerErrorServerError

For a list of error codes, visit the API error center.

Change history

Change timeSummary of changesOperate
2022-08-01The internal configurations of the API operation has changed but you can still call the operation.
Change itemChange content
The internal configurations of the API operation has changed but you can still call the operation.