All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.polardb20170801.models.ModifyBackupPolicyRequest Maven / Gradle / Ivy

There is a newer version: 4.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.polardb20170801.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link ModifyBackupPolicyRequest} extends {@link RequestModel}
 *
 * 

ModifyBackupPolicyRequest

*/ public class ModifyBackupPolicyRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("BackupFrequency") private String backupFrequency; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("BackupRetentionPolicyOnClusterDeletion") private String backupRetentionPolicyOnClusterDeletion; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DBClusterId") @com.aliyun.core.annotation.Validation(required = true) private String DBClusterId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel1BackupFrequency") private String dataLevel1BackupFrequency; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel1BackupPeriod") private String dataLevel1BackupPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel1BackupRetentionPeriod") private String dataLevel1BackupRetentionPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel1BackupTime") private String dataLevel1BackupTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel2BackupAnotherRegionRegion") private String dataLevel2BackupAnotherRegionRegion; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel2BackupAnotherRegionRetentionPeriod") private String dataLevel2BackupAnotherRegionRetentionPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel2BackupPeriod") private String dataLevel2BackupPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataLevel2BackupRetentionPeriod") private String dataLevel2BackupRetentionPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PreferredBackupPeriod") private String preferredBackupPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PreferredBackupTime") private String preferredBackupTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; private ModifyBackupPolicyRequest(Builder builder) { super(builder); this.backupFrequency = builder.backupFrequency; this.backupRetentionPolicyOnClusterDeletion = builder.backupRetentionPolicyOnClusterDeletion; this.DBClusterId = builder.DBClusterId; this.dataLevel1BackupFrequency = builder.dataLevel1BackupFrequency; this.dataLevel1BackupPeriod = builder.dataLevel1BackupPeriod; this.dataLevel1BackupRetentionPeriod = builder.dataLevel1BackupRetentionPeriod; this.dataLevel1BackupTime = builder.dataLevel1BackupTime; this.dataLevel2BackupAnotherRegionRegion = builder.dataLevel2BackupAnotherRegionRegion; this.dataLevel2BackupAnotherRegionRetentionPeriod = builder.dataLevel2BackupAnotherRegionRetentionPeriod; this.dataLevel2BackupPeriod = builder.dataLevel2BackupPeriod; this.dataLevel2BackupRetentionPeriod = builder.dataLevel2BackupRetentionPeriod; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.preferredBackupPeriod = builder.preferredBackupPeriod; this.preferredBackupTime = builder.preferredBackupTime; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; } public static Builder builder() { return new Builder(); } public static ModifyBackupPolicyRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return backupFrequency */ public String getBackupFrequency() { return this.backupFrequency; } /** * @return backupRetentionPolicyOnClusterDeletion */ public String getBackupRetentionPolicyOnClusterDeletion() { return this.backupRetentionPolicyOnClusterDeletion; } /** * @return DBClusterId */ public String getDBClusterId() { return this.DBClusterId; } /** * @return dataLevel1BackupFrequency */ public String getDataLevel1BackupFrequency() { return this.dataLevel1BackupFrequency; } /** * @return dataLevel1BackupPeriod */ public String getDataLevel1BackupPeriod() { return this.dataLevel1BackupPeriod; } /** * @return dataLevel1BackupRetentionPeriod */ public String getDataLevel1BackupRetentionPeriod() { return this.dataLevel1BackupRetentionPeriod; } /** * @return dataLevel1BackupTime */ public String getDataLevel1BackupTime() { return this.dataLevel1BackupTime; } /** * @return dataLevel2BackupAnotherRegionRegion */ public String getDataLevel2BackupAnotherRegionRegion() { return this.dataLevel2BackupAnotherRegionRegion; } /** * @return dataLevel2BackupAnotherRegionRetentionPeriod */ public String getDataLevel2BackupAnotherRegionRetentionPeriod() { return this.dataLevel2BackupAnotherRegionRetentionPeriod; } /** * @return dataLevel2BackupPeriod */ public String getDataLevel2BackupPeriod() { return this.dataLevel2BackupPeriod; } /** * @return dataLevel2BackupRetentionPeriod */ public String getDataLevel2BackupRetentionPeriod() { return this.dataLevel2BackupRetentionPeriod; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return preferredBackupPeriod */ public String getPreferredBackupPeriod() { return this.preferredBackupPeriod; } /** * @return preferredBackupTime */ public String getPreferredBackupTime() { return this.preferredBackupTime; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } public static final class Builder extends Request.Builder { private String backupFrequency; private String backupRetentionPolicyOnClusterDeletion; private String DBClusterId; private String dataLevel1BackupFrequency; private String dataLevel1BackupPeriod; private String dataLevel1BackupRetentionPeriod; private String dataLevel1BackupTime; private String dataLevel2BackupAnotherRegionRegion; private String dataLevel2BackupAnotherRegionRetentionPeriod; private String dataLevel2BackupPeriod; private String dataLevel2BackupRetentionPeriod; private String ownerAccount; private Long ownerId; private String preferredBackupPeriod; private String preferredBackupTime; private String resourceOwnerAccount; private Long resourceOwnerId; private Builder() { super(); } private Builder(ModifyBackupPolicyRequest request) { super(request); this.backupFrequency = request.backupFrequency; this.backupRetentionPolicyOnClusterDeletion = request.backupRetentionPolicyOnClusterDeletion; this.DBClusterId = request.DBClusterId; this.dataLevel1BackupFrequency = request.dataLevel1BackupFrequency; this.dataLevel1BackupPeriod = request.dataLevel1BackupPeriod; this.dataLevel1BackupRetentionPeriod = request.dataLevel1BackupRetentionPeriod; this.dataLevel1BackupTime = request.dataLevel1BackupTime; this.dataLevel2BackupAnotherRegionRegion = request.dataLevel2BackupAnotherRegionRegion; this.dataLevel2BackupAnotherRegionRetentionPeriod = request.dataLevel2BackupAnotherRegionRetentionPeriod; this.dataLevel2BackupPeriod = request.dataLevel2BackupPeriod; this.dataLevel2BackupRetentionPeriod = request.dataLevel2BackupRetentionPeriod; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.preferredBackupPeriod = request.preferredBackupPeriod; this.preferredBackupTime = request.preferredBackupTime; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; } /** * The backup frequency. Default value: Normal. Valid values: *

