Creates 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 dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateBackupPolicy

The operation that you want to perform. Set the value to CreateBackupPolicy.

Name String Yes Server anti-ransomware policy 01

The name of the anti-ransomware policy.

Policy Map Yes "{"IsDefault":1,"Include":[],"Source":[],"Schedule":"I|1648061040|PT24H","Retention":7,"SpeedLimiter":"","ExcludeSystemPath":true,"Exclude":["/bin/","/usr/bin/","/sbin/","/boot/","/proc/","/sys/","/srv/","/lib/","/selinux/","/usr/sbin/","/run/","/lib32/","/lib64/","/lost+found/","/var/lib/kubelet/","/var/lib/ntp/proc","/var/lib/container","Windows","Python27","Program Files (x86)","Program Files","Boot","$RECYCLE.BIN","System Volume Information","Users\Administrator\NTUSER.DAT*","ProgramData","pagefile.sys","Users\Default\NTUSER.DAT*","Users\Administrator\ntuser.*"],"UseVss":true}"
  • IsDefault: the type of the anti-ransomware policy. Valid values:
    • 1: a recommended policy
    • 0: a custom policy
  • Include: the format of the files that you want to protect. If you want to protect the files in all formats, set this field to [].
  • Source: the directory that you want to protect. If you want to protect all directories, set this field to [].
  • ExcludeSystemPath: specifies whether to exclude a specific directory from the anti-ransomware policy. If you want to exclude a directory, set this field to true. If you do not exclude a directory, you can leave this field empty.
  • Exclude: the directory that you want to exclude from the anti-ransomware policy. If you do not exclude a directory, set this field to [].
  • 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 0:24:30720, the maximum bandwidth for a data backup task is 30 MB/s from 00:00 to 24:00.
  • UseVss: specifies whether to enable the VSS feature that is available only for Windows servers. Valid values:
    • true: yes
    • false: no
Note The VSS feature is available only if you create the anti-ransomware policy for Windows servers. After you enable the feature, the number of backup failures due to running processes is significantly reduced. We recommend that you enable the VSS feature. After you enable the feature, the data of disks that are in the exFAT and FAT32 formats cannot be backed up.
PolicyVersion String Yes 2.0.0

The version of the anti-ransomware policy. Set the value to 2.0.0.

PolicyRegionId String No ch-hangzhou

The region ID of the server that is not deployed on Alibaba Cloud.

Note Specify the ID of the supported region that is the nearest to the region of the server. You can call the DescribeSupportRegion operation to query the supported regions of the anti-ransomware feature.
UuidList.N String Yes ["3bb30859-b3b5-4f28-868f-b0892c98****", "3bb30859-b3b5-4f28-868f-b0892c98****"]

The UUIDs of the servers that you want to protect. Separate multiple UUIDs with commas (,).

Note You can call the DescribeCloudCenterInstances operation to query the UUIDs of servers.

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 24A20733-10A0-4AF6-BE6B-E3322413BB68

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateBackupPolicy
&Name=Server anti-ransomware policy 01
&PolicyVersion=2.0.0
&PolicyRegionId=ch-hangzhou
&UuidList=["[\"3bb30859-b3b5-4f28-868f-b0892c98****\", \"3bb30859-b3b5-4f28-868f-b0892c98****\"]"]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateBackupPolicyResponse>
    <RequestId>24A20733-10A0-4AF6-BE6B-E3322413BB68</RequestId>
</CreateBackupPolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "24A20733-10A0-4AF6-BE6B-E3322413BB68"
}

Error codes

HTTP status code Error code Error message Description
500 ServerError ServerError The error message returned because a server error occurred.

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