Struct aws_sdk_transfer::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for AWS Transfer Family

Client for invoking operations on AWS Transfer Family. Each operation on AWS Transfer Family is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_transfer::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_transfer::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CreateAccess operation has a Client::create_access, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.create_access()
    .home_directory("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

§Waiters

This client provides wait_until methods behind the Waiters trait. To use them, simply import the trait, and then call one of the wait_until methods. This will return a waiter fluent builder that takes various parameters, which are documented on the builder type. Once parameters have been provided, the wait method can be called to initiate waiting.

For example, if there was a wait_until_thing method, it could look like:

let result = client.wait_until_thing()
    .thing_id("someId")
    .wait(Duration::from_secs(120))
    .await;

Implementations§

source§

impl Client

source

pub fn create_access(&self) -> CreateAccessFluentBuilder

Constructs a fluent builder for the CreateAccess operation.

  • The fluent builder is configurable:
    • home_directory(impl Into<String>) / set_home_directory(Option<String>):
      required: false

      The landing directory (folder) for a user when they log in to the server using the client.

      A HomeDirectory example is /bucket_name/home/mydirectory.

      The HomeDirectory parameter is only used if HomeDirectoryType is set to PATH.


    • home_directory_type(HomeDirectoryType) / set_home_directory_type(Option<HomeDirectoryType>):
      required: false

      The type of landing directory (folder) that you want your users’ home directory to be when they log in to the server. If you set it to PATH, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to LOGICAL, you need to provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users.

      If HomeDirectoryType is LOGICAL, you must provide mappings, using the HomeDirectoryMappings parameter. If, on the other hand, HomeDirectoryType is PATH, you provide an absolute path using the HomeDirectory parameter. You cannot have both HomeDirectory and HomeDirectoryMappings in your template.


    • home_directory_mappings(HomeDirectoryMapEntry) / set_home_directory_mappings(Option<Vec::<HomeDirectoryMapEntry>>):
      required: false

      Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the Entry and Target pair, where Entry shows how the path is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in Target. This value can be set only when HomeDirectoryType is set to LOGICAL.

      The following is an Entry and Target pair example.

      [ { “Entry”: “/directory1”, “Target”: “/bucket_name/home/mydirectory” } ]

      In most cases, you can use this value instead of the session policy to lock down your user to the designated home directory (“chroot”). To do this, you can set Entry to / and set Target to the HomeDirectory parameter value.

      The following is an Entry and Target pair example for chroot.

      [ { “Entry”: “/”, “Target”: “/bucket_name/home/mydirectory” } ]


    • policy(impl Into<String>) / set_policy(Option<String>):
      required: false

      A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user’s access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

      This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session policies.

      For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy argument.

      For an example of a session policy, see Example session policy.

      For more information, see AssumeRole in the Security Token Service API Reference.


    • posix_profile(PosixProfile) / set_posix_profile(Option<PosixProfile>):
      required: false

      The full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users’ access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.


    • role(impl Into<String>) / set_role(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users’ access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users’ transfer requests.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.


    • external_id(impl Into<String>) / set_external_id(Option<String>):
      required: true

      A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.

      Get-ADGroup -Filter {samAccountName -like “YourGroupName*”} -Properties * | Select SamAccountName,ObjectSid

      In that command, replace YourGroupName with the name of your Active Directory group.

      The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-


  • On success, responds with CreateAccessOutput with field(s):
    • server_id(String):

      The identifier of the server that the user is attached to.

    • external_id(String):

      The external identifier of the group whose users have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family.

  • On failure, responds with SdkError<CreateAccessError>
source§

impl Client

source

pub fn create_agreement(&self) -> CreateAgreementFluentBuilder

Constructs a fluent builder for the CreateAgreement operation.

  • The fluent builder is configurable:
    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      A name or short description to identify the agreement.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.


    • local_profile_id(impl Into<String>) / set_local_profile_id(Option<String>):
      required: true

      A unique identifier for the AS2 local profile.


    • partner_profile_id(impl Into<String>) / set_partner_profile_id(Option<String>):
      required: true

      A unique identifier for the partner profile used in the agreement.


    • base_directory(impl Into<String>) / set_base_directory(Option<String>):
      required: true

      The landing directory (folder) for files transferred by using the AS2 protocol.

      A BaseDirectory example is /DOC-EXAMPLE-BUCKET/home/mydirectory.


    • access_role(impl Into<String>) / set_access_role(Option<String>):
      required: true

      Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

      For AS2 connectors

      With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for –send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

      If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

      For SFTP connectors

      Make sure that the access role provides read and write access to the parent directory of the file location that’s used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


    • status(AgreementStatusType) / set_status(Option<AgreementStatusType>):
      required: false

      The status of the agreement. The agreement can be either ACTIVE or INACTIVE.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Key-value pairs that can be used to group and search for agreements.


  • On success, responds with CreateAgreementOutput with field(s):
    • agreement_id(String):

      The unique identifier for the agreement. Use this ID for deleting, or updating an agreement, as well as in any other API calls that require that you specify the agreement ID.

  • On failure, responds with SdkError<CreateAgreementError>
source§

impl Client

source

pub fn create_connector(&self) -> CreateConnectorFluentBuilder

Constructs a fluent builder for the CreateConnector operation.

  • The fluent builder is configurable:
    • url(impl Into<String>) / set_url(Option<String>):
      required: true

      The URL of the partner’s AS2 or SFTP endpoint.


    • as2_config(As2ConnectorConfig) / set_as2_config(Option<As2ConnectorConfig>):
      required: false

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


    • access_role(impl Into<String>) / set_access_role(Option<String>):
      required: true

      Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

      For AS2 connectors

      With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for –send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

      If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

      For SFTP connectors

      Make sure that the access role provides read and write access to the parent directory of the file location that’s used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


    • logging_role(impl Into<String>) / set_logging_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Key-value pairs that can be used to group and search for connectors. Tags are metadata attached to connectors for any purpose.


    • sftp_config(SftpConnectorConfig) / set_sftp_config(Option<SftpConnectorConfig>):
      required: false

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


    • security_policy_name(impl Into<String>) / set_security_policy_name(Option<String>):
      required: false

      Specifies the name of the security policy for the connector.


  • On success, responds with CreateConnectorOutput with field(s):
    • connector_id(String):

      The unique identifier for the connector, returned after the API call succeeds.

  • On failure, responds with SdkError<CreateConnectorError>
source§

impl Client

source

pub fn create_profile(&self) -> CreateProfileFluentBuilder

Constructs a fluent builder for the CreateProfile operation.

source§

impl Client

source

pub fn create_server(&self) -> CreateServerFluentBuilder

Constructs a fluent builder for the CreateServer operation.

  • The fluent builder is configurable:
    • certificate(impl Into<String>) / set_certificate(Option<String>):
      required: false

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

      To request a new public certificate, see Request a public certificate 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.


    • domain(Domain) / set_domain(Option<Domain>):
      required: false

      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.

      After the server is created, the domain cannot be changed.


    • endpoint_details(EndpointDetails) / set_endpoint_details(Option<EndpointDetails>):
      required: false

      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(EndpointType) / set_endpoint_type(Option<EndpointType>):
      required: false

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

      After May 19, 2021, you won’t be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Services 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 Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC.

      For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.

      It is recommended that you use VPC as the EndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server’s endpoint and use VPC security groups to restrict traffic by the client’s public IP address. This is not possible with EndpointType set to VPC_ENDPOINT.


    • host_key(impl Into<String>) / set_host_key(Option<String>):
      required: false

      The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.

      Use the following command to generate an RSA 2048 bit key with no passphrase:

      ssh-keygen -t rsa -b 2048 -N “” -m PEM -f my-new-server-key.

      Use a minimum value of 2048 for the -b option. You can create a stronger key by using 3072 or 4096.

      Use the following command to generate an ECDSA 256 bit key with no passphrase:

      ssh-keygen -t ecdsa -b 256 -N “” -m PEM -f my-new-server-key.

      Valid values for the -b option for ECDSA are 256, 384, and 521.

      Use the following command to generate an ED25519 key with no passphrase:

      ssh-keygen -t ed25519 -N “” -f my-new-server-key.

      For all of these commands, you can replace my-new-server-key with a string of your choice.

      If you aren’t planning to migrate existing users from an existing SFTP-enabled server to a new server, don’t update the host key. Accidentally changing a server’s host key can be disruptive.

      For more information, see Manage host keys for your SFTP-enabled server in the Transfer Family User Guide.


    • identity_provider_details(IdentityProviderDetails) / set_identity_provider_details(Option<IdentityProviderDetails>):
      required: false

      Required when IdentityProviderType is set to AWS_DIRECTORY_SERVICE, Amazon Web Services_LAMBDA or API_GATEWAY. Accepts an array containing all of the information required to use a directory in AWS_DIRECTORY_SERVICE or invoke a customer-supplied authentication API, including the API Gateway URL. Not required when IdentityProviderType is set to SERVICE_MANAGED.


    • identity_provider_type(IdentityProviderType) / set_identity_provider_type(Option<IdentityProviderType>):
      required: false

      The mode of authentication for a server. The default value is SERVICE_MANAGED, which allows you to store and access user credentials within the Transfer Family service.

      Use AWS_DIRECTORY_SERVICE to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services 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 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.


    • logging_role(impl Into<String>) / set_logging_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the 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(impl Into<String>) / set_post_authentication_login_banner(Option<String>):
      required: false

      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.


    • pre_authentication_login_banner(impl Into<String>) / set_pre_authentication_login_banner(Option<String>):
      required: false

      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.


    • protocols(Protocol) / set_protocols(Option<Vec::<Protocol>>):
      required: false

      Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server’s endpoint. The available protocols are:

      • SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH

      • FTPS (File Transfer Protocol Secure): File transfer with TLS encryption

      • FTP (File Transfer Protocol): Unencrypted file transfer

      • AS2 (Applicability Statement 2): used for transporting structured business-to-business data

      • If you select FTPS, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.

      • If Protocol includes either FTP or FTPS, then the EndpointType must be VPC and the IdentityProviderType must be either AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY.

      • If Protocol includes FTP, then AddressAllocationIds cannot be associated.

      • If Protocol is set only to SFTP, the EndpointType can be set to PUBLIC and the IdentityProviderType can be set any of the supported identity types: SERVICE_MANAGED, AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY.

      • If Protocol includes AS2, then the EndpointType must be VPC, and domain must be Amazon S3.


    • protocol_details(ProtocolDetails) / set_protocol_details(Option<ProtocolDetails>):
      required: false

      The protocol settings that are configured for your server.

      • To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.

      • To ignore the error that is generated when the client attempts to use the SETSTAT command on a file that you are uploading to an Amazon S3 bucket, use the SetStatOption parameter. To have the 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 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.


    • security_policy_name(impl Into<String>) / set_security_policy_name(Option<String>):
      required: false

      Specifies the name of the security policy for the server.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Key-value pairs that can be used to group and search for servers.


    • workflow_details(WorkflowDetails) / set_workflow_details(Option<WorkflowDetails>):
      required: false

      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 the server session disconnects while the file is still being uploaded.


    • structured_log_destinations(impl Into<String>) / set_structured_log_destinations(Option<Vec::<String>>):
      required: false

      Specifies the log groups to which your server logs are sent.

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

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

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

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

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


    • s3_storage_options(S3StorageOptions) / set_s3_storage_options(Option<S3StorageOptions>):
      required: false

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


  • On success, responds with CreateServerOutput with field(s):
  • On failure, responds with SdkError<CreateServerError>
source§

impl Client

source

pub fn create_user(&self) -> CreateUserFluentBuilder

Constructs a fluent builder for the CreateUser operation.

  • The fluent builder is configurable:
    • home_directory(impl Into<String>) / set_home_directory(Option<String>):
      required: false

      The landing directory (folder) for a user when they log in to the server using the client.

      A HomeDirectory example is /bucket_name/home/mydirectory.

      The HomeDirectory parameter is only used if HomeDirectoryType is set to PATH.


    • home_directory_type(HomeDirectoryType) / set_home_directory_type(Option<HomeDirectoryType>):
      required: false

      The type of landing directory (folder) that you want your users’ home directory to be when they log in to the server. If you set it to PATH, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to LOGICAL, you need to provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users.

      If HomeDirectoryType is LOGICAL, you must provide mappings, using the HomeDirectoryMappings parameter. If, on the other hand, HomeDirectoryType is PATH, you provide an absolute path using the HomeDirectory parameter. You cannot have both HomeDirectory and HomeDirectoryMappings in your template.


    • home_directory_mappings(HomeDirectoryMapEntry) / set_home_directory_mappings(Option<Vec::<HomeDirectoryMapEntry>>):
      required: false

      Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the Entry and Target pair, where Entry shows how the path is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in Target. This value can be set only when HomeDirectoryType is set to LOGICAL.

      The following is an Entry and Target pair example.

      [ { “Entry”: “/directory1”, “Target”: “/bucket_name/home/mydirectory” } ]

      In most cases, you can use this value instead of the session policy to lock your user down to the designated home directory (“chroot”). To do this, you can set Entry to / and set Target to the value the user should see for their home directory when they log in.

      The following is an Entry and Target pair example for chroot.

      [ { “Entry”: “/”, “Target”: “/bucket_name/home/mydirectory” } ]


    • policy(impl Into<String>) / set_policy(Option<String>):
      required: false

      A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user’s access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

      This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session policies.

      For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy argument.

      For an example of a session policy, see Example session policy.

      For more information, see AssumeRole in the Amazon Web Services Security Token Service API Reference.


    • posix_profile(PosixProfile) / set_posix_profile(Option<PosixProfile>):
      required: false

      Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users’ access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in Amazon EFS determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.


    • role(impl Into<String>) / set_role(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users’ access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users’ transfer requests.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.


    • ssh_public_key_body(impl Into<String>) / set_ssh_public_key_body(Option<String>):
      required: false

      The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.

      The three standard SSH public key format elements are <key type>, <body base64>, and an optional <comment>, with spaces between each element.

      Transfer Family accepts RSA, ECDSA, and ED25519 keys.

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

      • For ED25519 keys, the key type is ssh-ed25519.

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


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.


    • user_name(impl Into<String>) / set_user_name(Option<String>):
      required: true

      A unique string that identifies a user and is associated with a ServerId. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore ‘_’, hyphen ‘-’, period ‘.’, and at sign ‘@’. The user name can’t start with a hyphen, period, or at sign.


  • On success, responds with CreateUserOutput with field(s):
  • On failure, responds with SdkError<CreateUserError>
source§

impl Client

source

pub fn create_workflow(&self) -> CreateWorkflowFluentBuilder

Constructs a fluent builder for the CreateWorkflow operation.

  • The fluent builder is configurable:
    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      A textual description for the workflow.


    • steps(WorkflowStep) / set_steps(Option<Vec::<WorkflowStep>>):
      required: true

      Specifies the details for the steps that are in the specified workflow.

      The TYPE specifies which of the following actions is being taken for this step.

      • COPY - Copy the file to another location.

      • CUSTOM - Perform a custom step with an Lambda function target.

      • DECRYPT - Decrypt a file that was encrypted before it was uploaded.

      • DELETE - Delete the file.

      • TAG - Add a tag to the file.

      Currently, copying and tagging are supported only on S3.

      For file location, you specify either the Amazon S3 bucket and key, or the Amazon EFS file system ID and path.


    • on_exception_steps(WorkflowStep) / set_on_exception_steps(Option<Vec::<WorkflowStep>>):
      required: false

      Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

      For custom steps, the Lambda function needs to send FAILURE to the call back API to kick off the exception steps. Additionally, if the Lambda does not send SUCCESS before it times out, the exception steps are executed.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.


  • On success, responds with CreateWorkflowOutput with field(s):
  • On failure, responds with SdkError<CreateWorkflowError>
source§

impl Client

source

pub fn delete_access(&self) -> DeleteAccessFluentBuilder

Constructs a fluent builder for the DeleteAccess operation.

  • The fluent builder is configurable:
    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server that has this user assigned.


    • external_id(impl Into<String>) / set_external_id(Option<String>):
      required: true

      A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.

      Get-ADGroup -Filter {samAccountName -like “YourGroupName*”} -Properties * | Select SamAccountName,ObjectSid

      In that command, replace YourGroupName with the name of your Active Directory group.

      The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-


  • On success, responds with DeleteAccessOutput
  • On failure, responds with SdkError<DeleteAccessError>
source§

impl Client

source

pub fn delete_agreement(&self) -> DeleteAgreementFluentBuilder

Constructs a fluent builder for the DeleteAgreement operation.

source§

impl Client

source

pub fn delete_certificate(&self) -> DeleteCertificateFluentBuilder

Constructs a fluent builder for the DeleteCertificate operation.

source§

impl Client

source

pub fn delete_connector(&self) -> DeleteConnectorFluentBuilder

Constructs a fluent builder for the DeleteConnector operation.

source§

impl Client

source

pub fn delete_host_key(&self) -> DeleteHostKeyFluentBuilder

Constructs a fluent builder for the DeleteHostKey operation.

source§

impl Client

source

pub fn delete_profile(&self) -> DeleteProfileFluentBuilder

Constructs a fluent builder for the DeleteProfile operation.

source§

impl Client

source

pub fn delete_server(&self) -> DeleteServerFluentBuilder

Constructs a fluent builder for the DeleteServer operation.

source§

impl Client

source

pub fn delete_ssh_public_key(&self) -> DeleteSshPublicKeyFluentBuilder

Constructs a fluent builder for the DeleteSshPublicKey operation.

source§

impl Client

source

pub fn delete_user(&self) -> DeleteUserFluentBuilder

Constructs a fluent builder for the DeleteUser operation.

source§

impl Client

source

pub fn delete_workflow(&self) -> DeleteWorkflowFluentBuilder

Constructs a fluent builder for the DeleteWorkflow operation.

source§

impl Client

source

pub fn describe_access(&self) -> DescribeAccessFluentBuilder

Constructs a fluent builder for the DescribeAccess operation.

  • The fluent builder is configurable:
    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server that has this access assigned.


    • external_id(impl Into<String>) / set_external_id(Option<String>):
      required: true

      A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.

      Get-ADGroup -Filter {samAccountName -like “YourGroupName*”} -Properties * | Select SamAccountName,ObjectSid

      In that command, replace YourGroupName with the name of your Active Directory group.

      The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-


  • On success, responds with DescribeAccessOutput with field(s):
  • On failure, responds with SdkError<DescribeAccessError>
source§

impl Client

source

pub fn describe_agreement(&self) -> DescribeAgreementFluentBuilder

Constructs a fluent builder for the DescribeAgreement operation.

source§

impl Client

source

pub fn describe_certificate(&self) -> DescribeCertificateFluentBuilder

Constructs a fluent builder for the DescribeCertificate operation.

source§

impl Client

source

pub fn describe_connector(&self) -> DescribeConnectorFluentBuilder

Constructs a fluent builder for the DescribeConnector operation.

source§

impl Client

source

pub fn describe_execution(&self) -> DescribeExecutionFluentBuilder

Constructs a fluent builder for the DescribeExecution operation.

source§

impl Client

source

pub fn describe_host_key(&self) -> DescribeHostKeyFluentBuilder

Constructs a fluent builder for the DescribeHostKey operation.

source§

impl Client

source

pub fn describe_profile(&self) -> DescribeProfileFluentBuilder

Constructs a fluent builder for the DescribeProfile operation.

source§

impl Client

source

pub fn describe_security_policy(&self) -> DescribeSecurityPolicyFluentBuilder

Constructs a fluent builder for the DescribeSecurityPolicy operation.

source§

impl Client

source

pub fn describe_server(&self) -> DescribeServerFluentBuilder

Constructs a fluent builder for the DescribeServer operation.

source§

impl Client

source

pub fn describe_user(&self) -> DescribeUserFluentBuilder

Constructs a fluent builder for the DescribeUser operation.

source§

impl Client

source

pub fn describe_workflow(&self) -> DescribeWorkflowFluentBuilder

Constructs a fluent builder for the DescribeWorkflow operation.

source§

impl Client

source

pub fn import_certificate(&self) -> ImportCertificateFluentBuilder

Constructs a fluent builder for the ImportCertificate operation.

source§

impl Client

source

pub fn import_host_key(&self) -> ImportHostKeyFluentBuilder

Constructs a fluent builder for the ImportHostKey operation.

source§

impl Client

source

pub fn import_ssh_public_key(&self) -> ImportSshPublicKeyFluentBuilder

Constructs a fluent builder for the ImportSshPublicKey operation.

source§

impl Client

source

pub fn list_accesses(&self) -> ListAccessesFluentBuilder

Constructs a fluent builder for the ListAccesses operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_agreements(&self) -> ListAgreementsFluentBuilder

Constructs a fluent builder for the ListAgreements operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_certificates(&self) -> ListCertificatesFluentBuilder

Constructs a fluent builder for the ListCertificates operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_connectors(&self) -> ListConnectorsFluentBuilder

Constructs a fluent builder for the ListConnectors operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_executions(&self) -> ListExecutionsFluentBuilder

Constructs a fluent builder for the ListExecutions operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the maximum number of executions to return.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      ListExecutions returns the NextToken parameter in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional executions.

      This is useful for pagination, for instance. If you have 100 executions for a workflow, you might only want to list first 10. If so, call the API by specifying the max-results:

      aws transfer list-executions –max-results 10

      This returns details for the first 10 executions, as well as the pointer (NextToken) to the eleventh execution. You can now call the API again, supplying the NextToken value you received:

      aws transfer list-executions –max-results 10 –next-token $somePointerReturnedFromPreviousListResult

      This call returns the next 10 executions, the 11th through the 20th. You can then repeat the call until the details for all 100 executions have been returned.


    • workflow_id(impl Into<String>) / set_workflow_id(Option<String>):
      required: true

      A unique identifier for the workflow.


  • On success, responds with ListExecutionsOutput with field(s):
  • On failure, responds with SdkError<ListExecutionsError>
source§

impl Client

source

pub fn list_host_keys(&self) -> ListHostKeysFluentBuilder

Constructs a fluent builder for the ListHostKeys operation.

source§

impl Client

source

pub fn list_profiles(&self) -> ListProfilesFluentBuilder

Constructs a fluent builder for the ListProfiles operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_security_policies(&self) -> ListSecurityPoliciesFluentBuilder

Constructs a fluent builder for the ListSecurityPolicies operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_servers(&self) -> ListServersFluentBuilder

Constructs a fluent builder for the ListServers operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_users(&self) -> ListUsersFluentBuilder

Constructs a fluent builder for the ListUsers operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_workflows(&self) -> ListWorkflowsFluentBuilder

Constructs a fluent builder for the ListWorkflows operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn send_workflow_step_state(&self) -> SendWorkflowStepStateFluentBuilder

Constructs a fluent builder for the SendWorkflowStepState operation.

source§

impl Client

source

pub fn start_directory_listing(&self) -> StartDirectoryListingFluentBuilder

Constructs a fluent builder for the StartDirectoryListing operation.

source§

impl Client

source

pub fn start_file_transfer(&self) -> StartFileTransferFluentBuilder

Constructs a fluent builder for the StartFileTransfer operation.

source§

impl Client

source

pub fn start_server(&self) -> StartServerFluentBuilder

Constructs a fluent builder for the StartServer operation.

source§

impl Client

source

pub fn stop_server(&self) -> StopServerFluentBuilder

Constructs a fluent builder for the StopServer operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn test_connection(&self) -> TestConnectionFluentBuilder

Constructs a fluent builder for the TestConnection operation.

  • The fluent builder is configurable:
  • On success, responds with TestConnectionOutput with field(s):
    • connector_id(Option<String>):

      Returns the identifier of the connector object that you are testing.

    • status(Option<String>):

      Returns OK for successful test, or ERROR if the test fails.

    • status_message(Option<String>):

      Returns Connection succeeded if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides troubleshooting details, depending on the error message that you receive.

      • Verify that your secret name aligns with the one in Transfer Role permissions.

      • Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.

      • Verify that the secret exists and is formatted correctly.

      • Verify that the trusted host key in the connector configuration matches the ssh-keyscan output.

  • On failure, responds with SdkError<TestConnectionError>
source§

impl Client

source

pub fn test_identity_provider(&self) -> TestIdentityProviderFluentBuilder

Constructs a fluent builder for the TestIdentityProvider operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_access(&self) -> UpdateAccessFluentBuilder

Constructs a fluent builder for the UpdateAccess operation.

  • The fluent builder is configurable:
    • home_directory(impl Into<String>) / set_home_directory(Option<String>):
      required: false

      The landing directory (folder) for a user when they log in to the server using the client.

      A HomeDirectory example is /bucket_name/home/mydirectory.

      The HomeDirectory parameter is only used if HomeDirectoryType is set to PATH.


    • home_directory_type(HomeDirectoryType) / set_home_directory_type(Option<HomeDirectoryType>):
      required: false

      The type of landing directory (folder) that you want your users’ home directory to be when they log in to the server. If you set it to PATH, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to LOGICAL, you need to provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users.

      If HomeDirectoryType is LOGICAL, you must provide mappings, using the HomeDirectoryMappings parameter. If, on the other hand, HomeDirectoryType is PATH, you provide an absolute path using the HomeDirectory parameter. You cannot have both HomeDirectory and HomeDirectoryMappings in your template.


    • home_directory_mappings(HomeDirectoryMapEntry) / set_home_directory_mappings(Option<Vec::<HomeDirectoryMapEntry>>):
      required: false

      Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the Entry and Target pair, where Entry shows how the path is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in Target. This value can be set only when HomeDirectoryType is set to LOGICAL.

      The following is an Entry and Target pair example.

      [ { “Entry”: “/directory1”, “Target”: “/bucket_name/home/mydirectory” } ]

      In most cases, you can use this value instead of the session policy to lock down your user to the designated home directory (“chroot”). To do this, you can set Entry to / and set Target to the HomeDirectory parameter value.

      The following is an Entry and Target pair example for chroot.

      [ { “Entry”: “/”, “Target”: “/bucket_name/home/mydirectory” } ]


    • policy(impl Into<String>) / set_policy(Option<String>):
      required: false

      A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user’s access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

      This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session policies.

      For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy argument.

      For an example of a session policy, see Example session policy.

      For more information, see AssumeRole in the Amazon Web ServicesSecurity Token Service API Reference.


    • posix_profile(PosixProfile) / set_posix_profile(Option<PosixProfile>):
      required: false

      The full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users’ access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.


    • role(impl Into<String>) / set_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users’ access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users’ transfer requests.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.


    • external_id(impl Into<String>) / set_external_id(Option<String>):
      required: true

      A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.

      Get-ADGroup -Filter {samAccountName -like “YourGroupName*”} -Properties * | Select SamAccountName,ObjectSid

      In that command, replace YourGroupName with the name of your Active Directory group.

      The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-


  • On success, responds with UpdateAccessOutput with field(s):
    • server_id(String):

      The identifier of the server that the user is attached to.

    • external_id(String):

      The external identifier of the group whose users have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Amazon Web ServicesTransfer Family.

  • On failure, responds with SdkError<UpdateAccessError>
source§

impl Client

source

pub fn update_agreement(&self) -> UpdateAgreementFluentBuilder

Constructs a fluent builder for the UpdateAgreement operation.

  • The fluent builder is configurable:
    • agreement_id(impl Into<String>) / set_agreement_id(Option<String>):
      required: true

      A unique identifier for the agreement. This identifier is returned when you create an agreement.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.


    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      To replace the existing description, provide a short description for the agreement.


    • status(AgreementStatusType) / set_status(Option<AgreementStatusType>):
      required: false

      You can update the status for the agreement, either activating an inactive agreement or the reverse.


    • local_profile_id(impl Into<String>) / set_local_profile_id(Option<String>):
      required: false

      A unique identifier for the AS2 local profile.

      To change the local profile identifier, provide a new value here.


    • partner_profile_id(impl Into<String>) / set_partner_profile_id(Option<String>):
      required: false

      A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.


    • base_directory(impl Into<String>) / set_base_directory(Option<String>):
      required: false

      To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, /DOC-EXAMPLE-BUCKET/home/mydirectory .


    • access_role(impl Into<String>) / set_access_role(Option<String>):
      required: false

      Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

      For AS2 connectors

      With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for –send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

      If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

      For SFTP connectors

      Make sure that the access role provides read and write access to the parent directory of the file location that’s used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


  • On success, responds with UpdateAgreementOutput with field(s):
    • agreement_id(String):

      A unique identifier for the agreement. This identifier is returned when you create an agreement.

  • On failure, responds with SdkError<UpdateAgreementError>
source§

impl Client

source

pub fn update_certificate(&self) -> UpdateCertificateFluentBuilder

Constructs a fluent builder for the UpdateCertificate operation.

source§

impl Client

source

pub fn update_connector(&self) -> UpdateConnectorFluentBuilder

Constructs a fluent builder for the UpdateConnector operation.

  • The fluent builder is configurable:
    • connector_id(impl Into<String>) / set_connector_id(Option<String>):
      required: true

      The unique identifier for the connector.


    • url(impl Into<String>) / set_url(Option<String>):
      required: false

      The URL of the partner’s AS2 or SFTP endpoint.


    • as2_config(As2ConnectorConfig) / set_as2_config(Option<As2ConnectorConfig>):
      required: false

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


    • access_role(impl Into<String>) / set_access_role(Option<String>):
      required: false

      Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

      For AS2 connectors

      With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for –send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

      If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

      For SFTP connectors

      Make sure that the access role provides read and write access to the parent directory of the file location that’s used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.


    • logging_role(impl Into<String>) / set_logging_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.


    • sftp_config(SftpConnectorConfig) / set_sftp_config(Option<SftpConnectorConfig>):
      required: false

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


    • security_policy_name(impl Into<String>) / set_security_policy_name(Option<String>):
      required: false

      Specifies the name of the security policy for the connector.


  • On success, responds with UpdateConnectorOutput with field(s):
  • On failure, responds with SdkError<UpdateConnectorError>
source§

impl Client

source

pub fn update_host_key(&self) -> UpdateHostKeyFluentBuilder

Constructs a fluent builder for the UpdateHostKey operation.

source§

impl Client

source

pub fn update_profile(&self) -> UpdateProfileFluentBuilder

Constructs a fluent builder for the UpdateProfile operation.

source§

impl Client

source

pub fn update_server(&self) -> UpdateServerFluentBuilder

Constructs a fluent builder for the UpdateServer operation.

  • The fluent builder is configurable:
    • certificate(impl Into<String>) / set_certificate(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when Protocols is set to FTPS.

      To request a new public certificate, see Request a public certificate in the Amazon Web ServicesCertificate Manager User Guide.

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

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


    • protocol_details(ProtocolDetails) / set_protocol_details(Option<ProtocolDetails>):
      required: false

      The protocol settings that are configured for your server.

      • To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.

      • To ignore the error that is generated when the client attempts to use the SETSTAT command on a file that you are uploading to an Amazon S3 bucket, use the SetStatOption parameter. To have the 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 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.


    • endpoint_details(EndpointDetails) / set_endpoint_details(Option<EndpointDetails>):
      required: false

      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(EndpointType) / set_endpoint_type(Option<EndpointType>):
      required: false

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

      After May 19, 2021, you won’t be able to create a server using EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount if your account hasn’t already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC.

      For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.

      It is recommended that you use VPC as the EndpointType. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server’s endpoint and use VPC security groups to restrict traffic by the client’s public IP address. This is not possible with EndpointType set to VPC_ENDPOINT.


    • host_key(impl Into<String>) / set_host_key(Option<String>):
      required: false

      The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.

      Use the following command to generate an RSA 2048 bit key with no passphrase:

      ssh-keygen -t rsa -b 2048 -N “” -m PEM -f my-new-server-key.

      Use a minimum value of 2048 for the -b option. You can create a stronger key by using 3072 or 4096.

      Use the following command to generate an ECDSA 256 bit key with no passphrase:

      ssh-keygen -t ecdsa -b 256 -N “” -m PEM -f my-new-server-key.

      Valid values for the -b option for ECDSA are 256, 384, and 521.

      Use the following command to generate an ED25519 key with no passphrase:

      ssh-keygen -t ed25519 -N “” -f my-new-server-key.

      For all of these commands, you can replace my-new-server-key with a string of your choice.

      If you aren’t planning to migrate existing users from an existing SFTP-enabled server to a new server, don’t update the host key. Accidentally changing a server’s host key can be disruptive.

      For more information, see Manage host keys for your SFTP-enabled server in the Transfer Family User Guide.


    • identity_provider_details(IdentityProviderDetails) / set_identity_provider_details(Option<IdentityProviderDetails>):
      required: false

      An array containing all of the information required to call a customer’s authentication API method.


    • logging_role(impl Into<String>) / set_logging_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the 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(impl Into<String>) / set_post_authentication_login_banner(Option<String>):
      required: false

      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.


    • pre_authentication_login_banner(impl Into<String>) / set_pre_authentication_login_banner(Option<String>):
      required: false

      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.


    • protocols(Protocol) / set_protocols(Option<Vec::<Protocol>>):
      required: false

      Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server’s endpoint. The available protocols are:

      • SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH

      • FTPS (File Transfer Protocol Secure): File transfer with TLS encryption

      • FTP (File Transfer Protocol): Unencrypted file transfer

      • AS2 (Applicability Statement 2): used for transporting structured business-to-business data

      • If you select FTPS, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.

      • If Protocol includes either FTP or FTPS, then the EndpointType must be VPC and the IdentityProviderType must be either AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY.

      • If Protocol includes FTP, then AddressAllocationIds cannot be associated.

      • If Protocol is set only to SFTP, the EndpointType can be set to PUBLIC and the IdentityProviderType can be set any of the supported identity types: SERVICE_MANAGED, AWS_DIRECTORY_SERVICE, AWS_LAMBDA, or API_GATEWAY.

      • If Protocol includes AS2, then the EndpointType must be VPC, and domain must be Amazon S3.


    • security_policy_name(impl Into<String>) / set_security_policy_name(Option<String>):
      required: false

      Specifies the name of the security policy for the server.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.


    • workflow_details(WorkflowDetails) / set_workflow_details(Option<WorkflowDetails>):
      required: false

      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 the server session disconnects while the file is still being 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”:[]}’


    • structured_log_destinations(impl Into<String>) / set_structured_log_destinations(Option<Vec::<String>>):
      required: false

      Specifies the log groups to which your server logs are sent.

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

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

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

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

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


    • s3_storage_options(S3StorageOptions) / set_s3_storage_options(Option<S3StorageOptions>):
      required: false

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


  • On success, responds with UpdateServerOutput with field(s):
    • server_id(String):

      A system-assigned unique identifier for a server that the Transfer Family user is assigned to.

  • On failure, responds with SdkError<UpdateServerError>
source§

impl Client

source

pub fn update_user(&self) -> UpdateUserFluentBuilder

Constructs a fluent builder for the UpdateUser operation.

  • The fluent builder is configurable:
    • home_directory(impl Into<String>) / set_home_directory(Option<String>):
      required: false

      The landing directory (folder) for a user when they log in to the server using the client.

      A HomeDirectory example is /bucket_name/home/mydirectory.

      The HomeDirectory parameter is only used if HomeDirectoryType is set to PATH.


    • home_directory_type(HomeDirectoryType) / set_home_directory_type(Option<HomeDirectoryType>):
      required: false

      The type of landing directory (folder) that you want your users’ home directory to be when they log in to the server. If you set it to PATH, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to LOGICAL, you need to provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users.

      If HomeDirectoryType is LOGICAL, you must provide mappings, using the HomeDirectoryMappings parameter. If, on the other hand, HomeDirectoryType is PATH, you provide an absolute path using the HomeDirectory parameter. You cannot have both HomeDirectory and HomeDirectoryMappings in your template.


    • home_directory_mappings(HomeDirectoryMapEntry) / set_home_directory_mappings(Option<Vec::<HomeDirectoryMapEntry>>):
      required: false

      Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the Entry and Target pair, where Entry shows how the path is made visible and Target is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in Target. This value can be set only when HomeDirectoryType is set to LOGICAL.

      The following is an Entry and Target pair example.

      [ { “Entry”: “/directory1”, “Target”: “/bucket_name/home/mydirectory” } ]

      In most cases, you can use this value instead of the session policy to lock down your user to the designated home directory (“chroot”). To do this, you can set Entry to ‘/’ and set Target to the HomeDirectory parameter value.

      The following is an Entry and Target pair example for chroot.

      [ { “Entry”: “/”, “Target”: “/bucket_name/home/mydirectory” } ]


    • policy(impl Into<String>) / set_policy(Option<String>):
      required: false

      A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user’s access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

      This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session policies.

      For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the Policy argument.

      For an example of a session policy, see Creating a session policy.

      For more information, see AssumeRole in the Amazon Web Services Security Token Service API Reference.


    • posix_profile(PosixProfile) / set_posix_profile(Option<PosixProfile>):
      required: false

      Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users’ access to your Amazon Elastic File Systems (Amazon EFS). The POSIX permissions that are set on files and directories in your file system determines the level of access your users get when transferring files into and out of your Amazon EFS file systems.


    • role(impl Into<String>) / set_role(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users’ access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users’ transfer requests.


    • server_id(impl Into<String>) / set_server_id(Option<String>):
      required: true

      A system-assigned unique identifier for a Transfer Family server instance that the user is assigned to.


    • user_name(impl Into<String>) / set_user_name(Option<String>):
      required: true

      A unique string that identifies a user and is associated with a server as specified by the ServerId. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore ‘_’, hyphen ‘-’, period ‘.’, and at sign ‘@’. The user name can’t start with a hyphen, period, or at sign.


  • On success, responds with UpdateUserOutput with field(s):
    • server_id(String):

      A system-assigned unique identifier for a Transfer Family server instance that the account is assigned to.

    • user_name(String):

      The unique identifier for a user that is assigned to a server instance that was specified in the request.

  • On failure, responds with SdkError<UpdateUserError>
source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Waiters for Client

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more