Modifies an anti-ransomware policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyBackupPolicy

The operation that you want to perform.

Set the value to ModifyBackupPolicy.

Id Long Yes 11

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

Name String Yes policy_name_A

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

Policy Json Yes null

The 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 after the modification. If you want to protect all directories, set this field to brackets [].
  • Include: the format of the file that you want to protect after the modification. Examples: *.jpg and *.doc.
  • Exclude: the directory that you want to exclude from the anti-ransomware policy after the modification.You can call the DescribeExcludeSystemPath operation to query all directories and specify the directory that you want to exclude. For example, to exclude the /home/user directory, set the value to "/home/user".
  • Schedule: the start time and interval of a data backup task after the modification. 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 resides in an internal network, we recommend that you leave this field empty. If this field is left empty, the bandwidth for a data backup task is unlimited.

UuidList.N RepeatList Yes ["3bb30859-b3b5-4f28-868f-b0892c98****", "3bb30859-b3b5-4f28-868f-b0892c98****"]

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

PolicyVersion String No 2.0.0

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
PolicyRegionId String No cn-hangzhou

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.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
RequestId String D0D6E6E4-CB8C-4897-B852-46AEFDA04B21

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyBackupPolicy
&<Common request parameters>

Sample success responses

XML format

<ModifyBackupPolicy>
  <RequestId>D0D6E6E4-CB8C-4897-B852-46AEFDA04B21</RequestId>
</ModifyBackupPolicy>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.