public static final class ModifyBackupPolicyRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ModifyBackupPolicyRequest |
build() |
ModifyBackupPolicyRequest.Builder |
id(Long id)
The ID of the anti-ransomware policy that you want to modify.
|
ModifyBackupPolicyRequest.Builder |
name(String name)
The name of the anti-ransomware policy that you want to modify.
|
ModifyBackupPolicyRequest.Builder |
policy(Map<String,?> policy)
The configurations of the anti-ransomware policy that you want to modify.
|
ModifyBackupPolicyRequest.Builder |
policyRegionId(String policyRegionId)
The region ID of the server to which the anti-ransomware policy is applied.
|
ModifyBackupPolicyRequest.Builder |
policyVersion(String policyVersion)
The version of the anti-ransomware policy.
|
ModifyBackupPolicyRequest.Builder |
uuidList(List<String> uuidList)
The UUIDs of the servers to which the anti-ransomware policy is applied.
|
public ModifyBackupPolicyRequest.Builder id(Long id)
The ID of the anti-ransomware policy that you want to modify.
This parameter is required.
example:11
public ModifyBackupPolicyRequest.Builder name(String name)
The name of the anti-ransomware policy that you want to modify.
This parameter is required.
example:policy_name_A
public ModifyBackupPolicyRequest.Builder policy(Map<String,?> policy)
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.
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.
This parameter is required.
example:{"Source":["home","admin"]}
public ModifyBackupPolicyRequest.Builder policyRegionId(String policyRegionId)
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.
example:cn-hangzhou
public ModifyBackupPolicyRequest.Builder policyVersion(String policyVersion)
The version of the anti-ransomware policy. You can call the DescribeBackupPolicies operation to query the versions of anti-ransomware policies.
2.0.0
public ModifyBackupPolicyRequest.Builder uuidList(List<String> uuidList)
The UUIDs of the servers to which the anti-ransomware policy is applied.
This parameter is required.
example:["3bb30859-b3b5-4f28-868f-b0892c98****", "3bb30859-b3b5-4f28-868f-b0892c98****"]
public ModifyBackupPolicyRequest build()
Copyright © 2026. All rights reserved.