# CfnServer

Instantiates an auto-scaling virtual server based on the selected file transfer protocol in AWS .

When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated `ServerId` property that is assigned to the newly created server.

Extends: Construct › CfnElement › CfnRefElement › CfnResource › CfnServer
Implements: IInspectable, ITaggable, IEnvironmentAware, IServerRef, IConstruct, IDependable

- CloudFormation: [`AWS::Transfer::Server`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-transfer-server.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_transfer as transfer } from 'aws-cdk-lib';
const cfnServer = new transfer.CfnServer(this, 'MyCfnServer', /* all optional props */ {
  certificate: 'certificate',
  domain: 'domain',
  endpointDetails: {
    addressAllocationIds: ['addressAllocationIds'],
    securityGroupIds: ['securityGroupIds'],
    subnetIds: ['subnetIds'],
    vpcEndpointId: 'vpcEndpointId',
    vpcId: 'vpcId',
  },
  endpointType: 'endpointType',
  identityProviderDetails: {
    directoryId: 'directoryId',
    function: 'function',
    invocationRole: 'invocationRole',
    sftpAuthenticationMethods: 'sftpAuthenticationMethods',
    url: 'url',
  },
  identityProviderType: 'identityProviderType',
  ipAddressType: 'ipAddressType',
  loggingRole: 'loggingRole',
  postAuthenticationLoginBanner: 'postAuthenticationLoginBanner',
  preAuthenticationLoginBanner: 'preAuthenticationLoginBanner',
  protocolDetails: {
    as2Transports: ['as2Transports'],
    passiveIp: 'passiveIp',
    proxyConfig: {
      sftpMode: 'sftpMode',
    },
    setStatOption: 'setStatOption',
    tlsSessionResumptionMode: 'tlsSessionResumptionMode',
  },
  protocols: ['protocols'],
  s3StorageOptions: {
    directoryListingOptimization: 'directoryListingOptimization',
  },
  securityPolicyName: 'securityPolicyName',
  structuredLogDestinations: ['structuredLogDestinations'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  workflowDetails: {
    onPartialUpload: [{
      executionRole: 'executionRole',
      workflowId: 'workflowId',
    }],
    onUpload: [{
      executionRole: 'executionRole',
      workflowId: 'workflowId',
    }],
  },
});
```

## Initializer

```ts
new CfnServer(scope: Construct, id: string, props?: CfnServerProps)
```

## Construct Props

- `certificate`: string — The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when `Protocols` is set to `FTPS` .

  To request a new public certificate, see [Request a public certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html) in the *Certificate Manager User Guide* .

  To import an existing certificate into ACM, see [Importing certificates into ACM](https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) in the *Certificate Manager User Guide* .

  To request a private certificate to use FTPS through private IP addresses, see [Request a private certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) in the *Certificate Manager User Guide* .

  Certificates with the following cryptographic algorithms and key sizes are supported:

  - 2048-bit RSA (RSA_2048)
  - 4096-bit RSA (RSA_4096)
  - Elliptic Prime Curve 256 bit (EC_prime256v1)
  - Elliptic Prime Curve 384 bit (EC_secp384r1)
  - Elliptic Prime Curve 521 bit (EC_secp521r1)

  > The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.

- `domain`: string — Specifies the domain of the storage system that is used for file transfers.

  There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.

- `endpointDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.EndpointDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.EndpointDetailsProperty.html) — The virtual private cloud (VPC) endpoint settings that are configured for your server.

  When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.

- `endpointType`: string — The type of endpoint that you want your server to use.

  You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.

  > After May 19, 2021, you won't be able to create a server using `EndpointType=VPC_ENDPOINT` in your AWS account if your account hasn't already done so before May 19, 2021. If you have already created servers with `EndpointType=VPC_ENDPOINT` in your AWS account on or before May 19, 2021, you will not be affected. After this date, use `EndpointType` = `VPC` .
  >
  > For more information, see [Discontinuing the use of VPC_ENDPOINT](https://docs.aws.amazon.com//transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint) .
  >
  > It is recommended that you use `VPC` as the `EndpointType` . With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with `EndpointType` set to `VPC_ENDPOINT` .

- `identityProviderDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.IdentityProviderDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.IdentityProviderDetailsProperty.html) — Required when `IdentityProviderType` is set to `AWS_DIRECTORY_SERVICE` , `AWS _LAMBDA` or `API_GATEWAY` .

  Accepts an array containing all of the information required to use a directory in `AWS_DIRECTORY_SERVICE` or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when `IdentityProviderType` is set to `SERVICE_MANAGED` .

- `identityProviderType`: string — The mode of authentication for a server.

  The default value is `SERVICE_MANAGED` , which allows you to store and access user credentials within the AWS Transfer Family service.

  Use `AWS_DIRECTORY_SERVICE` to provide access to Active Directory groups in AWS Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in AWS using AD Connector. This option also requires you to provide a Directory ID by using the `IdentityProviderDetails` parameter.

  Use the `API_GATEWAY` value to integrate with an identity provider of your choosing. The `API_GATEWAY` setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the `IdentityProviderDetails` parameter.

  Use the `AWS_LAMBDA` value to directly use an AWS Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the `Function` parameter for the `IdentityProviderDetails` data type.

- `ipAddressType`: string — Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your AWS Transfer Family endpoint.

  The default value is `IPV4` .

  > The `IpAddressType` parameter has the following limitations:
  >
  > - It cannot be changed while the server is online. You must stop the server before modifying this parameter.
  > - It cannot be updated to `DUALSTACK` if the server has `AddressAllocationIds` specified. > When using `DUALSTACK` as the `IpAddressType` , you cannot set the `AddressAllocationIds` parameter for the [EndpointDetails](https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html) for the server.

- `loggingRole`: string — The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events.

  When set, you can view user activity in your CloudWatch logs.

- `postAuthenticationLoginBanner`: string — Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.

  > The SFTP protocol does not support post-authentication display banners.

- `preAuthenticationLoginBanner`: string — Specifies a string to display when users connect to a server.

  This string is displayed before the user authenticates. For example, the following banner displays details about using the system:

  `This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.`

- `protocolDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.ProtocolDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.ProtocolDetailsProperty.html) — The protocol settings that are configured for your server.

  - To indicate passive mode (for FTP and FTPS protocols), use the `PassiveIp` parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
  - To ignore the error that is generated when the client attempts to use the `SETSTAT` command on a file that you are uploading to an Amazon S3 bucket, use the `SetStatOption` parameter. To have the AWS Transfer Family server ignore the `SETSTAT` command and upload files without needing to make any changes to your SFTP client, set the value to `ENABLE_NO_OP` . If you set the `SetStatOption` parameter to `ENABLE_NO_OP` , Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a `SETSTAT` call.
  - To determine whether your AWS Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the `TlsSessionResumptionMode` parameter.
  - `As2Transports` indicates the transport method for the AS2 messages. Currently, only HTTP is supported.

  The `Protocols` parameter is an array of strings.

  *Allowed values* : One or more of `SFTP` , `FTPS` , `FTP` , `AS2`

- `protocols`: string[] — Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.

  The available protocols are:

  - `SFTP` (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
  - `FTPS` (File Transfer Protocol Secure): File transfer with TLS encryption
  - `FTP` (File Transfer Protocol): Unencrypted file transfer
  - `AS2` (Applicability Statement 2): used for transporting structured business-to-business data

  > - If you select `FTPS` , you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.
  > - If `Protocol` includes either `FTP` or `FTPS` , then the `EndpointType` must be `VPC` and the `IdentityProviderType` must be either `AWS_DIRECTORY_SERVICE` , `AWS_LAMBDA` , or `API_GATEWAY` .
  > - If `Protocol` includes `FTP` , then `AddressAllocationIds` cannot be associated.
  > - If `Protocol` is set only to `SFTP` , the `EndpointType` can be set to `PUBLIC` and the `IdentityProviderType` can be set any of the supported identity types: `SERVICE_MANAGED` , `AWS_DIRECTORY_SERVICE` , `AWS_LAMBDA` , or `API_GATEWAY` .
  > - If `Protocol` includes `AS2` , then the `EndpointType` must be `VPC` , and domain must be Amazon S3.

  The `Protocols` parameter is an array of strings.

  *Allowed values* : One or more of `SFTP` , `FTPS` , `FTP` , `AS2`

- `s3StorageOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.S3StorageOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.S3StorageOptionsProperty.html) — Specifies whether or not performance for your Amazon S3 directories is optimized.

  - If using the console, this is enabled by default.
  - If using the API or CLI, this is disabled by default.

  By default, home directory mappings have a `TYPE` of `DIRECTORY` . If you enable this option, you would then need to explicitly set the `HomeDirectoryMapEntry` `Type` to `FILE` if you want a mapping to have a file target.

- `securityPolicyName`: string — Specifies the name of the security policy for the server.

- `structuredLogDestinations`: string[] — Specifies the log groups to which your server logs are sent.

  To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:

  `arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*`

  For example, `arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*`

  If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an `update-server` call. For example:

  `update-server --server-id s-1234567890abcdef0 --structured-log-destinations`

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Key-value pairs that can be used to group and search for servers.

- `workflowDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.WorkflowDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.WorkflowDetailsProperty.html) — Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.

  In addition to a workflow to execute when a file is uploaded completely, `WorkflowDetails` can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when a file is open when the session disconnects.

## Properties

- `attrArn`: string (required) — Specifies the unique Amazon Resource Name (ARN) of the server.

- `attrAs2ServiceManagedEgressIpAddresses`: string[] (required) — The list of egress IP addresses of this server.

  These IP addresses are only relevant for servers that use the AS2 protocol. They are used for sending asynchronous MDNs.

  These IP addresses are assigned automatically when you create an AS2 server. Additionally, if you update an existing server and add the AS2 protocol, static IP addresses are assigned as well.

- `attrServerId`: string (required) — Specifies the unique system-assigned identifier for a server that you instantiate.

- `attrState`: string (required) — The condition of the server that was described.

  A value of `ONLINE` indicates that the server can accept jobs and transfer files. A `State` value of `OFFLINE` means that the server cannot perform file transfer operations.

  The states of `STARTING` and `STOPPING` indicate that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of `START_FAILED` or `STOP_FAILED` can indicate an error condition.

- `certificate`: string — The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate.

  Required when `Protocols` is set to `FTPS` .

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

- `creationStack`: string[] (required)

- `domain`: string — Specifies the domain of the storage system that is used for file transfers.

- `endpointDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.EndpointDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.EndpointDetailsProperty.html) — The virtual private cloud (VPC) endpoint settings that are configured for your server.

- `endpointType`: string — The type of endpoint that you want your server to use.

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

- `identityProviderDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.IdentityProviderDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.IdentityProviderDetailsProperty.html) — Required when `IdentityProviderType` is set to `AWS_DIRECTORY_SERVICE` , `AWS _LAMBDA` or `API_GATEWAY` .

- `identityProviderType`: string — The mode of authentication for a server.

- `ipAddressType`: string — Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your AWS Transfer Family endpoint.

- `loggingRole`: string — The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events.

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

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

- `postAuthenticationLoginBanner`: string — Specifies a string to display when users connect to a server.

  This string is displayed after the user authenticates.

- `preAuthenticationLoginBanner`: string — Specifies a string to display when users connect to a server.

- `protocolDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.ProtocolDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.ProtocolDetailsProperty.html) — The protocol settings that are configured for your server.

- `protocols`: string[] — Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.

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

- `s3StorageOptions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.S3StorageOptionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.S3StorageOptionsProperty.html) — Specifies whether or not performance for your Amazon S3 directories is optimized.

- `securityPolicyName`: string — Specifies the name of the security policy for the server.

- `serverRef`: [ServerReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_transfer.ServerReference.html) (required) — A reference to a Server resource.

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

- `structuredLogDestinations`: string[] — Specifies the log groups to which your server logs are sent.

- `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)[] — Key-value pairs that can be used to group and search for servers.

- `workflowDetails`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServer.WorkflowDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnServer.WorkflowDetailsProperty.html) — Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.

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

- `arnForServer(resource: IServerRef): string` (static)

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

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

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

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