CfnServer
- class aws_cdk.aws_transfer.CfnServer(scope, id, *, certificate=None, domain=None, endpoint_details=None, endpoint_type=None, identity_provider_details=None, identity_provider_type=None, logging_role=None, post_authentication_login_banner=None, pre_authentication_login_banner=None, protocol_details=None, protocols=None, s3_storage_options=None, security_policy_name=None, structured_log_destinations=None, tags=None, workflow_details=None)
Bases:
CfnResource
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.- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-server.html
- CloudformationResource:
AWS::Transfer::Server
- ExampleMetadata:
fixture=_generated
Example:
# 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", logging_role="loggingRole", post_authentication_login_banner="postAuthenticationLoginBanner", pre_authentication_login_banner="preAuthenticationLoginBanner", protocol_details=transfer.CfnServer.ProtocolDetailsProperty( as2_transports=["as2Transports"], passive_ip="passiveIp", 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" )] ) )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).certificate (
Optional
[str
]) – The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required whenProtocols
is set toFTPS
. To request a new public certificate, see Request a public certificate in the AWS Certificate Manager User Guide . To import an existing certificate into ACM, see Importing certificates into ACM in the AWS Certificate Manager User Guide . To request a private certificate to use FTPS through private IP addresses, see Request a private certificate in the AWS 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) .. epigraph:: 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 (
Optional
[str
]) – 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.endpoint_details (
Union
[IResolvable
,EndpointDetailsProperty
,Dict
[str
,Any
],None
]) – 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.endpoint_type (
Optional
[str
]) – 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. .. epigraph:: After May 19, 2021, you won’t be able to create a server usingEndpointType=VPC_ENDPOINT
in your AWS account if your account hasn’t already done so before May 19, 2021. If you have already created servers withEndpointType=VPC_ENDPOINT
in your AWS account on or before May 19, 2021, you will not be affected. After this date, useEndpointType
=VPC
. For more information, see Discontinuing the use of VPC_ENDPOINT . It is recommended that you useVPC
as theEndpointType
. 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 withEndpointType
set toVPC_ENDPOINT
.identity_provider_details (
Union
[IResolvable
,IdentityProviderDetailsProperty
,Dict
[str
,Any
],None
]) – Required whenIdentityProviderType
is set toAWS_DIRECTORY_SERVICE
,AWS _LAMBDA
orAPI_GATEWAY
. Accepts an array containing all of the information required to use a directory inAWS_DIRECTORY_SERVICE
or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified whenIdentityProviderType
is set toSERVICE_MANAGED
.identity_provider_type (
Optional
[str
]) – The mode of authentication for a server. The default value isSERVICE_MANAGED
, which allows you to store and access user credentials within the AWS Transfer Family service. UseAWS_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 theIdentityProviderDetails
parameter. Use theAPI_GATEWAY
value to integrate with an identity provider of your choosing. TheAPI_GATEWAY
setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using theIdentityProviderDetails
parameter. Use theAWS_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 theFunction
parameter for theIdentityProviderDetails
data type.logging_role (
Optional
[str
]) – 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 EFSevents. When set, you can view user activity in your CloudWatch logs.post_authentication_login_banner (
Optional
[str
]) – Specifies a string to display when users connect to a server. This string is displayed after the user authenticates. .. epigraph:: The SFTP protocol does not support post-authentication display banners.pre_authentication_login_banner (
Optional
[str
]) – 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.
protocol_details (
Union
[IResolvable
,ProtocolDetailsProperty
,Dict
[str
,Any
],None
]) – The protocol settings that are configured for your server. - To indicate passive mode (for FTP and FTPS protocols), use thePassiveIp
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 theSETSTAT
command on a file that you are uploading to an Amazon S3 bucket, use theSetStatOption
parameter. To have the AWS Transfer Family server ignore theSETSTAT
command and upload files without needing to make any changes to your SFTP client, set the value toENABLE_NO_OP
. If you set theSetStatOption
parameter toENABLE_NO_OP
, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making aSETSTAT
call. - To determine whether your AWS Transfer Family server resumes recent, negotiated sessions through a unique session ID, use theTlsSessionResumptionMode
parameter. -As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP is supported. TheProtocols
parameter is an array of strings. Allowed values : One or more ofSFTP
,FTPS
,FTP
,AS2
protocols (
Optional
[Sequence
[str
]]) – 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 .. epigraph:: - If you selectFTPS
, you must choose a certificate stored in AWS Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS. - IfProtocol
includes eitherFTP
orFTPS
, then theEndpointType
must beVPC
and theIdentityProviderType
must be eitherAWS_DIRECTORY_SERVICE
,AWS_LAMBDA
, orAPI_GATEWAY
. - IfProtocol
includesFTP
, thenAddressAllocationIds
cannot be associated. - IfProtocol
is set only toSFTP
, theEndpointType
can be set toPUBLIC
and theIdentityProviderType
can be set any of the supported identity types:SERVICE_MANAGED
,AWS_DIRECTORY_SERVICE
,AWS_LAMBDA
, orAPI_GATEWAY
. - IfProtocol
includesAS2
, then theEndpointType
must beVPC
, and domain must be Amazon S3. TheProtocols
parameter is an array of strings. Allowed values : One or more ofSFTP
,FTPS
,FTP
,AS2
s3_storage_options (
Union
[IResolvable
,S3StorageOptionsProperty
,Dict
[str
,Any
],None
]) – Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default. By default, home directory mappings have aTYPE
ofDIRECTORY
. If you enable this option, you would then need to explicitly set theHomeDirectoryMapEntry
Type
toFILE
if you want a mapping to have a file target.security_policy_name (
Optional
[str
]) – Specifies the name of the security policy for the server.structured_log_destinations (
Optional
[Sequence
[str
]]) – 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 anupdate-server
call. For example:update-server --server-id s-1234567890abcdef0 --structured-log-destinations
tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – Key-value pairs that can be used to group and search for servers.workflow_details (
Union
[IResolvable
,WorkflowDetailsProperty
,Dict
[str
,Any
],None
]) – 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.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
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.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
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:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
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 (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
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:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
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:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
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.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::Transfer::Server'
- attr_arn
The Amazon Resource Name associated with the server, in the form
arn:aws:transfer:region: *account-id* :server/ *server-id* /
.An example of a server ARN is:
arn:aws:transfer:us-east-1:123456789012:server/s-01234567890abcdef
.- CloudformationAttribute:
Arn
- attr_as2_service_managed_egress_ip_addresses
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.
- CloudformationAttribute:
As2ServiceManagedEgressIpAddresses
- attr_server_id
The service-assigned ID of the server that is created.
An example
ServerId
iss-01234567890abcdef
.- CloudformationAttribute:
ServerId
- certificate
The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- domain
Specifies the domain of the storage system that is used for file transfers.
- endpoint_details
The virtual private cloud (VPC) endpoint settings that are configured for your server.
- endpoint_type
The type of endpoint that you want your server to use.
- identity_provider_details
Required when
IdentityProviderType
is set toAWS_DIRECTORY_SERVICE
,AWS _LAMBDA
orAPI_GATEWAY
.
- identity_provider_type
The mode of authentication for a server.
- logging_role
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 EFSevents.
- logical_id
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)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- node
The tree node.
- post_authentication_login_banner
Specifies a string to display when users connect to a server.
This string is displayed after the user authenticates.
- pre_authentication_login_banner
Specifies a string to display when users connect to a server.
- protocol_details
The protocol settings that are configured for your server.
- protocols
Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server’s endpoint.
- ref
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 })
.
- s3_storage_options
Specifies whether or not performance for your Amazon S3 directories is optimized.
This is disabled by default.
- security_policy_name
Specifies the name of the security policy for the server.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- structured_log_destinations
Specifies the log groups to which your server logs are sent.
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
Key-value pairs that can be used to group and search for servers.
- workflow_details
Specifies the workflow ID for the workflow to assign and the execution role that’s used for executing the workflow.
Static Methods
- classmethod is_cfn_element(x)
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.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
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 classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
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 theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
EndpointDetailsProperty
- class CfnServer.EndpointDetailsProperty(*, address_allocation_ids=None, security_group_ids=None, subnet_ids=None, vpc_endpoint_id=None, vpc_id=None)
Bases:
object
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.
- Parameters:
address_allocation_ids (
Optional
[Sequence
[str
]]) – A list of address allocation IDs that are required to attach an Elastic IP address to your server’s endpoint. An address allocation ID corresponds to the allocation ID of an Elastic IP address. This value can be retrieved from theallocationId
field from the Amazon EC2 Address data type. One way to retrieve this value is by calling the EC2 DescribeAddresses API. This parameter is optional. Set this parameter if you want to make your VPC endpoint public-facing. For details, see Create an internet-facing endpoint for your server . .. epigraph:: This property can only be set as follows: -EndpointType
must be set toVPC
- The Transfer Family server must be offline. - You cannot set this parameter for Transfer Family servers that use the FTP protocol. - The server must already haveSubnetIds
populated (SubnetIds
andAddressAllocationIds
cannot be updated simultaneously). -AddressAllocationIds
can’t contain duplicates, and must be equal in length toSubnetIds
. For example, if you have three subnet IDs, you must also specify three address allocation IDs. - Call theUpdateServer
API to set or change this parameter.security_group_ids (
Optional
[Sequence
[str
]]) – A list of security groups IDs that are available to attach to your server’s endpoint. .. epigraph:: This property can only be set whenEndpointType
is set toVPC
. You can edit theSecurityGroupIds
property in the UpdateServer API only if you are changing theEndpointType
fromPUBLIC
orVPC_ENDPOINT
toVPC
. To change security groups associated with your server’s VPC endpoint after creation, use the Amazon EC2 ModifyVpcEndpoint API.subnet_ids (
Optional
[Sequence
[str
]]) – A list of subnet IDs that are required to host your server endpoint in your VPC. .. epigraph:: This property can only be set whenEndpointType
is set toVPC
.vpc_endpoint_id (
Optional
[str
]) – The ID of the VPC endpoint. .. epigraph:: This property can only be set whenEndpointType
is set toVPC_ENDPOINT
.vpc_id (
Optional
[str
]) – The VPC ID of the virtual private cloud in which the server’s endpoint will be hosted. .. epigraph:: This property can only be set whenEndpointType
is set toVPC
.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 endpoint_details_property = transfer.CfnServer.EndpointDetailsProperty( address_allocation_ids=["addressAllocationIds"], security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"], vpc_endpoint_id="vpcEndpointId", vpc_id="vpcId" )
Attributes
- address_allocation_ids
A list of address allocation IDs that are required to attach an Elastic IP address to your server’s endpoint.
An address allocation ID corresponds to the allocation ID of an Elastic IP address. This value can be retrieved from the
allocationId
field from the Amazon EC2 Address data type. One way to retrieve this value is by calling the EC2 DescribeAddresses API.This parameter is optional. Set this parameter if you want to make your VPC endpoint public-facing. For details, see Create an internet-facing endpoint for your server . .. epigraph:
This property can only be set as follows: - ``EndpointType`` must be set to ``VPC`` - The Transfer Family server must be offline. - You cannot set this parameter for Transfer Family servers that use the FTP protocol. - The server must already have ``SubnetIds`` populated ( ``SubnetIds`` and ``AddressAllocationIds`` cannot be updated simultaneously). - ``AddressAllocationIds`` can't contain duplicates, and must be equal in length to ``SubnetIds`` . For example, if you have three subnet IDs, you must also specify three address allocation IDs. - Call the ``UpdateServer`` API to set or change this parameter.
- security_group_ids
A list of security groups IDs that are available to attach to your server’s endpoint.
This property can only be set when
EndpointType
is set toVPC
.You can edit the
SecurityGroupIds
property in the UpdateServer API only if you are changing theEndpointType
fromPUBLIC
orVPC_ENDPOINT
toVPC
. To change security groups associated with your server’s VPC endpoint after creation, use the Amazon EC2 ModifyVpcEndpoint API.
- subnet_ids
A list of subnet IDs that are required to host your server endpoint in your VPC.
This property can only be set when
EndpointType
is set toVPC
.
- vpc_endpoint_id
The ID of the VPC endpoint.
This property can only be set when
EndpointType
is set toVPC_ENDPOINT
.
- vpc_id
The VPC ID of the virtual private cloud in which the server’s endpoint will be hosted.
This property can only be set when
EndpointType
is set toVPC
.
IdentityProviderDetailsProperty
- class CfnServer.IdentityProviderDetailsProperty(*, directory_id=None, function=None, invocation_role=None, sftp_authentication_methods=None, url=None)
Bases:
object
Required when
IdentityProviderType
is set toAWS_DIRECTORY_SERVICE
,AWS _LAMBDA
orAPI_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 whenIdentityProviderType
is set toSERVICE_MANAGED
.- Parameters:
directory_id (
Optional
[str
]) – The identifier of the AWS Directory Service directory that you want to use as your identity provider.function (
Optional
[str
]) – The ARN for a Lambda function to use for the Identity provider.invocation_role (
Optional
[str
]) – This parameter is only applicable if yourIdentityProviderType
isAPI_GATEWAY
. Provides the type ofInvocationRole
used to authenticate the user account.sftp_authentication_methods (
Optional
[str
]) – For SFTP-enabled servers, and for custom identity providers only , you can specify whether to authenticate using a password, SSH key pair, or both. -PASSWORD
- users must provide their password to connect. -PUBLIC_KEY
- users must provide their private key to connect. -PUBLIC_KEY_OR_PASSWORD
- users can authenticate with either their password or their key. This is the default value. -PUBLIC_KEY_AND_PASSWORD
- users must provide both their private key and their password to connect. The server checks the key first, and then if the key is valid, the system prompts for a password. If the private key provided does not match the public key that is stored, authentication fails.url (
Optional
[str
]) – Provides the location of the service endpoint used to authenticate users.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 identity_provider_details_property = transfer.CfnServer.IdentityProviderDetailsProperty( directory_id="directoryId", function="function", invocation_role="invocationRole", sftp_authentication_methods="sftpAuthenticationMethods", url="url" )
Attributes
- directory_id
The identifier of the AWS Directory Service directory that you want to use as your identity provider.
- function
The ARN for a Lambda function to use for the Identity provider.
- invocation_role
This parameter is only applicable if your
IdentityProviderType
isAPI_GATEWAY
.Provides the type of
InvocationRole
used to authenticate the user account.
- sftp_authentication_methods
For SFTP-enabled servers, and for custom identity providers only , you can specify whether to authenticate using a password, SSH key pair, or both.
PASSWORD
- users must provide their password to connect.PUBLIC_KEY
- users must provide their private key to connect.PUBLIC_KEY_OR_PASSWORD
- users can authenticate with either their password or their key. This is the default value.PUBLIC_KEY_AND_PASSWORD
- users must provide both their private key and their password to connect. The server checks the key first, and then if the key is valid, the system prompts for a password. If the private key provided does not match the public key that is stored, authentication fails.
- url
Provides the location of the service endpoint used to authenticate users.
ProtocolDetailsProperty
- class CfnServer.ProtocolDetailsProperty(*, as2_transports=None, passive_ip=None, set_stat_option=None, tls_session_resumption_mode=None)
Bases:
object
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 theSetStatOption
parameter. To have the AWS Transfer Family server ignore theSETSTAT
command and upload files without needing to make any changes to your SFTP client, set the value toENABLE_NO_OP
. If you set theSetStatOption
parameter toENABLE_NO_OP
, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making aSETSTAT
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.
- Parameters:
as2_transports (
Optional
[Sequence
[str
]]) – List ofAs2Transport
objects.passive_ip (
Optional
[str
]) – Indicates passive mode, for FTP and FTPS protocols. Enter a single IPv4 address, such as the public IP address of a firewall, router, or load balancer. For example:aws transfer update-server --protocol-details PassiveIp=0.0.0.0
Replace0.0.0.0
in the example above with the actual IP address you want to use. .. epigraph:: If you change thePassiveIp
value, you must stop and then restart your Transfer Family server for the change to take effect. For details on using passive mode (PASV) in a NAT environment, see Configuring your FTPS server behind a firewall or NAT with AWS Transfer Family . Special values TheAUTO
and0.0.0.0
are special values for thePassiveIp
parameter. The valuePassiveIp=AUTO
is assigned by default to FTP and FTPS type servers. In this case, the server automatically responds with one of the endpoint IPs within the PASV response.PassiveIp=0.0.0.0
has a more unique application for its usage. For example, if you have a High Availability (HA) Network Load Balancer (NLB) environment, where you have 3 subnets, you can only specify a single IP address using thePassiveIp
parameter. This reduces the effectiveness of having High Availability. In this case, you can specifyPassiveIp=0.0.0.0
. This tells the client to use the same IP address as the Control connection and utilize all AZs for their connections. Note, however, that not all FTP clients support thePassiveIp=0.0.0.0
response. FileZilla and WinSCP do support it. If you are using other clients, check to see if your client supports thePassiveIp=0.0.0.0
response.set_stat_option (
Optional
[str
]) – Use theSetStatOption
to ignore the error that is generated when the client attempts to useSETSTAT
on a file you are uploading to an S3 bucket. Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such asSETSTAT
when uploading the file. However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when the file is otherwise successfully uploaded. Set the value toENABLE_NO_OP
to have the Transfer Family server ignore theSETSTAT
command, and upload files without needing to make any changes to your SFTP client. While theSetStatOption
ENABLE_NO_OP
setting ignores the error, it does generate a log entry in Amazon CloudWatch Logs, so you can determine when the client is making aSETSTAT
call. .. epigraph:: If you want to preserve the original timestamp for your file, and modify other file attributes usingSETSTAT
, you can use Amazon EFS as backend storage with Transfer Family.tls_session_resumption_mode (
Optional
[str
]) – A property used with Transfer Family servers that use the FTPS protocol. TLS Session Resumption provides a mechanism to resume or share a negotiated secret key between the control and data connection for an FTPS session.TlsSessionResumptionMode
determines whether or not the server resumes recent, negotiated sessions through a unique session ID. This property is available duringCreateServer
andUpdateServer
calls. If aTlsSessionResumptionMode
value is not specified duringCreateServer
, it is set toENFORCED
by default. -DISABLED
: the server does not process TLS session resumption client requests and creates a new TLS session for each request. -ENABLED
: the server processes and accepts clients that are performing TLS session resumption. The server doesn’t reject client data connections that do not perform the TLS session resumption client processing. -ENFORCED
: the server processes and accepts clients that are performing TLS session resumption. The server rejects client data connections that do not perform the TLS session resumption client processing. Before you set the value toENFORCED
, test your clients. .. epigraph:: Not all FTPS clients perform TLS session resumption. So, if you choose to enforce TLS session resumption, you prevent any connections from FTPS clients that don’t perform the protocol negotiation. To determine whether or not you can use theENFORCED
value, you need to test your clients.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 protocol_details_property = transfer.CfnServer.ProtocolDetailsProperty( as2_transports=["as2Transports"], passive_ip="passiveIp", set_stat_option="setStatOption", tls_session_resumption_mode="tlsSessionResumptionMode" )
Attributes
- as2_transports
List of
As2Transport
objects.
- passive_ip
Indicates passive mode, for FTP and FTPS protocols.
Enter a single IPv4 address, such as the public IP address of a firewall, router, or load balancer. For example:
aws transfer update-server --protocol-details PassiveIp=0.0.0.0
Replace
0.0.0.0
in the example above with the actual IP address you want to use. .. epigraph:If you change the ``PassiveIp`` value, you must stop and then restart your Transfer Family server for the change to take effect. For details on using passive mode (PASV) in a NAT environment, see `Configuring your FTPS server behind a firewall or NAT with AWS Transfer Family <https://docs.aws.amazon.com/storage/configuring-your-ftps-server-behind-a-firewall-or-nat-with-aws-transfer-family/>`_ .
Special values
The
AUTO
and0.0.0.0
are special values for thePassiveIp
parameter. The valuePassiveIp=AUTO
is assigned by default to FTP and FTPS type servers. In this case, the server automatically responds with one of the endpoint IPs within the PASV response.PassiveIp=0.0.0.0
has a more unique application for its usage. For example, if you have a High Availability (HA) Network Load Balancer (NLB) environment, where you have 3 subnets, you can only specify a single IP address using thePassiveIp
parameter. This reduces the effectiveness of having High Availability. In this case, you can specifyPassiveIp=0.0.0.0
. This tells the client to use the same IP address as the Control connection and utilize all AZs for their connections. Note, however, that not all FTP clients support thePassiveIp=0.0.0.0
response. FileZilla and WinSCP do support it. If you are using other clients, check to see if your client supports thePassiveIp=0.0.0.0
response.
- set_stat_option
Use the
SetStatOption
to ignore the error that is generated when the client attempts to useSETSTAT
on a file you are uploading to an S3 bucket.Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as
SETSTAT
when uploading the file. However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when the file is otherwise successfully uploaded.Set the value to
ENABLE_NO_OP
to have the Transfer Family server ignore theSETSTAT
command, and upload files without needing to make any changes to your SFTP client. While theSetStatOption
ENABLE_NO_OP
setting ignores the error, it does generate a log entry in Amazon CloudWatch Logs, so you can determine when the client is making aSETSTAT
call. .. epigraph:If you want to preserve the original timestamp for your file, and modify other file attributes using ``SETSTAT`` , you can use Amazon EFS as backend storage with Transfer Family.
- tls_session_resumption_mode
A property used with Transfer Family servers that use the FTPS protocol.
TLS Session Resumption provides a mechanism to resume or share a negotiated secret key between the control and data connection for an FTPS session.
TlsSessionResumptionMode
determines whether or not the server resumes recent, negotiated sessions through a unique session ID. This property is available duringCreateServer
andUpdateServer
calls. If aTlsSessionResumptionMode
value is not specified duringCreateServer
, it is set toENFORCED
by default.DISABLED
: the server does not process TLS session resumption client requests and creates a new TLS session for each request.ENABLED
: the server processes and accepts clients that are performing TLS session resumption. The server doesn’t reject client data connections that do not perform the TLS session resumption client processing.ENFORCED
: the server processes and accepts clients that are performing TLS session resumption. The server rejects client data connections that do not perform the TLS session resumption client processing. Before you set the value toENFORCED
, test your clients.
Not all FTPS clients perform TLS session resumption. So, if you choose to enforce TLS session resumption, you prevent any connections from FTPS clients that don’t perform the protocol negotiation. To determine whether or not you can use the
ENFORCED
value, you need to test your clients.
S3StorageOptionsProperty
- class CfnServer.S3StorageOptionsProperty(*, directory_listing_optimization=None)
Bases:
object
The Amazon S3 storage options that are configured for your server.
- Parameters:
directory_listing_optimization (
Optional
[str
]) – Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default. By default, home directory mappings have aTYPE
ofDIRECTORY
. If you enable this option, you would then need to explicitly set theHomeDirectoryMapEntry
Type
toFILE
if you want a mapping to have a file target.- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 s3_storage_options_property = transfer.CfnServer.S3StorageOptionsProperty( directory_listing_optimization="directoryListingOptimization" )
Attributes
- directory_listing_optimization
Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.
By default, home directory mappings have a
TYPE
ofDIRECTORY
. If you enable this option, you would then need to explicitly set theHomeDirectoryMapEntry
Type
toFILE
if you want a mapping to have a file target.
WorkflowDetailProperty
- class CfnServer.WorkflowDetailProperty(*, execution_role, workflow_id)
Bases:
object
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.- Parameters:
execution_role (
str
) – Includes the necessary permissions for S3, EFS, and Lambda operations that Transfer can assume, so that all workflow steps can operate on the required resources.workflow_id (
str
) – A unique identifier for the workflow.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 workflow_detail_property = transfer.CfnServer.WorkflowDetailProperty( execution_role="executionRole", workflow_id="workflowId" )
Attributes
- execution_role
Includes the necessary permissions for S3, EFS, and Lambda operations that Transfer can assume, so that all workflow steps can operate on the required resources.
- workflow_id
A unique identifier for the workflow.
WorkflowDetailsProperty
- class CfnServer.WorkflowDetailsProperty(*, on_partial_upload=None, on_upload=None)
Bases:
object
Container for the
WorkflowDetail
data type.It is used by actions that trigger a workflow to begin execution.
- Parameters:
on_partial_upload (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,WorkflowDetailProperty
,Dict
[str
,Any
]]],None
]) – A trigger that starts a workflow if a file is only partially uploaded. You can attach a workflow to a server that executes whenever there is a partial upload. A partial upload occurs when a file is open when the session disconnects. .. epigraph::OnPartialUpload
can contain a maximum of oneWorkflowDetail
object.on_upload (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,WorkflowDetailProperty
,Dict
[str
,Any
]]],None
]) – A trigger that starts a workflow: the workflow begins to execute after a file is uploaded. To remove an associated workflow from a server, you can provide an emptyOnUpload
object, as in the following example.aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
.. epigraph::OnUpload
can contain a maximum of oneWorkflowDetail
object.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 workflow_details_property = 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" )] )
Attributes
- on_partial_upload
A trigger that starts a workflow if a file is only partially uploaded.
You can attach a workflow to a server that executes whenever there is a partial upload.
A partial upload occurs when a file is open when the session disconnects. .. epigraph:
``OnPartialUpload`` can contain a maximum of one ``WorkflowDetail`` object.
- on_upload
the workflow begins to execute after a file is uploaded.
To remove an associated workflow from a server, you can provide an empty
OnUpload
object, as in the following example.aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
.. epigraph:``OnUpload`` can contain a maximum of one ``WorkflowDetail`` object.
- See:
- Type:
A trigger that starts a workflow