aws_sdk_transfer::client

Struct 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 Builder 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 /amzn-s3-demo-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_file_transfer_results(&self) -> ListFileTransferResultsFluentBuilder

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

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, /amzn-s3-demo-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 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

      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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to Color::Primary.

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to Color::Fixed.

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to Color::Rgb.

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to Color::Black.

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to Color::Red.

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to Color::Green.

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::Yellow.

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::Blue.

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::Magenta.

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::Cyan.

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to Color::White.

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlack.

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightRed.

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightGreen.

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightYellow.

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlue.

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightMagenta.

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightCyan.

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightWhite.

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to Color::Primary.

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to Color::Fixed.

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to Color::Rgb.

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::Black.

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::Red.

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::Green.

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::Yellow.

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::Blue.

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::Magenta.

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::Cyan.

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::White.

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlack.

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightRed.

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightGreen.

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightYellow.

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlue.

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightMagenta.

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightCyan.

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightWhite.

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Bold.

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Dim.

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Italic.

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Underline.

§Example
println!("{}", value.underline());

Returns self with the attr() set to Attribute::Blink.

§Example
println!("{}", value.blink());

Returns self with the attr() set to Attribute::RapidBlink.

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Invert.

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Conceal.

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Strike.

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Mask.

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Wrap.

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Linger.

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to Quirk::Clear.

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Resetting.

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Bright.

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::OnBright.

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

Source§

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

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T