Class Cluster
Manages a DocDB Cluster.
Changes to a DocDB 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
apply_immediately flag to instruct the service to apply the change immediately
(see documentation below).
Note: using
apply_immediatelycan result in a brief downtime as the server reboots. Note: All arguments including the username and password will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var docdb = new Aws.DocDB.Cluster("docdb", new Aws.DocDB.ClusterArgs
{
BackupRetentionPeriod = 5,
ClusterIdentifier = "my-docdb-cluster",
Engine = "docdb",
MasterPassword = "mustbeeightchars",
MasterUsername = "foo",
PreferredBackupWindow = "07:00-09:00",
SkipFinalSnapshot = true,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.DocDB
Assembly: Pulumi.Aws.dll
Syntax
public class Cluster : CustomResource
Constructors
View SourceCluster(String, ClusterArgs, CustomResourceOptions)
Create a Cluster resource with the given unique name, arguments, and options.
Declaration
public Cluster(string name, ClusterArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ClusterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApplyImmediately
Specifies whether any cluster modifications
are applied immediately, or during the next maintenance window. Default is
false.
Declaration
public Output<bool> ApplyImmediately { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Arn
Amazon Resource Name (ARN) of cluster
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AvailabilityZones
A list of EC2 Availability Zones that instances in the DB cluster can be created in.
Declaration
public Output<ImmutableArray<string>> AvailabilityZones { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
BackupRetentionPeriod
The days to retain backups for. Default 1
Declaration
public Output<int?> BackupRetentionPeriod { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ClusterIdentifier
The cluster identifier. If omitted, this provider will assign a random, unique identifier.
Declaration
public Output<string> ClusterIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClusterIdentifierPrefix
Creates a unique cluster identifier beginning with the specified prefix. Conflicts with cluster_identifer.
Declaration
public Output<string> ClusterIdentifierPrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClusterMembers
List of DocDB Instances that are a part of this cluster
Declaration
public Output<ImmutableArray<string>> ClusterMembers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ClusterResourceId
The DocDB Cluster Resource ID
Declaration
public Output<string> ClusterResourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbClusterParameterGroupName
A cluster parameter group to associate with the cluster.
Declaration
public Output<string> DbClusterParameterGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbSubnetGroupName
A DB subnet group to associate with this DB instance.
Declaration
public Output<string> DbSubnetGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeletionProtection
A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled.
Declaration
public Output<bool?> DeletionProtection { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EnabledCloudwatchLogsExports
List of log types to export to cloudwatch. If omitted, no logs will be exported.
The following log types are supported: audit, profiler.
Declaration
public Output<ImmutableArray<string>> EnabledCloudwatchLogsExports { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Endpoint
The DNS address of the DocDB instance
Declaration
public Output<string> Endpoint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Engine
The name of the database engine to be used for this DB cluster. Defaults to docdb. Valid Values: docdb
Declaration
public Output<string> Engine { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EngineVersion
The database engine version. Updating this argument results in an outage.
Declaration
public Output<string> EngineVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
FinalSnapshotIdentifier
The name of your final DB snapshot when this DB cluster is deleted. If omitted, no final snapshot will be made.
Declaration
public Output<string> FinalSnapshotIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
HostedZoneId
The Route53 Hosted Zone ID of the endpoint
Declaration
public Output<string> HostedZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KmsKeyId
The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true.
Declaration
public Output<string> KmsKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MasterPassword
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 DocDB Naming Constraints.
Declaration
public Output<string> MasterPassword { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MasterUsername
Username for the master DB user.
Declaration
public Output<string> MasterUsername { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
The port on which the DB accepts connections
Declaration
public Output<int?> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PreferredBackupWindow
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 region. e.g. 04:00-09:00
Declaration
public Output<string> PreferredBackupWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PreferredMaintenanceWindow
Declaration
public Output<string> PreferredMaintenanceWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReaderEndpoint
A read-only endpoint for the DocDB cluster, automatically load-balanced across replicas
Declaration
public Output<string> ReaderEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SkipFinalSnapshot
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 final_snapshot_identifier. Default is false.
Declaration
public Output<bool?> SkipFinalSnapshot { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
SnapshotIdentifier
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.
Declaration
public Output<string> SnapshotIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StorageEncrypted
Specifies whether the DB cluster is encrypted. The default is false.
Declaration
public Output<bool?> StorageEncrypted { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Tags
A map of tags to assign to the DB cluster.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
VpcSecurityGroupIds
List of VPC security groups to associate with the Cluster
Declaration
public Output<ImmutableArray<string>> VpcSecurityGroupIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, ClusterState, CustomResourceOptions)
Get an existing Cluster resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Cluster Get(string name, Input<string> id, ClusterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ClusterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Cluster |