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

com.pulumi.alicloud.rds.ReadOnlyInstance 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;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.rds.ReadOnlyInstanceArgs;
import com.pulumi.alicloud.rds.inputs.ReadOnlyInstanceState;
import com.pulumi.alicloud.rds.outputs.ReadOnlyInstanceParameter;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides an RDS readonly instance resource, see [What is DB Readonly Instance](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/api-rds-2014-08-15-createreadonlydbinstance).
 * 
 * > **NOTE:** Available since v1.52.1.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.alicloud.rds.RdsFunctions;
 * import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
 * import com.pulumi.alicloud.vpc.Network;
 * import com.pulumi.alicloud.vpc.NetworkArgs;
 * import com.pulumi.alicloud.vpc.Switch;
 * import com.pulumi.alicloud.vpc.SwitchArgs;
 * import com.pulumi.alicloud.ecs.SecurityGroup;
 * import com.pulumi.alicloud.ecs.SecurityGroupArgs;
 * import com.pulumi.alicloud.rds.Instance;
 * import com.pulumi.alicloud.rds.InstanceArgs;
 * import com.pulumi.alicloud.rds.ReadOnlyInstance;
 * import com.pulumi.alicloud.rds.ReadOnlyInstanceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         final var config = ctx.config();
 *         final var name = config.get("name").orElse("tf-example");
 *         final var example = RdsFunctions.getZones(GetZonesArgs.builder()
 *             .engine("MySQL")
 *             .engineVersion("5.6")
 *             .build());
 * 
 *         var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
 *             .vpcName(name)
 *             .cidrBlock("172.16.0.0/16")
 *             .build());
 * 
 *         var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
 *             .vpcId(exampleNetwork.id())
 *             .cidrBlock("172.16.0.0/24")
 *             .zoneId(example.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
 *             .vswitchName(name)
 *             .build());
 * 
 *         var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
 *             .name(name)
 *             .vpcId(exampleNetwork.id())
 *             .build());
 * 
 *         var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
 *             .engine("MySQL")
 *             .engineVersion("5.6")
 *             .instanceType("rds.mysql.t1.small")
 *             .instanceStorage("20")
 *             .instanceChargeType("Postpaid")
 *             .instanceName(name)
 *             .vswitchId(exampleSwitch.id())
 *             .securityIps(            
 *                 "10.168.1.12",
 *                 "100.69.7.112")
 *             .build());
 * 
 *         var exampleReadOnlyInstance = new ReadOnlyInstance("exampleReadOnlyInstance", ReadOnlyInstanceArgs.builder()
 *             .zoneId(exampleInstance.zoneId())
 *             .masterDbInstanceId(exampleInstance.id())
 *             .engineVersion(exampleInstance.engineVersion())
 *             .instanceStorage(exampleInstance.instanceStorage())
 *             .instanceType(exampleInstance.instanceType())
 *             .instanceName(String.format("%sreadonly", name))
 *             .vswitchId(exampleSwitch.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * RDS readonly instance can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:rds/readOnlyInstance:ReadOnlyInstance example rm-abc12345678 * ``` * */ @ResourceType(type="alicloud:rds/readOnlyInstance:ReadOnlyInstance") public class ReadOnlyInstance extends com.pulumi.resources.CustomResource { /** * The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - cert * - perfer * - verify-ca * - verify-full (supported only when the instance runs PostgreSQL 12 or later) * */ @Export(name="acl", refs={String.class}, tree="[0]") private Output acl; /** * @return The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - cert * - perfer * - verify-ca * - verify-full (supported only when the instance runs PostgreSQL 12 or later) * */ public Output acl() { return this.acl; } /** * Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is `PrePaid`. Default to `false`. * */ @Export(name="autoRenew", refs={Boolean.class}, tree="[0]") private Output autoRenew; /** * @return Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is `PrePaid`. Default to `false`. * */ public Output> autoRenew() { return Codegen.optional(this.autoRenew); } /** * Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is `PrePaid`. Valid value:[1~12], Default to 1. * */ @Export(name="autoRenewPeriod", refs={Integer.class}, tree="[0]") private Output autoRenewPeriod; /** * @return Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is `PrePaid`. Valid value:[1~12], Default to 1. * */ public Output> autoRenewPeriod() { return Codegen.optional(this.autoRenewPeriod); } /** * The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `ssl_enabled = 1`. Value range: * - aliyun: a cloud certificate * - custom: a custom certificate * */ @Export(name="caType", refs={String.class}, tree="[0]") private Output caType; /** * @return The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. It is valid only when `ssl_enabled = 1`. Value range: * - aliyun: a cloud certificate * - custom: a custom certificate * */ public Output caType() { return this.caType; } /** * The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ @Export(name="clientCaCert", refs={String.class}, tree="[0]") private Output clientCaCert; /** * @return The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ public Output> clientCaCert() { return Codegen.optional(this.clientCaCert); } /** * Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `ssl_enabled = 1`. Valid values: * - 1: enables the public key * - 0: disables the public key * */ @Export(name="clientCaEnabled", refs={Integer.class}, tree="[0]") private Output clientCaEnabled; /** * @return Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. It is valid only when `ssl_enabled = 1`. Valid values: * - 1: enables the public key * - 0: disables the public key * */ public Output> clientCaEnabled() { return Codegen.optional(this.clientCaEnabled); } /** * The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ @Export(name="clientCertRevocationList", refs={String.class}, tree="[0]") private Output clientCertRevocationList; /** * @return The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ public Output> clientCertRevocationList() { return Codegen.optional(this.clientCertRevocationList); } /** * Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - 1: enables the CRL * - 0: disables the CRL * */ @Export(name="clientCrlEnabled", refs={Integer.class}, tree="[0]") private Output clientCrlEnabled; /** * @return Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - 1: enables the CRL * - 0: disables the CRL * */ public Output> clientCrlEnabled() { return Codegen.optional(this.clientCrlEnabled); } /** * RDS database connection string. * */ @Export(name="connectionString", refs={String.class}, tree="[0]") private Output connectionString; /** * @return RDS database connection string. * */ public Output connectionString() { return this.connectionString; } /** * The attribute of the IP address whitelist. By default, this parameter is empty. * * > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS). * */ @Export(name="dbInstanceIpArrayAttribute", refs={String.class}, tree="[0]") private Output dbInstanceIpArrayAttribute; /** * @return The attribute of the IP address whitelist. By default, this parameter is empty. * * > **NOTE:** The IP address whitelists that have the hidden attribute are not displayed in the ApsaraDB RDS console. These IP address whitelists are used to access Alibaba Cloud services, such as Data Transmission Service (DTS). * */ public Output> dbInstanceIpArrayAttribute() { return Codegen.optional(this.dbInstanceIpArrayAttribute); } /** * The name of the IP address whitelist. Default value: Default. * * > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance. * */ @Export(name="dbInstanceIpArrayName", refs={String.class}, tree="[0]") private Output dbInstanceIpArrayName; /** * @return The name of the IP address whitelist. Default value: Default. * * > **NOTE:** A maximum of 200 IP address whitelists can be configured for each instance. * */ public Output> dbInstanceIpArrayName() { return Codegen.optional(this.dbInstanceIpArrayName); } /** * The storage type of the instance. Valid values: * - local_ssd: specifies to use local SSDs. This value is recommended. * - cloud_ssd: specifies to use standard SSDs. * - cloud_essd: specifies to use enhanced SSDs (ESSDs). * - cloud_essd2: specifies to use enhanced SSDs (ESSDs). * - cloud_essd3: specifies to use enhanced SSDs (ESSDs). * */ @Export(name="dbInstanceStorageType", refs={String.class}, tree="[0]") private Output dbInstanceStorageType; /** * @return The storage type of the instance. Valid values: * - local_ssd: specifies to use local SSDs. This value is recommended. * - cloud_ssd: specifies to use standard SSDs. * - cloud_essd: specifies to use enhanced SSDs (ESSDs). * - cloud_essd2: specifies to use enhanced SSDs (ESSDs). * - cloud_essd3: specifies to use enhanced SSDs (ESSDs). * */ public Output dbInstanceStorageType() { return this.dbInstanceStorageType; } /** * The switch of delete protection. Valid values: * - true: delete protect. * - false: no delete protect. * */ @Export(name="deletionProtection", refs={Boolean.class}, tree="[0]") private Output deletionProtection; /** * @return The switch of delete protection. Valid values: * - true: delete protect. * - false: no delete protect. * */ public Output> deletionProtection() { return Codegen.optional(this.deletionProtection); } /** * The instance configuration type. Valid values: * - Up * - Down * - TempUpgrade * - Serverless * */ @Export(name="direction", refs={String.class}, tree="[0]") private Output direction; /** * @return The instance configuration type. Valid values: * - Up * - Down * - TempUpgrade * - Serverless * */ public Output> direction() { return Codegen.optional(this.direction); } /** * The method to change. Default value: Immediate. Valid values: * - Immediate: The change immediately takes effect. * - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime. * */ @Export(name="effectiveTime", refs={String.class}, tree="[0]") private Output effectiveTime; /** * @return The method to change. Default value: Immediate. Valid values: * - Immediate: The change immediately takes effect. * - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime. * */ public Output> effectiveTime() { return Codegen.optional(this.effectiveTime); } /** * Database type. * */ @Export(name="engine", refs={String.class}, tree="[0]") private Output engine; /** * @return Database type. * */ public Output engine() { return this.engine; } /** * Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`. * */ @Export(name="engineVersion", refs={String.class}, tree="[0]") private Output engineVersion; /** * @return Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`. * */ public Output engineVersion() { return this.engineVersion; } /** * Set it to true to make some parameter efficient when modifying them. Default to false. * */ @Export(name="forceRestart", refs={Boolean.class}, tree="[0]") private Output forceRestart; /** * @return Set it to true to make some parameter efficient when modifying them. Default to false. * */ public Output> forceRestart() { return Codegen.optional(this.forceRestart); } /** * Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released. * */ @Export(name="instanceChargeType", refs={String.class}, tree="[0]") private Output instanceChargeType; /** * @return Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. The interval between the two conversion operations must be greater than 15 minutes. Only when this parameter is `Postpaid`, the instance can be released. * */ public Output> instanceChargeType() { return Codegen.optional(this.instanceChargeType); } /** * The name of DB instance. It a string of 2 to 256 characters. * */ @Export(name="instanceName", refs={String.class}, tree="[0]") private Output instanceName; /** * @return The name of DB instance. It a string of 2 to 256 characters. * */ public Output instanceName() { return this.instanceName; } /** * User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). * */ @Export(name="instanceStorage", refs={Integer.class}, tree="[0]") private Output instanceStorage; /** * @return User-defined DB instance storage space. Value range: [5, 2000] for MySQL/SQL Server HA dual node edition. Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). * */ public Output instanceStorage() { return this.instanceStorage; } /** * DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). * */ @Export(name="instanceType", refs={String.class}, tree="[0]") private Output instanceType; /** * @return DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm). * */ public Output instanceType() { return this.instanceType; } /** * ID of the master instance. * */ @Export(name="masterDbInstanceId", refs={String.class}, tree="[0]") private Output masterDbInstanceId; /** * @return ID of the master instance. * */ public Output masterDbInstanceId() { return this.masterDbInstanceId; } /** * The method that is used to modify the IP address whitelist. Default value: Cover. Valid values: * - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist. * - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist. * - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block. * */ @Export(name="modifyMode", refs={String.class}, tree="[0]") private Output modifyMode; /** * @return The method that is used to modify the IP address whitelist. Default value: Cover. Valid values: * - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist. * - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist. * - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block. * */ public Output> modifyMode() { return Codegen.optional(this.modifyMode); } /** * 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. * */ @Export(name="parameters", refs={List.class,ReadOnlyInstanceParameter.class}, tree="[0,1]") private 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 Output> parameters() { return this.parameters; } /** * The duration that you will buy DB instance (in month). It is valid when instance_charge_type is `PrePaid`. Valid values: [1~9], 12, 24, 36. * */ @Export(name="period", refs={Integer.class}, tree="[0]") private Output period; /** * @return The duration that you will buy DB instance (in month). It is valid when instance_charge_type is `PrePaid`. Valid values: [1~9], 12, 24, 36. * */ public Output> period() { return Codegen.optional(this.period); } /** * RDS database connection port. * */ @Export(name="port", refs={String.class}, tree="[0]") private Output port; /** * @return RDS database connection port. * */ public Output port() { return this.port; } /** * The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - cert * - perfer * - verify-ca * - verify-full (supported only when the instance runs PostgreSQL 12 or later) * > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them. * */ @Export(name="replicationAcl", refs={String.class}, tree="[0]") private Output replicationAcl; /** * @return The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. It is valid only when `ssl_enabled = 1`. Valid values: * - cert * - perfer * - verify-ca * - verify-full (supported only when the instance runs PostgreSQL 12 or later) * > **NOTE:** Because of data backup and migration, change DB instance type and storage would cost 15~20 minutes. Please make full preparation before changing them. * */ public Output replicationAcl() { return this.replicationAcl; } /** * The ID of resource group which the DB read-only instance belongs. * */ @Export(name="resourceGroupId", refs={String.class}, tree="[0]") private Output resourceGroupId; /** * @return The ID of resource group which the DB read-only instance belongs. * */ public Output resourceGroupId() { return this.resourceGroupId; } /** * The type of IP address in the IP address whitelist. * */ @Export(name="securityIpType", refs={String.class}, tree="[0]") private Output securityIpType; /** * @return The type of IP address in the IP address whitelist. * */ public Output> securityIpType() { return Codegen.optional(this.securityIpType); } /** * List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). * */ @Export(name="securityIps", refs={List.class,String.class}, tree="[0,1]") private Output> securityIps; /** * @return List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]). * */ public Output> securityIps() { return this.securityIps; } /** * The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ @Export(name="serverCert", refs={String.class}, tree="[0]") private Output serverCert; /** * @return The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ public Output serverCert() { return this.serverCert; } /** * The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ @Export(name="serverKey", refs={String.class}, tree="[0]") private Output serverKey; /** * @return The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter. It is valid only when `ssl_enabled = 1`. * */ public Output serverKey() { return this.serverKey; } /** * Specifies whether to enable or disable SSL encryption. Valid values: * - 1: enables SSL encryption * - 0: disables SSL encryption * */ @Export(name="sslEnabled", refs={Integer.class}, tree="[0]") private Output sslEnabled; /** * @return Specifies whether to enable or disable SSL encryption. Valid values: * - 1: enables SSL encryption * - 0: disables SSL encryption * */ public Output sslEnabled() { return this.sslEnabled; } /** * The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgrade_db_instance_kernel_version = true`. The time must be in UTC. * * > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime. * */ @Export(name="switchTime", refs={String.class}, tree="[0]") private Output switchTime; /** * @return The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `upgrade_db_instance_kernel_version = true`. The time must be in UTC. * * > **NOTE:** This parameter takes effect only when you set the UpgradeTime parameter to SpecifyTime. * */ public Output> switchTime() { return Codegen.optional(this.switchTime); } /** * A mapping of tags to assign to the resource. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgrade_db_instance_kernel_version = true`. You must specify the minor engine version in one of the following formats: * - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830. * - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported: * - rds: The instance runs RDS Basic or High-availability Edition. * - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition. * - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition. * - SQLServer: <Minor engine version>. Example: 15.0.4073.23. * * > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server. * */ @Export(name="targetMinorVersion", refs={String.class}, tree="[0]") private Output targetMinorVersion; /** * @return The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. It is valid only when `upgrade_db_instance_kernel_version = true`. You must specify the minor engine version in one of the following formats: * - PostgreSQL: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830. * - MySQL: <RDS edition>_<Minor engine version>. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported: * - rds: The instance runs RDS Basic or High-availability Edition. * - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition. * - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition. * - SQLServer: <Minor engine version>. Example: 15.0.4073.23. * * > **NOTE:** For more information about minor engine versions, see Release notes of minor AliPG versions, Release notes of minor AliSQL versions, and Release notes of minor engine versions of ApsaraDB RDS for SQL Server. * */ public Output targetMinorVersion() { return this.targetMinorVersion; } /** * Whether to upgrade a minor version of the kernel. Valid values: * - true: upgrade * - false: not to upgrade * */ @Export(name="upgradeDbInstanceKernelVersion", refs={Boolean.class}, tree="[0]") private Output upgradeDbInstanceKernelVersion; /** * @return Whether to upgrade a minor version of the kernel. Valid values: * - true: upgrade * - false: not to upgrade * */ public Output> upgradeDbInstanceKernelVersion() { return Codegen.optional(this.upgradeDbInstanceKernelVersion); } /** * The method to update the minor engine version. Default value: Immediate. It is valid only when `upgrade_db_instance_kernel_version = true`. Valid values: * - Immediate: The minor engine version is immediately updated. * - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime. * - SpecifyTime: The minor engine version is updated at the point in time you specify. * */ @Export(name="upgradeTime", refs={String.class}, tree="[0]") private Output upgradeTime; /** * @return The method to update the minor engine version. Default value: Immediate. It is valid only when `upgrade_db_instance_kernel_version = true`. Valid values: * - Immediate: The minor engine version is immediately updated. * - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime. * - SpecifyTime: The minor engine version is updated at the point in time you specify. * */ public Output> upgradeTime() { return Codegen.optional(this.upgradeTime); } /** * The virtual switch ID to launch DB instances in one VPC. * */ @Export(name="vswitchId", refs={String.class}, tree="[0]") private Output vswitchId; /** * @return The virtual switch ID to launch DB instances in one VPC. * */ public Output> vswitchId() { return Codegen.optional(this.vswitchId); } /** * The network type of the IP address whitelist. Default value: MIX. Valid values: * - Classic: classic network in enhanced whitelist mode * - VPC: virtual private cloud (VPC) in enhanced whitelist mode * - MIX: standard whitelist mode * > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type. * */ @Export(name="whitelistNetworkType", refs={String.class}, tree="[0]") private Output whitelistNetworkType; /** * @return The network type of the IP address whitelist. Default value: MIX. Valid values: * - Classic: classic network in enhanced whitelist mode * - VPC: virtual private cloud (VPC) in enhanced whitelist mode * - MIX: standard whitelist mode * > **NOTE:** In standard whitelist mode, IP addresses and CIDR blocks can be added only to the default IP address whitelist. In enhanced whitelist mode, IP addresses and CIDR blocks can be added to both IP address whitelists of the classic network type and those of the VPC network type. * */ public Output> whitelistNetworkType() { return Codegen.optional(this.whitelistNetworkType); } /** * The Zone to launch the DB instance. * */ @Export(name="zoneId", refs={String.class}, tree="[0]") private Output zoneId; /** * @return The Zone to launch the DB instance. * */ public Output zoneId() { return this.zoneId; } /** * * @param name The _unique_ name of the resulting resource. */ public ReadOnlyInstance(java.lang.String name) { this(name, ReadOnlyInstanceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ReadOnlyInstance(java.lang.String name, ReadOnlyInstanceArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ReadOnlyInstance(java.lang.String name, ReadOnlyInstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:rds/readOnlyInstance:ReadOnlyInstance", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ReadOnlyInstance(java.lang.String name, Output id, @Nullable ReadOnlyInstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:rds/readOnlyInstance:ReadOnlyInstance", name, state, makeResourceOptions(options, id), false); } private static ReadOnlyInstanceArgs makeArgs(ReadOnlyInstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ReadOnlyInstanceArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ReadOnlyInstance get(java.lang.String name, Output id, @Nullable ReadOnlyInstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ReadOnlyInstance(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy