CfnConnectorPropsMixin

class aws_cdk.mixins_preview.aws_transfer.mixins.CfnConnectorPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol.

For AS2, the connector is required for sending files to an externally hosted AS2 server. For SFTP, the connector is required when sending files to an SFTP server or receiving files from an SFTP server. For more details about connectors, see Configure AS2 connectors and Create SFTP connectors . .. epigraph:

You must specify exactly one configuration object: either for AS2 ( ``As2Config`` ) or SFTP ( ``SftpConfig`` ).
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-connector.html

CloudformationResource:

AWS::Transfer::Connector

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_transfer import mixins as transfer_mixins

# as2_config: Any

cfn_connector_props_mixin = transfer_mixins.CfnConnectorPropsMixin(transfer_mixins.CfnConnectorMixinProps(
    access_role="accessRole",
    as2_config=as2_config,
    egress_config=transfer_mixins.CfnConnectorPropsMixin.ConnectorEgressConfigProperty(
        vpc_lattice=transfer_mixins.CfnConnectorPropsMixin.ConnectorVpcLatticeEgressConfigProperty(
            port_number=123,
            resource_configuration_arn="resourceConfigurationArn"
        )
    ),
    egress_type="egressType",
    logging_role="loggingRole",
    security_policy_name="securityPolicyName",
    sftp_config=transfer_mixins.CfnConnectorPropsMixin.SftpConfigProperty(
        max_concurrent_connections=123,
        trusted_host_keys=["trustedHostKeys"],
        user_secret_id="userSecretId"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    url="url"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Transfer::Connector.

Parameters:
  • props (Union[CfnConnectorMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['accessRole', 'as2Config', 'egressConfig', 'egressType', 'loggingRole', 'securityPolicyName', 'sftpConfig', 'tags', 'url']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

As2ConfigProperty

class CfnConnectorPropsMixin.As2ConfigProperty(*, basic_auth_secret_id=None, compression=None, encryption_algorithm=None, local_profile_id=None, mdn_response=None, mdn_signing_algorithm=None, message_subject=None, partner_profile_id=None, preserve_content_type=None, signing_algorithm=None)

Bases: object

A structure that contains the parameters for an AS2 connector object.

Parameters:
  • basic_auth_secret_id (Optional[str]) – Provides Basic authentication support to the AS2 Connectors API. To use Basic authentication, you must provide the name or Amazon Resource Name (ARN) of a secret in AWS Secrets Manager . The default value for this parameter is null , which indicates that Basic authentication is not enabled for the connector. If the connector should use Basic authentication, the secret needs to be in the following format: { "Username": "user-name", "Password": "user-password" } Replace user-name and user-password with the credentials for the actual user that is being authenticated. Note the following: - You are storing these credentials in Secrets Manager, not passing them directly into this API. - If you are using the API, SDKs, or CloudFormation to configure your connector, then you must create the secret before you can enable Basic authentication. However, if you are using the AWS management console, you can have the system create the secret for you. If you have previously enabled Basic authentication for a connector, you can disable it by using the UpdateConnector API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication: update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=""'

  • compression (Optional[str]) – Specifies whether the AS2 file is compressed.

  • encryption_algorithm (Optional[str]) – The algorithm that is used to encrypt the file. Note the following: - Do not use the DES_EDE3_CBC algorithm unless you must support a legacy client that requires it, as it is a weak encryption algorithm. - You can only specify NONE if the URL for your connector uses HTTPS. Using HTTPS ensures that no traffic is sent in clear text.

  • local_profile_id (Optional[str]) – A unique identifier for the AS2 local profile.

  • mdn_response (Optional[str]) – Used for outbound requests (from an AWS Transfer Family connector to a partner AS2 server) to determine whether the partner response for transfers is synchronous or asynchronous. Specify either of the following values: - SYNC : The system expects a synchronous MDN response, confirming that the file was transferred successfully (or not). - NONE : Specifies that no MDN response is required.

  • mdn_signing_algorithm (Optional[str]) – The signing algorithm for the MDN response. .. epigraph:: If set to DEFAULT (or not set at all), the value for SigningAlgorithm is used.

  • message_subject (Optional[str]) – Used as the Subject HTTP header attribute in AS2 messages that are being sent with the connector.

  • partner_profile_id (Optional[str]) – A unique identifier for the partner profile for the connector.

  • preserve_content_type (Optional[str]) – Specifies whether to use the AWS S3 object content-type as the content-type for the AS2 message.

  • signing_algorithm (Optional[str]) – The algorithm that is used to sign the AS2 messages sent with the connector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html

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.mixins_preview.aws_transfer import mixins as transfer_mixins

as2_config_property = transfer_mixins.CfnConnectorPropsMixin.As2ConfigProperty(
    basic_auth_secret_id="basicAuthSecretId",
    compression="compression",
    encryption_algorithm="encryptionAlgorithm",
    local_profile_id="localProfileId",
    mdn_response="mdnResponse",
    mdn_signing_algorithm="mdnSigningAlgorithm",
    message_subject="messageSubject",
    partner_profile_id="partnerProfileId",
    preserve_content_type="preserveContentType",
    signing_algorithm="signingAlgorithm"
)

Attributes

basic_auth_secret_id

Provides Basic authentication support to the AS2 Connectors API.

To use Basic authentication, you must provide the name or Amazon Resource Name (ARN) of a secret in AWS Secrets Manager .

The default value for this parameter is null , which indicates that Basic authentication is not enabled for the connector.

If the connector should use Basic authentication, the secret needs to be in the following format:

{ "Username": "user-name", "Password": "user-password" }

Replace user-name and user-password with the credentials for the actual user that is being authenticated.

Note the following:

  • You are storing these credentials in Secrets Manager, not passing them directly into this API.

  • If you are using the API, SDKs, or CloudFormation to configure your connector, then you must create the secret before you can enable Basic authentication. However, if you are using the AWS management console, you can have the system create the secret for you.

If you have previously enabled Basic authentication for a connector, you can disable it by using the UpdateConnector API call. For example, if you are using the CLI, you can run the following command to remove Basic authentication:

update-connector --connector-id my-connector-id --as2-config 'BasicAuthSecretId=""'

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-basicauthsecretid

compression

Specifies whether the AS2 file is compressed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-compression

encryption_algorithm

The algorithm that is used to encrypt the file.

Note the following:

  • Do not use the DES_EDE3_CBC algorithm unless you must support a legacy client that requires it, as it is a weak encryption algorithm.

  • You can only specify NONE if the URL for your connector uses HTTPS. Using HTTPS ensures that no traffic is sent in clear text.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-encryptionalgorithm

local_profile_id

A unique identifier for the AS2 local profile.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-localprofileid

mdn_response

Used for outbound requests (from an AWS Transfer Family connector to a partner AS2 server) to determine whether the partner response for transfers is synchronous or asynchronous.

Specify either of the following values:

  • SYNC : The system expects a synchronous MDN response, confirming that the file was transferred successfully (or not).

  • NONE : Specifies that no MDN response is required.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-mdnresponse

mdn_signing_algorithm

The signing algorithm for the MDN response.

If set to DEFAULT (or not set at all), the value for SigningAlgorithm is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-mdnsigningalgorithm

message_subject

Used as the Subject HTTP header attribute in AS2 messages that are being sent with the connector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-messagesubject

partner_profile_id

A unique identifier for the partner profile for the connector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-partnerprofileid

preserve_content_type

Specifies whether to use the AWS S3 object content-type as the content-type for the AS2 message.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-preservecontenttype

signing_algorithm

The algorithm that is used to sign the AS2 messages sent with the connector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html#cfn-transfer-connector-as2config-signingalgorithm

ConnectorEgressConfigProperty

class CfnConnectorPropsMixin.ConnectorEgressConfigProperty(*, vpc_lattice=None)

Bases: object

Configuration structure that defines how traffic is routed from the connector to the SFTP server.

Contains VPC Lattice settings when using VPC_LATTICE egress type for private connectivity through customer VPCs.

Parameters:

vpc_lattice (Union[IResolvable, ConnectorVpcLatticeEgressConfigProperty, Dict[str, Any], None]) – VPC_LATTICE configuration for routing connector traffic through customer VPCs. Enables private connectivity to SFTP servers without requiring public internet access or complex network configurations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-connectoregressconfig.html

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.mixins_preview.aws_transfer import mixins as transfer_mixins

connector_egress_config_property = transfer_mixins.CfnConnectorPropsMixin.ConnectorEgressConfigProperty(
    vpc_lattice=transfer_mixins.CfnConnectorPropsMixin.ConnectorVpcLatticeEgressConfigProperty(
        port_number=123,
        resource_configuration_arn="resourceConfigurationArn"
    )
)

Attributes

vpc_lattice

VPC_LATTICE configuration for routing connector traffic through customer VPCs.

Enables private connectivity to SFTP servers without requiring public internet access or complex network configurations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-connectoregressconfig.html#cfn-transfer-connector-connectoregressconfig-vpclattice

ConnectorVpcLatticeEgressConfigProperty

class CfnConnectorPropsMixin.ConnectorVpcLatticeEgressConfigProperty(*, port_number=None, resource_configuration_arn=None)

Bases: object

VPC_LATTICE egress configuration that specifies the Resource Configuration ARN and port for connecting to SFTP servers through customer VPCs.

Requires a valid Resource Configuration with appropriate network access.

Parameters:
  • port_number (Union[int, float, None]) – Port number for connecting to the SFTP server through VPC_LATTICE. Defaults to 22 if not specified. Must match the port on which the target SFTP server is listening.

  • resource_configuration_arn (Optional[str]) – ARN of the VPC_LATTICE Resource Configuration that defines the target SFTP server location. Must point to a valid Resource Configuration in the customer’s VPC with appropriate network connectivity to the SFTP server.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-connectorvpclatticeegressconfig.html

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.mixins_preview.aws_transfer import mixins as transfer_mixins

connector_vpc_lattice_egress_config_property = transfer_mixins.CfnConnectorPropsMixin.ConnectorVpcLatticeEgressConfigProperty(
    port_number=123,
    resource_configuration_arn="resourceConfigurationArn"
)

Attributes

port_number

Port number for connecting to the SFTP server through VPC_LATTICE.

Defaults to 22 if not specified. Must match the port on which the target SFTP server is listening.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-connectorvpclatticeegressconfig.html#cfn-transfer-connector-connectorvpclatticeegressconfig-portnumber

resource_configuration_arn

ARN of the VPC_LATTICE Resource Configuration that defines the target SFTP server location.

Must point to a valid Resource Configuration in the customer’s VPC with appropriate network connectivity to the SFTP server.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-connectorvpclatticeegressconfig.html#cfn-transfer-connector-connectorvpclatticeegressconfig-resourceconfigurationarn

SftpConfigProperty

class CfnConnectorPropsMixin.SftpConfigProperty(*, max_concurrent_connections=None, trusted_host_keys=None, user_secret_id=None)

Bases: object

A structure that contains the parameters for an SFTP connector object.

Parameters:
  • max_concurrent_connections (Union[int, float, None]) – Specify the number of concurrent connections that your connector creates to the remote server. The default value is 1 . The maximum values is 5 . .. epigraph:: If you are using the AWS Management Console , the default value is 5 . This parameter specifies the number of active connections that your connector can establish with the remote server at the same time. Increasing this value can enhance connector performance when transferring large file batches by enabling parallel operations. Default: - 1

  • trusted_host_keys (Optional[Sequence[str]]) – The public portion of the host key, or keys, that are used to identify the external server to which you are connecting. You can use the ssh-keyscan command against the SFTP server to retrieve the necessary key. .. epigraph:: TrustedHostKeys is optional for CreateConnector . If not provided, you can use TestConnection to retrieve the server host key during the initial connection attempt, and subsequently update the connector with the observed host key. When creating connectors with egress config (VPC_LATTICE type connectors), since host name is not something we can verify, the only accepted trusted host key format is key-type key-body without the host name. For example: ssh-rsa AAAAB3Nza...<long-string-for-public-key> The three standard SSH public key format elements are <key type> , <body base64> , and an optional <comment> , with spaces between each element. Specify only the <key type> and <body base64> : do not enter the <comment> portion of the key. For the trusted host key, AWS Transfer Family accepts RSA and ECDSA keys. - For RSA keys, the <key type> string is ssh-rsa . - For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256 , ecdsa-sha2-nistp384 , or ecdsa-sha2-nistp521 , depending on the size of the key you generated. Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com . ssh-keyscan ftp.host.com This prints the public host key to standard output. ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key> Copy and paste this string into the TrustedHostKeys field for the create-connector command or into the Trusted host keys field in the console. For VPC Lattice type connectors (VPC_LATTICE), remove the hostname from the key and use only the key-type key-body format. In this example, it should be: ssh-rsa AAAAB3Nza...<long-string-for-public-key>

  • user_secret_id (Optional[str]) – The identifier for the secret (in AWS Secrets Manager) that contains the SFTP user’s private key, password, or both. The identifier must be the Amazon Resource Name (ARN) of the secret. .. epigraph:: - Required when creating an SFTP connector - Optional when updating an existing SFTP connector

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-sftpconfig.html

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.mixins_preview.aws_transfer import mixins as transfer_mixins

sftp_config_property = transfer_mixins.CfnConnectorPropsMixin.SftpConfigProperty(
    max_concurrent_connections=123,
    trusted_host_keys=["trustedHostKeys"],
    user_secret_id="userSecretId"
)

Attributes

max_concurrent_connections

Specify the number of concurrent connections that your connector creates to the remote server.

The default value is 1 . The maximum values is 5 . .. epigraph:

If you are using the AWS Management Console , the default value is ``5`` .

This parameter specifies the number of active connections that your connector can establish with the remote server at the same time. Increasing this value can enhance connector performance when transferring large file batches by enabling parallel operations.

Default:
  • 1

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-sftpconfig.html#cfn-transfer-connector-sftpconfig-maxconcurrentconnections

trusted_host_keys

The public portion of the host key, or keys, that are used to identify the external server to which you are connecting.

You can use the ssh-keyscan command against the SFTP server to retrieve the necessary key. .. epigraph:

``TrustedHostKeys`` is optional for ``CreateConnector`` . If not provided, you can use ``TestConnection`` to retrieve the server host key during the initial connection attempt, and subsequently update the connector with the observed host key.

When creating connectors with egress config (VPC_LATTICE type connectors), since host name is not something we can verify, the only accepted trusted host key format is key-type key-body without the host name. For example: ssh-rsa AAAAB3Nza...<long-string-for-public-key>

The three standard SSH public key format elements are <key type> , <body base64> , and an optional <comment> , with spaces between each element. Specify only the <key type> and <body base64> : do not enter the <comment> portion of the key.

For the trusted host key, AWS Transfer Family accepts RSA and ECDSA keys.

  • For RSA keys, the <key type> string is ssh-rsa .

  • For ECDSA keys, the <key type> string is either ecdsa-sha2-nistp256 , ecdsa-sha2-nistp384 , or ecdsa-sha2-nistp521 , depending on the size of the key you generated.

Run this command to retrieve the SFTP server host key, where your SFTP server name is ftp.host.com .

ssh-keyscan ftp.host.com

This prints the public host key to standard output.

ftp.host.com ssh-rsa AAAAB3Nza...<long-string-for-public-key>

Copy and paste this string into the TrustedHostKeys field for the create-connector command or into the Trusted host keys field in the console.

For VPC Lattice type connectors (VPC_LATTICE), remove the hostname from the key and use only the key-type key-body format. In this example, it should be: ssh-rsa AAAAB3Nza...<long-string-for-public-key>

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-sftpconfig.html#cfn-transfer-connector-sftpconfig-trustedhostkeys

user_secret_id

The identifier for the secret (in AWS Secrets Manager) that contains the SFTP user’s private key, password, or both.

The identifier must be the Amazon Resource Name (ARN) of the secret. .. epigraph:

- Required when creating an SFTP connector
- Optional when updating an existing SFTP connector
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-sftpconfig.html#cfn-transfer-connector-sftpconfig-usersecretid