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):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an 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, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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::InstanceProfileCredentails 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)
  • :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.

  • :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

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

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

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

  • :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 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 - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. 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.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

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

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :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_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_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.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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



358
359
360
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 358

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
    },
  ],
  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.

  • :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 EFS paths as is in their file transfer protocol clients. If you set it 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.

  • :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:



515
516
517
518
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 515

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.

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", # required
  access_role: "Role", # required
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # 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 (required, String)

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

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

  • :access_role (required, String)

    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.

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

Returns:

See Also:



600
601
602
603
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 600

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 an outbound connection for the AS2 protocol. The connector is required for sending files from a customer's non Amazon Web Services server.

Examples:

Request syntax with placeholder values


resp = client.create_connector({
  url: "Url", # required
  as_2_config: { # required
    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
    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
  },
  access_role: "Role", # required
  logging_role: "Role",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.connector_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :url (required, String)

    The URL of the partner's AS2 endpoint.

  • :as_2_config (required, Types::As2ConnectorConfig)

    A structure that contains the parameters for a connector object.

  • :access_role (required, String)

    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.

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

Returns:

See Also:



675
676
677
678
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 675

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

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

Creates the profile for the AS2 process. The agreement is between the partner and the AS2 process.

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)

    Indicates whether to list only LOCAL type profiles or only PARTNER type profiles. If not supplied in the request, the command lists all types of profiles.

  • :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:



732
733
734
735
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 732

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",
  },
  identity_provider_type: "SERVICE_MANAGED", # accepts SERVICE_MANAGED, API_GATEWAY, AWS_DIRECTORY_SERVICE, AWS_LAMBDA
  logging_role: "Role",
  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: [ # required
      {
        workflow_id: "WorkflowId", # required
        execution_role: "Role", # required
      },
    ],
  },
})

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

    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 Change the host key 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 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 (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 or 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 EFSevents. 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 AWS_DIRECTORY_SERVICE 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 to SERVICE_MANAGED.

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

    • 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 that is attached to 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.

Returns:

See Also:



1048
1049
1050
1051
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1048

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
    },
  ],
  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.

  • :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 EFS paths as is in their file transfer protocol clients. If you set it 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.

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

    Transfer Family accepts RSA, ECDSA, and ED25519 keys.

  • :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:



1210
1211
1212
1213
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1210

def create_user(params = {}, options = {})
  req = build_request(:create_user, 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
      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",
      },
    },
  ],
  on_exception_steps: [
    {
      type: "COPY", # accepts COPY, CUSTOM, TAG, DELETE
      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",
      },
    },
  ],
  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.

    • 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 S3 bucket and key, or the 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:



1365
1366
1367
1368
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1365

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:



1409
1410
1411
1412
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1409

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 ID associated with the agreement that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1436
1437
1438
1439
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1436

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 ID of the certificate object that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1459
1460
1461
1462
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1459

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

#delete_connector(params = {}) ⇒ Struct

Deletes the agreement 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:



1481
1482
1483
1484
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1481

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 HoskKeyId 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)

    Provide the ID of the server that contains the host key that you are deleting.

  • :host_key_id (required, String)

    The ID of the host key that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1508
1509
1510
1511
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1508

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 ID of the profile that you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1530
1531
1532
1533
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1530

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:



1554
1555
1556
1557
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1554

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:



1586
1587
1588
1589
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1586

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:



1621
1622
1623
1624
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1621

def delete_user(params = {}, options = {})
  req = build_request(:delete_user, 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:



1643
1644
1645
1646
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1643

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.

Examples:

Request syntax with placeholder values


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

Response structure


resp.server_id #=> String
resp.access.home_directory #=> String
resp.access.home_directory_mappings #=> Array
resp.access.home_directory_mappings[0].entry #=> String
resp.access.home_directory_mappings[0].target #=> String
resp.access.home_directory_type #=> String, one of "PATH", "LOGICAL"
resp.access.policy #=> String
resp.access.posix_profile.uid #=> Integer
resp.access.posix_profile.gid #=> Integer
resp.access.posix_profile.secondary_gids #=> Array
resp.access.posix_profile.secondary_gids[0] #=> Integer
resp.access.role #=> String
resp.access.external_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server that has this access 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:

See Also:



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

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

#describe_agreement(params = {}) ⇒ Types::DescribeAgreementResponse

Describes the agreement that's identified by the AgreementId.

Examples:

Request syntax with placeholder values


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

Response structure


resp.agreement.arn #=> String
resp.agreement.agreement_id #=> String
resp.agreement.description #=> String
resp.agreement.status #=> String, one of "ACTIVE", "INACTIVE"
resp.agreement.server_id #=> String
resp.agreement.local_profile_id #=> String
resp.agreement.partner_profile_id #=> String
resp.agreement.base_directory #=> String
resp.agreement.access_role #=> String
resp.agreement.tags #=> Array
resp.agreement.tags[0].key #=> String
resp.agreement.tags[0].value #=> String

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 ID that's associated with the agreement.

Returns:

See Also:



1754
1755
1756
1757
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1754

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

#describe_certificate(params = {}) ⇒ Types::DescribeCertificateResponse

Describes the certificate that's identified by the CertificateId.

Examples:

Request syntax with placeholder values


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

Response structure


resp.certificate.arn #=> String
resp.certificate.certificate_id #=> String
resp.certificate.usage #=> String, one of "SIGNING", "ENCRYPTION"
resp.certificate.status #=> String, one of "ACTIVE", "PENDING_ROTATION", "INACTIVE"
resp.certificate.certificate #=> String
resp.certificate.certificate_chain #=> String
resp.certificate.active_date #=> Time
resp.certificate.inactive_date #=> Time
resp.certificate.serial #=> String
resp.certificate.not_before_date #=> Time
resp.certificate.not_after_date #=> Time
resp.certificate.type #=> String, one of "CERTIFICATE", "CERTIFICATE_WITH_PRIVATE_KEY"
resp.certificate.description #=> String
resp.certificate.tags #=> Array
resp.certificate.tags[0].key #=> String
resp.certificate.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

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

Returns:

See Also:



1798
1799
1800
1801
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1798

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

#describe_connector(params = {}) ⇒ Types::DescribeConnectorResponse

Describes the connector that's identified by the ConnectorId.

Examples:

Request syntax with placeholder values


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

Response structure


resp.connector.arn #=> String
resp.connector.connector_id #=> String
resp.connector.url #=> String
resp.connector.as_2_config.local_profile_id #=> String
resp.connector.as_2_config.partner_profile_id #=> String
resp.connector.as_2_config.message_subject #=> String
resp.connector.as_2_config.compression #=> String, one of "ZLIB", "DISABLED"
resp.connector.as_2_config.encryption_algorithm #=> String, one of "AES128_CBC", "AES192_CBC", "AES256_CBC"
resp.connector.as_2_config.signing_algorithm #=> String, one of "SHA256", "SHA384", "SHA512", "SHA1", "NONE"
resp.connector.as_2_config.mdn_signing_algorithm #=> String, one of "SHA256", "SHA384", "SHA512", "SHA1", "NONE", "DEFAULT"
resp.connector.as_2_config.mdn_response #=> String, one of "SYNC", "NONE"
resp.connector.access_role #=> String
resp.connector.logging_role #=> String
resp.connector.tags #=> Array
resp.connector.tags[0].key #=> String
resp.connector.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :connector_id (required, String)

    The unique identifier for the connector.

Returns:

See Also:



1841
1842
1843
1844
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1841

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

#describe_execution(params = {}) ⇒ Types::DescribeExecutionResponse

You can use DescribeExecution to check the details of the execution of the specified workflow.

Examples:

Request syntax with placeholder values


resp = client.describe_execution({
  execution_id: "ExecutionId", # required
  workflow_id: "WorkflowId", # required
})

Response structure


resp.workflow_id #=> String
resp.execution.execution_id #=> String
resp.execution.initial_file_location.s3_file_location.bucket #=> String
resp.execution.initial_file_location.s3_file_location.key #=> String
resp.execution.initial_file_location.s3_file_location.version_id #=> String
resp.execution.initial_file_location.s3_file_location.etag #=> String
resp.execution.initial_file_location.efs_file_location.file_system_id #=> String
resp.execution.initial_file_location.efs_file_location.path #=> String
resp.execution..user_details.user_name #=> String
resp.execution..user_details.server_id #=> String
resp.execution..user_details.session_id #=> String
resp.execution.execution_role #=> String
resp.execution.logging_configuration.logging_role #=> String
resp.execution.logging_configuration.log_group_name #=> String
resp.execution.posix_profile.uid #=> Integer
resp.execution.posix_profile.gid #=> Integer
resp.execution.posix_profile.secondary_gids #=> Array
resp.execution.posix_profile.secondary_gids[0] #=> Integer
resp.execution.status #=> String, one of "IN_PROGRESS", "COMPLETED", "EXCEPTION", "HANDLING_EXCEPTION"
resp.execution.results.steps #=> Array
resp.execution.results.steps[0].step_type #=> String, one of "COPY", "CUSTOM", "TAG", "DELETE"
resp.execution.results.steps[0].outputs #=> String
resp.execution.results.steps[0].error.type #=> String, one of "PERMISSION_DENIED", "CUSTOM_STEP_FAILED", "THROTTLED", "ALREADY_EXISTS", "NOT_FOUND", "BAD_REQUEST", "TIMEOUT", "INTERNAL_SERVER_ERROR"
resp.execution.results.steps[0].error.message #=> String
resp.execution.results.on_exception_steps #=> Array
resp.execution.results.on_exception_steps[0].step_type #=> String, one of "COPY", "CUSTOM", "TAG", "DELETE"
resp.execution.results.on_exception_steps[0].outputs #=> String
resp.execution.results.on_exception_steps[0].error.type #=> String, one of "PERMISSION_DENIED", "CUSTOM_STEP_FAILED", "THROTTLED", "ALREADY_EXISTS", "NOT_FOUND", "BAD_REQUEST", "TIMEOUT", "INTERNAL_SERVER_ERROR"
resp.execution.results.on_exception_steps[0].error.message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :execution_id (required, String)

    A unique identifier for the execution of a workflow.

  • :workflow_id (required, String)

    A unique identifier for the workflow.

Returns:

See Also:



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

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

#describe_host_key(params = {}) ⇒ Types::DescribeHostKeyResponse

Returns the details of the host key that's specified by the HostKeyId and ServerId.

Examples:

Request syntax with placeholder values


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

Response structure


resp.host_key.arn #=> String
resp.host_key.host_key_id #=> String
resp.host_key.host_key_fingerprint #=> String
resp.host_key.description #=> String
resp.host_key.type #=> String
resp.host_key.date_imported #=> Time
resp.host_key.tags #=> Array
resp.host_key.tags[0].key #=> String
resp.host_key.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    Provide the ID of the server that contains the host key that you want described.

  • :host_key_id (required, String)

    Provide the ID of the host key that you want described.

Returns:

See Also:



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

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

#describe_profile(params = {}) ⇒ Types::DescribeProfileResponse

Returns the details of the profile that's specified by the ProfileId.

Examples:

Request syntax with placeholder values


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

Response structure


resp.profile.arn #=> String
resp.profile.profile_id #=> String
resp.profile.profile_type #=> String, one of "LOCAL", "PARTNER"
resp.profile.as_2_id #=> String
resp.profile.certificate_ids #=> Array
resp.profile.certificate_ids[0] #=> String
resp.profile.tags #=> Array
resp.profile.tags[0].key #=> String
resp.profile.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    The identifier of the profile that you want described.

Returns:

See Also:



1982
1983
1984
1985
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 1982

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

#describe_security_policy(params = {}) ⇒ Types::DescribeSecurityPolicyResponse

Describes the security policy that is attached to your file transfer protocol-enabled server. The response contains a description of the security policy's properties. For more information about security policies, see Working with security policies.

Examples:

Request syntax with placeholder values


resp = client.describe_security_policy({
  security_policy_name: "SecurityPolicyName", # required
})

Response structure


resp.security_policy.fips #=> Boolean
resp.security_policy.security_policy_name #=> String
resp.security_policy.ssh_ciphers #=> Array
resp.security_policy.ssh_ciphers[0] #=> String
resp.security_policy.ssh_kexs #=> Array
resp.security_policy.ssh_kexs[0] #=> String
resp.security_policy.ssh_macs #=> Array
resp.security_policy.ssh_macs[0] #=> String
resp.security_policy.tls_ciphers #=> Array
resp.security_policy.tls_ciphers[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :security_policy_name (required, String)

    Specifies the name of the security policy that is attached to the server.

Returns:

See Also:



2027
2028
2029
2030
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2027

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

#describe_server(params = {}) ⇒ Types::DescribeServerResponse

Describes a file transfer protocol-enabled server that you specify by passing the ServerId parameter.

The response contains a description of a server's properties. When you set EndpointType to VPC, the response will contain the EndpointDetails.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • server_offline
  • server_online

Examples:

Request syntax with placeholder values


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

Response structure


resp.server.arn #=> String
resp.server.certificate #=> String
resp.server.protocol_details.passive_ip #=> String
resp.server.protocol_details.tls_session_resumption_mode #=> String, one of "DISABLED", "ENABLED", "ENFORCED"
resp.server.protocol_details.set_stat_option #=> String, one of "DEFAULT", "ENABLE_NO_OP"
resp.server.protocol_details.as_2_transports #=> Array
resp.server.protocol_details.as_2_transports[0] #=> String, one of "HTTP"
resp.server.domain #=> String, one of "S3", "EFS"
resp.server.endpoint_details.address_allocation_ids #=> Array
resp.server.endpoint_details.address_allocation_ids[0] #=> String
resp.server.endpoint_details.subnet_ids #=> Array
resp.server.endpoint_details.subnet_ids[0] #=> String
resp.server.endpoint_details.vpc_endpoint_id #=> String
resp.server.endpoint_details.vpc_id #=> String
resp.server.endpoint_details.security_group_ids #=> Array
resp.server.endpoint_details.security_group_ids[0] #=> String
resp.server.endpoint_type #=> String, one of "PUBLIC", "VPC", "VPC_ENDPOINT"
resp.server.host_key_fingerprint #=> String
resp.server.identity_provider_details.url #=> String
resp.server.identity_provider_details.invocation_role #=> String
resp.server.identity_provider_details.directory_id #=> String
resp.server.identity_provider_details.function #=> String
resp.server.identity_provider_type #=> String, one of "SERVICE_MANAGED", "API_GATEWAY", "AWS_DIRECTORY_SERVICE", "AWS_LAMBDA"
resp.server.logging_role #=> String
resp.server. #=> String
resp.server. #=> String
resp.server.protocols #=> Array
resp.server.protocols[0] #=> String, one of "SFTP", "FTP", "FTPS", "AS2"
resp.server.security_policy_name #=> String
resp.server.server_id #=> String
resp.server.state #=> String, one of "OFFLINE", "ONLINE", "STARTING", "STOPPING", "START_FAILED", "STOP_FAILED"
resp.server.tags #=> Array
resp.server.tags[0].key #=> String
resp.server.tags[0].value #=> String
resp.server.user_count #=> Integer
resp.server.workflow_details.on_upload #=> Array
resp.server.workflow_details.on_upload[0].workflow_id #=> String
resp.server.workflow_details.on_upload[0].execution_role #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server.

Returns:

See Also:



2103
2104
2105
2106
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2103

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

#describe_user(params = {}) ⇒ Types::DescribeUserResponse

Describes the user assigned to the specific file transfer protocol-enabled server, as identified by its ServerId property.

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.server_id #=> String
resp.user.arn #=> String
resp.user.home_directory #=> String
resp.user.home_directory_mappings #=> Array
resp.user.home_directory_mappings[0].entry #=> String
resp.user.home_directory_mappings[0].target #=> String
resp.user.home_directory_type #=> String, one of "PATH", "LOGICAL"
resp.user.policy #=> String
resp.user.posix_profile.uid #=> Integer
resp.user.posix_profile.gid #=> Integer
resp.user.posix_profile.secondary_gids #=> Array
resp.user.posix_profile.secondary_gids[0] #=> Integer
resp.user.role #=> String
resp.user.ssh_public_keys #=> Array
resp.user.ssh_public_keys[0].date_imported #=> Time
resp.user.ssh_public_keys[0].ssh_public_key_body #=> String
resp.user.ssh_public_keys[0].ssh_public_key_id #=> String
resp.user.tags #=> Array
resp.user.tags[0].key #=> String
resp.user.tags[0].value #=> String
resp.user.user_name #=> String

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.

  • :user_name (required, String)

    The name of the user assigned to one or more servers. User names are part of the sign-in credentials to use the Transfer Family service and perform file transfer tasks.

Returns:

See Also:



2163
2164
2165
2166
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2163

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

#describe_workflow(params = {}) ⇒ Types::DescribeWorkflowResponse

Describes the specified workflow.

Examples:

Request syntax with placeholder values


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

Response structure


resp.workflow.arn #=> String
resp.workflow.description #=> String
resp.workflow.steps #=> Array
resp.workflow.steps[0].type #=> String, one of "COPY", "CUSTOM", "TAG", "DELETE"
resp.workflow.steps[0].copy_step_details.name #=> String
resp.workflow.steps[0].copy_step_details.destination_file_location.s3_file_location.bucket #=> String
resp.workflow.steps[0].copy_step_details.destination_file_location.s3_file_location.key #=> String
resp.workflow.steps[0].copy_step_details.destination_file_location.efs_file_location.file_system_id #=> String
resp.workflow.steps[0].copy_step_details.destination_file_location.efs_file_location.path #=> String
resp.workflow.steps[0].copy_step_details.overwrite_existing #=> String, one of "TRUE", "FALSE"
resp.workflow.steps[0].copy_step_details.source_file_location #=> String
resp.workflow.steps[0].custom_step_details.name #=> String
resp.workflow.steps[0].custom_step_details.target #=> String
resp.workflow.steps[0].custom_step_details.timeout_seconds #=> Integer
resp.workflow.steps[0].custom_step_details.source_file_location #=> String
resp.workflow.steps[0].delete_step_details.name #=> String
resp.workflow.steps[0].delete_step_details.source_file_location #=> String
resp.workflow.steps[0].tag_step_details.name #=> String
resp.workflow.steps[0].tag_step_details.tags #=> Array
resp.workflow.steps[0].tag_step_details.tags[0].key #=> String
resp.workflow.steps[0].tag_step_details.tags[0].value #=> String
resp.workflow.steps[0].tag_step_details.source_file_location #=> String
resp.workflow.on_exception_steps #=> Array
resp.workflow.on_exception_steps[0].type #=> String, one of "COPY", "CUSTOM", "TAG", "DELETE"
resp.workflow.on_exception_steps[0].copy_step_details.name #=> String
resp.workflow.on_exception_steps[0].copy_step_details.destination_file_location.s3_file_location.bucket #=> String
resp.workflow.on_exception_steps[0].copy_step_details.destination_file_location.s3_file_location.key #=> String
resp.workflow.on_exception_steps[0].copy_step_details.destination_file_location.efs_file_location.file_system_id #=> String
resp.workflow.on_exception_steps[0].copy_step_details.destination_file_location.efs_file_location.path #=> String
resp.workflow.on_exception_steps[0].copy_step_details.overwrite_existing #=> String, one of "TRUE", "FALSE"
resp.workflow.on_exception_steps[0].copy_step_details.source_file_location #=> String
resp.workflow.on_exception_steps[0].custom_step_details.name #=> String
resp.workflow.on_exception_steps[0].custom_step_details.target #=> String
resp.workflow.on_exception_steps[0].custom_step_details.timeout_seconds #=> Integer
resp.workflow.on_exception_steps[0].custom_step_details.source_file_location #=> String
resp.workflow.on_exception_steps[0].delete_step_details.name #=> String
resp.workflow.on_exception_steps[0].delete_step_details.source_file_location #=> String
resp.workflow.on_exception_steps[0].tag_step_details.name #=> String
resp.workflow.on_exception_steps[0].tag_step_details.tags #=> Array
resp.workflow.on_exception_steps[0].tag_step_details.tags[0].key #=> String
resp.workflow.on_exception_steps[0].tag_step_details.tags[0].value #=> String
resp.workflow.on_exception_steps[0].tag_step_details.source_file_location #=> String
resp.workflow.workflow_id #=> String
resp.workflow.tags #=> Array
resp.workflow.tags[0].key #=> String
resp.workflow.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :workflow_id (required, String)

    A unique identifier for the workflow.

Returns:

See Also:



2236
2237
2238
2239
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2236

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

#import_certificate(params = {}) ⇒ Types::ImportCertificateResponse

Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner profiles.

Examples:

Request syntax with placeholder values


resp = client.import_certificate({
  usage: "SIGNING", # required, accepts SIGNING, ENCRYPTION
  certificate: "CertificateBodyType", # required
  certificate_chain: "CertificateChainType",
  private_key: "PrivateKeyType",
  active_date: Time.now,
  inactive_date: Time.now,
  description: "Description",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.certificate_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :usage (required, String)

    Specifies whether this certificate is used for signing or encryption.

  • :certificate (required, String)

    The file that contains the certificate to import.

  • :certificate_chain (String)

    An optional list of certificates that make up the chain for the certificate that's being imported.

  • :private_key (String)

    The file that contains the private key for the certificate that's being imported.

  • :active_date (Time, DateTime, Date, Integer, String)

    An optional date that specifies when the certificate becomes active.

  • :inactive_date (Time, DateTime, Date, Integer, String)

    An optional date that specifies when the certificate becomes inactive.

  • :description (String)

    A short description that helps identify the certificate.

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

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

Returns:

See Also:



2300
2301
2302
2303
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2300

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

#import_host_key(params = {}) ⇒ Types::ImportHostKeyResponse

Adds a host key to the server specified by the ServerId parameter.

Examples:

Request syntax with placeholder values


resp = client.import_host_key({
  server_id: "ServerId", # required
  host_key_body: "HostKey", # required
  description: "HostKeyDescription",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.server_id #=> String
resp.host_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    Provide the ID of the server that contains the host key that you are importing.

  • :host_key_body (required, String)

    The public key portion of an SSH key pair.

    Transfer Family accepts RSA, ECDSA, and ED25519 keys.

  • :description (String)

    Enter a text description to identify this host key.

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

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

Returns:

See Also:



2350
2351
2352
2353
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2350

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

#import_ssh_public_key(params = {}) ⇒ Types::ImportSshPublicKeyResponse

Adds a Secure Shell (SSH) public key to a user account identified by a UserName value assigned to the specific file transfer protocol-enabled server, identified by ServerId.

The response returns the UserName value, the ServerId value, and the name of the SshPublicKeyId.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server.

  • :ssh_public_key_body (required, String)

    The public key portion of an SSH key pair.

    Transfer Family accepts RSA, ECDSA, and ED25519 keys.

  • :user_name (required, String)

    The name of the user account that is assigned to one or more servers.

Returns:

See Also:



2397
2398
2399
2400
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2397

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

#list_accesses(params = {}) ⇒ Types::ListAccessesResponse

Lists the details for all the accesses you have on your server.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_accesses({
  max_results: 1,
  next_token: "NextToken",
  server_id: "ServerId", # required
})

Response structure


resp.next_token #=> String
resp.server_id #=> String
resp.accesses #=> Array
resp.accesses[0].home_directory #=> String
resp.accesses[0].home_directory_type #=> String, one of "PATH", "LOGICAL"
resp.accesses[0].role #=> String
resp.accesses[0].external_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the maximum number of access SIDs to return.

  • :next_token (String)

    When you can get additional results from the ListAccesses call, a NextToken parameter is returned in the output. You can then pass in a subsequent command to the NextToken parameter to continue listing additional accesses.

  • :server_id (required, String)

    A system-assigned unique identifier for a server that has users assigned to it.

Returns:

See Also:



2447
2448
2449
2450
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2447

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

#list_agreements(params = {}) ⇒ Types::ListAgreementsResponse

Returns a list of the agreements for the server that's identified by the ServerId that you supply. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for NextToken, you can supply that value to continue listing agreements from where you left off.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_agreements({
  max_results: 1,
  next_token: "NextToken",
  server_id: "ServerId", # required
})

Response structure


resp.next_token #=> String
resp.agreements #=> Array
resp.agreements[0].arn #=> String
resp.agreements[0].agreement_id #=> String
resp.agreements[0].description #=> String
resp.agreements[0].status #=> String, one of "ACTIVE", "INACTIVE"
resp.agreements[0].server_id #=> String
resp.agreements[0].local_profile_id #=> String
resp.agreements[0].partner_profile_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of agreements to return.

  • :next_token (String)

    When you can get additional results from the ListAgreements call, a NextToken parameter is returned in the output. You can then pass in a subsequent command to the NextToken parameter to continue listing additional agreements.

  • :server_id (required, String)

    The identifier of the server for which you want a list of agreements.

Returns:

See Also:



2502
2503
2504
2505
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2502

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

#list_certificates(params = {}) ⇒ Types::ListCertificatesResponse

Returns a list of the current certificates that have been imported into Transfer Family. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for the NextToken parameter, you can supply that value to continue listing certificates from where you left off.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_certificates({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.certificates #=> Array
resp.certificates[0].arn #=> String
resp.certificates[0].certificate_id #=> String
resp.certificates[0].usage #=> String, one of "SIGNING", "ENCRYPTION"
resp.certificates[0].status #=> String, one of "ACTIVE", "PENDING_ROTATION", "INACTIVE"
resp.certificates[0].active_date #=> Time
resp.certificates[0].inactive_date #=> Time
resp.certificates[0].type #=> String, one of "CERTIFICATE", "CERTIFICATE_WITH_PRIVATE_KEY"
resp.certificates[0].description #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of certificates to return.

  • :next_token (String)

    When you can get additional results from the ListCertificates call, a NextToken parameter is returned in the output. You can then pass in a subsequent command to the NextToken parameter to continue listing additional certificates.

Returns:

See Also:



2554
2555
2556
2557
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2554

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

#list_connectors(params = {}) ⇒ Types::ListConnectorsResponse

Lists the connectors for the specified Region.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_connectors({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.connectors #=> Array
resp.connectors[0].arn #=> String
resp.connectors[0].connector_id #=> String
resp.connectors[0].url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of connectors to return.

  • :next_token (String)

    When you can get additional results from the ListConnectors call, a NextToken parameter is returned in the output. You can then pass in a subsequent command to the NextToken parameter to continue listing additional connectors.

Returns:

See Also:



2596
2597
2598
2599
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2596

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

#list_executions(params = {}) ⇒ Types::ListExecutionsResponse

Lists all executions for the specified workflow.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_executions({
  max_results: 1,
  next_token: "NextToken",
  workflow_id: "WorkflowId", # required
})

Response structure


resp.next_token #=> String
resp.workflow_id #=> String
resp.executions #=> Array
resp.executions[0].execution_id #=> String
resp.executions[0].initial_file_location.s3_file_location.bucket #=> String
resp.executions[0].initial_file_location.s3_file_location.key #=> String
resp.executions[0].initial_file_location.s3_file_location.version_id #=> String
resp.executions[0].initial_file_location.s3_file_location.etag #=> String
resp.executions[0].initial_file_location.efs_file_location.file_system_id #=> String
resp.executions[0].initial_file_location.efs_file_location.path #=> String
resp.executions[0]..user_details.user_name #=> String
resp.executions[0]..user_details.server_id #=> String
resp.executions[0]..user_details.session_id #=> String
resp.executions[0].status #=> String, one of "IN_PROGRESS", "COMPLETED", "EXCEPTION", "HANDLING_EXCEPTION"

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the maximum number of executions to return.

  • :next_token (String)

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

    A unique identifier for the workflow.

Returns:

See Also:



2668
2669
2670
2671
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2668

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

#list_host_keys(params = {}) ⇒ Types::ListHostKeysResponse

Returns a list of host keys for the server specified by the ServerId paramter.

Examples:

Request syntax with placeholder values


resp = client.list_host_keys({
  max_results: 1,
  next_token: "NextToken",
  server_id: "ServerId", # required
})

Response structure


resp.next_token #=> String
resp.server_id #=> String
resp.host_keys #=> Array
resp.host_keys[0].arn #=> String
resp.host_keys[0].host_key_id #=> String
resp.host_keys[0].fingerprint #=> String
resp.host_keys[0].description #=> String
resp.host_keys[0].type #=> String
resp.host_keys[0].date_imported #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of host keys to return.

  • :next_token (String)

    When there are additional results that were not returned, a NextToken parameter is returned. You can use that value for a subsequent call to ListHostKeys to continue listing results.

  • :server_id (required, String)

    Provide the ID of the server that contains the host keys that you want to view.

Returns:

See Also:



2718
2719
2720
2721
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2718

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

#list_profiles(params = {}) ⇒ Types::ListProfilesResponse

Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for NextToken, you can supply that value to continue listing profiles from where you left off.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_profiles({
  max_results: 1,
  next_token: "NextToken",
  profile_type: "LOCAL", # accepts LOCAL, PARTNER
})

Response structure


resp.next_token #=> String
resp.profiles #=> Array
resp.profiles[0].arn #=> String
resp.profiles[0].profile_id #=> String
resp.profiles[0].as_2_id #=> String
resp.profiles[0].profile_type #=> String, one of "LOCAL", "PARTNER"

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of profiles to return.

  • :next_token (String)

    When there are additional results that were not returned, a NextToken parameter is returned. You can use that value for a subsequent call to ListProfiles to continue listing results.

  • :profile_type (String)

    Indicates whether to list only LOCAL type profiles or only PARTNER type profiles. If not supplied in the request, the command lists all types of profiles.

Returns:

See Also:



2770
2771
2772
2773
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2770

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

#list_security_policies(params = {}) ⇒ Types::ListSecurityPoliciesResponse

Lists the security policies that are attached to your file transfer protocol-enabled servers.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_security_policies({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.security_policy_names #=> Array
resp.security_policy_names[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the number of security policies to return as a response to the ListSecurityPolicies query.

  • :next_token (String)

    When additional results are obtained from the ListSecurityPolicies command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional security policies.

Returns:

See Also:



2812
2813
2814
2815
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2812

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

#list_servers(params = {}) ⇒ Types::ListServersResponse

Lists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_servers({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.servers #=> Array
resp.servers[0].arn #=> String
resp.servers[0].domain #=> String, one of "S3", "EFS"
resp.servers[0].identity_provider_type #=> String, one of "SERVICE_MANAGED", "API_GATEWAY", "AWS_DIRECTORY_SERVICE", "AWS_LAMBDA"
resp.servers[0].endpoint_type #=> String, one of "PUBLIC", "VPC", "VPC_ENDPOINT"
resp.servers[0].logging_role #=> String
resp.servers[0].server_id #=> String
resp.servers[0].state #=> String, one of "OFFLINE", "ONLINE", "STARTING", "STOPPING", "START_FAILED", "STOP_FAILED"
resp.servers[0].user_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the number of servers to return as a response to the ListServers query.

  • :next_token (String)

    When additional results are obtained from the ListServers command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional servers.

Returns:

See Also:



2861
2862
2863
2864
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2861

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

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  arn: "Arn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.arn #=> String
resp.next_token #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    Requests the tags associated with a particular Amazon Resource Name (ARN). An ARN is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.

  • :max_results (Integer)

    Specifies the number of tags to return as a response to the ListTagsForResource request.

  • :next_token (String)

    When you request additional results from the ListTagsForResource operation, a NextToken parameter is returned in the input. You can then pass in a subsequent command to the NextToken parameter to continue listing additional tags.

Returns:

See Also:



2912
2913
2914
2915
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2912

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

#list_users(params = {}) ⇒ Types::ListUsersResponse

Lists the users for a file transfer protocol-enabled server that you specify by passing the ServerId parameter.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_users({
  max_results: 1,
  next_token: "NextToken",
  server_id: "ServerId", # required
})

Response structure


resp.next_token #=> String
resp.server_id #=> String
resp.users #=> Array
resp.users[0].arn #=> String
resp.users[0].home_directory #=> String
resp.users[0].home_directory_type #=> String, one of "PATH", "LOGICAL"
resp.users[0].role #=> String
resp.users[0].ssh_public_key_count #=> Integer
resp.users[0].user_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the number of users to return as a response to the ListUsers request.

  • :next_token (String)

    When you can get additional results from the ListUsers call, a NextToken parameter is returned in the output. You can then pass in a subsequent command to the NextToken parameter to continue listing additional users.

  • :server_id (required, String)

    A system-assigned unique identifier for a server that has users assigned to it.

Returns:

See Also:



2966
2967
2968
2969
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 2966

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

#list_workflows(params = {}) ⇒ Types::ListWorkflowsResponse

Lists all of your workflows.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_workflows({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.workflows #=> Array
resp.workflows[0].workflow_id #=> String
resp.workflows[0].description #=> String
resp.workflows[0].arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Specifies the maximum number of workflows to return.

  • :next_token (String)

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

Returns:

See Also:



3007
3008
3009
3010
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3007

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

#send_workflow_step_state(params = {}) ⇒ Struct

Sends a callback for asynchronous custom steps.

The ExecutionId, WorkflowId, and Token are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status.

Examples:

Request syntax with placeholder values


resp = client.send_workflow_step_state({
  workflow_id: "WorkflowId", # required
  execution_id: "ExecutionId", # required
  token: "CallbackToken", # required
  status: "SUCCESS", # required, accepts SUCCESS, FAILURE
})

Parameters:

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

    ({})

Options Hash (params):

  • :workflow_id (required, String)

    A unique identifier for the workflow.

  • :execution_id (required, String)

    A unique identifier for the execution of a workflow.

  • :token (required, String)

    Used to distinguish between multiple callbacks for multiple Lambda steps within the same execution.

  • :status (required, String)

    Indicates whether the specified step succeeded or failed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3046
3047
3048
3049
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3046

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

#start_file_transfer(params = {}) ⇒ Types::StartFileTransferResponse

Begins an outbound file transfer. You specify the ConnectorId and the file paths for where to send the files.

Examples:

Request syntax with placeholder values


resp = client.start_file_transfer({
  connector_id: "ConnectorId", # required
  send_file_paths: ["FilePath"], # required
})

Response structure


resp.transfer_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :connector_id (required, String)

    The unique identifier for the connector.

  • :send_file_paths (required, Array<String>)

    An array of strings. Each string represents the absolute path for one outbound file transfer. For example, DOC-EXAMPLE-BUCKET/myfile.txt .

Returns:

See Also:



3081
3082
3083
3084
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3081

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

#start_server(params = {}) ⇒ Struct

Changes the state of a file transfer protocol-enabled server from OFFLINE to ONLINE. It has no impact on a server that is already ONLINE. An ONLINE server can accept and process file transfer jobs.

The state of STARTING indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of START_FAILED can indicate an error condition.

No response is returned from this call.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server that you start.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3112
3113
3114
3115
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3112

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

#stop_server(params = {}) ⇒ Struct

Changes the state of a file transfer protocol-enabled server from ONLINE to OFFLINE. An OFFLINE server cannot accept and process file transfer jobs. Information tied to your server, such as server and user properties, are not affected by stopping your server.

Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the server to stop being billed.

The state of STOPPING indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of STOP_FAILED can indicate an error condition.

No response is returned from this call.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned unique identifier for a server that you stopped.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3149
3150
3151
3152
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3149

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

#tag_resource(params = {}) ⇒ Struct

Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.

There is no response returned from this call.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  arn: "Arn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    An Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a server, user, or role.

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

    Key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to user accounts for any purpose.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3187
3188
3189
3190
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3187

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

#test_identity_provider(params = {}) ⇒ Types::TestIdentityProviderResponse

If the IdentityProviderType of a file transfer protocol-enabled server is AWS_DIRECTORY_SERVICE or API_Gateway, tests whether your identity provider is set up successfully. We highly recommend that you call this operation to test your authentication method as soon as you create your server. By doing so, you can troubleshoot issues with the identity provider integration to ensure that your users can successfully use the service.

The ServerId and UserName parameters are required. The ServerProtocol, SourceIp, and UserPassword are all optional.

You cannot use TestIdentityProvider if the IdentityProviderType of your server is SERVICE_MANAGED.

  • If you provide any incorrect values for any parameters, the Response field is empty.

  • If you provide a server ID for a server that uses service-managed users, you get an error:

    An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth

  • If you enter a Server ID for the --server-id parameter that does not identify an actual Transfer server, you receive the following error:

    An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server

Examples:

Request syntax with placeholder values


resp = client.test_identity_provider({
  server_id: "ServerId", # required
  server_protocol: "SFTP", # accepts SFTP, FTP, FTPS, AS2
  source_ip: "SourceIp",
  user_name: "UserName", # required
  user_password: "UserPassword",
})

Response structure


resp.response #=> String
resp.status_code #=> Integer
resp.message #=> String
resp.url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    A system-assigned identifier for a specific server. That server's user authentication method is tested with a user name and password.

  • :server_protocol (String)

    The type of file transfer protocol to be tested.

    The available protocols are:

    • Secure Shell (SSH) File Transfer Protocol (SFTP)

    • File Transfer Protocol Secure (FTPS)

    • File Transfer Protocol (FTP)

  • :source_ip (String)

    The source IP address of the user account to be tested.

  • :user_name (required, String)

    The name of the user account to be tested.

  • :user_password (String)

    The password of the user account to be tested.

Returns:

See Also:



3277
3278
3279
3280
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3277

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

#untag_resource(params = {}) ⇒ Struct

Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.

No response is returned from this call.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.

  • :tag_keys (required, Array<String>)

    TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3311
3312
3313
3314
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3311

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

#update_access(params = {}) ⇒ Types::UpdateAccessResponse

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

Examples:

Request syntax with placeholder values


resp = client.update_access({
  home_directory: "HomeDirectory",
  home_directory_type: "PATH", # accepts PATH, LOGICAL
  home_directory_mappings: [
    {
      entry: "MapEntry", # required
      target: "MapTarget", # required
    },
  ],
  policy: "Policy",
  posix_profile: {
    uid: 1, # required
    gid: 1, # required
    secondary_gids: [1],
  },
  role: "Role",
  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.

  • :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 EFS paths as is in their file transfer protocol clients. If you set it 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.

  • :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 Amazon Web ServicesSecurity 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 (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:



3462
3463
3464
3465
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3462

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

#update_agreement(params = {}) ⇒ Types::UpdateAgreementResponse

Updates some of the parameters for an existing agreement. Provide the AgreementId and the ServerId for the agreement that you want to update, along with the new values for the parameters to update.

Examples:

Request syntax with placeholder values


resp = client.update_agreement({
  agreement_id: "AgreementId", # required
  server_id: "ServerId", # required
  description: "Description",
  status: "ACTIVE", # accepts ACTIVE, INACTIVE
  local_profile_id: "ProfileId",
  partner_profile_id: "ProfileId",
  base_directory: "HomeDirectory",
  access_role: "Role",
})

Response structure


resp.agreement_id #=> String

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)

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

  • :description (String)

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

  • :status (String)

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

  • :local_profile_id (String)

    A unique identifier for the AS2 local profile.

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

  • :partner_profile_id (String)

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

  • :base_directory (String)

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

  • :access_role (String)

    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.

Returns:

See Also:



3540
3541
3542
3543
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3540

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

#update_certificate(params = {}) ⇒ Types::UpdateCertificateResponse

Updates the active and inactive dates for a certificate.

Examples:

Request syntax with placeholder values


resp = client.update_certificate({
  certificate_id: "CertificateId", # required
  active_date: Time.now,
  inactive_date: Time.now,
  description: "Description",
})

Response structure


resp.certificate_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_id (required, String)

    The identifier of the certificate object that you are updating.

  • :active_date (Time, DateTime, Date, Integer, String)

    An optional date that specifies when the certificate becomes active.

  • :inactive_date (Time, DateTime, Date, Integer, String)

    An optional date that specifies when the certificate becomes inactive.

  • :description (String)

    A short description to help identify the certificate.

Returns:

See Also:



3580
3581
3582
3583
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3580

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

#update_connector(params = {}) ⇒ Types::UpdateConnectorResponse

Updates some of the parameters for an existing connector. Provide the ConnectorId for the connector that you want to update, along with the new values for the parameters to update.

Examples:

Request syntax with placeholder values


resp = client.update_connector({
  connector_id: "ConnectorId", # required
  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
    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
  },
  access_role: "Role",
  logging_role: "Role",
})

Response structure


resp.connector_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :connector_id (required, String)

    The unique identifier for the connector.

  • :url (String)

    The URL of the partner's AS2 endpoint.

  • :as_2_config (Types::As2ConnectorConfig)

    A structure that contains the parameters for a connector object.

  • :access_role (String)

    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.

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

Returns:

See Also:



3649
3650
3651
3652
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3649

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

#update_host_key(params = {}) ⇒ Types::UpdateHostKeyResponse

Updates the description for the host key specified by the specified by the ServerId and HostKeyId parameters.

Examples:

Request syntax with placeholder values


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

Response structure


resp.server_id #=> String
resp.host_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_id (required, String)

    Provide the ID of the server that contains the host key that you are updating.

  • :host_key_id (required, String)

    Provide the ID of the host key that you are updating.

  • :description (required, String)

    Provide an updated description for the host key.

Returns:

See Also:



3689
3690
3691
3692
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3689

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

#update_profile(params = {}) ⇒ Types::UpdateProfileResponse

Updates some of the parameters for an existing profile. Provide the ProfileId for the profile that you want to update, along with the new values for the parameters to update.

Examples:

Request syntax with placeholder values


resp = client.update_profile({
  profile_id: "ProfileId", # required
  certificate_ids: ["CertificateId"],
})

Response structure


resp.profile_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_id (required, String)

    The identifier of the profile object that you are updating.

  • :certificate_ids (Array<String>)

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

Returns:

See Also:



3724
3725
3726
3727
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 3724

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

#update_server(params = {}) ⇒ Types::UpdateServerResponse

Updates the file transfer protocol-enabled server's properties after that server has been created.

The UpdateServer call returns the ServerId of the server you updated.

Examples:

Request syntax with placeholder values


resp = client.update_server({
  certificate: "Certificate",
  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
  },
  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",
  },
  logging_role: "NullableRole",
  post_authentication_login_banner: "PostAuthenticationLoginBanner",
  pre_authentication_login_banner: "PreAuthenticationLoginBanner",
  protocols: ["SFTP"], # accepts SFTP, FTP, FTPS, AS2
  security_policy_name: "SecurityPolicyName",
  server_id: "ServerId", # required
  workflow_details: {
    on_upload: [ # required
      {
        workflow_id: "WorkflowId", # required
        execution_role: "Role", # required
      },
    ],
  },
})

Response structure


resp.server_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate (String)

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

    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 (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 Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already created servers with EndpointType=VPC_ENDPOINT in your Amazon Web Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use EndpointType=VPC.

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

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

  • :host_key (String)

    The RSA, ECDSA, or ED25519 private key to use for your server.

    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 Change the host key for your SFTP-enabled server in the Transfer Family User Guide.

  • :identity_provider_details (Types::IdentityProviderDetails)

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

  • :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 EFSevents. 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 AWS_DIRECTORY_SERVICE 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 to SERVICE_MANAGED.

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

  • :security_policy_name (String)

    Specifies the name of the security policy that is attached to the server.

  • :server_id (required, String)

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

  • :workflow_details (Types::WorkflowDetails)

    Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.

    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":[]\}'

Returns:

See Also:



4007
4008
4009
4010
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 4007

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

#update_user(params = {}) ⇒ Types::UpdateUserResponse

Assigns new properties to a user. Parameters you pass modify any or all of the following: the home directory, role, and policy for the UserName and ServerId you specify.

The response returns the ServerId and the UserName for the updated user.

Examples:

Request syntax with placeholder values


resp = client.update_user({
  home_directory: "HomeDirectory",
  home_directory_type: "PATH", # accepts PATH, LOGICAL
  home_directory_mappings: [
    {
      entry: "MapEntry", # required
      target: "MapTarget", # required
    },
  ],
  policy: "Policy",
  posix_profile: {
    uid: 1, # required
    gid: 1, # required
    secondary_gids: [1],
  },
  role: "Role",
  server_id: "ServerId", # 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.

  • :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 EFS paths as is in their file transfer protocol clients. If you set it 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.

  • :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 Creating a 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 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 (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 that the user account is assigned to.

  • :user_name (required, String)

    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.

Returns:

See Also:



4152
4153
4154
4155
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 4152

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

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
server_offline #describe_server 30 120
server_online #describe_server 30 120

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



4263
4264
4265
4266
4267
# File 'gems/aws-sdk-transfer/lib/aws-sdk-transfer/client.rb', line 4263

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end