Class Cluster


  • public class Cluster
    extends com.pulumi.resources.CustomResource
    Manages a DocumentDB Cluster. Changes to a DocumentDB Cluster can occur when you manually change a parameter, such as `port`, 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). > **Note:** using `applyImmediately` can result in a brief downtime as the server reboots. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.docdb.Cluster;
     import com.pulumi.aws.docdb.ClusterArgs;
     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 docdb = new Cluster("docdb", ClusterArgs.builder()
                 .clusterIdentifier("my-docdb-cluster")
                 .engine("docdb")
                 .masterUsername("foo")
                 .masterPassword("mustbeeightchars")
                 .backupRetentionPeriod(5)
                 .preferredBackupWindow("07:00-09:00")
                 .skipFinalSnapshot(true)
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import DocumentDB Clusters using the `clusterIdentifier`. For example: ```sh $ pulumi import aws:docdb/cluster:Cluster docdb_cluster docdb-prod-cluster ```
    • 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
      Cluster​(java.lang.String name)  
      Cluster​(java.lang.String name, ClusterArgs args)  
      Cluster​(java.lang.String name, ClusterArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Constructor Detail

      • Cluster

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

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

        public Cluster​(java.lang.String name,
                       @Nullable
                       ClusterArgs 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

      • allowMajorVersionUpgrade

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowMajorVersionUpgrade()
        Returns:
        A value that indicates whether major version upgrades are allowed. Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version.
      • applyImmediately

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> applyImmediately()
        Returns:
        Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of cluster
      • availabilityZones

        public com.pulumi.core.Output<java.util.List<java.lang.String>> availabilityZones()
        Returns:
        A list of EC2 Availability Zones that instances in the DB cluster can be created in. DocumentDB automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next pulumi up. We recommend specifying 3 AZs or using the `lifecycle` configuration block `ignoreChanges` argument if necessary. At most 3 AZs can be configured. **Note:** Do not set `availabilityZones` to the output of a data source such as `aws.getAvailabilityZones`, as this may be subject to change (for example, when a new AZ is added to a Region). Because changing `availabilityZones` forces replacement, any change to the set of values will plan to destroy and recreate the cluster. Always use an explicit, static list of AZs.
      • backupRetentionPeriod

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> backupRetentionPeriod()
        Returns:
        The days to retain backups for. Default `1`
      • clusterIdentifier

        public com.pulumi.core.Output<java.lang.String> clusterIdentifier()
        Returns:
        The cluster identifier. If omitted, the provider will assign a random, unique identifier.
      • clusterIdentifierPrefix

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

        public com.pulumi.core.Output<java.util.List<java.lang.String>> clusterMembers()
        Returns:
        List of DocumentDB Instances that are a part of this cluster
      • clusterResourceId

        public com.pulumi.core.Output<java.lang.String> clusterResourceId()
        Returns:
        The DocumentDB Cluster Resource ID
      • dbClusterParameterGroupName

        public com.pulumi.core.Output<java.lang.String> dbClusterParameterGroupName()
        Returns:
        A cluster parameter group to associate with the cluster.
      • dbSubnetGroupName

        public com.pulumi.core.Output<java.lang.String> dbSubnetGroupName()
        Returns:
        A DB subnet group to associate with this DB instance.
      • deletionProtection

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deletionProtection()
        Returns:
        A boolean value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. Defaults to `false`.
      • enabledCloudwatchLogsExports

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> enabledCloudwatchLogsExports()
        Returns:
        List of log types to export to CloudWatch. If omitted, no logs will be exported. The following log types are supported: `audit`, `profiler`.
      • endpoint

        public com.pulumi.core.Output<java.lang.String> endpoint()
        Returns:
        The DNS address of the DocumentDB instance
      • engine

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> engine()
        Returns:
        The name of the database engine to be used for this DB cluster. Defaults to `docdb`. Valid values: `docdb`.
      • engineVersion

        public com.pulumi.core.Output<java.lang.String> engineVersion()
        Returns:
        The database engine version. Updating this argument results in an outage.
      • finalSnapshotIdentifier

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> finalSnapshotIdentifier()
        Returns:
        The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made.
      • globalClusterIdentifier

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> globalClusterIdentifier()
        Returns:
        The global cluster identifier specified on `aws.docdb.GlobalCluster`.
      • hostedZoneId

        public com.pulumi.core.Output<java.lang.String> hostedZoneId()
        Returns:
        The Route53 Hosted Zone ID of the endpoint
      • kmsKeyId

        public com.pulumi.core.Output<java.lang.String> kmsKeyId()
        Returns:
        The ARN for the KMS encryption key. When specifying `kmsKeyId`, `storageEncrypted` needs to be set to true.
      • manageMasterUserPassword

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

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> masterPassword()
        Returns:
        Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the DocumentDB Naming Constraints. Conflicts with `masterPasswordWo` and `manageMasterUserPassword`.
      • masterPasswordWo

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> masterPasswordWo()
        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 will show up in logs. Please refer to the DocumentDB Naming Constraints. Conflicts with `masterPassword` and `manageMasterUserPassword`. If set, requires `masterPasswordWoVersion` to be set.
      • masterPasswordWoVersion

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

        public com.pulumi.core.Output<java.lang.String> masterUsername()
        Returns:
        Username for the master DB user.
      • networkType

        public com.pulumi.core.Output<java.lang.String> networkType()
        Returns:
        The network type of the DB cluster (`IPV4` or `DUAL`).
      • port

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> port()
        Returns:
        The port on which the DB accepts connections
      • preferredBackupWindow

        public com.pulumi.core.Output<java.lang.String> preferredBackupWindow()
        Returns:
        The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC Default: A 30-minute window selected at random from an 8-hour block of time per regionE.g., 04:00-09:00
      • preferredMaintenanceWindow

        public com.pulumi.core.Output<java.lang.String> preferredMaintenanceWindow()
        Returns:
        The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30
      • readerEndpoint

        public com.pulumi.core.Output<java.lang.String> readerEndpoint()
        Returns:
        A read-only endpoint for the DocumentDB cluster, automatically load-balanced across replicas
      • 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.
      • restoreToPointInTime

        public com.pulumi.core.Output<java.util.Optional<ClusterRestoreToPointInTime>> restoreToPointInTime()
        Returns:
        A 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 Restore To Point In Time below for details.
      • serverlessV2ScalingConfiguration

        public com.pulumi.core.Output<java.util.Optional<ClusterServerlessV2ScalingConfiguration>> serverlessV2ScalingConfiguration()
        Returns:
        Scaling configuration of an Amazon DocumentDB Serverless cluster. See Serverless V2 Scaling Configuration below for details.
      • skipFinalSnapshot

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

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotIdentifier()
        Returns:
        Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Automated snapshots **should not** be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced.
      • storageEncrypted

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> storageEncrypted()
        Returns:
        Specifies whether the DB cluster is encrypted. The default is `false`.
      • storageType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> storageType()
        Returns:
        The storage type to associate with the DB cluster. Valid values: `standard`, `iopt1`.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        A map of tags to assign to the DB cluster. 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:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • vpcSecurityGroupIds

        public com.pulumi.core.Output<java.util.List<java.lang.String>> vpcSecurityGroupIds()
        Returns:
        List of VPC security groups to associate with the Cluster For more detailed documentation about each argument, refer to the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/docdb/create-db-cluster.html).
      • get

        public static Cluster get​(java.lang.String name,
                                  com.pulumi.core.Output<java.lang.String> id,
                                  @Nullable
                                  ClusterState 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.