All Products
Search
Document Center

Security Center:ModifyBackupPolicy

Last Updated:Nov 13, 2024

Modifies an anti-ransomware policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:ModifyBackupPolicyupdate
  • All Resources
    *
    none
none

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 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 and then 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 executed 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 executed at an interval of 24 hours.
  • Retention: the period during which backup data is retained. Unit: day. 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.

{"Source":["home","admin"]}
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.

stringYes

The UUID of the server 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

Examples

Sample success responses

JSONformat

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

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
2023-03-23The Error code has changedView Change Details
2022-08-01The internal configuration of the API is changed, but the call is not affectedView Change Details