Class: Aws::Transfer::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb

Overview

An API client for Transfer. To construct a client, you need to configure a :region and :credentials.

client = Aws::Transfer::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]

    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.aws/credentials

    • ~/.aws/config

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.

  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :auth_scheme_preference (Array<String>)

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_checksum_calculation (String) — default: "when_supported"

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :response_checksum_validation (String) — default: "when_supported"

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is the default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::Transfer::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::Transfer::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



478
479
480
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 478

def initialize(*args)
  super
end

Instance Method Details

#create_access(params = {}) ⇒ Types::CreateAccessResponse

Used by administrators to choose which groups in the directory should have access to upload and download files over the enabled protocols using Transfer Family. For example, a Microsoft Active Directory might contain 50,000 users, but only a small fraction might need the ability to transfer files to the server. An administrator can use CreateAccess to limit the access to the correct set of users who need this ability.

Examples:

Request syntax with placeholder values


resp = client.create_access({
  home_directory: "HomeDirectory",
  home_directory_type: "PATH", # accepts PATH, LOGICAL
  home_directory_mappings: [
    {
      entry: "MapEntry", # required
      target: "MapTarget", # required
      type: "FILE", # accepts FILE, DIRECTORY
    },
  ],
  policy: "Policy",
  posix_profile: {
    uid: 1, # required
    gid: 1, # required
    secondary_gids: [1],
  },
  role: "Role", # required
  server_id: "ServerId", # required
  external_id: "ExternalId", # required
})

Response structure


resp.server_id #=> String
resp.external_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :home_directory (String)

    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.

    You can use the HomeDirectory parameter for HomeDirectoryType when it is set to either PATH or LOGICAL.

  • :home_directory_type (String)

    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 (Array<Types::HomeDirectoryMapEntry>)

    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 (String)

    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 (Types::PosixProfile)

    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 (required, String)

    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 (required, String)

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

  • :external_id (required, String)

    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: =,.@:/-

Returns:

See Also:



649
650
651
652
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 649

def create_access(params = {}, options = {})
  req = build_request(:create_access, params)
  req.send_request(options)
end

#create_agreement(params = {}) ⇒ Types::CreateAgreementResponse

Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes.

The partner is identified with the PartnerProfileId, and the AS2 process is identified with the LocalProfileId.

Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail.

Examples:

Request syntax with placeholder values


resp = client.create_agreement({
  description: "Description",
  server_id: "ServerId", # required
  local_profile_id: "ProfileId", # required
  partner_profile_id: "ProfileId", # required
  base_directory: "HomeDirectory",
  access_role: "Role", # required
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  preserve_filename: "ENABLED", # accepts ENABLED, DISABLED
  enforce_message_signing: "ENABLED", # accepts ENABLED, DISABLED
  custom_directories: {
    failed_files_directory: "HomeDirectory", # required
    mdn_files_directory: "HomeDirectory", # required
    payload_files_directory: "HomeDirectory", # required
    status_files_directory: "HomeDirectory", # required
    temporary_files_directory: "HomeDirectory", # required
  },
})

Response structure


resp.agreement_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    A name or short description to identify the agreement.

  • :server_id (required, String)

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

  • :local_profile_id (required, String)

    A unique identifier for the AS2 local profile.

  • :partner_profile_id (required, String)

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

  • :base_directory (String)

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

    A BaseDirectory example is /amzn-s3-demo-bucket/home/mydirectory.

  • :access_role (required, String)

    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 (String)

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

  • :tags (Array<Types::Tag>)

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

  • :preserve_filename (String)

    Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

    • ENABLED: the filename provided by your trading parter is preserved when the file is saved.

    • DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.

  • :enforce_message_signing (String)

    Determines whether or not unsigned messages from your trading partners will be accepted.

    • ENABLED: Transfer Family rejects unsigned messages from your trading partner.

    • DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.

  • :custom_directories (Types::CustomDirectoriesType)

    A CustomDirectoriesType structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.

    • Failed files

    • MDN files

    • Payload files

    • Status files

    • Temporary files

Returns:

See Also:



808
809
810
811
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 808

def create_agreement(params = {}, options = {})
  req = build_request(:create_agreement, params)
  req.send_request(options)
end

#create_connector(params = {}) ⇒ Types::CreateConnectorResponse

Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol. For AS2, the connector is required for sending files to an externally hosted AS2 server. For SFTP, the connector is required when sending files to an SFTP server or receiving files from an SFTP server. For more details about connectors, see Configure AS2 connectors and Create SFTP connectors.

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

