Class Instance


  • public class Instance
    extends com.pulumi.resources.CustomResource
    Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases. Changes to a DB instance can occur when you manually change a parameter, such as `allocatedStorage`, and are reflected in the next maintenance window. Because of this, this provider may report a difference in its planning phase because a modification has not yet taken place. You can use the `applyImmediately` flag to instruct the service to apply the change immediately (see documentation below). When upgrading the major version of an engine, `allowMajorVersionUpgrade` must be set to `true`. > **Note:** using `applyImmediately` can result in a brief downtime as the server reboots. See the AWS Docs on [RDS Instance Maintenance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html) for more information. > **Note:** All arguments including the username and password will be stored in the raw state as plain-text. Read more about sensitive data instate. Amazon RDS supports instance classes for General-purpose, Memory-optimized, Burstable Performance, and Optimized-reads use cases. For more information see [DB Instance Class Types](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html). ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var default_ = new Instance("default", InstanceArgs.builder()
                 .allocatedStorage(10)
                 .dbName("mydb")
                 .engine("mysql")
                 .engineVersion("8.0")
                 .instanceClass("db.t3.micro")
                 .username("foo")
                 .password("foobarbaz")
                 .parameterGroupName("default.mysql8.0")
                 .skipFinalSnapshot(true)
                 .build());
     
         }
     }
     
     
    ### RDS Custom for Oracle Usage with Replica
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.RdsFunctions;
     import com.pulumi.aws.rds.inputs.GetOrderableDbInstanceArgs;
     import com.pulumi.aws.kms.KmsFunctions;
     import com.pulumi.aws.kms.inputs.GetKeyArgs;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import com.pulumi.resources.CustomResourceOptions;
     import com.pulumi.resources.CustomTimeouts;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             // Lookup the available instance classes for the custom engine for the region being operated in
             final var custom-oracle = RdsFunctions.getOrderableDbInstance(GetOrderableDbInstanceArgs.builder()
                 .engine("custom-oracle-ee")
                 .engineVersion("19.c.ee.002")
                 .licenseModel("bring-your-own-license")
                 .storageType("gp3")
                 .preferredInstanceClasses(            
                     "db.r5.xlarge",
                     "db.r5.2xlarge",
                     "db.r5.4xlarge")
                 .build());
     
             // The RDS instance resource requires an ARN. Look up the ARN of the KMS key associated with the CEV.
             final var byId = KmsFunctions.getKey(GetKeyArgs.builder()
                 .keyId("example-ef278353ceba4a5a97de6784565b9f78")
                 .build());
     
             var default_ = new Instance("default", InstanceArgs.builder()
                 .allocatedStorage(50)
                 .autoMinorVersionUpgrade(false)
                 .customIamInstanceProfile("AWSRDSCustomInstanceProfile")
                 .backupRetentionPeriod(7)
                 .dbSubnetGroupName(dbSubnetGroupName)
                 .engine(custom_oracle.engine())
                 .engineVersion(custom_oracle.engineVersion())
                 .identifier("ee-instance-demo")
                 .instanceClass(custom_oracle.instanceClass())
                 .kmsKeyId(byId.arn())
                 .licenseModel(custom_oracle.licenseModel())
                 .multiAz(false)
                 .password("avoid-plaintext-passwords")
                 .username("test")
                 .storageEncrypted(true)
                 .build(), CustomResourceOptions.builder()
                     .customTimeouts(CustomTimeouts.builder()
                         .create(CustomTimeouts.parseTimeoutString("3h"))
                         .delete(CustomTimeouts.parseTimeoutString("3h"))
                         .update(CustomTimeouts.parseTimeoutString("3h"))
                     .build())
                     .build());
     
             var test_replica = new Instance("test-replica", InstanceArgs.builder()
                 .replicateSourceDb(default_.identifier())
                 .replicaMode("mounted")
                 .autoMinorVersionUpgrade(false)
                 .customIamInstanceProfile("AWSRDSCustomInstanceProfile")
                 .backupRetentionPeriod(7)
                 .identifier("ee-instance-replica")
                 .instanceClass(custom_oracle.instanceClass())
                 .kmsKeyId(byId.arn())
                 .multiAz(false)
                 .skipFinalSnapshot(true)
                 .storageEncrypted(true)
                 .build(), CustomResourceOptions.builder()
                     .customTimeouts(CustomTimeouts.builder()
                         .create(CustomTimeouts.parseTimeoutString("3h"))
                         .delete(CustomTimeouts.parseTimeoutString("3h"))
                         .update(CustomTimeouts.parseTimeoutString("3h"))
                     .build())
                     .build());
     
         }
     }
     
     
    ### RDS Custom for SQL Server
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.RdsFunctions;
     import com.pulumi.aws.rds.inputs.GetOrderableDbInstanceArgs;
     import com.pulumi.aws.kms.KmsFunctions;
     import com.pulumi.aws.kms.inputs.GetKeyArgs;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import com.pulumi.resources.CustomResourceOptions;
     import com.pulumi.resources.CustomTimeouts;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             // Lookup the available instance classes for the custom engine for the region being operated in
             final var custom-sqlserver = RdsFunctions.getOrderableDbInstance(GetOrderableDbInstanceArgs.builder()
                 .engine("custom-sqlserver-se")
                 .engineVersion("15.00.4249.2.v1")
                 .storageType("gp3")
                 .preferredInstanceClasses(            
                     "db.r5.xlarge",
                     "db.r5.2xlarge",
                     "db.r5.4xlarge")
                 .build());
     
             // The RDS instance resource requires an ARN. Look up the ARN of the KMS key.
             final var byId = KmsFunctions.getKey(GetKeyArgs.builder()
                 .keyId("example-ef278353ceba4a5a97de6784565b9f78")
                 .build());
     
             var example = new Instance("example", InstanceArgs.builder()
                 .allocatedStorage(500)
                 .autoMinorVersionUpgrade(false)
                 .customIamInstanceProfile("AWSRDSCustomSQLServerInstanceProfile")
                 .backupRetentionPeriod(7)
                 .dbSubnetGroupName(dbSubnetGroupName)
                 .engine(custom_sqlserver.engine())
                 .engineVersion(custom_sqlserver.engineVersion())
                 .identifier("sql-instance-demo")
                 .instanceClass(custom_sqlserver.instanceClass())
                 .kmsKeyId(byId.arn())
                 .multiAz(false)
                 .password("avoid-plaintext-passwords")
                 .storageEncrypted(true)
                 .username("test")
                 .build(), CustomResourceOptions.builder()
                     .customTimeouts(CustomTimeouts.builder()
                         .create(CustomTimeouts.parseTimeoutString("3h"))
                         .delete(CustomTimeouts.parseTimeoutString("3h"))
                         .update(CustomTimeouts.parseTimeoutString("3h"))
                     .build())
                     .build());
     
         }
     }
     
     
    ### RDS Db2 Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.RdsFunctions;
     import com.pulumi.aws.rds.inputs.GetEngineVersionArgs;
     import com.pulumi.aws.rds.inputs.GetOrderableDbInstanceArgs;
     import com.pulumi.aws.rds.ParameterGroup;
     import com.pulumi.aws.rds.ParameterGroupArgs;
     import com.pulumi.aws.rds.inputs.ParameterGroupParameterArgs;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             // Lookup the default version for the engine. Db2 Standard Edition is `db2-se`, Db2 Advanced Edition is `db2-ae`.
             final var default = RdsFunctions.getEngineVersion(GetEngineVersionArgs.builder()
                 .engine("db2-se")
                 .build());
     
             // Lookup the available instance classes for the engine in the region being operated in
             final var example = RdsFunctions.getOrderableDbInstance(GetOrderableDbInstanceArgs.builder()
                 .engine(default_.engine())
                 .engineVersion(default_.version())
                 .licenseModel("bring-your-own-license")
                 .storageType("gp3")
                 .preferredInstanceClasses(            
                     "db.t3.small",
                     "db.r6i.large",
                     "db.m6i.large")
                 .build());
     
             // The RDS Db2 instance resource requires licensing information. Create a new parameter group using the default parameter group as a source, and set license information.
             var exampleParameterGroup = new ParameterGroup("exampleParameterGroup", ParameterGroupArgs.builder()
                 .parameters(            
                     ParameterGroupParameterArgs.builder()
                         .applyMethod("immediate")
                         .name("rds.ibm_customer_id")
                         .value("0")
                         .build(),
                     ParameterGroupParameterArgs.builder()
                         .applyMethod("immediate")
                         .name("rds.ibm_site_id")
                         .value("0")
                         .build())
                 .name("db-db2-params")
                 .family(default_.parameterGroupFamily())
                 .build());
     
             // Create the RDS Db2 instance, use the data sources defined to set attributes
             var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                 .allocatedStorage(100)
                 .backupRetentionPeriod(7)
                 .dbName("test")
                 .engine(example.engine())
                 .engineVersion(example.engineVersion())
                 .identifier("db2-instance-demo")
                 .instanceClass(example.instanceClass())
                 .parameterGroupName(exampleParameterGroup.name())
                 .password("avoid-plaintext-passwords")
                 .username("test")
                 .build());
     
         }
     }
     
     
    ### Storage Autoscaling To enable Storage Autoscaling with instances that support the feature, define the `maxAllocatedStorage` argument higher than the `allocatedStorage` argument. This provider will automatically hide differences with the `allocatedStorage` argument value if autoscaling occurs.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new Instance("example", InstanceArgs.builder()
                 .allocatedStorage(50)
                 .maxAllocatedStorage(100)
                 .build());
     
         }
     }
     
     
    ### Managed Master Passwords via Secrets Manager, default KMS Key > More information about RDS/Aurora Aurora integrates with Secrets Manager to manage master user passwords for your DB clusters can be found in the [RDS User Guide](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-rds-integration-aws-secrets-manager/) and [Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html). You can specify the `manageMasterUserPassword` attribute to enable managing the master password with Secrets Manager. You can also update an existing cluster to use Secrets Manager by specify the `manageMasterUserPassword` attribute and removing the `password` attribute (removal is required).
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var default_ = new Instance("default", InstanceArgs.builder()
                 .allocatedStorage(10)
                 .dbName("mydb")
                 .engine("mysql")
                 .engineVersion("8.0")
                 .instanceClass("db.t3.micro")
                 .manageMasterUserPassword(true)
                 .username("foo")
                 .parameterGroupName("default.mysql8.0")
                 .build());
     
         }
     }
     
     
    ### Managed Master Passwords via Secrets Manager, specific KMS Key > More information about RDS/Aurora Aurora integrates with Secrets Manager to manage master user passwords for your DB clusters can be found in the [RDS User Guide](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-rds-integration-aws-secrets-manager/) and [Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html). You can specify the `masterUserSecretKmsKeyId` attribute to specify a specific KMS Key.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.kms.KeyArgs;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new Key("example", KeyArgs.builder()
                 .description("Example KMS Key")
                 .build());
     
             var default_ = new Instance("default", InstanceArgs.builder()
                 .allocatedStorage(10)
                 .dbName("mydb")
                 .engine("mysql")
                 .engineVersion("8.0")
                 .instanceClass("db.t3.micro")
                 .manageMasterUserPassword(true)
                 .masterUserSecretKmsKeyId(example.keyId())
                 .username("foo")
                 .parameterGroupName("default.mysql8.0")
                 .build());
     
         }
     }
     
     
    ### Disabling Master Password Rotation When `manageMasterUserPassword` is enabled, Secrets Manager rotates the master user password automatically (every 7 days by default). To disable that rotation while keeping the managed secret, manage the secret's rotation with `aws.secretsmanager.SecretRotation` and set `rotationEnabled = false`. Referencing `aws_db_instance.default.master_user_secret[0].secret_arn` (as in the example below) ensures the rotation change is applied after the instance is available. Avoid hardcoding the secret ARN, which would remove that ordering.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import com.pulumi.aws.secretsmanager.SecretRotation;
     import com.pulumi.aws.secretsmanager.SecretRotationArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var default_ = new Instance("default", InstanceArgs.builder()
                 .allocatedStorage(10)
                 .dbName("mydb")
                 .engine("mysql")
                 .engineVersion("8.0")
                 .instanceClass("db.t3.micro")
                 .manageMasterUserPassword(true)
                 .username("foo")
                 .parameterGroupName("default.mysql8.0")
                 .build());
     
             var defaultSecretRotation = new SecretRotation("defaultSecretRotation", SecretRotationArgs.builder()
                 .secretId(default_.masterUserSecrets().applyValue(_masterUserSecrets -> _masterUserSecrets[0].secretArn()))
                 .rotationEnabled(false)
                 .build());
     
         }
     }
     
     
    ### RDS Instance from S3 Import (Percona XtraBackup) Full details on the core parameters and impacts are in the API Docs: [RestoreDBInstanceFromS3](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromS3.html). This will not recreate the resource if the S3 object changes in some way. It's only used to initialize the database.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.rds.Instance;
     import com.pulumi.aws.rds.InstanceArgs;
     import com.pulumi.aws.rds.inputs.InstanceS3ImportArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var db = new Instance("db", InstanceArgs.builder()
                 .s3Import(InstanceS3ImportArgs.builder()
                     .sourceEngine("mysql")
                     .sourceEngineVersion("5.6")
                     .bucketName("mybucket")
                     .bucketPrefix("backups")
                     .ingestionRole("arn:aws:iam::1234567890:role/role-xtrabackup-rds-restore")
                     .build())
                 .build());
     
         }
     }
     
     
    > **NOTE:** Removing the `replicateSourceDb` attribute from an existing RDS Replicate database managed by the provider will promote the database to a fully standalone database. For more detailed documentation about each argument, refer to the [AWS official documentation](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). ## Import ### Identity Schema #### Required * `identifier` (String) Identifier of the DB Instance. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import DB Instances using the `identifier`. For example: ```sh $ pulumi import aws:rds/instance:Instance default mydb-rds-instance ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Instance​(java.lang.String name)  
      Instance​(java.lang.String name, InstanceArgs args)  
      Instance​(java.lang.String name, InstanceArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Constructor Detail

      • Instance

        public Instance​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Instance

        public Instance​(java.lang.String name,
                        InstanceArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Instance

        public Instance​(java.lang.String name,
                        InstanceArgs args,
                        @Nullable
                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • address

        public com.pulumi.core.Output<java.lang.String> address()
        Returns:
        DNS address of the DB instance.
      • allocatedStorage

        public com.pulumi.core.Output<java.lang.Integer> allocatedStorage()
        Returns:
        Allocated storage in gibibytes. If `maxAllocatedStorage` is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs. If `replicateSourceDb` is set, the value is ignored during the creation of the instance.
      • allowMajorVersionUpgrade

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowMajorVersionUpgrade()
        Returns:
        Whether major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
      • applyImmediately

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> applyImmediately()
        Returns:
        Whether any database modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the RDS instance.
      • autoMinorVersionUpgrade

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> autoMinorVersionUpgrade()
        Returns:
        Whether minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Defaults to true.
      • availabilityZone

        public com.pulumi.core.Output<java.lang.String> availabilityZone()
        Returns:
        AZ for the RDS instance.
      • backupRetentionPeriod

        public com.pulumi.core.Output<java.lang.Integer> backupRetentionPeriod()
        Returns:
        Days to retain backups for. Must be between `0` and `35`. Default is `0`. Must be greater than `0` if the database is used as a source for a [Read Replica](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Replication.html), uses low-downtime updates, or will use [RDS Blue/Green deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html).
      • backupTarget

        public com.pulumi.core.Output<java.lang.String> backupTarget()
        Returns:
        Where automated backups and manual snapshots are stored. Possible values are `region` (default) and `outposts`. See [Working with Amazon RDS on AWS Outposts](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) for more information.
      • backupWindow

        public com.pulumi.core.Output<java.lang.String> backupWindow()
        Returns:
        Daily time range (in UTC) during which automated backups are created if they are enabled. Example: "09:46-10:16". Must not overlap with `maintenanceWindow`.
      • blueGreenUpdate

        public com.pulumi.core.Output<java.util.Optional<InstanceBlueGreenUpdate>> blueGreenUpdate()
        Returns:
        Enables low-downtime updates using [RDS Blue/Green deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments.html). See `blueGreenUpdate` Block below.
      • caCertIdentifier

        public com.pulumi.core.Output<java.lang.String> caCertIdentifier()
        Returns:
        Identifier of the CA certificate for the DB instance.
      • characterSetName

        public com.pulumi.core.Output<java.lang.String> characterSetName()
        Returns:
        Character set name to use for DB encoding in Oracle and Microsoft SQL instances (collation). This can't be changed. See [Oracle Character Sets Supported in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html) or [Server-Level Collation for Microsoft SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Collation.html) for more information. Cannot be set with `replicateSourceDb`, `restoreToPointInTime`, `s3Import`, or `snapshotIdentifier`.
      • copyTagsToSnapshot

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> copyTagsToSnapshot()
        Returns:
        Copy all Instance `tags` to snapshots. Default is `false`.
      • customIamInstanceProfile

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> customIamInstanceProfile()
        Returns:
        Instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.
      • customerOwnedIpEnabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> customerOwnedIpEnabled()
        Returns:
        Whether to enable a customer-owned IP address (CoIP) for an RDS on Outposts DB instance. See [CoIP for RDS on Outposts](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html#rds-on-outposts.coip) for more information.
      • databaseInsightsMode

        public com.pulumi.core.Output<java.lang.String> databaseInsightsMode()
        Returns:
        Mode of Database Insights that is enabled for the instance. Valid values: `standard`, `advanced` .
      • dbName

        public com.pulumi.core.Output<java.lang.String> dbName()
        Returns:
        Name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. Note that this does not apply for Oracle or SQL Server engines. See the [AWS documentation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-instance.html) for more details on what applies for those engines. If you are providing an Oracle DB name, it needs to be in all upper case. Cannot be specified for a replica.
      • dbSubnetGroupName

        public com.pulumi.core.Output<java.lang.String> dbSubnetGroupName()
        Returns:
        Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the `default` Subnet Group. When working with read replicas created in the same region, defaults to the Subnet Group Name of the source DB. When working with read replicas created in a different region, defaults to the `default` Subnet Group. See [DBSubnetGroupName in API action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html) for additional read replica constraints.
      • dedicatedLogVolume

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> dedicatedLogVolume()
        Returns:
        Use a dedicated log volume (DLV) for the DB instance. Requires Provisioned IOPS. See the [AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.dlv) for more details.
      • deleteAutomatedBackups

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deleteAutomatedBackups()
        Returns:
        Whether to remove automated backups immediately after the DB instance is deleted. Default is `true`.
      • deletionProtection

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deletionProtection()
        Returns:
        If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`.
      • domain

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domain()
        Returns:
        ID of the Directory Service Active Directory domain to create the instance in. Conflicts with `domainFqdn`, `domainOu`, `domainAuthSecretArn` and a `domainDnsIps`.
      • domainAuthSecretArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainAuthSecretArn()
        Returns:
        ARN for the Secrets Manager secret with the self managed Active Directory credentials for the user joining the domain. Conflicts with `domain` and `domainIamRoleName`.
      • domainDnsIps

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> domainDnsIps()
        Returns:
        IPv4 DNS IP addresses of your primary and secondary self managed Active Directory domain controllers. Two IP addresses must be provided. If there isn't a secondary domain controller, use the IP address of the primary domain controller for both entries in the list. Conflicts with `domain` and `domainIamRoleName`.
      • domainFqdn

        public com.pulumi.core.Output<java.lang.String> domainFqdn()
        Returns:
        Fully qualified domain name (FQDN) of the self managed Active Directory domain. Conflicts with `domain` and `domainIamRoleName`.
      • domainIamRoleName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainIamRoleName()
        Returns:
        Name of the IAM role to be used when making API calls to the Directory Service. Conflicts with `domainFqdn`, `domainOu`, `domainAuthSecretArn` and a `domainDnsIps`.
      • domainOu

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainOu()
        Returns:
        Self managed Active Directory organizational unit for your DB instance to join. Conflicts with `domain` and `domainIamRoleName`.
      • enabledCloudwatchLogsExports

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> enabledCloudwatchLogsExports()
        Returns:
        Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. For supported values, see the EnableCloudwatchLogsExports.member.N parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
      • endpoint

        public com.pulumi.core.Output<java.lang.String> endpoint()
        Returns:
        Connection endpoint in `address:port` format.
      • engine

        public com.pulumi.core.Output<java.lang.String> engine()
        Returns:
        Database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine must match the DB cluster's engine'. For information on the difference between the available Aurora MySQL engines see [Comparison between Aurora MySQL 1 and Aurora MySQL 2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Updates.20180206.html) in the Amazon RDS User Guide.
      • engineLifecycleSupport

        public com.pulumi.core.Output<java.lang.String> engineLifecycleSupport()
        Returns:
        Life cycle type for this DB instance. This setting applies only to RDS for MySQL and RDS for PostgreSQL. Valid values are `open-source-rds-extended-support`, `open-source-rds-extended-support-disabled`. Default value is `open-source-rds-extended-support`. [Using Amazon RDS Extended Support]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html
      • engineVersion

        public com.pulumi.core.Output<java.lang.String> engineVersion()
        Returns:
        Engine version to use. If `autoMinorVersionUpgrade` is enabled, you can provide a prefix of the version such as `8.0` (for `8.0.36`). The actual engine version used is returned in the attribute `engineVersionActual`, see Attribute Reference below. For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). Note that for Amazon Aurora instances the engine version must match the DB cluster's engine version'.
      • engineVersionActual

        public com.pulumi.core.Output<java.lang.String> engineVersionActual()
        Returns:
        Running version of the database.
      • finalSnapshotIdentifier

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> finalSnapshotIdentifier()
        Returns:
        Name of your final DB snapshot when this DB instance is deleted. Must be provided if `skipFinalSnapshot` is set to `false`. The value must begin with a letter, only contain alphanumeric characters and hyphens, and not end with a hyphen or contain two consecutive hyphens. Must not be provided when deleting a read replica.
      • hostedZoneId

        public com.pulumi.core.Output<java.lang.String> hostedZoneId()
        Returns:
        ID that Amazon Route 53 assigns when you create a hosted zone.
      • iamDatabaseAuthenticationEnabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> iamDatabaseAuthenticationEnabled()
        Returns:
        Whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.
      • identifier

        public com.pulumi.core.Output<java.lang.String> identifier()
        Returns:
        Name of the RDS instance, if omitted, this provider will assign a random, unique identifier. Required if `restoreToPointInTime` is specified.
      • identifierPrefix

        public com.pulumi.core.Output<java.lang.String> identifierPrefix()
        Returns:
        Creates a unique identifier beginning with the specified prefix. Conflicts with `identifier`.
      • instanceClass

        public com.pulumi.core.Output<java.lang.String> instanceClass()
        Returns:
        Instance type of the RDS instance.
      • iops

        public com.pulumi.core.Output<java.lang.Integer> iops()
        Returns:
        Amount of provisioned IOPS. Setting this implies a storageType of "io1" or "io2". Can only be set when `storageType` is `"io1"`, `"io2` or `"gp3"`. Cannot be specified for gp3 storage if the `allocatedStorage` value is below a per-`engine` threshold. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#gp3-storage) for details.
      • kmsKeyId

        public com.pulumi.core.Output<java.lang.String> kmsKeyId()
        Returns:
        ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN.
      • latestRestorableTime

        public com.pulumi.core.Output<java.lang.String> latestRestorableTime()
        Returns:
        Latest time, in UTC [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), to which a database can be restored with point-in-time restore.
      • licenseModel

        public com.pulumi.core.Output<java.lang.String> licenseModel()
        Returns:
        License model information for this DB instance. Valid values for this field are as follows: RDS for MariaDB: `general-public-license`; RDS for Microsoft SQL Server: `license-included`; RDS for MySQL: `general-public-license`; RDS for Oracle: `bring-your-own-license | license-included`; RDS for PostgreSQL: `postgresql-license`.
      • listenerEndpoints

        public com.pulumi.core.Output<java.util.List<InstanceListenerEndpoint>> listenerEndpoints()
        Returns:
        Listener connection endpoint for SQL Server Always On. See `listenerEndpoint` Block below.
      • maintenanceWindow

        public com.pulumi.core.Output<java.lang.String> maintenanceWindow()
        Returns:
        Window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". See [RDS Maintenance Window docs](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow) for more information.
      • manageMasterUserPassword

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> manageMasterUserPassword()
        Returns:
        Set to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if `password` or `passwordWo` is provided.
      • masterUserSecretKmsKeyId

        public com.pulumi.core.Output<java.lang.String> masterUserSecretKmsKeyId()
        Returns:
        Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN. If not specified, the default KMS key for your Amazon Web Services account is used.
      • masterUserSecrets

        public com.pulumi.core.Output<java.util.List<InstanceMasterUserSecret>> masterUserSecrets()
        Returns:
        Block that specifies the master user secret. Only available when `manageMasterUserPassword` is set to true. See `masterUserSecret` Block below.
      • maxAllocatedStorage

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> maxAllocatedStorage()
        Returns:
        Maximum storage (in GiB) that Amazon RDS can automatically scale to for this DB instance. By default, Storage Autoscaling is disabled. To enable Storage Autoscaling, set `maxAllocatedStorage` to **greater than or equal to** `allocatedStorage`. Setting `maxAllocatedStorage` to 0 explicitly disables Storage Autoscaling. When configured, changes to `allocatedStorage` will be automatically ignored as the storage can dynamically scale.
      • monitoringInterval

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> monitoringInterval()
        Returns:
        Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60.
      • monitoringRoleArn

        public com.pulumi.core.Output<java.lang.String> monitoringRoleArn()
        Returns:
        ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. You can find more information on the [AWS Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html) what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances.
      • multiAz

        public com.pulumi.core.Output<java.lang.Boolean> multiAz()
        Returns:
        Whether the RDS instance is multi-AZ.
      • ncharCharacterSetName

        public com.pulumi.core.Output<java.lang.String> ncharCharacterSetName()
        Returns:
        National character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed. See [Oracle Character Sets Supported in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html).
      • networkType

        public com.pulumi.core.Output<java.lang.String> networkType()
        Returns:
        Network type of the DB instance. Valid values: `IPV4`, `DUAL`.
      • optionGroupName

        public com.pulumi.core.Output<java.lang.String> optionGroupName()
        Returns:
        Name of the DB option group to associate.
      • parameterGroupName

        public com.pulumi.core.Output<java.lang.String> parameterGroupName()
        Returns:
        Name of the DB parameter group to associate.
      • password

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> password()
        Returns:
        Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Cannot be set if `manageMasterUserPassword` is set to `true`.
      • passwordWo

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> passwordWo()
        Returns:
        **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Password for the master DB user. Note that this may show up in logs. Cannot be set if `manageMasterUserPassword` is set to `true`. If set, requires `passwordWoVersion` to be set.
      • passwordWoVersion

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> passwordWoVersion()
        Returns:
        Required when `passwordWo` is set. Changing this value triggers an update to `passwordWo`.
      • performanceInsightsEnabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> performanceInsightsEnabled()
        Returns:
        Whether Performance Insights are enabled. Defaults to false.
      • performanceInsightsKmsKeyId

        public com.pulumi.core.Output<java.lang.String> performanceInsightsKmsKeyId()
        Returns:
        ARN for the KMS key to encrypt Performance Insights data. When specifying `performanceInsightsKmsKeyId`, `performanceInsightsEnabled` needs to be set to true. Once KMS key is set, it can never be changed.
      • performanceInsightsRetentionPeriod

        public com.pulumi.core.Output<java.lang.Integer> performanceInsightsRetentionPeriod()
        Returns:
        Amount of time in days to retain Performance Insights data. Valid values are `7`, `731` (2 years) or a multiple of `31`. When specifying `performanceInsightsRetentionPeriod`, `performanceInsightsEnabled` needs to be set to true. Defaults to '7'.
      • port

        public com.pulumi.core.Output<java.lang.Integer> port()
        Returns:
        Port on which the DB accepts connections.
      • publiclyAccessible

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> publiclyAccessible()
        Returns:
        Bool to control if instance is publicly accessible. Default is `false`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • replicaMode

        public com.pulumi.core.Output<java.lang.String> replicaMode()
        Returns:
        Whether the replica is in either `mounted` or `open-read-only` mode. This attribute is only supported by Oracle instances. Oracle replicas operate in `open-read-only` mode unless otherwise specified. See [Working with Oracle Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) for more information.
      • replicas

        public com.pulumi.core.Output<java.util.List<java.lang.String>> replicas()
        Returns:
        List of read replica identifiers associated with this instance.
      • replicateSourceDb

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> replicateSourceDb()
        Returns:
        Set this to specify that this resource is a Replica database, and to use this value as the source database. If replicating an Amazon RDS Database Instance in the same region, use the `identifier` of the source DB, unless also specifying the `dbSubnetGroupName`. If specifying the `dbSubnetGroupName` in the same region, use the `arn` of the source DB. If replicating an Instance in a different region, use the `arn` of the source DB. Note that if you are creating a cross-region replica of an encrypted database you will also need to specify a `kmsKeyId`. See [DB Instance Replication](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Replication.html) and [Working with PostgreSQL and MySQL Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) for more information on using Replication.
      • resourceId

        public com.pulumi.core.Output<java.lang.String> resourceId()
        Returns:
        RDS Resource ID of this instance.
      • restoreToPointInTime

        public com.pulumi.core.Output<java.util.Optional<InstanceRestoreToPointInTime>> restoreToPointInTime()
        Returns:
        Configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See `restoreToPointInTime` Block below for details.
      • s3Import

        public com.pulumi.core.Output<java.util.Optional<InstanceS3Import>> s3Import()
        Returns:
        Restore from a Percona XtraBackup in S3. See [Importing Data into an Amazon RDS MySQL DB Instance](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html). See `s3Import` Block below.
      • skipFinalSnapshot

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> skipFinalSnapshot()
        Returns:
        Whether a final DB snapshot is created before the DB instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB snapshot is created before the DB instance is deleted, using the value from `finalSnapshotIdentifier`. Default is `false`.
      • snapshotIdentifier

        public com.pulumi.core.Output<java.lang.String> snapshotIdentifier()
        Returns:
        Whether or not to create this database from a snapshot. This corresponds to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        RDS instance status.
      • storageEncrypted

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> storageEncrypted()
        Returns:
        Whether the DB instance is encrypted. Note that if you are creating a cross-region read replica this field is ignored and you should instead declare `kmsKeyId` with a valid ARN. The default is `false` if not specified.
      • storageThroughput

        public com.pulumi.core.Output<java.lang.Integer> storageThroughput()
        Returns:
        Storage throughput value for the DB instance. Can only be set when `storageType` is `"gp3"`. Cannot be specified if the `allocatedStorage` value is below a per-`engine` threshold. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#gp3-storage) for details.
      • storageType

        public com.pulumi.core.Output<java.lang.String> storageType()
        Returns:
        One of "standard" (magnetic), "gp2" (general purpose SSD), "gp3" (general purpose SSD that needs `iops` independently) "io1" (provisioned IOPS SSD) or "io2" (block express storage provisioned IOPS SSD). The default is "io1" if `iops` is specified, "gp2" if not.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • timezone

        public com.pulumi.core.Output<java.lang.String> timezone()
        Returns:
        Time zone of the DB instance. `timezone` is currently only supported by Microsoft SQL Server. The `timezone` can only be set on creation. See [MSSQL User Guide](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone) for more information.
      • upgradeRolloutOrder

        public com.pulumi.core.Output<java.lang.String> upgradeRolloutOrder()
        Returns:
        Order in which the instances are upgraded (`first`, `second`, `last`). See [the AWS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Maintenance.AMVU.UpgradeRollout.html) for details.
      • upgradeStorageConfig

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> upgradeStorageConfig()
        Returns:
        Whether to upgrade the storage file system configuration on the read replica. Can only be set with `replicateSourceDb`.
      • username

        public com.pulumi.core.Output<java.lang.String> username()
        Returns:
        Username for the master DB user. Cannot be specified for a replica.
      • vpcSecurityGroupIds

        public com.pulumi.core.Output<java.util.List<java.lang.String>> vpcSecurityGroupIds()
        Returns:
        List of VPC security groups to associate.
      • warningEventCategories

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> warningEventCategories()
        Returns:
        Set of RDS event categories (for example `failure`, `maintenance`) to check for after create and update operations. If set, the provider describes RDS events reported for this instance during the operation and surfaces a warning diagnostic, with the RDS event message, for each one found in these categories. Has no effect if unset; see [DescribeEvents](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeEvents.html) and the `aws.rds.getEvents` data source for the source of these events. Requires the `rds:DescribeEvents` IAM permission when set.
      • get

        public static Instance get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   InstanceState state,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.