Class: Aws::Transfer::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Transfer::Client
- Includes:
- ClientStubs
- Defined in:
- 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](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_server(params = {}) ⇒ Types::CreateServerResponse
Instantiates an autoscaling virtual server based on Secure File Transfer Protocol (SFTP) in AWS.
-
#create_user(params = {}) ⇒ Types::CreateUserResponse
Creates a user and associates them with an existing Secure File Transfer Protocol (SFTP) server.
-
#delete_server(params = {}) ⇒ Struct
Deletes the Secure File Transfer Protocol (SFTP) server that you specify.
-
#delete_ssh_public_key(params = {}) ⇒ Struct
Deletes a user’s Secure Shell (SSH) public key.
-
#delete_user(params = {}) ⇒ Struct
Deletes the user belonging to the server you specify.
-
#describe_server(params = {}) ⇒ Types::DescribeServerResponse
Describes the server that you specify by passing the ‘ServerId` parameter.
-
#describe_user(params = {}) ⇒ Types::DescribeUserResponse
Describes the user assigned to a specific server, as identified by its ‘ServerId` property.
-
#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 a specific server, identified by `ServerId`.
-
#list_servers(params = {}) ⇒ Types::ListServersResponse
Lists the Secure File Transfer Protocol (SFTP) servers that are associated with your AWS account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all of the tags associated with the Amazon Resource Number (ARN) you specify.
-
#list_users(params = {}) ⇒ Types::ListUsersResponse
Lists the users for the server that you specify by passing the ‘ServerId` parameter.
-
#start_server(params = {}) ⇒ Struct
Changes the state of a Secure File Transfer Protocol (SFTP) server from ‘OFFLINE` to `ONLINE`.
-
#stop_server(params = {}) ⇒ Struct
Changes the state of an SFTP server from ‘ONLINE` to `OFFLINE`.
-
#tag_resource(params = {}) ⇒ Struct
Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN).
-
#test_identity_provider(params = {}) ⇒ Types::TestIdentityProviderResponse
If the ‘IdentityProviderType` of the server is `API_Gateway`, tests whether your API Gateway is set up successfully.
-
#untag_resource(params = {}) ⇒ Struct
Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN).
-
#update_server(params = {}) ⇒ Types::UpdateServerResponse
Updates the server properties after that server has been created.
-
#update_user(params = {}) ⇒ Types::UpdateUserResponse
Assigns new properties to a user.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
316 317 318 |
# File 'lib/aws-sdk-transfer/client.rb', line 316 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1371 1372 1373 |
# File 'lib/aws-sdk-transfer/client.rb', line 1371 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1374 1375 1376 |
# File 'lib/aws-sdk-transfer/client.rb', line 1374 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 |
# File 'lib/aws-sdk-transfer/client.rb', line 1349 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-transfer' context[:gem_version] = '1.17.0' Seahorse::Client::Request.new(handlers, context) end |
#create_server(params = {}) ⇒ Types::CreateServerResponse
Instantiates an autoscaling virtual server based on Secure File Transfer Protocol (SFTP) in AWS. When you make updates to your server or when you work with users, use the service-generated ‘ServerId` property that is assigned to the newly created server.
412 413 414 415 |
# File 'lib/aws-sdk-transfer/client.rb', line 412 def create_server(params = {}, = {}) req = build_request(:create_server, params) req.send_request() end |
#create_user(params = {}) ⇒ Types::CreateUserResponse
Creates a user and associates them with an existing Secure File Transfer Protocol (SFTP) server. You can only create and associate users with SFTP 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 AWS Identity and Access Management (IAM) role. You can also optionally add a scope-down policy, and assign metadata with tags that can be used to group and search for users.
555 556 557 558 |
# File 'lib/aws-sdk-transfer/client.rb', line 555 def create_user(params = {}, = {}) req = build_request(:create_user, params) req.send_request() end |
#delete_server(params = {}) ⇒ Struct
Deletes the Secure File Transfer Protocol (SFTP) server that you specify.
No response returns from this operation.
580 581 582 583 |
# File 'lib/aws-sdk-transfer/client.rb', line 580 def delete_server(params = {}, = {}) req = build_request(:delete_server, params) req.send_request() end |
#delete_ssh_public_key(params = {}) ⇒ Struct
Deletes a user’s Secure Shell (SSH) public key.
No response is returned from this operation.
614 615 616 617 |
# File 'lib/aws-sdk-transfer/client.rb', line 614 def delete_ssh_public_key(params = {}, = {}) req = build_request(:delete_ssh_public_key, params) req.send_request() end |
#delete_user(params = {}) ⇒ Struct
Deletes the user belonging to the server you specify.
No response returns from this operation.
<note markdown=“1”> When you delete a user from a server, the user’s information is lost.
</note>
648 649 650 651 |
# File 'lib/aws-sdk-transfer/client.rb', line 648 def delete_user(params = {}, = {}) req = build_request(:delete_user, params) req.send_request() end |
#describe_server(params = {}) ⇒ Types::DescribeServerResponse
Describes the server that you specify by passing the ‘ServerId` parameter.
The response contains a description of the server’s properties. When you set ‘EndpointType` to VPC, the response will contain the `EndpointDetails`.
699 700 701 702 |
# File 'lib/aws-sdk-transfer/client.rb', line 699 def describe_server(params = {}, = {}) req = build_request(:describe_server, params) req.send_request() end |
#describe_user(params = {}) ⇒ Types::DescribeUserResponse
Describes the user assigned to a specific 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.
755 756 757 758 |
# File 'lib/aws-sdk-transfer/client.rb', line 755 def describe_user(params = {}, = {}) req = build_request(:describe_user, params) req.send_request() 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 a specific server, identified by `ServerId`.
The response returns the ‘UserName` value, the `ServerId` value, and the name of the `SshPublicKeyId`.
800 801 802 803 |
# File 'lib/aws-sdk-transfer/client.rb', line 800 def import_ssh_public_key(params = {}, = {}) req = build_request(:import_ssh_public_key, params) req.send_request() end |
#list_servers(params = {}) ⇒ Types::ListServersResponse
Lists the Secure File Transfer Protocol (SFTP) servers that are associated with your AWS account.
846 847 848 849 |
# File 'lib/aws-sdk-transfer/client.rb', line 846 def list_servers(params = {}, = {}) req = build_request(:list_servers, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all of the tags associated with the Amazon Resource Number (ARN) you specify. The resource can be a user, server, or role.
895 896 897 898 |
# File 'lib/aws-sdk-transfer/client.rb', line 895 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#list_users(params = {}) ⇒ Types::ListUsersResponse
Lists the users for the server that you specify by passing the ‘ServerId` parameter.
947 948 949 950 |
# File 'lib/aws-sdk-transfer/client.rb', line 947 def list_users(params = {}, = {}) req = build_request(:list_users, params) req.send_request() end |
#start_server(params = {}) ⇒ Struct
Changes the state of a Secure File Transfer Protocol (SFTP) server from ‘OFFLINE` to `ONLINE`. It has no impact on an SFTP 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.
978 979 980 981 |
# File 'lib/aws-sdk-transfer/client.rb', line 978 def start_server(params = {}, = {}) req = build_request(:start_server, params) req.send_request() end |
#stop_server(params = {}) ⇒ Struct
Changes the state of an SFTP 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 a server will not reduce or impact your Secure File Transfer Protocol (SFTP) endpoint billing.
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.
1012 1013 1014 1015 |
# File 'lib/aws-sdk-transfer/client.rb', line 1012 def stop_server(params = {}, = {}) req = build_request(:stop_server, params) req.send_request() 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.
1050 1051 1052 1053 |
# File 'lib/aws-sdk-transfer/client.rb', line 1050 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#test_identity_provider(params = {}) ⇒ Types::TestIdentityProviderResponse
If the ‘IdentityProviderType` of the server is `API_Gateway`, tests whether your API Gateway 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 API Gateway integration to ensure that your users can successfully use the service.
1098 1099 1100 1101 |
# File 'lib/aws-sdk-transfer/client.rb', line 1098 def test_identity_provider(params = {}, = {}) req = build_request(:test_identity_provider, params) req.send_request() 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.
1132 1133 1134 1135 |
# File 'lib/aws-sdk-transfer/client.rb', line 1132 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_server(params = {}) ⇒ Types::UpdateServerResponse
Updates the server properties after that server has been created.
The ‘UpdateServer` call returns the `ServerId` of the Secure File Transfer Protocol (SFTP) server you updated.
1211 1212 1213 1214 |
# File 'lib/aws-sdk-transfer/client.rb', line 1211 def update_server(params = {}, = {}) req = build_request(:update_server, params) req.send_request() 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.
1340 1341 1342 1343 |
# File 'lib/aws-sdk-transfer/client.rb', line 1340 def update_user(params = {}, = {}) req = build_request(:update_user, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1364 1365 1366 |
# File 'lib/aws-sdk-transfer/client.rb', line 1364 def waiter_names [] end |