Examples:

Request syntax with placeholder values


resp = client.create_connector({
  url: "Url",
  as_2_config: {
    local_profile_id: "ProfileId",
    partner_profile_id: "ProfileId",
    message_subject: "MessageSubject",
    compression: "ZLIB", # accepts ZLIB, DISABLED
    encryption_algorithm: "AES128_CBC", # accepts AES128_CBC, AES192_CBC, AES256_CBC, DES_EDE3_CBC, NONE
    signing_algorithm: "SHA256", # accepts SHA256, SHA384, SHA512, SHA1, NONE
    mdn_signing_algorithm: "SHA256", # accepts SHA256, SHA384, SHA512, SHA1, NONE, DEFAULT
    mdn_response: "SYNC", # accepts SYNC, NONE, ASYNC
    basic_auth_secret_id: "As2ConnectorSecretId",
    preserve_content_type: "ENABLED", # accepts ENABLED, DISABLED
    async_mdn_config: {
      url: "Url",
      server_ids: ["ServerId"],
    },
  },
  access_role: "Role", # required
  logging_role: "Role",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  sftp_config: {
    user_secret_id: "SecretId",
    trusted_host_keys: ["SftpConnectorTrustedHostKey"],
    max_concurrent_connections: 1,
    ordered_user_secret_version_stages: ["SecretVersionStage"],
  },
  security_policy_name: "ConnectorSecurityPolicyName",
  egress_config: {
    vpc_lattice: {
      resource_configuration_arn: "VpcLatticeResourceConfigurationArn", # required
      port_number: 1,
    },
  },
  ip_address_type: "IPV4", # accepts IPV4, DUALSTACK
})

Response structure


resp.connector_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :url (String)

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

    When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.

  • :as_2_config (Types::As2ConnectorConfig)

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

  • :access_role (required, String)

    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 (String)

    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 (Array<Types::Tag>)

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

  • :sftp_config (Types::SftpConnectorConfig)

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

  • :security_policy_name (String)

    Specifies the name of the security policy for the connector.

  • :egress_config (Types::ConnectorEgressConfig)

    Specifies the egress configuration for the connector, which determines how traffic is routed from the connector to the SFTP server. When set to VPC, enables routing through customer VPCs using VPC_LATTICE for private connectivity.

  • :ip_address_type (String)

    Specifies the IP address type for the connector's network connections. When set to IPV4, the connector uses IPv4 addresses only. When set to DUALSTACK, the connector supports both IPv4 and IPv6 addresses, with IPv6 preferred when available.

Returns:

See Also:



960
961
962
963
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 960

def create_connector(params = {}, options = {})
  req = build_request(:create_connector, params)
  req.send_request(options)
end

#create_profile(params = {}) ⇒ Types::CreateProfileResponse

Creates the local or partner profile to use for AS2 transfers.

Examples:

Request syntax with placeholder values


