# CfnDBCluster

The `AWS::DocDB::DBCluster` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBCluster.

Amazon DocumentDB is a fully managed, MongoDB-compatible document database engine. For more information, see [DBCluster](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBCluster.html) in the *Amazon DocumentDB Developer Guide* .

Extends: Construct › CfnElement › CfnRefElement › CfnResource › CfnDBCluster
Implements: IInspectable, ITaggable, IEnvironmentAware, IDBClusterRef, IConstruct, IDependable

- CloudFormation: [`AWS::DocDB::DBCluster`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-docdb-dbcluster.html)
- Source: Generated code
- Type last changed: v2.252.0 · 30 Apr 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_docdb as docdb } from 'aws-cdk-lib';
const cfnDBCluster = new docdb.CfnDBCluster(this, 'MyCfnDBCluster', /* all optional props */ {
  availabilityZones: ['availabilityZones'],
  backupRetentionPeriod: 123,
  copyTagsToSnapshot: false,
  dbClusterIdentifier: 'dbClusterIdentifier',
  dbClusterParameterGroupName: 'dbClusterParameterGroupName',
  dbSubnetGroupName: 'dbSubnetGroupName',
  deletionProtection: false,
  enableCloudwatchLogsExports: ['enableCloudwatchLogsExports'],
  engineVersion: 'engineVersion',
  globalClusterIdentifier: 'globalClusterIdentifier',
  kmsKeyId: 'kmsKeyId',
  manageMasterUserPassword: false,
  masterUsername: 'masterUsername',
  masterUserPassword: 'masterUserPassword',
  masterUserSecretKmsKeyId: 'masterUserSecretKmsKeyId',
  networkType: 'networkType',
  port: 123,
  preferredBackupWindow: 'preferredBackupWindow',
  preferredMaintenanceWindow: 'preferredMaintenanceWindow',
  restoreToTime: 'restoreToTime',
  restoreType: 'restoreType',
  rotateMasterUserPassword: false,
  serverlessV2ScalingConfiguration: {
    maxCapacity: 123,
    minCapacity: 123,
  },
  snapshotIdentifier: 'snapshotIdentifier',
  sourceDbClusterIdentifier: 'sourceDbClusterIdentifier',
  storageEncrypted: false,
  storageType: 'storageType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  useLatestRestorableTime: false,
  vpcSecurityGroupIds: ['vpcSecurityGroupIds'],
});
```

## Initializer

```ts
new CfnDBCluster(scope: Construct, id: string, props?: CfnDBClusterProps)
```

## Construct Props

- `availabilityZones`: string[] — A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.

- `backupRetentionPeriod`: number — The number of days for which automated backups are retained. You must specify a minimum value of 1.

  Default: 1

  Constraints:

  - Must be a value from 1 to 35.

- `copyTagsToSnapshot`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Set to `true` to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwise `false` .

  The default is `false` .

- `dbClusterIdentifier`: string — The cluster identifier. 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`

- `dbClusterParameterGroupName`: string — The name of the cluster parameter group to associate with this cluster.

- `dbSubnetGroupName`: string — A subnet group to associate with this cluster.

  Constraints: Must match the name of an existing `DBSubnetGroup` . Must not be default.

  Example: `mySubnetgroup`

- `deletionProtection`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Protects clusters from being accidentally deleted.

  If enabled, the cluster cannot be deleted unless it is modified and `DeletionProtection` is disabled.

- `enableCloudwatchLogsExports`: string[] — The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.

  You can enable audit logs or profiler logs. For more information, see [Auditing Amazon DocumentDB Events](https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html) and [Profiling Amazon DocumentDB Operations](https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html) .

- `engineVersion`: string — The version number of the database engine to use.

  The `--engine-version` will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.

  If you intend to trigger an in-place upgrade, please refer to [Amazon DocumentDB in-place major version upgrade](https://docs.aws.amazon.com/documentdb/latest/developerguide/docdb-mvu.html) . Note that for an in-place engine version upgrade, you need to remove other cluster properties changes (e.g. SecurityGroupId) from the CFN template.

- `globalClusterIdentifier`: string — The cluster identifier of the new global cluster.

- `kmsKeyId`: string — The AWS key identifier for an encrypted cluster.

  The AWS  key identifier is the Amazon Resource Name (ARN) for the AWS  encryption key. If you are creating a cluster using the same AWS account that owns the AWS  encryption key that is used to encrypt the new cluster, you can use the AWS  key alias instead of the ARN for the AWS  encryption key.

  If an encryption key is not specified in `KmsKeyId` :

  - If the `StorageEncrypted` parameter is `true` , Amazon DocumentDB uses your default encryption key.

  AWS  creates the default encryption key for your AWS account . Your AWS account has a different default encryption key for each AWS Regions .

- `manageMasterUserPassword`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.

  Constraint: You can't manage the master user password with Amazon Web Services Secrets Manager if `MasterUserPassword` is specified.

- `masterUsername`: string — The name of the master user for the cluster.

  Constraints:

  - Must be from 1 to 63 letters or numbers.
  - The first character must be a letter.
  - Cannot be a reserved word for the chosen database engine.

- `masterUserPassword`: string — The password for the master database user.

  This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).

  Constraints: Must contain from 8 to 100 characters.

- `masterUserSecretKmsKeyId`: string — The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.

  This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the DB cluster.

  The 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 you don't specify `MasterUserSecretKmsKeyId` , then the `aws/secretsmanager` KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the `aws/secretsmanager` KMS key to encrypt the secret, and you must use a customer managed KMS key.

  There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.

- `networkType`: string — The network type of the cluster.

  The network type is determined by the `DBSubnetGroup` specified for the cluster. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and the IPv6 protocols ( `DUAL` ).

  For more information, see [DocumentDB clusters in a VPC](https://docs.aws.amazon.com/documentdb/latest/developerguide/vpc-clusters.html) in the Amazon DocumentDB Developer Guide.

  Valid Values: `IPV4` | `DUAL`

- `port`: number — Specifies the port that the database engine is listening on.

- `preferredBackupWindow`: string — The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter.

  The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region .

  Constraints:

  - Must be in the format `hh24:mi-hh24:mi` .
  - Must be in Universal Coordinated Time (UTC).
  - Must not conflict with the preferred maintenance window.
  - Must be at least 30 minutes.

- `preferredMaintenanceWindow`: string — The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

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

  The default is 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.

- `restoreToTime`: string — The date and time to restore the cluster to.

  Valid values: A time in Universal Coordinated Time (UTC) format.

  Constraints:

  - Must be before the latest restorable time for the instance.
  - Must be specified if the `UseLatestRestorableTime` parameter is not provided.
  - Cannot be specified if the `UseLatestRestorableTime` parameter is `true` .
  - Cannot be specified if the `RestoreType` parameter is `copy-on-write` .

  Example: `2015-03-07T23:45:00Z`

- `restoreType`: string — The type of restore to be performed. You can specify one of the following values:.

  - `full-copy` - The new DB cluster is restored as a full copy of the source DB cluster.
  - `copy-on-write` - The new DB cluster is restored as a clone of the source DB cluster.

  Constraints: You can't specify `copy-on-write` if the engine version of the source DB cluster is earlier than 1.11.

  If you don't specify a `RestoreType` value, then the new DB cluster is restored as a full copy of the source DB cluster.

- `rotateMasterUserPassword`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.

  This setting is valid only if the master user password is managed by Amazon DocumentDB in Amazon Web Services Secrets Manager for the cluster. The secret value contains the updated password.

  Constraint: You must apply the change immediately when rotating the master user password.

- `serverlessV2ScalingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDBCluster.ServerlessV2ScalingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_docdb.CfnDBCluster.ServerlessV2ScalingConfigurationProperty.html) — Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.

- `snapshotIdentifier`: string — The identifier for the snapshot or cluster snapshot to restore from.

  You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.

  Constraints:

  - Must match the identifier of an existing snapshot.

- `sourceDbClusterIdentifier`: string — The identifier of the source cluster from which to restore.

  Constraints:

  - Must match the identifier of an existing `DBCluster` .

- `storageEncrypted`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether the cluster is encrypted.

  If you specify `SourceDBClusterIdentifier` or `SnapshotIdentifier` and don’t specify `StorageEncrypted` , the encryption property is inherited from the source cluster or snapshot (unless `KMSKeyId` is specified, in which case the restored cluster will be encrypted with that KMS key). If the source is encrypted and `StorageEncrypted` is specified to be true, the restored cluster will be encrypted (if you want to use a different KMS key, specify the `KMSKeyId` property as well). If the source is unencrypted and `StorageEncrypted` is specified to be true, then the `KMSKeyId` property must be specified. If the source is encrypted, don’t specify `StorageEncrypted` to be false as opting out of encryption is not allowed.

- `storageType`: string — The storage type to associate with the DB cluster.

  For information on storage types for Amazon DocumentDB clusters, see Cluster storage configurations in the *Amazon DocumentDB Developer Guide* .

  Valid values for storage type - `standard | iopt1`

  Default value is `standard`

  > When you create an Amazon DocumentDB cluster with the storage type set to `iopt1` , the storage type is returned in the response. The storage type isn't returned when you set it to `standard` .

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags to be assigned to the cluster.

- `useLatestRestorableTime`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise.

  Default: `false`

  Constraints: Cannot be specified if the `RestoreToTime` parameter is provided.

- `vpcSecurityGroupIds`: string[] — A list of EC2 VPC security groups to associate with this cluster.

## Properties

- `attrClusterResourceId`: string — The resource id for the cluster;

  for example: `cluster-ABCD1234EFGH5678IJKL90MNOP` . The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.

- `attrEndpoint`: string — The connection endpoint for the cluster, such as `sample-cluster.cluster-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com` .

- `attrId`: string

- `attrPort`: string — The port number on which the cluster accepts connections.

  For example: `27017` .

- `attrReadEndpoint`: string — The reader endpoint for the cluster.

  For example: `sample-cluster.cluster-ro-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com` .

- `availabilityZones`: string[] — A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.

- `backupRetentionPeriod`: number — The number of days for which automated backups are retained.

  You must specify a minimum value of 1.

- `CFN_RESOURCE_TYPE_NAME`: string (static) — The CloudFormation resource type name for this resource class.

- `cfnOptions`: [ICfnResourceOptions](/cdk/api/v2/docs/aws-cdk-lib.ICfnResourceOptions.html) — Options for this resource, such as condition, update policy etc.

- `cfnResourceType`: string — AWS resource type.

- `copyTagsToSnapshot`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Set to `true` to copy all tags from the source cluster snapshot to the target cluster snapshot, and otherwise `false` .

- `creationStack`: string[]

- `dbClusterIdentifier`: string — The cluster identifier.

  This parameter is stored as a lowercase string.

- `dbClusterParameterGroupName`: string — The name of the cluster parameter group to associate with this cluster.

- `dbClusterRef`: [DBClusterReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_docdb.DBClusterReference.html) — A reference to a DBCluster resource.

- `dbSubnetGroupName`: string — A subnet group to associate with this cluster.

- `deletionProtection`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Protects clusters from being accidentally deleted.

- `enableCloudwatchLogsExports`: string[] — The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.

- `engineVersion`: string — The version number of the database engine to use.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html)

- `globalClusterIdentifier`: string — The cluster identifier of the new global cluster.

- `kmsKeyId`: string — The AWS key identifier for an encrypted cluster.

- `logicalId`: string — The logical ID for this CloudFormation stack element.

  The logical ID of the element
  is calculated from the path of the resource node in the construct tree.

  To override this value, use `overrideLogicalId(newLogicalId)`.

- `manageMasterUserPassword`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.

- `masterUsername`: string — The name of the master user for the cluster.

- `masterUserPassword`: string — The password for the master database user.

- `masterUserSecretKmsKeyId`: string — The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.

- `networkType`: string — The network type of the cluster.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `port`: number — Specifies the port that the database engine is listening on.

- `preferredBackupWindow`: string — The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter.

- `preferredMaintenanceWindow`: string — The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).

- `ref`: string — Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

  If, by any chance, the intrinsic reference of a resource is not a string, you could
  coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.

- `restoreToTime`: string — The date and time to restore the cluster to.

- `restoreType`: string — The type of restore to be performed.

  You can specify one of the following values:.

- `rotateMasterUserPassword`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to rotate the secret managed by Amazon Web Services Secrets Manager for the master user password.

- `serverlessV2ScalingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDBCluster.ServerlessV2ScalingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_docdb.CfnDBCluster.ServerlessV2ScalingConfigurationProperty.html) — Contains the scaling configuration of an Amazon DocumentDB Serverless cluster.

- `snapshotIdentifier`: string — The identifier for the snapshot or cluster snapshot to restore from.

- `sourceDbClusterIdentifier`: string — The identifier of the source cluster from which to restore.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this element is defined.

  CfnElements must be defined within a stack scope (directly or indirectly).

- `storageEncrypted`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether the cluster is encrypted.

- `storageType`: string — The storage type to associate with the DB cluster.

- `tags`: [TagManager](/cdk/api/v2/docs/aws-cdk-lib.TagManager.html) — Tag Manager which manages the tags for this resource.

- `tagsRaw`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags to be assigned to the cluster.

- `useLatestRestorableTime`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise.

- `vpcSecurityGroupIds`: string[] — A list of EC2 VPC security groups to associate with this cluster.

## Methods

- `addDeletionOverride(path: string): void` — Syntactic sugar for `addOverride(path, undefined)`.

  **Parameters**

  - `path` — The path of the value to delete.

- `addDependency(target: CfnResource): void` — Use `addResourceDependency` instead.

  This method has been renamed to `addResourceDependency` to more clearly
  set it apart from `construct.node.addDependency`. See the documentation
  of that function for more details.

- `addDependsOn(target: CfnResource): void` — Use `addResourceDependency` instead.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method has been renamed to `addResourceDependency`, which makes it
  more clear that this method operates at a different level from the
  construct-level `construct.node.addDependency()` mechanism.

- `addMetadata(key: string, value: any): void` — Add a value to the CloudFormation Resource Metadata.

- `addOverride(path: string, value: any): void` — Adds an override to the synthesized CloudFormation resource.

  To add a
  property override, either use `addPropertyOverride` or prefix `path` with
  "Properties." (i.e. `Properties.TopicName`).

  If the override is nested, separate each nested level using a dot (.) in the path parameter.
  If there is an array as part of the nesting, specify the index in the path.

  To include a literal `.` in the property name, prefix with a `\`. In most
  programming languages you will need to write this as `"\\."` because the
  `\` itself will need to be escaped.

  For example,
  ```typescript
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
  ```
  would add the overrides
  ```json
  "Properties": {
    "GlobalSecondaryIndexes": [
      {
        "Projection": {
          "NonKeyAttributes": [ "myattribute" ]
          ...
        }
        ...
      },
      {
        "ProjectionType": "INCLUDE"
        ...
      },
    ]
    ...
  }
  ```

  The `value` argument to `addOverride` will not be processed or translated
  in any way. Pass raw JSON values in here with the correct capitalization
  for CloudFormation. If you pass CDK classes or structs, they will be
  rendered with lowercased key names, and CloudFormation will reject the
  template.

  **Parameters**

  - `path` — - The path of the property, you can use dot notation to override values in complex types.
  - `value` — - The value.

- `addPropertyDeletionOverride(propertyPath: string): void` — Adds an override that deletes the value of a property from the resource definition.

  **Parameters**

  - `propertyPath` — The path to the property.

- `addPropertyOverride(propertyPath: string, value: any): void` — Adds an override to a resource property.

  Syntactic sugar for `addOverride("Properties.<...>", value)`.

  **Parameters**

  - `propertyPath` — The path of the property.
  - `value` — The value.

- `addResourceDependency(target: CfnResource, reason?: string): void` — Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method only adds dependencies between L1 resources. If you are
  looking for a generic construct-to-construct dependency mechanism that works
  for all constructs including L2s, use `construct.node.addDependency` instead.

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — Sets the cross-stack reference strength for this resource.

  When set, any cross-stack reference to this resource will use the specified
  strength instead of the global default from the consuming stack's context.

  **Parameters**

  - `strength` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void` — Sets the deletion policy of the resource based on the removal policy specified.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
  cases, a snapshot can be taken of the resource prior to deletion
  (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
  can be found in the following link:

- `cfnPropertyName(cdkPropertyName: string): string`

- `getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference` — Returns a token for an runtime attribute of this resource.

  Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
  in case there is no generated attribute.

  **Parameters**

  - `attributeName` — The name of the attribute.

- `getMetadata(key: string): any` — Retrieve a value value from the CloudFormation Resource Metadata.

- `inspect(inspector: TreeInspector): void` — Examines the CloudFormation resource and discloses attributes.

  **Parameters**

  - `inspector` — tree inspector to collect and process attributes.

- `isCfnDBCluster(x: any): boolean` (static) — Checks whether the given object is a CfnDBCluster.

- `isCfnElement(x: any): boolean` (static) — Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

  Uses duck-typing instead of `instanceof` to allow stack elements from different
  versions of this library to be included in the same stack.

  **Returns:** The construct as a stack element or undefined if it is not a stack element.

- `isCfnResource(x: any): boolean` (static) — Check whether the given object is a CfnResource.

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `obtainDependencies(): Stack | CfnResource[]` — Retrieves an array of resources and stacks this resource depends on.

  For resources depended on directly, returns the `CfnResource` object. For
  dependencies on other stacks, returns the `Stack` object. The order of the
  array is not guaranteed.

- `overrideLogicalId(newLogicalId: string): void` — Overrides the auto-generated logical ID with a specific ID.

  **Parameters**

  - `newLogicalId` — The new logical ID to use for this stack element.

- `removeDependency(target: CfnResource): void` — Use `removeResourceDependency` instead

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `removeResourceDependency(target: CfnResource): void` — Indicates that this resource no longer depends on another resource.

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `replaceDependency(target: CfnResource, newTarget: CfnResource): void` — Replaces one dependency with another.

  **Parameters**

  - `target` — The dependency to replace.
  - `newTarget` — The new dependency to add.

- `toString(): string` — Returns a string representation of this construct.

  **Returns:** a string representation of this resource

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.
