1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. docdbelastic
  5. Cluster

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.docdbelastic.Cluster

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

The AWS::DocDBElastic::Cluster Amazon DocumentDB (with MongoDB compatibility) Elastic Scale resource describes a Cluster

Create Cluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
            args: ClusterArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Cluster(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            shard_capacity: Optional[int] = None,
            shard_count: Optional[int] = None,
            auth_type: Optional[str] = None,
            admin_user_name: Optional[str] = None,
            backup_retention_period: Optional[int] = None,
            kms_key_id: Optional[str] = None,
            preferred_backup_window: Optional[str] = None,
            preferred_maintenance_window: Optional[str] = None,
            cluster_name: Optional[str] = None,
            admin_user_password: Optional[str] = None,
            shard_instance_count: Optional[int] = None,
            subnet_ids: Optional[Sequence[str]] = None,
            tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
            vpc_security_group_ids: Optional[Sequence[str]] = None)
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: aws-native:docdbelastic:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Cluster resource accepts the following input properties:

AdminUserName This property is required. string

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
AuthType This property is required. string
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
ShardCapacity This property is required. int
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
ShardCount This property is required. int
The number of shards assigned to the elastic cluster. Maximum is 32.
AdminUserPassword string

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
BackupRetentionPeriod int
The number of days for which automatic snapshots are retained.
ClusterName string

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

KmsKeyId string

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

PreferredBackupWindow string
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
PreferredMaintenanceWindow string

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

ShardInstanceCount int
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
SubnetIds List<string>
The Amazon EC2 subnet IDs for the new elastic cluster.
Tags List<Pulumi.AwsNative.Inputs.Tag>
The tags to be assigned to the new elastic cluster.
VpcSecurityGroupIds List<string>
A list of EC2 VPC security groups to associate with the new elastic cluster.
AdminUserName This property is required. string

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
AuthType This property is required. string
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
ShardCapacity This property is required. int
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
ShardCount This property is required. int
The number of shards assigned to the elastic cluster. Maximum is 32.
AdminUserPassword string

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
BackupRetentionPeriod int
The number of days for which automatic snapshots are retained.
ClusterName string

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

KmsKeyId string

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

PreferredBackupWindow string
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
PreferredMaintenanceWindow string

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

ShardInstanceCount int
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
SubnetIds []string
The Amazon EC2 subnet IDs for the new elastic cluster.
Tags TagArgs
The tags to be assigned to the new elastic cluster.
VpcSecurityGroupIds []string
A list of EC2 VPC security groups to associate with the new elastic cluster.
adminUserName This property is required. String

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
authType This property is required. String
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
shardCapacity This property is required. Integer
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shardCount This property is required. Integer
The number of shards assigned to the elastic cluster. Maximum is 32.
adminUserPassword String

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
backupRetentionPeriod Integer
The number of days for which automatic snapshots are retained.
clusterName String

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

kmsKeyId String

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

preferredBackupWindow String
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
preferredMaintenanceWindow String

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

shardInstanceCount Integer
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
subnetIds List<String>
The Amazon EC2 subnet IDs for the new elastic cluster.
tags List<Tag>
The tags to be assigned to the new elastic cluster.
vpcSecurityGroupIds List<String>
A list of EC2 VPC security groups to associate with the new elastic cluster.
adminUserName This property is required. string

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
authType This property is required. string
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
shardCapacity This property is required. number
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shardCount This property is required. number
The number of shards assigned to the elastic cluster. Maximum is 32.
adminUserPassword string

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
backupRetentionPeriod number
The number of days for which automatic snapshots are retained.
clusterName string

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

kmsKeyId string

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

preferredBackupWindow string
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
preferredMaintenanceWindow string

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

shardInstanceCount number
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
subnetIds string[]
The Amazon EC2 subnet IDs for the new elastic cluster.
tags Tag[]
The tags to be assigned to the new elastic cluster.
vpcSecurityGroupIds string[]
A list of EC2 VPC security groups to associate with the new elastic cluster.
admin_user_name This property is required. str

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
auth_type This property is required. str
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
shard_capacity This property is required. int
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shard_count This property is required. int
The number of shards assigned to the elastic cluster. Maximum is 32.
admin_user_password str

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
backup_retention_period int
The number of days for which automatic snapshots are retained.
cluster_name str

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

kms_key_id str

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

preferred_backup_window str
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
preferred_maintenance_window str

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

shard_instance_count int
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
subnet_ids Sequence[str]
The Amazon EC2 subnet IDs for the new elastic cluster.
tags Sequence[TagArgs]
The tags to be assigned to the new elastic cluster.
vpc_security_group_ids Sequence[str]
A list of EC2 VPC security groups to associate with the new elastic cluster.
adminUserName This property is required. String

The name of the Amazon DocumentDB elastic clusters administrator.

Constraints :

  • Must be from 1 to 63 letters or numbers.
  • The first character must be a letter.
  • Cannot be a reserved word.
authType This property is required. String
The authentication type used to determine where to fetch the password used for accessing the elastic cluster. Valid types are PLAIN_TEXT or SECRET_ARN .
shardCapacity This property is required. Number
The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64.
shardCount This property is required. Number
The number of shards assigned to the elastic cluster. Maximum is 32.
adminUserPassword String

The password for the Elastic DocumentDB cluster administrator and can contain any printable ASCII characters.

Constraints :

  • Must contain from 8 to 100 characters.
  • Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
  • A valid AdminUserName entry is also required.
backupRetentionPeriod Number
The number of days for which automatic snapshots are retained.
clusterName String

The name of the new elastic cluster. This parameter is stored as a lowercase string.

Constraints :

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Example : my-cluster

kmsKeyId String

The KMS key identifier to use to encrypt the new elastic cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of the ARN as the KMS encryption key.

If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different default encryption key for each Amazon Region.

preferredBackupWindow String
The daily time range during which automated backups are created if automated backups are enabled, as determined by backupRetentionPeriod .
preferredMaintenanceWindow String

The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

Format : ddd:hh24:mi-ddd:hh24:mi

Default : a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week.

Valid days : Mon, Tue, Wed, Thu, Fri, Sat, Sun

Constraints : Minimum 30-minute window.

shardInstanceCount Number
The number of replica instances applying to all shards in the cluster. A shardInstanceCount value of 1 means there is one writer instance, and any additional instances are replicas that can be used for reads and to improve availability.
subnetIds List<String>
The Amazon EC2 subnet IDs for the new elastic cluster.
tags List<Property Map>
The tags to be assigned to the new elastic cluster.
vpcSecurityGroupIds List<String>
A list of EC2 VPC security groups to associate with the new elastic cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:

ClusterArn string
ClusterEndpoint string
The URL used to connect to the elastic cluster.
Id string
The provider-assigned unique ID for this managed resource.
ClusterArn string
ClusterEndpoint string
The URL used to connect to the elastic cluster.
Id string
The provider-assigned unique ID for this managed resource.
clusterArn String
clusterEndpoint String
The URL used to connect to the elastic cluster.
id String
The provider-assigned unique ID for this managed resource.
clusterArn string
clusterEndpoint string
The URL used to connect to the elastic cluster.
id string
The provider-assigned unique ID for this managed resource.
cluster_arn str
cluster_endpoint str
The URL used to connect to the elastic cluster.
id str
The provider-assigned unique ID for this managed resource.
clusterArn String
clusterEndpoint String
The URL used to connect to the elastic cluster.
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

Tag
, TagArgs

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi