All Products
Search
Document Center

Security Center:CreateBackupPolicy

Last Updated:Mar 21, 2023

Creates an anti-ransomware policy for servers.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

The name of the anti-ransomware policy.

ServerBackUpPolicy01
PolicyobjectYes
  • IsDefault: the type of the anti-ransomware policy. Valid values:

    • 1: recommended policy
    • 0: 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 want to exclude a directory, leave this field empty.

  • Exclude: the directory that you want to exclude from the anti-ransomware policy. If you do not want to 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. Examples:

    • 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. The feature is available only for Windows servers. Valid values:

    • true: yes
    • false: no
NoteThe 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.
PolicyVersionstringYes

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

2.0.0
PolicyRegionIdstringNo

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

NoteWe recommend that you specify the ID of the supported region that is the nearest to the location of the server. You can call the DescribeSupportRegion operation to query the supported regions of the anti-ransomware feature.
ch-hangzhou
UuidListarrayYes

The UUIDs of the servers that you want to protect.

stringNo

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

NoteYou can call the DescribeCloudCenterInstances operation to query the UUIDs of servers.
3bb30859-b3b5-4f28-868f-b0892c98****

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

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

24A20733-10A0-4AF6-BE6B-E3322413BB68
BackupPolicyobject

The information about the anti-ransomware policy.

Idstring

The ID of the anti-ransomware policy.

1301575
Statusstring

The status of the anti-ransomware policy. Valid values:

  • enabled
  • disabled
NoteAfter you create an anti-ransomware policy, the policy is enabled by default.
enabled

Examples

Sample success responses

JSONformat

{
  "RequestId": "24A20733-10A0-4AF6-BE6B-E3322413BB68",
  "BackupPolicy": {
    "Id": "1301575",
    "Status": "enabled"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400AgentNotOnlineThe agent not online.The error message returned because the Security Center agent is offline. Make sure that the Security Center agent is online and try again.
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

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

Change history

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