resp = client.create_profile({
  as_2_id: "As2Id", # required
  profile_type: "LOCAL", # required, accepts LOCAL, PARTNER
  certificate_ids: ["CertificateId"],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.profile_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :as_2_id (required, String)

    The As2Id is the AS2-name, as defined in the RFC 4130. For inbound transfers, this is the AS2-From header for the AS2 messages sent from the partner. For outbound connectors, this is the AS2-To header for the AS2 messages sent to the partner using the StartFileTransfer API operation. This ID cannot include spaces.

  • :profile_type (required, String)

    Determines the type of profile to create:

    • Specify LOCAL to create a local profile. A local profile represents the AS2-enabled Transfer Family server organization or party.

    • Specify PARTNER to create a partner profile. A partner profile represents a remote organization, external to Transfer Family.

  • :certificate_ids (Array<String>)

    An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.

  • :tags (Array<Types::Tag>)

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

Returns:

See Also:



1021
1022
1023
1024
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1021

def create_profile(params = {}, options = {})
  req = build_request(:create_profile, params)
  req.send_request(options)
end

#create_server(params = {}) ⇒ Types::CreateServerResponse

Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services. When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated ServerId property that is assigned to the newly created server.

Examples:

Request syntax with placeholder values


resp = client.create_server({
  certificate: "Certificate",
  domain: "S3", # accepts S3, EFS
  endpoint_details: {
    address_allocation_ids: ["AddressAllocationId"],
    subnet_ids: ["SubnetId"],
    vpc_endpoint_id: "VpcEndpointId",
    vpc_id: "VpcId",
    security_group_ids: ["SecurityGroupId"],
  },
  endpoint_type: "PUBLIC", # accepts PUBLIC, VPC, VPC_ENDPOINT
  host_key: "HostKey",
  identity_provider_details: {
    url: "Url",
    invocation_role: "Role",
    directory_id: "DirectoryId",
    function: "Function",
    sftp_authentication_methods: "PASSWORD", # accepts PASSWORD, PUBLIC_KEY, PUBLIC_KEY_OR_PASSWORD, PUBLIC_KEY_AND_PASSWORD
  },
  identity_provider_type: "SERVICE_MANAGED", # accepts SERVICE_MANAGED, API_GATEWAY, AWS_DIRECTORY_SERVICE, AWS_LAMBDA
  logging_role: "NullableRole",
  post_authentication_login_banner: "PostAuthenticationLoginBanner",
  pre_authentication_login_banner: "PreAuthenticationLoginBanner",
  protocols: ["SFTP"], # accepts SFTP, FTP, FTPS, AS2
  protocol_details: {
    passive_ip: "PassiveIp",
    tls_session_resumption_mode: "DISABLED", # accepts DISABLED, ENABLED, ENFORCED
    set_stat_option: "DEFAULT", # accepts DEFAULT, ENABLE_NO_OP
    as_2_transports: ["HTTP"], # accepts HTTP
  },
  security_policy_name: "SecurityPolicyName",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  workflow_details: {
    on_upload: [
      {
        workflow_id: "WorkflowId", # required
        execution_role: "Role", # required
      },
    ],
    on_partial_upload: [
      {
        workflow_id: "WorkflowId", # required
        execution_role: "Role", # required
      },
    ],
  },
  structured_log_destinations: ["Arn"],
  s3_storage_options: {
    directory_listing_optimization: "ENABLED", # accepts ENABLED, DISABLED
  },
  ip_address_type: "IPV4", # accepts IPV4, DUALSTACK
})

Response structure


resp.server_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate (String)

    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 (String)

    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 (Types::EndpointDetails)

    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 (String)

    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 (String)

    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 (Types::IdentityProviderDetails)

    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. Cannot be specified when IdentityProviderType is set to SERVICE_MANAGED.

  • :identity_provider_type (String)

    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 (String)

    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 EFS events. When set, you can view user activity in your CloudWatch logs.

  • :post_authentication_login_banner (String)

    Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.

    The SFTP protocol does not support post-authentication display banners.

  • :pre_authentication_login_banner (String)

    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 (Array<String>)

    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 (Types::ProtocolDetails)

    The protocol settings that are configured for your server.

    Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see Avoid placing NLBs and NATs in front of Transfer Family.

    • 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 (String)

    Specifies the name of the security policy for the server.

  • :tags (Array<Types::Tag>)

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

  • :workflow_details (Types::WorkflowDetails)

    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 (Array<String>)

    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 (Types::S3StorageOptions)

    Specifies whether or not performance for your Amazon S3 directories is optimized.

    • If using the console, this is enabled by default.

    • If using the API or CLI, this is disabled by default.

    By default, home directory mappings have a TYPE of DIRECTORY. If you enable this option, you would then need to explicitly set the HomeDirectoryMapEntry Type to FILE if you want a mapping to have a file target.

  • :ip_address_type (String)

    Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is IPV4.

    The IpAddressType parameter has the following limitations:

    • It cannot be changed while the server is online. You must stop the server before modifying this parameter.

    • It cannot be updated to DUALSTACK if the server has AddressAllocationIds specified.

    When using DUALSTACK as the IpAddressType, you cannot set the AddressAllocationIds parameter for the EndpointDetails for the server.

Returns:

See Also:



1425
1426
1427
1428
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1425

def create_server(params = {}, options = {})
  req = build_request(:create_server, params)
  req.send_request(options)
end

#create_user(params = {}) ⇒ Types::CreateUserResponse

Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create and associate users with servers that have the IdentityProviderType set to SERVICE_MANAGED. Using parameters for CreateUser, you can specify the user name, set the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.

Examples:

Request syntax with placeholder values


resp = client.create_user({
  home_directory: "HomeDirectory",
  home_directory_type: "PATH", # accepts PATH, LOGICAL
  home_directory_mappings: [
    {
      entry: "MapEntry", # required
      target: "MapTarget", # required
      type: "FILE", # accepts FILE, DIRECTORY
    },
  ],
  policy: "Policy",
  posix_profile: {
    uid: 1, # required
    gid: 1, # required
    secondary_gids: [1],
  },
  role: "Role", # required
  server_id: "ServerId", # required
  ssh_public_key_body: "SshPublicKeyBody",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  user_name: "UserName", # required
})

Response structure


resp.server_id #=> String
resp.user_name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :home_directory (String)

    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.

    You can use the HomeDirectory parameter for HomeDirectoryType when it is set to either PATH or LOGICAL.

  • :home_directory_type (String)

    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 (Array<Types::HomeDirectoryMapEntry>)

    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 (String)

    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 (Types::PosixProfile)

    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 (required, String)

    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 (required, String)

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

  • :ssh_public_key_body (String)

    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 (Array<Types::Tag>)

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

  • :user_name (required, String)

    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.

Returns:

See Also:



1613
1614
1615
1616
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1613

def create_user(params = {}, options = {})
  req = build_request(:create_user, params)
  req.send_request(options)
end

#create_web_app(params = {}) ⇒ Types::CreateWebAppResponse

Creates a web app based on specified parameters, and returns the ID for the new web app. You can configure the web app to be publicly accessible or hosted within a VPC.

For more information about using VPC endpoints with Transfer Family, see Create a Transfer Family web app in a VPC.

Examples:

Request syntax with placeholder values


resp = client.create_web_app({
  identity_provider_details: { # required
    identity_center_config: {
      instance_arn: "IdentityCenterInstanceArn",
      role: "Role",
    },
  },
  access_endpoint: "WebAppAccessEndpoint",
  web_app_units: {
    provisioned: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  web_app_endpoint_policy: "FIPS", # accepts FIPS, STANDARD
  endpoint_details: {
    vpc: {
      subnet_ids: ["SubnetId"],
      vpc_id: "VpcId",
      security_group_ids: ["SecurityGroupId"],
      ip_address_type: "IPV4", # accepts IPV4, DUALSTACK
    },
  },
})

Response structure


resp.web_app_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :identity_provider_details (required, Types::WebAppIdentityProviderDetails)

    You can provide a structure that contains the details for the identity provider to use with your web app.

    For more details about this parameter, see Configure your identity provider for Transfer Family web apps.

  • :access_endpoint (String)

    The AccessEndpoint is the URL that you provide to your users for them to interact with the Transfer Family web app. You can specify a custom URL or use the default value.

    Before you enter a custom URL for this parameter, follow the steps described in Update your access endpoint with a custom URL.

  • :web_app_units (Types::WebAppUnits)

    A union that contains the value for number of concurrent connections or the user sessions on your web app.

  • :tags (Array<Types::Tag>)

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

  • :web_app_endpoint_policy (String)

    Setting for the type of endpoint policy for the web app. The default value is STANDARD.

    If you are creating the web app in an Amazon Web Services GovCloud (US) Region, you can set this parameter to FIPS.

  • :endpoint_details (Types::WebAppEndpointDetails)

    The endpoint configuration for the web app. You can specify whether the web app endpoint is publicly accessible or hosted within a VPC.

Returns:

See Also:



1712
1713
1714
1715
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1712

def create_web_app(params = {}, options = {})
  req = build_request(:create_web_app, params)
  req.send_request(options)
end

#create_workflow(params = {}) ⇒ Types::CreateWorkflowResponse

Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes. After creating a workflow, you can associate the workflow created with any transfer servers by specifying the workflow-details field in CreateServer and UpdateServer operations.

Examples:

Request syntax with placeholder values


resp = client.create_workflow({
  description: "WorkflowDescription",
  steps: [ # required
    {
      type: "COPY", # accepts COPY, CUSTOM, TAG, DELETE, DECRYPT
      copy_step_details: {
        name: "WorkflowStepName",
        destination_file_location: {
          s3_file_location: {
            bucket: "S3Bucket",
            key: "S3Key",
          },
          efs_file_location: {
            file_system_id: "EfsFileSystemId",
            path: "EfsPath",
          },
        },
        overwrite_existing: "TRUE", # accepts TRUE, FALSE
        source_file_location: "SourceFileLocation",
      },
      custom_step_details: {
        name: "WorkflowStepName",
        target: "CustomStepTarget",
        timeout_seconds: 1,
        source_file_location: "SourceFileLocation",
      },
      delete_step_details: {
        name: "WorkflowStepName",
        source_file_location: "SourceFileLocation",
      },
      tag_step_details: {
        name: "WorkflowStepName",
        tags: [
          {
            key: "S3TagKey", # required
            value: "S3TagValue", # required
          },
        ],
        source_file_location: "SourceFileLocation",
      },
      decrypt_step_details: {
        name: "WorkflowStepName",
        type: "PGP", # required, accepts PGP
        source_file_location: "SourceFileLocation",
        overwrite_existing: "TRUE", # accepts TRUE, FALSE
        destination_file_location: { # required
          s3_file_location: {
            bucket: "S3Bucket",
            key: "S3Key",
          },
          efs_file_location: {
            file_system_id: "EfsFileSystemId",
            path: "EfsPath",
          },
        },
      },
    },
  ],
  on_exception_steps: [
    {
      type: "COPY", # accepts COPY, CUSTOM, TAG, DELETE, DECRYPT
      copy_step_details: {
        name: "WorkflowStepName",
        destination_file_location: {
          s3_file_location: {
            bucket: "S3Bucket",
            key: "S3Key",
          },
          efs_file_location: {
            file_system_id: "EfsFileSystemId",
            path: "EfsPath",
          },
        },
        overwrite_existing: "TRUE", # accepts TRUE, FALSE
        source_file_location: "SourceFileLocation",
      },
      custom_step_details: {
        name: "WorkflowStepName",
        target: "CustomStepTarget",
        timeout_seconds: 1,
        source_file_location: "SourceFileLocation",
      },
      delete_step_details: {
        name: "WorkflowStepName",
        source_file_location: "SourceFileLocation",
      },
      tag_step_details: {
        name: "WorkflowStepName",
        tags: [
          {
            key: "S3TagKey", # required
            value: "S3TagValue", # required
          },
        ],
        source_file_location: "SourceFileLocation",
      },
      decrypt_step_details: {
        name: "WorkflowStepName",
        type: "PGP", # required, accepts PGP
        source_file_location: "SourceFileLocation",
        overwrite_existing: "TRUE", # accepts TRUE, FALSE
        destination_file_location: { # required
          s3_file_location: {
            bucket: "S3Bucket",
            key: "S3Key",
          },
          efs_file_location: {
            file_system_id: "EfsFileSystemId",
            path: "EfsPath",
          },
        },
      },
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.workflow_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :description (String)

    A textual description for the workflow.

  • :steps (required, Array<Types::WorkflowStep>)

    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 (Array<Types::WorkflowStep>)

    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 (Array<Types::Tag>)

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

Returns:

See Also:



1903
1904
1905
1906
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1903

def create_workflow(params = {}, options = {})
  req = build_request(:create_workflow, params)
  req.send_request(options)
end

#delete_access(params = {}) ⇒ Struct

Allows you to delete the access specified in the ServerID and ExternalID parameters.

Examples:

Request syntax with placeholder values


resp = client.delete_access({
  server_id: "ServerId", # required
  external_id: "ExternalId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :server_id (required, String)

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

  • :external_id (required, String)

    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: =,.@:/-

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1947
1948
1949
1950
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1947

def delete_access(params = {}, options = {})
  req = build_request(:delete_access, params)
  req.send_request(options)
end

#delete_agreement(params = {}) ⇒ Struct

Delete the agreement that's specified in the provided AgreementId.

Examples:

Request syntax with placeholder values


resp = client.delete_agreement({
  agreement_id: "AgreementId", # required
  server_id: "ServerId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :agreement_id (required, String)

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

  • :server_id (required, String)

    The server identifier associated with the agreement that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1975
1976
1977
1978
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1975

def delete_agreement(params = {}, options = {})
  req = build_request(:delete_agreement, params)
  req.send_request(options)
end

#delete_certificate(params = {}) ⇒ Struct

Deletes the certificate that's specified in the CertificateId parameter.

Examples:

Request syntax with placeholder values


resp = client.delete_certificate({
  certificate_id: "CertificateId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The identifier of the certificate object that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1998
1999
2000
2001
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1998

def delete_certificate(params = {}, options = {})
  req = build_request(:delete_certificate, params)
  req.send_request(options)
end

#delete_connector(params = {}) ⇒ Struct

Deletes the connector that's specified in the provided ConnectorId.

Examples:

Request syntax with placeholder values


resp = client.delete_connector({
  connector_id: "ConnectorId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :connector_id (required, String)

    The unique identifier for the connector.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2020
2021
2022
2023
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2020

def delete_connector(params = {}, options = {})
  req = build_request(:delete_connector, params)
  req.send_request(options)
end

#delete_host_key(params = {}) ⇒ Struct

Deletes the host key that's specified in the HostKeyId parameter.

Examples:

Request syntax with placeholder values


resp = client.delete_host_key({
  server_id: "ServerId", # required
  host_key_id: "HostKeyId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :server_id (required, String)

    The identifier of the server that contains the host key that you are deleting.

  • :host_key_id (required, String)

    The identifier of the host key that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2047
2048
2049
2050
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2047

def delete_host_key(params = {}, options = {})
  req = build_request(:delete_host_key, params)
  req.send_request(options)
end

#delete_profile(params = {}) ⇒ Struct

Deletes the profile that's specified in the ProfileId parameter.

Examples:

Request syntax with placeholder values


resp = client.delete_profile({
  profile_id: "ProfileId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :profile_id (required, String)

    The identifier of the profile that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2069
2070
2071
2072
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2069

def delete_profile(params = {}, options = {})
  req = build_request(:delete_profile, params)
  req.send_request(options)
end

#delete_server(params = {}) ⇒ Struct

Deletes the file transfer protocol-enabled server that you specify.

No response returns from this operation.

Examples:

Request syntax with placeholder values


resp = client.delete_server({
  server_id: "ServerId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :server_id (required, String)

    A unique system-assigned identifier for a server instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2093
2094
2095
2096
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2093

def delete_server(params = {}, options = {})
  req = build_request(:delete_server, params)
  req.send_request(options)
end

#delete_ssh_public_key(params = {}) ⇒ Struct

Deletes a user's Secure Shell (SSH) public key.

Examples:

Request syntax with placeholder values


resp = client.delete_ssh_public_key({
  server_id: "ServerId", # required
  ssh_public_key_id: "SshPublicKeyId", # required
  user_name: "UserName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a file transfer protocol-enabled server instance that has the user assigned to it.

  • :ssh_public_key_id (required, String)

    A unique identifier used to reference your user's specific SSH key.

  • :user_name (required, String)

    A unique string that identifies a user whose public key is being deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2125
2126
2127
2128
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2125

def delete_ssh_public_key(params = {}, options = {})
  req = build_request(:delete_ssh_public_key, params)
  req.send_request(options)
end

#delete_user(params = {}) ⇒ Struct

Deletes the user belonging to a file transfer protocol-enabled server you specify.

No response returns from this operation.

When you delete a user from a server, the user's information is lost.

Examples:

Request syntax with placeholder values


resp = client.delete_user({
  server_id: "ServerId", # required
  user_name: "UserName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server instance that has the user assigned to it.

  • :user_name (required, String)

    A unique string that identifies a user that is being deleted from a server.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2160
2161
2162
2163
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2160

def delete_user(params = {}, options = {})
  req = build_request(:delete_user, params)
  req.send_request(options)
end

#delete_web_app(params = {}) ⇒ Struct

Deletes the specified web app.

Examples:

Request syntax with placeholder values


resp = client.delete_web_app({
  web_app_id: "WebAppId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :web_app_id (required, String)

    Provide the unique identifier for the web app that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2182
2183
2184
2185
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2182

def delete_web_app(params = {}, options = {})
  req = build_request(:delete_web_app, params)
  req.send_request(options)
end

#delete_web_app_customization(params = {}) ⇒ Struct

Deletes the WebAppCustomization object that corresponds to the web app ID specified.

Examples:

Request syntax with placeholder values


resp = client.delete_web_app_customization({
  web_app_id: "WebAppId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :web_app_id (required, String)

    Provide the unique identifier for the web app that contains the customizations that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2206
2207
2208
2209
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2206

def delete_web_app_customization(params = {}, options = {})
  req = build_request(:delete_web_app_customization, params)
  req.send_request(options)
end

#delete_workflow(params = {}) ⇒ Struct

Deletes the specified workflow.

Examples:

Request syntax with placeholder values


resp = client.delete_workflow({
  workflow_id: "WorkflowId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :workflow_id (required, String)

    A unique identifier for the workflow.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2228
2229
2230
2231
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2228

def delete_workflow(params = {}, options = {})
  req = build_request(:delete_workflow, params)
  req.send_request(options)
end

#describe_access(params = {}) ⇒ Types::DescribeAccessResponse

Describes the access that is assigned to the specific file transfer protocol-enabled server, as identified by its ServerId property and its ExternalId.

The response from this call returns the properties of the access that is associated with the ServerId value that was specified.