Class ClusterInstance
Provides an DocDB Cluster Resource Instance. A Cluster Instance Resource defines attributes that are specific to a single instance in a DocDB Cluster.
You do not designate a primary and subsequent replicas. Instead, you simply add DocDB
Instances and DocDB manages the replication. You can use the count
meta-parameter to make multiple instances and join them all to the same DocDB
Cluster, or you may specify different Cluster Instance resources with various
instance_class sizes.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = new Aws.DocDB.Cluster("default", new Aws.DocDB.ClusterArgs
{
AvailabilityZones =
{
"us-west-2a",
"us-west-2b",
"us-west-2c",
},
ClusterIdentifier = "docdb-cluster-demo",
MasterPassword = "barbut8chars",
MasterUsername = "foo",
});
var clusterInstances = new List<Aws.DocDB.ClusterInstance>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
clusterInstances.Add(new Aws.DocDB.ClusterInstance($"clusterInstances-{range.Value}", new Aws.DocDB.ClusterInstanceArgs
{
ClusterIdentifier = @default.Id,
Identifier = $"docdb-cluster-demo-{range.Value}",
InstanceClass = "db.r5.large",
}));
}
}
}
Inherited Members
Namespace: Pulumi.Aws.DocDB
Assembly: Pulumi.Aws.dll
Syntax
public class ClusterInstance : CustomResource
Constructors
View SourceClusterInstance(String, ClusterInstanceArgs, CustomResourceOptions)
Create a ClusterInstance resource with the given unique name, arguments, and options.
Declaration
public ClusterInstance(string name, ClusterInstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ClusterInstanceArgs | 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 database modifications
are applied immediately, or during the next maintenance window. Default isfalse.
Declaration
public Output<bool> ApplyImmediately { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Arn
Amazon Resource Name (ARN) of cluster instance
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AutoMinorVersionUpgrade
Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Default true.
Declaration
public Output<bool?> AutoMinorVersionUpgrade { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
AvailabilityZone
The EC2 Availability Zone that the DB instance is created in. See docs about the details.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CaCertIdentifier
(Optional) The identifier of the CA certificate for the DB instance.
Declaration
public Output<string> CaCertIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClusterIdentifier
The identifier of the aws.docdb.Cluster in which to launch this instance.
Declaration
public Output<string> ClusterIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbiResourceId
The region-unique, immutable identifier for the DB instance.
Declaration
public Output<string> DbiResourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DbSubnetGroupName
The DB subnet group to associate with this DB instance.
Declaration
public Output<string> DbSubnetGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Endpoint
The DNS address for this instance. May not be writable
Declaration
public Output<string> Endpoint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Engine
The name of the database engine to be used for the DocDB instance. Defaults to docdb. Valid Values: docdb.
Declaration
public Output<string> Engine { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EngineVersion
The database engine version
Declaration
public Output<string> EngineVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Identifier
The indentifier for the DocDB instance, if omitted, this provider will assign a random, unique identifier.
Declaration
public Output<string> Identifier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IdentifierPrefix
Creates a unique identifier beginning with the specified prefix. Conflicts with identifer.
Declaration
public Output<string> IdentifierPrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceClass
The instance class to use. For details on CPU and memory, see Scaling for DocDB Instances. DocDB currently supports the below instance classes. Please see AWS Documentation for complete details.
- db.r4.large
- db.r4.xlarge
- db.r4.2xlarge
- db.r4.4xlarge
- db.r4.8xlarge
- db.r4.16xlarge
Declaration
public Output<string> InstanceClass { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
KmsKeyId
The ARN for the KMS encryption key if one is set to the cluster.
Declaration
public Output<string> KmsKeyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
The database port
Declaration
public Output<int> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
PreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled.
Declaration
public Output<string> PreferredBackupWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PreferredMaintenanceWindow
The window to perform maintenance in. Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00".
Declaration
public Output<string> PreferredMaintenanceWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PromotionTier
Default 0. Failover Priority setting on instance level. The reader who has lower tier has higher priority to get promoter to writer.
Declaration
public Output<int?> PromotionTier { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PubliclyAccessible
Declaration
public Output<bool> PubliclyAccessible { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
StorageEncrypted
Specifies whether the DB cluster is encrypted.
Declaration
public Output<bool> StorageEncrypted { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Tags
A map of tags to assign to the instance.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Writer
Boolean indicating if this instance is writable. False indicates this instance is a read replica.
Declaration
public Output<bool> Writer { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, ClusterInstanceState, CustomResourceOptions)
Get an existing ClusterInstance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ClusterInstance Get(string name, Input<string> id, ClusterInstanceState 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. |
| ClusterInstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ClusterInstance |