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

com.pulumi.alicloud.rds.inputs.RdsUpgradeDbInstanceState Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.rds.inputs;

import com.pulumi.alicloud.rds.inputs.RdsUpgradeDbInstanceParameterArgs;
import com.pulumi.alicloud.rds.inputs.RdsUpgradeDbInstancePgHbaConfArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class RdsUpgradeDbInstanceState extends com.pulumi.resources.ResourceArgs {

    public static final RdsUpgradeDbInstanceState Empty = new RdsUpgradeDbInstanceState();

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
     * 
     */
    @Import(name="acl")
    private @Nullable Output acl;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
     * 
     */
    public Optional> acl() {
        return Optional.ofNullable(this.acl);
    }

    /**
     * How to upgrade the minor version of the instance. Valid values:
     * * **Auto**: automatically upgrade the minor version.
     * * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
     * 
     */
    @Import(name="autoUpgradeMinorVersion")
    private @Nullable Output autoUpgradeMinorVersion;

    /**
     * @return How to upgrade the minor version of the instance. Valid values:
     * * **Auto**: automatically upgrade the minor version.
     * * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
     * 
     */
    public Optional> autoUpgradeMinorVersion() {
        return Optional.ofNullable(this.autoUpgradeMinorVersion);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of ssl_action is Open, the default value of this parameter is aliyun. Value range:
     * * **aliyun**: using cloud certificates.
     * * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
     * 
     */
    @Import(name="caType")
    private @Nullable Output caType;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of ssl_action is Open, the default value of this parameter is aliyun. Value range:
     * * **aliyun**: using cloud certificates.
     * * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
     * 
     */
    public Optional> caType() {
        return Optional.ofNullable(this.caType);
    }

    /**
     * The file that contains the certificate used for TDE.
     * 
     */
    @Import(name="certificate")
    private @Nullable Output certificate;

    /**
     * @return The file that contains the certificate used for TDE.
     * 
     */
    public Optional> certificate() {
        return Optional.ofNullable(this.certificate);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of client_ca_enabled is 1, this parameter must be configured.
     * 
     */
    @Import(name="clientCaCert")
    private @Nullable Output clientCaCert;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of client_ca_enabled is 1, this parameter must be configured.
     * 
     */
    public Optional> clientCaCert() {
        return Optional.ofNullable(this.clientCaCert);
    }

    /**
     * The client ca enabled.
     * 
     */
    @Import(name="clientCaEnabled")
    private @Nullable Output clientCaEnabled;

    /**
     * @return The client ca enabled.
     * 
     */
    public Optional> clientCaEnabled() {
        return Optional.ofNullable(this.clientCaEnabled);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of client_crl_enabled is 1, this parameter must be configured.
     * 
     */
    @Import(name="clientCertRevocationList")
    private @Nullable Output clientCertRevocationList;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of client_crl_enabled is 1, this parameter must be configured.
     * 
     */
    public Optional> clientCertRevocationList() {
        return Optional.ofNullable(this.clientCertRevocationList);
    }

    /**
     * The client crl enabled.
     * 
     */
    @Import(name="clientCrlEnabled")
    private @Nullable Output clientCrlEnabled;

    /**
     * @return The client crl enabled.
     * 
     */
    public Optional> clientCrlEnabled() {
        return Optional.ofNullable(this.clientCrlEnabled);
    }

    /**
     * The time at which ApsaraDB RDS collects the statistics of the new instance.
     * * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
     * * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
     * 
     * > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
     * 
     */
    @Import(name="collectStatMode")
    private @Nullable Output collectStatMode;

    /**
     * @return The time at which ApsaraDB RDS collects the statistics of the new instance.
     * * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
     * * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
     * 
     * > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
     * 
     */
    public Optional> collectStatMode() {
        return Optional.ofNullable(this.collectStatMode);
    }

    /**
     * The database connection address.
     * 
     */
    @Import(name="connectionString")
    private @Nullable Output connectionString;

    /**
     * @return The database connection address.
     * 
     */
    public Optional> connectionString() {
        return Optional.ofNullable(this.connectionString);
    }

    /**
     * The connection string prefix.
     * 
     */
    @Import(name="connectionStringPrefix")
    private @Nullable Output connectionStringPrefix;

    /**
     * @return The connection string prefix.
     * 
     */
    public Optional> connectionStringPrefix() {
        return Optional.ofNullable(this.connectionStringPrefix);
    }

    /**
     * The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
     * 
     */
    @Import(name="dbInstanceClass")
    private @Nullable Output dbInstanceClass;

    /**
     * @return The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
     * 
     */
    public Optional> dbInstanceClass() {
        return Optional.ofNullable(this.dbInstanceClass);
    }

    /**
     * The db instance description.
     * 
     */
    @Import(name="dbInstanceDescription")
    private @Nullable Output dbInstanceDescription;

    /**
     * @return The db instance description.
     * 
     */
    public Optional> dbInstanceDescription() {
        return Optional.ofNullable(this.dbInstanceDescription);
    }

    /**
     * The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
     * 
     * > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
     * 
     */
    @Import(name="dbInstanceStorage")
    private @Nullable Output dbInstanceStorage;

    /**
     * @return The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
     * 
     * > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
     * 
     */
    public Optional> dbInstanceStorage() {
        return Optional.ofNullable(this.dbInstanceStorage);
    }

    /**
     * The type of storage media that is used for the new instance. Valid values:
     * * **local_ssd**: local SSDs.
     * * **cloud_ssd**: standard SSDs.
     * * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
     * * **cloud_essd2**: ESSDs of PL2.
     * * **cloud_essd3**: ESSDs of PL3.
     * 
     */
    @Import(name="dbInstanceStorageType")
    private @Nullable Output dbInstanceStorageType;

    /**
     * @return The type of storage media that is used for the new instance. Valid values:
     * * **local_ssd**: local SSDs.
     * * **cloud_ssd**: standard SSDs.
     * * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
     * * **cloud_essd2**: ESSDs of PL2.
     * * **cloud_essd3**: ESSDs of PL3.
     * 
     */
    public Optional> dbInstanceStorageType() {
        return Optional.ofNullable(this.dbInstanceStorageType);
    }

    /**
     * The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
     * 
     * > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
     * 
     */
    @Import(name="dbName")
    private @Nullable Output dbName;

    /**
     * @return The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
     * 
     * > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
     * 
     */
    public Optional> dbName() {
        return Optional.ofNullable(this.dbName);
    }

    /**
     * The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
     * 
     */
    @Import(name="dedicatedHostGroupId")
    private @Nullable Output dedicatedHostGroupId;

    /**
     * @return The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
     * 
     */
    public Optional> dedicatedHostGroupId() {
        return Optional.ofNullable(this.dedicatedHostGroupId);
    }

    /**
     * The switch of delete protection. Valid values:
     * - true: delete protect.
     * - false: no delete protect.
     * 
     * > **NOTE:** `deletion_protection` is valid only when attribute `payment_type` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
     * 
     */
    @Import(name="deletionProtection")
    private @Nullable Output deletionProtection;

    /**
     * @return The switch of delete protection. Valid values:
     * - true: delete protect.
     * - false: no delete protect.
     * 
     * > **NOTE:** `deletion_protection` is valid only when attribute `payment_type` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
     * 
     */
    public Optional> deletionProtection() {
        return Optional.ofNullable(this.deletionProtection);
    }

    /**
     * The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
     * 
     */
    @Import(name="direction")
    private @Nullable Output direction;

    /**
     * @return The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
     * 
     */
    public Optional> direction() {
        return Optional.ofNullable(this.direction);
    }

    /**
     * The effective time.
     * 
     */
    @Import(name="effectiveTime")
    private @Nullable Output effectiveTime;

    /**
     * @return The effective time.
     * 
     */
    public Optional> effectiveTime() {
        return Optional.ofNullable(this.effectiveTime);
    }

    /**
     * The ID of the private key.
     * 
     * > **NOTE:** This parameter is available only when the instance runs MySQL.
     * 
     */
    @Import(name="encryptionKey")
    private @Nullable Output encryptionKey;

    /**
     * @return The ID of the private key.
     * 
     * > **NOTE:** This parameter is available only when the instance runs MySQL.
     * 
     */
    public Optional> encryptionKey() {
        return Optional.ofNullable(this.encryptionKey);
    }

    /**
     * Database type. Value options: MySQL, SQLServer, PostgreSQL.
     * 
     */
    @Import(name="engine")
    private @Nullable Output engine;

    /**
     * @return Database type. Value options: MySQL, SQLServer, PostgreSQL.
     * 
     */
    public Optional> engine() {
        return Optional.ofNullable(this.engine);
    }

    /**
     * Database version. Value:
     * * MySQL: **5.5/5.6/5.7/8.0**.
     * * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
     * * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
     * * MariaDB: **10.3**.
     * 
     */
    @Import(name="engineVersion")
    private @Nullable Output engineVersion;

    /**
     * @return Database version. Value:
     * * MySQL: **5.5/5.6/5.7/8.0**.
     * * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
     * * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
     * * MariaDB: **10.3**.
     * 
     */
    public Optional> engineVersion() {
        return Optional.ofNullable(this.engineVersion);
    }

    /**
     * Set it to true to make some parameter efficient when modifying them. Default to false.
     * 
     */
    @Import(name="forceRestart")
    private @Nullable Output forceRestart;

    /**
     * @return Set it to true to make some parameter efficient when modifying them. Default to false.
     * 
     */
    public Optional> forceRestart() {
        return Optional.ofNullable(this.forceRestart);
    }

    /**
     * The high availability mode. Valid values:
     * * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
     * * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
     * 
     */
    @Import(name="haMode")
    private @Nullable Output haMode;

    /**
     * @return The high availability mode. Valid values:
     * * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
     * * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
     * 
     */
    public Optional> haMode() {
        return Optional.ofNullable(this.haMode);
    }

    /**
     * The network type of the instance. Valid values:
     * * **Classic**: Classic Network.
     * * **VPC**: VPC.
     * 
     */
    @Import(name="instanceNetworkType")
    private @Nullable Output instanceNetworkType;

    /**
     * @return The network type of the instance. Valid values:
     * * **Classic**: Classic Network.
     * * **VPC**: VPC.
     * 
     */
    public Optional> instanceNetworkType() {
        return Optional.ofNullable(this.instanceNetworkType);
    }

    /**
     * The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
     * 
     */
    @Import(name="maintainTime")
    private @Nullable Output maintainTime;

    /**
     * @return The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
     * 
     */
    public Optional> maintainTime() {
        return Optional.ofNullable(this.maintainTime);
    }

    /**
     * Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The password of the certificate.
     * 
     * > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
     * 
     */
    @Import(name="password")
    private @Nullable Output password;

    /**
     * @return The password of the certificate.
     * 
     * > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
     * 
     */
    public Optional> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
     * 
     */
    @Import(name="paymentType")
    private @Nullable Output paymentType;

    /**
     * @return The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
     * 
     */
    public Optional> paymentType() {
        return Optional.ofNullable(this.paymentType);
    }

    /**
     * The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
     * 
     */
    @Import(name="pgHbaConfs")
    private @Nullable Output> pgHbaConfs;

    /**
     * @return The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
     * 
     */
    public Optional>> pgHbaConfs() {
        return Optional.ofNullable(this.pgHbaConfs);
    }

    /**
     * The port.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return The port.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
     * 
     */
    @Import(name="privateIpAddress")
    private @Nullable Output privateIpAddress;

    /**
     * @return The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
     * 
     */
    public Optional> privateIpAddress() {
        return Optional.ofNullable(this.privateIpAddress);
    }

    /**
     * The file that contains the private key used for TDE.
     * 
     */
    @Import(name="privateKey")
    private @Nullable Output privateKey;

    /**
     * @return The file that contains the private key used for TDE.
     * 
     */
    public Optional> privateKey() {
        return Optional.ofNullable(this.privateKey);
    }

    /**
     * The released keep policy.
     * 
     */
    @Import(name="releasedKeepPolicy")
    private @Nullable Output releasedKeepPolicy;

    /**
     * @return The released keep policy.
     * 
     */
    public Optional> releasedKeepPolicy() {
        return Optional.ofNullable(this.releasedKeepPolicy);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
     * 
     */
    @Import(name="replicationAcl")
    private @Nullable Output replicationAcl;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
     * 
     */
    public Optional> replicationAcl() {
        return Optional.ofNullable(this.replicationAcl);
    }

    /**
     * The resource group id.
     * 
     */
    @Import(name="resourceGroupId")
    private @Nullable Output resourceGroupId;

    /**
     * @return The resource group id.
     * 
     */
    public Optional> resourceGroupId() {
        return Optional.ofNullable(this.resourceGroupId);
    }

    /**
     * The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
     * 
     * > **NOTE:** This parameter is available only when the instance runs MySQL.
     * 
     */
    @Import(name="roleArn")
    private @Nullable Output roleArn;

    /**
     * @return The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
     * 
     * > **NOTE:** This parameter is available only when the instance runs MySQL.
     * 
     */
    public Optional> roleArn() {
        return Optional.ofNullable(this.roleArn);
    }

    /**
     * The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
     * * IP address form, for example: 10.23.12.24.
     * * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
     * 
     * > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
     * 
     */
    @Import(name="securityIps")
    private @Nullable Output> securityIps;

    /**
     * @return The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
     * * IP address form, for example: 10.23.12.24.
     * * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
     * 
     * > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
     * 
     */
    public Optional>> securityIps() {
        return Optional.ofNullable(this.securityIps);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
     * 
     */
    @Import(name="serverCert")
    private @Nullable Output serverCert;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
     * 
     */
    public Optional> serverCert() {
        return Optional.ofNullable(this.serverCert);
    }

    /**
     * This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
     * 
     */
    @Import(name="serverKey")
    private @Nullable Output serverKey;

    /**
     * @return This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
     * 
     */
    public Optional> serverKey() {
        return Optional.ofNullable(this.serverKey);
    }

    /**
     * The source biz.
     * 
     */
    @Import(name="sourceBiz")
    private @Nullable Output sourceBiz;

    /**
     * @return The source biz.
     * 
     */
    public Optional> sourceBiz() {
        return Optional.ofNullable(this.sourceBiz);
    }

    /**
     * The source db instance id.
     * 
     */
    @Import(name="sourceDbInstanceId")
    private @Nullable Output sourceDbInstanceId;

    /**
     * @return The source db instance id.
     * 
     */
    public Optional> sourceDbInstanceId() {
        return Optional.ofNullable(this.sourceDbInstanceId);
    }

    /**
     * Enable or disable SSL. Valid values: `0` and `1`.
     * 
     */
    @Import(name="sslEnabled")
    private @Nullable Output sslEnabled;

    /**
     * @return Enable or disable SSL. Valid values: `0` and `1`.
     * 
     */
    public Optional> sslEnabled() {
        return Optional.ofNullable(this.sslEnabled);
    }

    /**
     * Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
     * * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
     * * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
     * * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
     * * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
     * * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
     * * The data migration does not interrupt your workloads on the original instance.
     * * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
     * 
     */
    @Import(name="switchOver")
    private @Nullable Output switchOver;

    /**
     * @return Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
     * * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
     * * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
     * * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
     * * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
     * * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
     * * The data migration does not interrupt your workloads on the original instance.
     * * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
     * 
     */
    public Optional> switchOver() {
        return Optional.ofNullable(this.switchOver);
    }

    /**
     * The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
     * 
     */
    @Import(name="switchTime")
    private @Nullable Output switchTime;

    /**
     * @return The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
     * 
     */
    public Optional> switchTime() {
        return Optional.ofNullable(this.switchTime);
    }

    /**
     * The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
     * * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
     * * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
     * 
     */
    @Import(name="switchTimeMode")
    private @Nullable Output switchTimeMode;

    /**
     * @return The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
     * * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
     * * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
     * 
     */
    public Optional> switchTimeMode() {
        return Optional.ofNullable(this.switchTimeMode);
    }

    /**
     * [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
     * * **Sync**: strong synchronization.
     * * **Semi-sync**: Semi-synchronous.
     * * **Async**: asynchronous.
     * 
     * > **NOTE:** SQL Server 2017 cluster version is currently not supported.
     * 
     */
    @Import(name="syncMode")
    private @Nullable Output syncMode;

    /**
     * @return [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
     * * **Sync**: strong synchronization.
     * * **Semi-sync**: Semi-synchronous.
     * * **Async**: asynchronous.
     * 
     * > **NOTE:** SQL Server 2017 cluster version is currently not supported.
     * 
     */
    public Optional> syncMode() {
        return Optional.ofNullable(this.syncMode);
    }

    /**
     * The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
     * 
     * > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
     * 
     */
    @Import(name="targetMajorVersion")
    private @Nullable Output targetMajorVersion;

    /**
     * @return The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
     * 
     * > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
     * 
     */
    public Optional> targetMajorVersion() {
        return Optional.ofNullable(this.targetMajorVersion);
    }

    /**
     * The availability check method of the instance. Valid values:
     * - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
     * - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
     * 
     */
    @Import(name="tcpConnectionType")
    private @Nullable Output tcpConnectionType;

    /**
     * @return The availability check method of the instance. Valid values:
     * - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
     * - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
     * 
     */
    public Optional> tcpConnectionType() {
        return Optional.ofNullable(this.tcpConnectionType);
    }

    /**
     * Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
     * 
     */
    @Import(name="tdeStatus")
    private @Nullable Output tdeStatus;

    /**
     * @return Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
     * 
     */
    public Optional> tdeStatus() {
        return Optional.ofNullable(this.tdeStatus);
    }

    /**
     * The ID of the VPC to which the new instance belongs.
     * 
     * > **NOTE:** Make sure that the VPC resides in the specified region.
     * 
     */
    @Import(name="vpcId")
    private @Nullable Output vpcId;

    /**
     * @return The ID of the VPC to which the new instance belongs.
     * 
     * > **NOTE:** Make sure that the VPC resides in the specified region.
     * 
     */
    public Optional> vpcId() {
        return Optional.ofNullable(this.vpcId);
    }

    /**
     * The ID of the vSwitch associated with the specified VPC.
     * 
     * > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
     * 
     */
    @Import(name="vswitchId")
    private @Nullable Output vswitchId;

    /**
     * @return The ID of the vSwitch associated with the specified VPC.
     * 
     * > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
     * 
     */
    public Optional> vswitchId() {
        return Optional.ofNullable(this.vswitchId);
    }

    /**
     * The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
     * 
     * > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
     * 
     */
    @Import(name="zoneId")
    private @Nullable Output zoneId;

    /**
     * @return The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
     * 
     * > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
     * 
     */
    public Optional> zoneId() {
        return Optional.ofNullable(this.zoneId);
    }

    /**
     * The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
     * 
     */
    @Import(name="zoneIdSlave1")
    private @Nullable Output zoneIdSlave1;

    /**
     * @return The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
     * 
     */
    public Optional> zoneIdSlave1() {
        return Optional.ofNullable(this.zoneIdSlave1);
    }

    private RdsUpgradeDbInstanceState() {}

    private RdsUpgradeDbInstanceState(RdsUpgradeDbInstanceState $) {
        this.acl = $.acl;
        this.autoUpgradeMinorVersion = $.autoUpgradeMinorVersion;
        this.caType = $.caType;
        this.certificate = $.certificate;
        this.clientCaCert = $.clientCaCert;
        this.clientCaEnabled = $.clientCaEnabled;
        this.clientCertRevocationList = $.clientCertRevocationList;
        this.clientCrlEnabled = $.clientCrlEnabled;
        this.collectStatMode = $.collectStatMode;
        this.connectionString = $.connectionString;
        this.connectionStringPrefix = $.connectionStringPrefix;
        this.dbInstanceClass = $.dbInstanceClass;
        this.dbInstanceDescription = $.dbInstanceDescription;
        this.dbInstanceStorage = $.dbInstanceStorage;
        this.dbInstanceStorageType = $.dbInstanceStorageType;
        this.dbName = $.dbName;
        this.dedicatedHostGroupId = $.dedicatedHostGroupId;
        this.deletionProtection = $.deletionProtection;
        this.direction = $.direction;
        this.effectiveTime = $.effectiveTime;
        this.encryptionKey = $.encryptionKey;
        this.engine = $.engine;
        this.engineVersion = $.engineVersion;
        this.forceRestart = $.forceRestart;
        this.haMode = $.haMode;
        this.instanceNetworkType = $.instanceNetworkType;
        this.maintainTime = $.maintainTime;
        this.parameters = $.parameters;
        this.password = $.password;
        this.paymentType = $.paymentType;
        this.pgHbaConfs = $.pgHbaConfs;
        this.port = $.port;
        this.privateIpAddress = $.privateIpAddress;
        this.privateKey = $.privateKey;
        this.releasedKeepPolicy = $.releasedKeepPolicy;
        this.replicationAcl = $.replicationAcl;
        this.resourceGroupId = $.resourceGroupId;
        this.roleArn = $.roleArn;
        this.securityIps = $.securityIps;
        this.serverCert = $.serverCert;
        this.serverKey = $.serverKey;
        this.sourceBiz = $.sourceBiz;
        this.sourceDbInstanceId = $.sourceDbInstanceId;
        this.sslEnabled = $.sslEnabled;
        this.switchOver = $.switchOver;
        this.switchTime = $.switchTime;
        this.switchTimeMode = $.switchTimeMode;
        this.syncMode = $.syncMode;
        this.targetMajorVersion = $.targetMajorVersion;
        this.tcpConnectionType = $.tcpConnectionType;
        this.tdeStatus = $.tdeStatus;
        this.vpcId = $.vpcId;
        this.vswitchId = $.vswitchId;
        this.zoneId = $.zoneId;
        this.zoneIdSlave1 = $.zoneIdSlave1;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(RdsUpgradeDbInstanceState defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private RdsUpgradeDbInstanceState $;

        public Builder() {
            $ = new RdsUpgradeDbInstanceState();
        }

        public Builder(RdsUpgradeDbInstanceState defaults) {
            $ = new RdsUpgradeDbInstanceState(Objects.requireNonNull(defaults));
        }

        /**
         * @param acl This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
         * 
         * @return builder
         * 
         */
        public Builder acl(@Nullable Output acl) {
            $.acl = acl;
            return this;
        }

        /**
         * @param acl This parameter is only supported by the RDS PostgreSQL cloud disk version. This parameter indicates the authentication method. It is allowed only when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
         * 
         * @return builder
         * 
         */
        public Builder acl(String acl) {
            return acl(Output.of(acl));
        }

        /**
         * @param autoUpgradeMinorVersion How to upgrade the minor version of the instance. Valid values:
         * * **Auto**: automatically upgrade the minor version.
         * * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(@Nullable Output autoUpgradeMinorVersion) {
            $.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
            return this;
        }

        /**
         * @param autoUpgradeMinorVersion How to upgrade the minor version of the instance. Valid values:
         * * **Auto**: automatically upgrade the minor version.
         * * **Manual**: It is not automatically upgraded. It is only mandatory when the current version is offline.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(String autoUpgradeMinorVersion) {
            return autoUpgradeMinorVersion(Output.of(autoUpgradeMinorVersion));
        }

        /**
         * @param caType This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of ssl_action is Open, the default value of this parameter is aliyun. Value range:
         * * **aliyun**: using cloud certificates.
         * * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
         * 
         * @return builder
         * 
         */
        public Builder caType(@Nullable Output caType) {
            $.caType = caType;
            return this;
        }

        /**
         * @param caType This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the certificate type. When the value of ssl_action is Open, the default value of this parameter is aliyun. Value range:
         * * **aliyun**: using cloud certificates.
         * * **custom**: use a custom certificate. Valid values: `aliyun`, `custom`.
         * 
         * @return builder
         * 
         */
        public Builder caType(String caType) {
            return caType(Output.of(caType));
        }

        /**
         * @param certificate The file that contains the certificate used for TDE.
         * 
         * @return builder
         * 
         */
        public Builder certificate(@Nullable Output certificate) {
            $.certificate = certificate;
            return this;
        }

        /**
         * @param certificate The file that contains the certificate used for TDE.
         * 
         * @return builder
         * 
         */
        public Builder certificate(String certificate) {
            return certificate(Output.of(certificate));
        }

        /**
         * @param clientCaCert This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of client_ca_enabled is 1, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder clientCaCert(@Nullable Output clientCaCert) {
            $.clientCaCert = clientCaCert;
            return this;
        }

        /**
         * @param clientCaCert This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the public key of the client certification authority. If the value of client_ca_enabled is 1, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder clientCaCert(String clientCaCert) {
            return clientCaCert(Output.of(clientCaCert));
        }

        /**
         * @param clientCaEnabled The client ca enabled.
         * 
         * @return builder
         * 
         */
        public Builder clientCaEnabled(@Nullable Output clientCaEnabled) {
            $.clientCaEnabled = clientCaEnabled;
            return this;
        }

        /**
         * @param clientCaEnabled The client ca enabled.
         * 
         * @return builder
         * 
         */
        public Builder clientCaEnabled(Integer clientCaEnabled) {
            return clientCaEnabled(Output.of(clientCaEnabled));
        }

        /**
         * @param clientCertRevocationList This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of client_crl_enabled is 1, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder clientCertRevocationList(@Nullable Output clientCertRevocationList) {
            $.clientCertRevocationList = clientCertRevocationList;
            return this;
        }

        /**
         * @param clientCertRevocationList This parameter is only supported by the RDS PostgreSQL cloud disk version, which indicates that the client revokes the certificate file. If the value of client_crl_enabled is 1, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder clientCertRevocationList(String clientCertRevocationList) {
            return clientCertRevocationList(Output.of(clientCertRevocationList));
        }

        /**
         * @param clientCrlEnabled The client crl enabled.
         * 
         * @return builder
         * 
         */
        public Builder clientCrlEnabled(@Nullable Output clientCrlEnabled) {
            $.clientCrlEnabled = clientCrlEnabled;
            return this;
        }

        /**
         * @param clientCrlEnabled The client crl enabled.
         * 
         * @return builder
         * 
         */
        public Builder clientCrlEnabled(Integer clientCrlEnabled) {
            return clientCrlEnabled(Output.of(clientCrlEnabled));
        }

        /**
         * @param collectStatMode The time at which ApsaraDB RDS collects the statistics of the new instance.
         * * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
         * * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
         * 
         * > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
         * 
         * @return builder
         * 
         */
        public Builder collectStatMode(@Nullable Output collectStatMode) {
            $.collectStatMode = collectStatMode;
            return this;
        }

        /**
         * @param collectStatMode The time at which ApsaraDB RDS collects the statistics of the new instance.
         * * **Before**: ApsaraDB RDS collects the statistics of the new instance before the switchover to ensure service stability. If the original instance contains a large amount of data, the upgrade may require a long period of time.
         * * **After**: ApsaraDB RDS collects the statistics of the new instance after the switchover to accelerate the upgrade. If you access tables for which no statistics are generated, the query plans that you specify may be inaccurately executed. In addition, your database service may be unavailable during peak hours.
         * 
         * > **NOTE** If you set the SwitchOver parameter to false, the value Before specifies that ApsaraDB RDS collects the statistics of the new instance before the new instance starts to process read and write requests, and the value After specifies that ApsaraDB RDS collects the statistics of the new instance after the new instance starts to process read and write requests.
         * 
         * @return builder
         * 
         */
        public Builder collectStatMode(String collectStatMode) {
            return collectStatMode(Output.of(collectStatMode));
        }

        /**
         * @param connectionString The database connection address.
         * 
         * @return builder
         * 
         */
        public Builder connectionString(@Nullable Output connectionString) {
            $.connectionString = connectionString;
            return this;
        }

        /**
         * @param connectionString The database connection address.
         * 
         * @return builder
         * 
         */
        public Builder connectionString(String connectionString) {
            return connectionString(Output.of(connectionString));
        }

        /**
         * @param connectionStringPrefix The connection string prefix.
         * 
         * @return builder
         * 
         */
        public Builder connectionStringPrefix(@Nullable Output connectionStringPrefix) {
            $.connectionStringPrefix = connectionStringPrefix;
            return this;
        }

        /**
         * @param connectionStringPrefix The connection string prefix.
         * 
         * @return builder
         * 
         */
        public Builder connectionStringPrefix(String connectionStringPrefix) {
            return connectionStringPrefix(Output.of(connectionStringPrefix));
        }

        /**
         * @param dbInstanceClass The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceClass(@Nullable Output dbInstanceClass) {
            $.dbInstanceClass = dbInstanceClass;
            return this;
        }

        /**
         * @param dbInstanceClass The instance type of the new instance. For information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceClass(String dbInstanceClass) {
            return dbInstanceClass(Output.of(dbInstanceClass));
        }

        /**
         * @param dbInstanceDescription The db instance description.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceDescription(@Nullable Output dbInstanceDescription) {
            $.dbInstanceDescription = dbInstanceDescription;
            return this;
        }

        /**
         * @param dbInstanceDescription The db instance description.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceDescription(String dbInstanceDescription) {
            return dbInstanceDescription(Output.of(dbInstanceDescription));
        }

        /**
         * @param dbInstanceStorage The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
         * 
         * > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceStorage(@Nullable Output dbInstanceStorage) {
            $.dbInstanceStorage = dbInstanceStorage;
            return this;
        }

        /**
         * @param dbInstanceStorage The storage capacity of the new instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see [Primary ApsaraDB RDS instance types](https://www.alibabacloud.com/help/en/rds/product-overview/primary-apsaradb-rds-instance-types).
         * 
         * > **NOTE:** The default value of this parameter is the storage capacity of the original instance.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceStorage(Integer dbInstanceStorage) {
            return dbInstanceStorage(Output.of(dbInstanceStorage));
        }

        /**
         * @param dbInstanceStorageType The type of storage media that is used for the new instance. Valid values:
         * * **local_ssd**: local SSDs.
         * * **cloud_ssd**: standard SSDs.
         * * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
         * * **cloud_essd2**: ESSDs of PL2.
         * * **cloud_essd3**: ESSDs of PL3.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceStorageType(@Nullable Output dbInstanceStorageType) {
            $.dbInstanceStorageType = dbInstanceStorageType;
            return this;
        }

        /**
         * @param dbInstanceStorageType The type of storage media that is used for the new instance. Valid values:
         * * **local_ssd**: local SSDs.
         * * **cloud_ssd**: standard SSDs.
         * * **cloud_essd**: enhanced SSDs (ESSDs) of performance level 1 (PL1).
         * * **cloud_essd2**: ESSDs of PL2.
         * * **cloud_essd3**: ESSDs of PL3.
         * 
         * @return builder
         * 
         */
        public Builder dbInstanceStorageType(String dbInstanceStorageType) {
            return dbInstanceStorageType(Output.of(dbInstanceStorageType));
        }

        /**
         * @param dbName The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
         * 
         * > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
         * 
         * @return builder
         * 
         */
        public Builder dbName(@Nullable Output dbName) {
            $.dbName = dbName;
            return this;
        }

        /**
         * @param dbName The name of the database for which you want to enable TDE. Up to 50 names can be entered in a single request. If you specify multiple names, separate these names with commas (,).
         * 
         * > **NOTE:** This parameter is available and must be specified only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
         * 
         * @return builder
         * 
         */
        public Builder dbName(String dbName) {
            return dbName(Output.of(dbName));
        }

        /**
         * @param dedicatedHostGroupId The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
         * 
         * @return builder
         * 
         */
        public Builder dedicatedHostGroupId(@Nullable Output dedicatedHostGroupId) {
            $.dedicatedHostGroupId = dedicatedHostGroupId;
            return this;
        }

        /**
         * @param dedicatedHostGroupId The ID of the dedicated cluster to which the new instance belongs. This parameter takes effect only when you create the new instance in a dedicated cluster.
         * 
         * @return builder
         * 
         */
        public Builder dedicatedHostGroupId(String dedicatedHostGroupId) {
            return dedicatedHostGroupId(Output.of(dedicatedHostGroupId));
        }

        /**
         * @param deletionProtection The switch of delete protection. Valid values:
         * - true: delete protect.
         * - false: no delete protect.
         * 
         * > **NOTE:** `deletion_protection` is valid only when attribute `payment_type` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
         * 
         * @return builder
         * 
         */
        public Builder deletionProtection(@Nullable Output deletionProtection) {
            $.deletionProtection = deletionProtection;
            return this;
        }

        /**
         * @param deletionProtection The switch of delete protection. Valid values:
         * - true: delete protect.
         * - false: no delete protect.
         * 
         * > **NOTE:** `deletion_protection` is valid only when attribute `payment_type` is set to `PayAsYouGo`, supported engine type: **MySQL**, **PostgreSQL**, **MariaDB**, **MSSQL**.
         * 
         * @return builder
         * 
         */
        public Builder deletionProtection(Boolean deletionProtection) {
            return deletionProtection(Output.of(deletionProtection));
        }

        /**
         * @param direction The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
         * 
         * @return builder
         * 
         */
        public Builder direction(@Nullable Output direction) {
            $.direction = direction;
            return this;
        }

        /**
         * @param direction The direction. Valid values: `Auto`, `Down`, `TempUpgrade`, `Up`.
         * 
         * @return builder
         * 
         */
        public Builder direction(String direction) {
            return direction(Output.of(direction));
        }

        /**
         * @param effectiveTime The effective time.
         * 
         * @return builder
         * 
         */
        public Builder effectiveTime(@Nullable Output effectiveTime) {
            $.effectiveTime = effectiveTime;
            return this;
        }

        /**
         * @param effectiveTime The effective time.
         * 
         * @return builder
         * 
         */
        public Builder effectiveTime(String effectiveTime) {
            return effectiveTime(Output.of(effectiveTime));
        }

        /**
         * @param encryptionKey The ID of the private key.
         * 
         * > **NOTE:** This parameter is available only when the instance runs MySQL.
         * 
         * @return builder
         * 
         */
        public Builder encryptionKey(@Nullable Output encryptionKey) {
            $.encryptionKey = encryptionKey;
            return this;
        }

        /**
         * @param encryptionKey The ID of the private key.
         * 
         * > **NOTE:** This parameter is available only when the instance runs MySQL.
         * 
         * @return builder
         * 
         */
        public Builder encryptionKey(String encryptionKey) {
            return encryptionKey(Output.of(encryptionKey));
        }

        /**
         * @param engine Database type. Value options: MySQL, SQLServer, PostgreSQL.
         * 
         * @return builder
         * 
         */
        public Builder engine(@Nullable Output engine) {
            $.engine = engine;
            return this;
        }

        /**
         * @param engine Database type. Value options: MySQL, SQLServer, PostgreSQL.
         * 
         * @return builder
         * 
         */
        public Builder engine(String engine) {
            return engine(Output.of(engine));
        }

        /**
         * @param engineVersion Database version. Value:
         * * MySQL: **5.5/5.6/5.7/8.0**.
         * * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
         * * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
         * * MariaDB: **10.3**.
         * 
         * @return builder
         * 
         */
        public Builder engineVersion(@Nullable Output engineVersion) {
            $.engineVersion = engineVersion;
            return this;
        }

        /**
         * @param engineVersion Database version. Value:
         * * MySQL: **5.5/5.6/5.7/8.0**.
         * * SQL Server: **2008r2/08r2_ent_ha/2012/2012_ent_ha/2012_std_ha/2012_web/2014_std_ha/2016_ent_ha/2016_std_ha/2016_web/2017_std_ha/2017_ent/2019_std_ha/2019_ent**.
         * * PostgreSQL: **9.4/10.0/11.0/12.0/13.0**.
         * * MariaDB: **10.3**.
         * 
         * @return builder
         * 
         */
        public Builder engineVersion(String engineVersion) {
            return engineVersion(Output.of(engineVersion));
        }

        /**
         * @param forceRestart Set it to true to make some parameter efficient when modifying them. Default to false.
         * 
         * @return builder
         * 
         */
        public Builder forceRestart(@Nullable Output forceRestart) {
            $.forceRestart = forceRestart;
            return this;
        }

        /**
         * @param forceRestart Set it to true to make some parameter efficient when modifying them. Default to false.
         * 
         * @return builder
         * 
         */
        public Builder forceRestart(Boolean forceRestart) {
            return forceRestart(Output.of(forceRestart));
        }

        /**
         * @param haMode The high availability mode. Valid values:
         * * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
         * * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
         * 
         * @return builder
         * 
         */
        public Builder haMode(@Nullable Output haMode) {
            $.haMode = haMode;
            return this;
        }

        /**
         * @param haMode The high availability mode. Valid values:
         * * **RPO**: Data persistence is preferred. The instance preferentially ensures data reliability to minimize data loss. Use this mode if you have higher requirements on data consistency.
         * * **RTO**: Instance availability is preferred. The instance restores services as soon as possible to ensure availability. Use this mode if you have higher requirements on service availability.
         * 
         * @return builder
         * 
         */
        public Builder haMode(String haMode) {
            return haMode(Output.of(haMode));
        }

        /**
         * @param instanceNetworkType The network type of the instance. Valid values:
         * * **Classic**: Classic Network.
         * * **VPC**: VPC.
         * 
         * @return builder
         * 
         */
        public Builder instanceNetworkType(@Nullable Output instanceNetworkType) {
            $.instanceNetworkType = instanceNetworkType;
            return this;
        }

        /**
         * @param instanceNetworkType The network type of the instance. Valid values:
         * * **Classic**: Classic Network.
         * * **VPC**: VPC.
         * 
         * @return builder
         * 
         */
        public Builder instanceNetworkType(String instanceNetworkType) {
            return instanceNetworkType(Output.of(instanceNetworkType));
        }

        /**
         * @param maintainTime The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
         * 
         * @return builder
         * 
         */
        public Builder maintainTime(@Nullable Output maintainTime) {
            $.maintainTime = maintainTime;
            return this;
        }

        /**
         * @param maintainTime The maintainable time period of the instance. Format: <I> HH:mm</I> Z-<I> HH:mm</I> Z(UTC time).
         * 
         * @return builder
         * 
         */
        public Builder maintainTime(String maintainTime) {
            return maintainTime(Output.of(maintainTime));
        }

        /**
         * @param parameters Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
         * 
         * @return builder
         * 
         */
        public Builder parameters(List parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param parameters Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm). See `parameters` below.
         * 
         * @return builder
         * 
         */
        public Builder parameters(RdsUpgradeDbInstanceParameterArgs... parameters) {
            return parameters(List.of(parameters));
        }

        /**
         * @param password The password of the certificate.
         * 
         * > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
         * 
         * @return builder
         * 
         */
        public Builder password(@Nullable Output password) {
            $.password = password;
            return this;
        }

        /**
         * @param password The password of the certificate.
         * 
         * > **NOTE:** This parameter is available only when the instance runs SQL Server 2019 SE or an Enterprise Edition of SQL Server.
         * 
         * @return builder
         * 
         */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param paymentType The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
         * 
         * @return builder
         * 
         */
        public Builder paymentType(@Nullable Output paymentType) {
            $.paymentType = paymentType;
            return this;
        }

        /**
         * @param paymentType The billing method of the new instance. Valid values: `PayAsYouGo` and `Subscription`.
         * 
         * @return builder
         * 
         */
        public Builder paymentType(String paymentType) {
            return paymentType(Output.of(paymentType));
        }

        /**
         * @param pgHbaConfs The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
         * 
         * @return builder
         * 
         */
        public Builder pgHbaConfs(@Nullable Output> pgHbaConfs) {
            $.pgHbaConfs = pgHbaConfs;
            return this;
        }

        /**
         * @param pgHbaConfs The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
         * 
         * @return builder
         * 
         */
        public Builder pgHbaConfs(List pgHbaConfs) {
            return pgHbaConfs(Output.of(pgHbaConfs));
        }

        /**
         * @param pgHbaConfs The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) . See `pg_hba_conf` below.
         * 
         * @return builder
         * 
         */
        public Builder pgHbaConfs(RdsUpgradeDbInstancePgHbaConfArgs... pgHbaConfs) {
            return pgHbaConfs(List.of(pgHbaConfs));
        }

        /**
         * @param port The port.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The port.
         * 
         * @return builder
         * 
         */
        public Builder port(String port) {
            return port(Output.of(port));
        }

        /**
         * @param privateIpAddress The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
         * 
         * @return builder
         * 
         */
        public Builder privateIpAddress(@Nullable Output privateIpAddress) {
            $.privateIpAddress = privateIpAddress;
            return this;
        }

        /**
         * @param privateIpAddress The intranet IP address of the new instance must be within the specified vSwitch IP address range. By default, the system automatically allocates by using **VPCId** and **VSwitchId**.
         * 
         * @return builder
         * 
         */
        public Builder privateIpAddress(String privateIpAddress) {
            return privateIpAddress(Output.of(privateIpAddress));
        }

        /**
         * @param privateKey The file that contains the private key used for TDE.
         * 
         * @return builder
         * 
         */
        public Builder privateKey(@Nullable Output privateKey) {
            $.privateKey = privateKey;
            return this;
        }

        /**
         * @param privateKey The file that contains the private key used for TDE.
         * 
         * @return builder
         * 
         */
        public Builder privateKey(String privateKey) {
            return privateKey(Output.of(privateKey));
        }

        /**
         * @param releasedKeepPolicy The released keep policy.
         * 
         * @return builder
         * 
         */
        public Builder releasedKeepPolicy(@Nullable Output releasedKeepPolicy) {
            $.releasedKeepPolicy = releasedKeepPolicy;
            return this;
        }

        /**
         * @param releasedKeepPolicy The released keep policy.
         * 
         * @return builder
         * 
         */
        public Builder releasedKeepPolicy(String releasedKeepPolicy) {
            return releasedKeepPolicy(Output.of(releasedKeepPolicy));
        }

        /**
         * @param replicationAcl This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
         * 
         * @return builder
         * 
         */
        public Builder replicationAcl(@Nullable Output replicationAcl) {
            $.replicationAcl = replicationAcl;
            return this;
        }

        /**
         * @param replicationAcl This parameter is only supported by the RDS PostgreSQL cloud disk version, indicating the authentication method of the replication permission. It is only allowed when the public key of the client certificate authority is enabled. Valid values: `cert` and `perfer` and `verify-ca` and `verify-full (supported by RDS PostgreSQL above 12)`.
         * 
         * @return builder
         * 
         */
        public Builder replicationAcl(String replicationAcl) {
            return replicationAcl(Output.of(replicationAcl));
        }

        /**
         * @param resourceGroupId The resource group id.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupId(@Nullable Output resourceGroupId) {
            $.resourceGroupId = resourceGroupId;
            return this;
        }

        /**
         * @param resourceGroupId The resource group id.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupId(String resourceGroupId) {
            return resourceGroupId(Output.of(resourceGroupId));
        }

        /**
         * @param roleArn The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
         * 
         * > **NOTE:** This parameter is available only when the instance runs MySQL.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(@Nullable Output roleArn) {
            $.roleArn = roleArn;
            return this;
        }

        /**
         * @param roleArn The Alibaba Cloud Resource Name (ARN) of a RAM role. A RAM role is a virtual RAM identity that you can create within your Alibaba Cloud account. For more information, see [RAM role overview](https://www.alibabacloud.com/help/en/ram/user-guide/ram-role-overview).
         * 
         * > **NOTE:** This parameter is available only when the instance runs MySQL.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(String roleArn) {
            return roleArn(Output.of(roleArn));
        }

        /**
         * @param securityIps The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
         * * IP address form, for example: 10.23.12.24.
         * * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
         * 
         * > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
         * 
         * @return builder
         * 
         */
        public Builder securityIps(@Nullable Output> securityIps) {
            $.securityIps = securityIps;
            return this;
        }

        /**
         * @param securityIps The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
         * * IP address form, for example: 10.23.12.24.
         * * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
         * 
         * > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
         * 
         * @return builder
         * 
         */
        public Builder securityIps(List securityIps) {
            return securityIps(Output.of(securityIps));
        }

        /**
         * @param securityIps The IP address whitelist of the instance. Separate multiple IP addresses with commas (,) and cannot be repeated. The following two formats are supported:
         * * IP address form, for example: 10.23.12.24.
         * * CIDR format, for example, 10.23.12.0/24 (no Inter-Domain Routing, 24 indicates the length of the prefix in the address, ranging from 1 to 32).
         * 
         * > **NOTE:** each instance can add up to 1000 IP addresses or IP segments, that is, the total number of IP addresses or IP segments in all IP whitelist groups cannot exceed 1000. When there are more IP addresses, it is recommended to merge them into IP segments, for example, 10.23.12.0/24.
         * 
         * @return builder
         * 
         */
        public Builder securityIps(String... securityIps) {
            return securityIps(List.of(securityIps));
        }

        /**
         * @param serverCert This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder serverCert(@Nullable Output serverCert) {
            $.serverCert = serverCert;
            return this;
        }

        /**
         * @param serverCert This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the content of the server certificate. If the CAType value is custom, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder serverCert(String serverCert) {
            return serverCert(Output.of(serverCert));
        }

        /**
         * @param serverKey This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder serverKey(@Nullable Output serverKey) {
            $.serverKey = serverKey;
            return this;
        }

        /**
         * @param serverKey This parameter is only supported by the RDS PostgreSQL cloud disk version. It indicates the private key of the server certificate. If the value of CAType is custom, this parameter must be configured.
         * 
         * @return builder
         * 
         */
        public Builder serverKey(String serverKey) {
            return serverKey(Output.of(serverKey));
        }

        /**
         * @param sourceBiz The source biz.
         * 
         * @return builder
         * 
         */
        public Builder sourceBiz(@Nullable Output sourceBiz) {
            $.sourceBiz = sourceBiz;
            return this;
        }

        /**
         * @param sourceBiz The source biz.
         * 
         * @return builder
         * 
         */
        public Builder sourceBiz(String sourceBiz) {
            return sourceBiz(Output.of(sourceBiz));
        }

        /**
         * @param sourceDbInstanceId The source db instance id.
         * 
         * @return builder
         * 
         */
        public Builder sourceDbInstanceId(@Nullable Output sourceDbInstanceId) {
            $.sourceDbInstanceId = sourceDbInstanceId;
            return this;
        }

        /**
         * @param sourceDbInstanceId The source db instance id.
         * 
         * @return builder
         * 
         */
        public Builder sourceDbInstanceId(String sourceDbInstanceId) {
            return sourceDbInstanceId(Output.of(sourceDbInstanceId));
        }

        /**
         * @param sslEnabled Enable or disable SSL. Valid values: `0` and `1`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnabled(@Nullable Output sslEnabled) {
            $.sslEnabled = sslEnabled;
            return this;
        }

        /**
         * @param sslEnabled Enable or disable SSL. Valid values: `0` and `1`.
         * 
         * @return builder
         * 
         */
        public Builder sslEnabled(Integer sslEnabled) {
            return sslEnabled(Output.of(sslEnabled));
        }

        /**
         * @param switchOver Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
         * * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
         * * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
         * * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
         * * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
         * * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
         * * The data migration does not interrupt your workloads on the original instance.
         * * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
         * 
         * @return builder
         * 
         */
        public Builder switchOver(@Nullable Output switchOver) {
            $.switchOver = switchOver;
            return this;
        }

        /**
         * @param switchOver Specifies whether ApsaraDB RDS automatically switches your workloads over to the new instance after data is migrated to the new instance. Valid values:
         * * **true**: ApsaraDB RDS automatically switches workloads over to the new instance. If you set this parameter to true, you must take note of the following information:
         * * After the switchover is complete, you cannot roll your workloads back to the original instance. Proceed with caution.
         * * During the switchover, the original instance processes only read requests. You must perform the switchover during off-peak hours.
         * * If read-only instances are attached to the original instance, you can set this parameter only to false. In this case, the read-only instances that are attached to the original instance cannot be cloned. After the upgrade is complete, you must create read-only instances for the new instance.
         * * **false**: ApsaraDB RDS does not automatically switch your workloads over to the new instance. Before you perform an upgrade, we recommend that you set this parameter to false to test whether the new major engine version is compatible with your workloads. If you set this parameter to false, you must take note of the following information:
         * * The data migration does not interrupt your workloads on the original instance.
         * * After data is migrated to the new instance, you must update the endpoint configuration on your application. This update requires you to replace the endpoint of the original instance with the endpoint of the new instance. For more information about how to view the endpoint of an instance, see [View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance](https://www.alibabacloud.com/help/doc-detail/96788.htm).
         * 
         * @return builder
         * 
         */
        public Builder switchOver(String switchOver) {
            return switchOver(Output.of(switchOver));
        }

        /**
         * @param switchTime The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
         * 
         * @return builder
         * 
         */
        public Builder switchTime(@Nullable Output switchTime) {
            $.switchTime = switchTime;
            return this;
        }

        /**
         * @param switchTime The time at which you want to apply the specification changes. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
         * 
         * @return builder
         * 
         */
        public Builder switchTime(String switchTime) {
            return switchTime(Output.of(switchTime));
        }

        /**
         * @param switchTimeMode The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
         * * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
         * * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
         * 
         * @return builder
         * 
         */
        public Builder switchTimeMode(@Nullable Output switchTimeMode) {
            $.switchTimeMode = switchTimeMode;
            return this;
        }

        /**
         * @param switchTimeMode The time at which ApsaraDB RDS switches your workloads over to the new instance. This parameter is used together with the SwitchOver parameter and takes effect only when you set the SwitchOver parameter to true. Valid values:
         * * **Immediate**: After data is migrated to the new instance, ApsaraDB RDS immediately switches your workloads over to the new instance.
         * * **MaintainTime**: After data is migrated to the new instance, ApsaraDB RDS switches your workloads over to the new instance during the maintenance window that you specify. You can call the [ModifyDBInstanceMaintainTime](https://www.alibabacloud.com/help/doc-detail/26249.htm) operation to change the maintenance window of an instance.
         * 
         * @return builder
         * 
         */
        public Builder switchTimeMode(String switchTimeMode) {
            return switchTimeMode(Output.of(switchTimeMode));
        }

        /**
         * @param syncMode [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
         * * **Sync**: strong synchronization.
         * * **Semi-sync**: Semi-synchronous.
         * * **Async**: asynchronous.
         * 
         * > **NOTE:** SQL Server 2017 cluster version is currently not supported.
         * 
         * @return builder
         * 
         */
        public Builder syncMode(@Nullable Output syncMode) {
            $.syncMode = syncMode;
            return this;
        }

        /**
         * @param syncMode [The data replication mode](https://www.alibabacloud.com/help/doc-detail/96055.htm). Valid values:
         * * **Sync**: strong synchronization.
         * * **Semi-sync**: Semi-synchronous.
         * * **Async**: asynchronous.
         * 
         * > **NOTE:** SQL Server 2017 cluster version is currently not supported.
         * 
         * @return builder
         * 
         */
        public Builder syncMode(String syncMode) {
            return syncMode(Output.of(syncMode));
        }

        /**
         * @param targetMajorVersion The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
         * 
         * > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
         * 
         * @return builder
         * 
         */
        public Builder targetMajorVersion(@Nullable Output targetMajorVersion) {
            $.targetMajorVersion = targetMajorVersion;
            return this;
        }

        /**
         * @param targetMajorVersion The major engine version of the new instance. The value of this parameter must be the major engine version on which an upgrade check is performed.
         * 
         * > **NOTE** You can call the [UpgradeDBInstanceMajorVersionPrecheck](https://www.alibabacloud.com/help/doc-detail/330050.htm) operation to perform an upgrade check on a major engine version.
         * 
         * @return builder
         * 
         */
        public Builder targetMajorVersion(String targetMajorVersion) {
            return targetMajorVersion(Output.of(targetMajorVersion));
        }

        /**
         * @param tcpConnectionType The availability check method of the instance. Valid values:
         * - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
         * - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
         * 
         * @return builder
         * 
         */
        public Builder tcpConnectionType(@Nullable Output tcpConnectionType) {
            $.tcpConnectionType = tcpConnectionType;
            return this;
        }

        /**
         * @param tcpConnectionType The availability check method of the instance. Valid values:
         * - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
         * - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
         * 
         * @return builder
         * 
         */
        public Builder tcpConnectionType(String tcpConnectionType) {
            return tcpConnectionType(Output.of(tcpConnectionType));
        }

        /**
         * @param tdeStatus Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
         * 
         * @return builder
         * 
         */
        public Builder tdeStatus(@Nullable Output tdeStatus) {
            $.tdeStatus = tdeStatus;
            return this;
        }

        /**
         * @param tdeStatus Specifies whether to enable TDE. Valid values: `Enabled` and `Disabled`.
         * 
         * @return builder
         * 
         */
        public Builder tdeStatus(String tdeStatus) {
            return tdeStatus(Output.of(tdeStatus));
        }

        /**
         * @param vpcId The ID of the VPC to which the new instance belongs.
         * 
         * > **NOTE:** Make sure that the VPC resides in the specified region.
         * 
         * @return builder
         * 
         */
        public Builder vpcId(@Nullable Output vpcId) {
            $.vpcId = vpcId;
            return this;
        }

        /**
         * @param vpcId The ID of the VPC to which the new instance belongs.
         * 
         * > **NOTE:** Make sure that the VPC resides in the specified region.
         * 
         * @return builder
         * 
         */
        public Builder vpcId(String vpcId) {
            return vpcId(Output.of(vpcId));
        }

        /**
         * @param vswitchId The ID of the vSwitch associated with the specified VPC.
         * 
         * > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
         * 
         * @return builder
         * 
         */
        public Builder vswitchId(@Nullable Output vswitchId) {
            $.vswitchId = vswitchId;
            return this;
        }

        /**
         * @param vswitchId The ID of the vSwitch associated with the specified VPC.
         * 
         * > **NOTE:** Make sure that the vSwitch belongs to the specified VPC and region.
         * 
         * @return builder
         * 
         */
        public Builder vswitchId(String vswitchId) {
            return vswitchId(Output.of(vswitchId));
        }

        /**
         * @param zoneId The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
         * 
         * > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
         * 
         * @return builder
         * 
         */
        public Builder zoneId(@Nullable Output zoneId) {
            $.zoneId = zoneId;
            return this;
        }

        /**
         * @param zoneId The ID of the zone to which the new instance belongs. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query the most recent region list.
         * 
         * > **NOTE:** The default value of this parameter is the ID of the zone to which the original instance belongs.
         * 
         * @return builder
         * 
         */
        public Builder zoneId(String zoneId) {
            return zoneId(Output.of(zoneId));
        }

        /**
         * @param zoneIdSlave1 The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
         * 
         * @return builder
         * 
         */
        public Builder zoneIdSlave1(@Nullable Output zoneIdSlave1) {
            $.zoneIdSlave1 = zoneIdSlave1;
            return this;
        }

        /**
         * @param zoneIdSlave1 The ID of the zone to which the secondary instance of the new instance belongs. You can specify this parameter only when the original instance runs RDS High-availability Edition. You can select a zone that belongs to the region where the original instance resides. You can call the [DescribeRegions](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-describeregions) operation to query zone IDs.
         * 
         * @return builder
         * 
         */
        public Builder zoneIdSlave1(String zoneIdSlave1) {
            return zoneIdSlave1(Output.of(zoneIdSlave1));
        }

        public RdsUpgradeDbInstanceState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy