# CfnDomain

The AWS::Elasticsearch::Domain resource creates an Amazon OpenSearch Service domain.

> The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and legacy Elasticsearch. For instructions to upgrade domains defined within CloudFormation from Elasticsearch to OpenSearch, see [Remarks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html#aws-resource-opensearchservice-domain--remarks) .

Extends: Construct › CfnElement › CfnRefElement › CfnResource › CfnDomain
Implements: IInspectable, ITaggable, IEnvironmentAware, IDomainRef, IConstruct, IDependable

- CloudFormation: [`AWS::Elasticsearch::Domain`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticsearch-domain.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_elasticsearch as elasticsearch } from 'aws-cdk-lib';

declare const accessPolicies: any;
const cfnDomain = new elasticsearch.CfnDomain(this, 'MyCfnDomain', /* all optional props */ {
  accessPolicies: accessPolicies,
  advancedOptions: {
    advancedOptionsKey: 'advancedOptions',
  },
  advancedSecurityOptions: {
    anonymousAuthEnabled: false,
    enabled: false,
    internalUserDatabaseEnabled: false,
    masterUserOptions: {
      masterUserArn: 'masterUserArn',
      masterUserName: 'masterUserName',
      masterUserPassword: 'masterUserPassword',
    },
  },
  cognitoOptions: {
    enabled: false,
    identityPoolId: 'identityPoolId',
    roleArn: 'roleArn',
    userPoolId: 'userPoolId',
  },
  domainArn: 'domainArn',
  domainEndpointOptions: {
    customEndpoint: 'customEndpoint',
    customEndpointCertificateArn: 'customEndpointCertificateArn',
    customEndpointEnabled: false,
    enforceHttps: false,
    tlsSecurityPolicy: 'tlsSecurityPolicy',
  },
  domainName: 'domainName',
  ebsOptions: {
    ebsEnabled: false,
    iops: 123,
    volumeSize: 123,
    volumeType: 'volumeType',
  },
  elasticsearchClusterConfig: {
    coldStorageOptions: {
      enabled: false,
    },
    dedicatedMasterCount: 123,
    dedicatedMasterEnabled: false,
    dedicatedMasterType: 'dedicatedMasterType',
    instanceCount: 123,
    instanceType: 'instanceType',
    warmCount: 123,
    warmEnabled: false,
    warmType: 'warmType',
    zoneAwarenessConfig: {
      availabilityZoneCount: 123,
    },
    zoneAwarenessEnabled: false,
  },
  elasticsearchVersion: 'elasticsearchVersion',
  encryptionAtRestOptions: {
    enabled: false,
    kmsKeyId: 'kmsKeyId',
  },
  logPublishingOptions: {
    logPublishingOptionsKey: {
      cloudWatchLogsLogGroupArn: 'cloudWatchLogsLogGroupArn',
      enabled: false,
    },
  },
  nodeToNodeEncryptionOptions: {
    enabled: false,
  },
  snapshotOptions: {
    automatedSnapshotStartHour: 123,
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcOptions: {
    securityGroupIds: ['securityGroupIds'],
    subnetIds: ['subnetIds'],
  },
});
```

## Initializer

```ts
new CfnDomain(scope: Construct, id: string, props?: CfnDomainProps)
```

## Construct Props

- `accessPolicies`: any — An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.

  For more information, see [Configuring access policies](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ac.html#ac-creating) in the *Amazon OpenSearch Service Developer Guid* e.

- `advancedOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — Additional options to specify for the OpenSearch Service domain.

  For more information, see [Advanced cluster parameters](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) in the *Amazon OpenSearch Service Developer Guide* .

- `advancedSecurityOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.AdvancedSecurityOptionsInputProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.AdvancedSecurityOptionsInputProperty.html) — Specifies options for fine-grained access control.

- `cognitoOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.CognitoOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.CognitoOptionsProperty.html) — Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.

- `domainArn`: string

- `domainEndpointOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.DomainEndpointOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.DomainEndpointOptionsProperty.html) — Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.

- `domainName`: string — A name for the OpenSearch Service domain.

  For valid values, see the [DomainName](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html#configuration-api-datatypes-domainname) data type in the *Amazon OpenSearch Service Developer Guide* . If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the domain name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .

  > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

- `ebsOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.EBSOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.EBSOptionsProperty.html) — The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.

  For more information, see [EBS volume size limits](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/limits.html#ebsresource) in the *Amazon OpenSearch Service Developer Guide* .

- `elasticsearchClusterConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.ElasticsearchClusterConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.ElasticsearchClusterConfigProperty.html) — ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.

- `elasticsearchVersion`: string — The version of Elasticsearch to use, such as 2.3. If not specified, 1.5 is used as the default. For information about the versions that OpenSearch Service supports, see [Supported versions of OpenSearch and Elasticsearch](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/what-is.html#choosing-version) in the *Amazon OpenSearch Service Developer Guide* .

  If you set the [EnableVersionUpgrade](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain) update policy to `true` , you can update `ElasticsearchVersion` without interruption. When `EnableVersionUpgrade` is set to `false` , or is not specified, updating `ElasticsearchVersion` results in [replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) .

- `encryptionAtRestOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.EncryptionAtRestOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.EncryptionAtRestOptionsProperty.html) — Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.

  See [Encryption of data at rest for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html) .

- `logPublishingOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.LogPublishingOptionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.LogPublishingOptionProperty.html) } — An object with one or more of the following keys: `SEARCH_SLOW_LOGS` , `ES_APPLICATION_LOGS` , `INDEX_SLOW_LOGS` , `AUDIT_LOGS` , depending on the types of logs you want to publish.

  Each key needs a valid `LogPublishingOption` value.

- `nodeToNodeEncryptionOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.NodeToNodeEncryptionOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.NodeToNodeEncryptionOptionsProperty.html) — Specifies whether node-to-node encryption is enabled.

  See [Node-to-node encryption for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ntn.html) .

- `snapshotOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.SnapshotOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.SnapshotOptionsProperty.html) — *DEPRECATED* .

  The automated snapshot configuration for the OpenSearch Service domain indices.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.

- `vpcOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.VPCOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.VPCOptionsProperty.html) — The virtual private cloud (VPC) configuration for the OpenSearch Service domain.

  For more information, see [Launching your Amazon OpenSearch Service domains within a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html) in the *Amazon OpenSearch Service Developer Guide* .

## Properties

- `accessPolicies`: any (required) — An AWS Identity and Access Management ( IAM ) policy document that specifies who can access the OpenSearch Service domain and their permissions.

- `advancedOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — Additional options to specify for the OpenSearch Service domain.

- `advancedSecurityOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.AdvancedSecurityOptionsInputProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.AdvancedSecurityOptionsInputProperty.html) — Specifies options for fine-grained access control.

- `attrArn`: string (required) — The Amazon Resource Name (ARN) of the domain, such as `arn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij` .

  This returned value is the same as the one returned by `AWS::Elasticsearch::Domain.DomainArn` .

- `attrDomainEndpoint`: string (required) — The domain-specific endpoint that's used for requests to the OpenSearch APIs, such as `search-mystack-elasti-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm.us-west-1.es.amazonaws.com` .

- `attrId`: string (required)

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

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

- `cfnResourceType`: string (required) — AWS resource type.

- `cognitoOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.CognitoOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.CognitoOptionsProperty.html) — Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.

- `creationStack`: string[] (required)

- `domainArn`: string

- `domainEndpointOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.DomainEndpointOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.DomainEndpointOptionsProperty.html) — Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.

- `domainName`: string — A name for the OpenSearch Service domain.

- `domainRef`: [DomainReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_elasticsearch.DomainReference.html) (required) — A reference to a Domain resource.

- `ebsOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.EBSOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.EBSOptionsProperty.html) — The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain.

- `elasticsearchClusterConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.ElasticsearchClusterConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.ElasticsearchClusterConfigProperty.html) — ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.

- `elasticsearchVersion`: string — The version of Elasticsearch to use, such as 2.3. If not specified, 1.5 is used as the default. For information about the versions that OpenSearch Service supports, see [Supported versions of OpenSearch and Elasticsearch](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/what-is.html#choosing-version) in the *Amazon OpenSearch Service Developer Guide* .

- `encryptionAtRestOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.EncryptionAtRestOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.EncryptionAtRestOptionsProperty.html) — Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.

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

- `logicalId`: string (required) — 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)`.

- `logPublishingOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.LogPublishingOptionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.LogPublishingOptionProperty.html) } — An object with one or more of the following keys: `SEARCH_SLOW_LOGS` , `ES_APPLICATION_LOGS` , `INDEX_SLOW_LOGS` , `AUDIT_LOGS` , depending on the types of logs you want to publish.

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

- `nodeToNodeEncryptionOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.NodeToNodeEncryptionOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.NodeToNodeEncryptionOptionsProperty.html) — Specifies whether node-to-node encryption is enabled.

- `ref`: string (required) — 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 })`.

- `snapshotOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.SnapshotOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.SnapshotOptionsProperty.html) — *DEPRECATED* .

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

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

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

- `tagsRaw`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.

- `vpcOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomain.VPCOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.CfnDomain.VPCOptionsProperty.html) — The virtual private cloud (VPC) configuration for the OpenSearch Service domain.

## 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:

- `arnForDomain(resource: IDomainRef): string` (static)

- `cfnPropertyName(cdkPropertyName: string): string`

- `fromDomainArn(scope: Construct, id: string, arn: string): IDomainRef` (static) — Creates a new IDomainRef from an ARN.

- `fromDomainName(scope: Construct, id: string, domainName: string): IDomainRef` (static) — Creates a new IDomainRef from a domainName.

- `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.

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

- `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.