* * * **Normal**: standard backup. The system backs up data once a day. * * **2/24H**: enhanced backup. The system backs up data every 2 hours. * * **3/24H**: enhanced backup. The system backs up data every 3 hours. * * **4/24H**: enhanced backup. The system backs up data every 4 hours. * * >- If you enable enhanced backup, all backups are retained for 24 hours. For backup files that are created earlier than the previous 24 hours, the system permanently retains only the first backup that is created after 00:00 every day and deletes the rest. * >- If you enable enhanced backup, **PreferredBackupPeriod** is automatically set to all days in a week (from Monday to Sunday). * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed supports the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder backupFrequency(String backupFrequency) { this.putQueryParameter("BackupFrequency", backupFrequency); this.backupFrequency = backupFrequency; return this; } /** * Specifies whether to retain backups when you delete a cluster. Valid values: *

* * * **ALL**: permanently retains all backups. * * **LATEST**: permanently retains only the last backup. * * **NONE**: does not retain backups. * * > The default value is NONE. */ public Builder backupRetentionPolicyOnClusterDeletion(String backupRetentionPolicyOnClusterDeletion) { this.putQueryParameter("BackupRetentionPolicyOnClusterDeletion", backupRetentionPolicyOnClusterDeletion); this.backupRetentionPolicyOnClusterDeletion = backupRetentionPolicyOnClusterDeletion; return this; } /** * The ID of the cluster. *

* * > You can call the [DescribeDBClusters](~~98094~~) operation to query information about all clusters that are deployed in a specified region, such as the cluster ID. */ public Builder DBClusterId(String DBClusterId) { this.putQueryParameter("DBClusterId", DBClusterId); this.DBClusterId = DBClusterId; return this; } /** * The frequency of level-1 backups. Default value: Normal. Valid values: *

* * * **Normal**: standard backup. The system backs up data once a day. * * **2/24H**: enhanced backup. The system backs up data every 2 hours. * * **3/24H**: enhanced backup. The system backs up data every 3 hours. * * **4/24H**: enhanced backup. The system backs up data every 4 hours. * * >- This parameter is invalid for PolarDB for Oracle clusters or PolarDB for PostgreSQL clusters. * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder dataLevel1BackupFrequency(String dataLevel1BackupFrequency) { this.putQueryParameter("DataLevel1BackupFrequency", dataLevel1BackupFrequency); this.dataLevel1BackupFrequency = dataLevel1BackupFrequency; return this; } /** * The backup cycle of level-1 backups. Valid values: *

* * * **Monday** * * **Tuesday** * * **Wednesday** * * **Thursday** * * **Friday** * * **Saturday** * * **Sunday** * * >- You need to specify at least two values. Separate multiple values with commas (,). * >- This parameter is invalid for PolarDB for Oracle clusters or PolarDB for PostgreSQL clusters. * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder dataLevel1BackupPeriod(String dataLevel1BackupPeriod) { this.putQueryParameter("DataLevel1BackupPeriod", dataLevel1BackupPeriod); this.dataLevel1BackupPeriod = dataLevel1BackupPeriod; return this; } /** * The retention period of level-1 backups. Valid values: 3 to 14. Unit: days. */ public Builder dataLevel1BackupRetentionPeriod(String dataLevel1BackupRetentionPeriod) { this.putQueryParameter("DataLevel1BackupRetentionPeriod", dataLevel1BackupRetentionPeriod); this.dataLevel1BackupRetentionPeriod = dataLevel1BackupRetentionPeriod; return this; } /** * The time period during which automatic backup for level-1 backup is performed. The time period is in the `hh:mmZ-hh:mmZ` format and is displayed in UTC. The start time and end time are on the hour and have an interval of 1 hour. Example: `14:00Z-15:00Z`. *

* >- This parameter is invalid for PolarDB for Oracle clusters or PolarDB for PostgreSQL clusters. * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder dataLevel1BackupTime(String dataLevel1BackupTime) { this.putQueryParameter("DataLevel1BackupTime", dataLevel1BackupTime); this.dataLevel1BackupTime = dataLevel1BackupTime; return this; } /** * The region where the cross-region level-2 backup is stored. For information about regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder dataLevel2BackupAnotherRegionRegion(String dataLevel2BackupAnotherRegionRegion) { this.putQueryParameter("DataLevel2BackupAnotherRegionRegion", dataLevel2BackupAnotherRegionRegion); this.dataLevel2BackupAnotherRegionRegion = dataLevel2BackupAnotherRegionRegion; return this; } /** * The retention period of cross-region level-2 backups. Valid values: *

* * * **0**: The cross-region level-2 backup feature is disabled. * * **30 to 7300**: Cross-region level-2 backups are retained for 30 to 7,300 days. * * **1**: Cross-region level-2 backups are permanently retained. * * > The default value is **0**. By default, the cross-region level-2 backup feature is disabled when you create a cluster. */ public Builder dataLevel2BackupAnotherRegionRetentionPeriod(String dataLevel2BackupAnotherRegionRetentionPeriod) { this.putQueryParameter("DataLevel2BackupAnotherRegionRetentionPeriod", dataLevel2BackupAnotherRegionRetentionPeriod); this.dataLevel2BackupAnotherRegionRetentionPeriod = dataLevel2BackupAnotherRegionRetentionPeriod; return this; } /** * The backup cycle of level-2 backups. Valid values: *

* * * **Monday** * * **Tuesday** * * **Wednesday** * * **Thursday** * * **Friday** * * **Saturday** * * **Sunday** * * >- You need to specify at least two values. Separate multiple values with commas (,). * >- This parameter is invalid for PolarDB for Oracle clusters or PolarDB for PostgreSQL clusters. * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed does not support the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder dataLevel2BackupPeriod(String dataLevel2BackupPeriod) { this.putQueryParameter("DataLevel2BackupPeriod", dataLevel2BackupPeriod); this.dataLevel2BackupPeriod = dataLevel2BackupPeriod; return this; } /** * The retention period of level-2 backups. Valid values: *

* * * **0**: The level-2 backup feature is disabled. * * **30 to 7300**: Cross-region level-2 backups are retained for 30 to 7,300 days. * * **1**: Cross-region level-2 backups are permanently retained. * * > The default value is **0**. By default, the level-2 backup feature is disabled when you create a cluster. */ public Builder dataLevel2BackupRetentionPeriod(String dataLevel2BackupRetentionPeriod) { this.putQueryParameter("DataLevel2BackupRetentionPeriod", dataLevel2BackupRetentionPeriod); this.dataLevel2BackupRetentionPeriod = dataLevel2BackupRetentionPeriod; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** * The backup cycle. Valid values: *

* * * **Monday** * * **Tuesday** * * **Wednesday** * * **Thursday** * * **Friday** * * **Saturday** * * **Sunday** * * >- You need to specify at least two values. Separate multiple values with commas (,). * >- This parameter is invalid if the region where your PolarDB for MySQL cluster is deployed supports the cross-region backup feature. For information about the regions that support the cross-region backup feature, see [Overview](~~72672~~). */ public Builder preferredBackupPeriod(String preferredBackupPeriod) { this.putQueryParameter("PreferredBackupPeriod", preferredBackupPeriod); this.preferredBackupPeriod = preferredBackupPeriod; return this; } /** * The time period during which automatic backup for level-1 backup is performed. The format is `hh:mmZ-hh:mmZ` format. The time is displayed in UTC. The start time and end time are on the hour and with an interval of one hour. Example: `14:00Z-15:00Z`. */ public Builder preferredBackupTime(String preferredBackupTime) { this.putQueryParameter("PreferredBackupTime", preferredBackupTime); this.preferredBackupTime = preferredBackupTime; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } @Override public ModifyBackupPolicyRequest build() { return new ModifyBackupPolicyRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy