Skip to content
v2.273.0

CfnServer L1 construct ​

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.

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',
    }],
  },
});
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_transfer as transfer

cfn_server = transfer.CfnServer(self, "MyCfnServer",
    certificate="certificate",
    domain="domain",
    endpoint_details=transfer.CfnServer.EndpointDetailsProperty(
        address_allocation_ids=["addressAllocationIds"],
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"],
        vpc_endpoint_id="vpcEndpointId",
        vpc_id="vpcId"
    ),
    endpoint_type="endpointType",
    identity_provider_details=transfer.CfnServer.IdentityProviderDetailsProperty(
        directory_id="directoryId",
        function="function",
        invocation_role="invocationRole",
        sftp_authentication_methods="sftpAuthenticationMethods",
        url="url"
    ),
    identity_provider_type="identityProviderType",
    ip_address_type="ipAddressType",
    logging_role="loggingRole",
    post_authentication_login_banner="postAuthenticationLoginBanner",
    pre_authentication_login_banner="preAuthenticationLoginBanner",
    protocol_details=transfer.CfnServer.ProtocolDetailsProperty(
        as2_transports=["as2Transports"],
        passive_ip="passiveIp",
        proxy_config=transfer.CfnServer.ProxyConfigProperty(
            sftp_mode="sftpMode"
        ),
        set_stat_option="setStatOption",
        tls_session_resumption_mode="tlsSessionResumptionMode"
    ),
    protocols=["protocols"],
    s3_storage_options=transfer.CfnServer.S3StorageOptionsProperty(
        directory_listing_optimization="directoryListingOptimization"
    ),
    security_policy_name="securityPolicyName",
    structured_log_destinations=["structuredLogDestinations"],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    workflow_details=transfer.CfnServer.WorkflowDetailsProperty(
        on_partial_upload=[transfer.CfnServer.WorkflowDetailProperty(
            execution_role="executionRole",
            workflow_id="workflowId"
        )],
        on_upload=[transfer.CfnServer.WorkflowDetailProperty(
            execution_role="executionRole",
            workflow_id="workflowId"
        )]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.transfer.*;

CfnServer cfnServer = CfnServer.Builder.create(this, "MyCfnServer")
        .certificate("certificate")
        .domain("domain")
        .endpointDetails(EndpointDetailsProperty.builder()
                .addressAllocationIds(List.of("addressAllocationIds"))
                .securityGroupIds(List.of("securityGroupIds"))
                .subnetIds(List.of("subnetIds"))
                .vpcEndpointId("vpcEndpointId")
                .vpcId("vpcId")
                .build())
        .endpointType("endpointType")
        .identityProviderDetails(IdentityProviderDetailsProperty.builder()
                .directoryId("directoryId")
                .function("function")
                .invocationRole("invocationRole")
                .sftpAuthenticationMethods("sftpAuthenticationMethods")
                .url("url")
                .build())
        .identityProviderType("identityProviderType")
        .ipAddressType("ipAddressType")
        .loggingRole("loggingRole")
        .postAuthenticationLoginBanner("postAuthenticationLoginBanner")
        .preAuthenticationLoginBanner("preAuthenticationLoginBanner")
        .protocolDetails(ProtocolDetailsProperty.builder()
                .as2Transports(List.of("as2Transports"))
                .passiveIp("passiveIp")
                .proxyConfig(ProxyConfigProperty.builder()
                        .sftpMode("sftpMode")
                        .build())
                .setStatOption("setStatOption")
                .tlsSessionResumptionMode("tlsSessionResumptionMode")
                .build())
        .protocols(List.of("protocols"))
        .s3StorageOptions(S3StorageOptionsProperty.builder()
                .directoryListingOptimization("directoryListingOptimization")
                .build())
        .securityPolicyName("securityPolicyName")
        .structuredLogDestinations(List.of("structuredLogDestinations"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .workflowDetails(WorkflowDetailsProperty.builder()
                .onPartialUpload(List.of(WorkflowDetailProperty.builder()
                        .executionRole("executionRole")
                        .workflowId("workflowId")
                        .build()))
                .onUpload(List.of(WorkflowDetailProperty.builder()
                        .executionRole("executionRole")
                        .workflowId("workflowId")
                        .build()))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Transfer;

var cfnServer = new CfnServer(this, "MyCfnServer", new CfnServerProps {
    Certificate = "certificate",
    Domain = "domain",
    EndpointDetails = new EndpointDetailsProperty {
        AddressAllocationIds = new [] { "addressAllocationIds" },
        SecurityGroupIds = new [] { "securityGroupIds" },
        SubnetIds = new [] { "subnetIds" },
        VpcEndpointId = "vpcEndpointId",
        VpcId = "vpcId"
    },
    EndpointType = "endpointType",
    IdentityProviderDetails = new IdentityProviderDetailsProperty {
        DirectoryId = "directoryId",
        Function = "function",
        InvocationRole = "invocationRole",
        SftpAuthenticationMethods = "sftpAuthenticationMethods",
        Url = "url"
    },
    IdentityProviderType = "identityProviderType",
    IpAddressType = "ipAddressType",
    LoggingRole = "loggingRole",
    PostAuthenticationLoginBanner = "postAuthenticationLoginBanner",
    PreAuthenticationLoginBanner = "preAuthenticationLoginBanner",
    ProtocolDetails = new ProtocolDetailsProperty {
        As2Transports = new [] { "as2Transports" },
        PassiveIp = "passiveIp",
        ProxyConfig = new ProxyConfigProperty {
            SftpMode = "sftpMode"
        },
        SetStatOption = "setStatOption",
        TlsSessionResumptionMode = "tlsSessionResumptionMode"
    },
    Protocols = new [] { "protocols" },
    S3StorageOptions = new S3StorageOptionsProperty {
        DirectoryListingOptimization = "directoryListingOptimization"
    },
    SecurityPolicyName = "securityPolicyName",
    StructuredLogDestinations = new [] { "structuredLogDestinations" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    WorkflowDetails = new WorkflowDetailsProperty {
        OnPartialUpload = new [] { new WorkflowDetailProperty {
            ExecutionRole = "executionRole",
            WorkflowId = "workflowId"
        } },
        OnUpload = new [] { new WorkflowDetailProperty {
            ExecutionRole = "executionRole",
            WorkflowId = "workflowId"
        } }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnServer := awscdk.Aws_transfer.NewCfnServer(this, jsii.String("MyCfnServer"), &CfnServerProps{
	Certificate: jsii.String("certificate"),
	Domain: jsii.String("domain"),
	EndpointDetails: &EndpointDetailsProperty{
		AddressAllocationIds: []*string{
			jsii.String("addressAllocationIds"),
		},
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		SubnetIds: []*string{
			jsii.String("subnetIds"),
		},
		VpcEndpointId: jsii.String("vpcEndpointId"),
		VpcId: jsii.String("vpcId"),
	},
	EndpointType: jsii.String("endpointType"),
	IdentityProviderDetails: &IdentityProviderDetailsProperty{
		DirectoryId: jsii.String("directoryId"),
		Function: jsii.String("function"),
		InvocationRole: jsii.String("invocationRole"),
		SftpAuthenticationMethods: jsii.String("sftpAuthenticationMethods"),
		Url: jsii.String("url"),
	},
	IdentityProviderType: jsii.String("identityProviderType"),
	IpAddressType: jsii.String("ipAddressType"),
	LoggingRole: jsii.String("loggingRole"),
	PostAuthenticationLoginBanner: jsii.String("postAuthenticationLoginBanner"),
	PreAuthenticationLoginBanner: jsii.String("preAuthenticationLoginBanner"),
	ProtocolDetails: &ProtocolDetailsProperty{
		As2Transports: []*string{
			jsii.String("as2Transports"),
		},
		PassiveIp: jsii.String("passiveIp"),
		ProxyConfig: &ProxyConfigProperty{
			SftpMode: jsii.String("sftpMode"),
		},
		SetStatOption: jsii.String("setStatOption"),
		TlsSessionResumptionMode: jsii.String("tlsSessionResumptionMode"),
	},
	Protocols: []*string{
		jsii.String("protocols"),
	},
	S3StorageOptions: &S3StorageOptionsProperty{
		DirectoryListingOptimization: jsii.String("directoryListingOptimization"),
	},
	SecurityPolicyName: jsii.String("securityPolicyName"),
	StructuredLogDestinations: []*string{
		jsii.String("structuredLogDestinations"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	WorkflowDetails: &WorkflowDetailsProperty{
		OnPartialUpload: []interface{}{
			&WorkflowDetailProperty{
				ExecutionRole: jsii.String("executionRole"),
				WorkflowId: jsii.String("workflowId"),
			},
		},
		OnUpload: []interface{}{
			&WorkflowDetailProperty{
				ExecutionRole: jsii.String("executionRole"),
				WorkflowId: jsii.String("workflowId"),
			},
		},
	},
})

Initializer ​

ts
new CfnServer(scope: Construct, id: string, props?: CfnServerProps)
python
CfnServer(scope: Construct, id: str, props: typing.Optional[CfnServerProps] = None)
java
new CfnServer(Construct scope, String id, CfnServerProps props)
csharp
new CfnServer(Construct scope, string id, CfnServerProps? props = null)
go
NewCfnServer(Scope Construct, Id *string, Props CfnServerProps)

Construct Props ​

certificatestringcertificatestrcertificateStringCertificatestringCertificate*string#
The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when `Protocols` is set to `FTPS` .
notes

To request a new public certificate, see Request a public certificate in the Certificate Manager User Guide .

To import an existing certificate into ACM, see Importing certificates into ACM in the Certificate Manager User Guide .

To request a private certificate to use FTPS through private IP addresses, see Request a private certificate 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.

domainstringdomainstrdomainStringDomainstringDomain*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.

endpointDetailsIResolvable | CfnServer.EndpointDetailsPropertyendpoint_detailstyping.Union[IResolvable, EndpointDetailsProperty]endpointDetailsIResolvableEndpointDetailsIResolvableEndpointDetailsinterface{}#
The virtual private cloud (VPC) endpoint settings that are configured for your server.
notes

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.

endpointTypestringendpoint_typestrendpointTypeStringEndpointTypestringEndpointType*string#
The type of endpoint that you want your server to use.
notes

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 .

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 .

identityProviderDetailsIResolvable | CfnServer.IdentityProviderDetailsPropertyidentity_provider_detailstyping.Union[IResolvable, IdentityProviderDetailsProperty]identityProviderDetailsIResolvableIdentityProviderDetailsIResolvableIdentityProviderDetailsinterface{}#
Required when `IdentityProviderType` is set to `AWS_DIRECTORY_SERVICE` , `AWS _LAMBDA` or `API_GATEWAY` .
notes

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 .

identityProviderTypestringidentity_provider_typestridentityProviderTypeStringIdentityProviderTypestringIdentityProviderType*string#
The mode of authentication for a server.
notes

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.

ipAddressTypestringip_address_typestripAddressTypeStringIpAddressTypestringIpAddressType*string#
Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your AWS Transfer Family endpoint.
notes

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 for the server.
loggingRolestringlogging_rolestrloggingRoleStringLoggingRolestringLoggingRole*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.

postAuthenticationLoginBannerstringpost_authentication_login_bannerstrpostAuthenticationLoginBannerStringPostAuthenticationLoginBannerstringPostAuthenticationLoginBanner*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.

preAuthenticationLoginBannerstringpre_authentication_login_bannerstrpreAuthenticationLoginBannerStringPreAuthenticationLoginBannerstringPreAuthenticationLoginBanner*string#
Specifies a string to display when users connect to a server.
notes

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.

protocolDetailsIResolvable | CfnServer.ProtocolDetailsPropertyprotocol_detailstyping.Union[IResolvable, ProtocolDetailsProperty]protocolDetailsIResolvableProtocolDetailsIResolvableProtocolDetailsinterface{}#
The protocol settings that are configured for your server.
notes
  • 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

protocolsstring[]protocolstyping.List[str]protocolsList<String>Protocolsstring[]Protocols*[]*string#
Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.
notes

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

s3StorageOptionsIResolvable | CfnServer.S3StorageOptionsPropertys3_storage_optionstyping.Union[IResolvable, S3StorageOptionsProperty]s3StorageOptionsIResolvableS3StorageOptionsIResolvableS3StorageOptionsinterface{}#
Specifies whether or not performance for your Amazon S3 directories is optimized.
notes
  • 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.

securityPolicyNamestringsecurity_policy_namestrsecurityPolicyNameStringSecurityPolicyNamestringSecurityPolicyName*string#
Specifies the name of the security policy for the server.
structuredLogDestinationsstring[]structured_log_destinationstyping.List[str]structuredLogDestinationsList<String>StructuredLogDestinationsstring[]StructuredLogDestinations*[]*string#
Specifies the log groups to which your server logs are sent.
notes

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

tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
Key-value pairs that can be used to group and search for servers.
workflowDetailsIResolvable | CfnServer.WorkflowDetailsPropertyworkflow_detailstyping.Union[IResolvable, WorkflowDetailsProperty]workflowDetailsIResolvableWorkflowDetailsIResolvableWorkflowDetailsinterface{}#
Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.
notes

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 ​

attrArnstringattr_arnstrattrArnStringAttrArnstringAttrArn*stringrequired#
Specifies the unique Amazon Resource Name (ARN) of the server.
attrAs2ServiceManagedEgressIpAddressesstring[]attr_as2_service_managed_egress_ip_addressestyping.List[str]attrAs2ServiceManagedEgressIpAddressesList<String>AttrAs2ServiceManagedEgressIpAddressesstring[]AttrAs2ServiceManagedEgressIpAddresses*[]*stringrequired#
The list of egress IP addresses of this server.
notes

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.

attrServerIdstringattr_server_idstrattrServerIdStringAttrServerIdstringAttrServerId*stringrequired#
Specifies the unique system-assigned identifier for a server that you instantiate.
attrStatestringattr_statestrattrStateStringAttrStatestringAttrState*stringrequired#
The condition of the server that was described.
notes

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.

certificatestringcertificatestrcertificateStringCertificatestringCertificate*string#
The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate.

Required when Protocols is set to FTPS .

CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringrequiredstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*stringrequired#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#
domainstringdomainstrdomainStringDomainstringDomain*string#
Specifies the domain of the storage system that is used for file transfers.
endpointDetailsIResolvable | CfnServer.EndpointDetailsPropertyendpoint_detailstyping.Union[IResolvable, EndpointDetailsProperty]endpointDetailsIResolvableEndpointDetailsIResolvableEndpointDetailsinterface{}#
The virtual private cloud (VPC) endpoint settings that are configured for your server.
endpointTypestringendpoint_typestrendpointTypeStringEndpointTypestringEndpointType*string#
The type of endpoint that you want your server to use.
identityProviderDetailsIResolvable | CfnServer.IdentityProviderDetailsPropertyidentity_provider_detailstyping.Union[IResolvable, IdentityProviderDetailsProperty]identityProviderDetailsIResolvableIdentityProviderDetailsIResolvableIdentityProviderDetailsinterface{}#
Required when `IdentityProviderType` is set to `AWS_DIRECTORY_SERVICE` , `AWS _LAMBDA` or `API_GATEWAY` .
identityProviderTypestringidentity_provider_typestridentityProviderTypeStringIdentityProviderTypestringIdentityProviderType*string#
The mode of authentication for a server.
ipAddressTypestringip_address_typestripAddressTypeStringIpAddressTypestringIpAddressType*string#
Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your AWS Transfer Family endpoint.
loggingRolestringlogging_rolestrloggingRoleStringLoggingRolestringLoggingRole*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.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*stringrequired#
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).

nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
postAuthenticationLoginBannerstringpost_authentication_login_bannerstrpostAuthenticationLoginBannerStringPostAuthenticationLoginBannerstringPostAuthenticationLoginBanner*string#
Specifies a string to display when users connect to a server.

This string is displayed after the user authenticates.

preAuthenticationLoginBannerstringpre_authentication_login_bannerstrpreAuthenticationLoginBannerStringPreAuthenticationLoginBannerstringPreAuthenticationLoginBanner*string#
Specifies a string to display when users connect to a server.
protocolDetailsIResolvable | CfnServer.ProtocolDetailsPropertyprotocol_detailstyping.Union[IResolvable, ProtocolDetailsProperty]protocolDetailsIResolvableProtocolDetailsIResolvableProtocolDetailsinterface{}#
The protocol settings that are configured for your server.
protocolsstring[]protocolstyping.List[str]protocolsList<String>Protocolsstring[]Protocols*[]*string#
Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.
refstringrefstrrefStringRefstringRef*stringrequired#
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 }).

s3StorageOptionsIResolvable | CfnServer.S3StorageOptionsPropertys3_storage_optionstyping.Union[IResolvable, S3StorageOptionsProperty]s3StorageOptionsIResolvableS3StorageOptionsIResolvableS3StorageOptionsinterface{}#
Specifies whether or not performance for your Amazon S3 directories is optimized.
securityPolicyNamestringsecurity_policy_namestrsecurityPolicyNameStringSecurityPolicyNamestringSecurityPolicyName*string#
Specifies the name of the security policy for the server.
serverRefServerReferenceserver_refServerReferenceserverRefServerReferenceServerRefServerReferenceServerRefServerReferencerequired#
A reference to a Server resource.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this element is defined.

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

structuredLogDestinationsstring[]structured_log_destinationstyping.List[str]structuredLogDestinationsList<String>StructuredLogDestinationsstring[]StructuredLogDestinations*[]*string#
Specifies the log groups to which your server logs are sent.
Tag Manager which manages the tags for this resource.
tagsRawCfnTag[]tags_rawtyping.List[CfnTag]tagsRawList<CfnTag>TagsRawCfnTag[]TagsRaw*[]CfnTag#
Key-value pairs that can be used to group and search for servers.
workflowDetailsIResolvable | CfnServer.WorkflowDetailsPropertyworkflow_detailstyping.Union[IResolvable, WorkflowDetailsProperty]workflowDetailsIResolvableWorkflowDetailsIResolvableWorkflowDetailsinterface{}#
Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
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): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

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): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

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

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

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

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

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): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
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.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

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@staticmethod def arn_for_server(resource: IServerRef) -> strpublic static String arnForServer(IServerRef resource)public static string ArnForServer(IServerRef resource)func ArnForServer(Resource IServerRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func 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.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
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

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

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isCfnServer(x: any): boolean@staticmethod def is_cfn_server(x: Any) -> boolpublic static Boolean isCfnServer(Object x)public static bool IsCfnServer(object x)func IsCfnServer(X interface{}) *boolstatic#
Checks whether the given object is a CfnServer.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

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

  • xxxxX — Any object.

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

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
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): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
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): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
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): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func 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.