Reference documentation and code samples for the Cloud FTP V1 API class Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.
REST client for the CloudFtp service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the CloudFtp Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudFtp clients ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the CloudFtp Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_server
def create_server(request, options = nil) -> ::Gapic::Operation
def create_server(parent: nil, server_id: nil, server: nil, request_id: nil) -> ::Gapic::OperationCreates a new Server in a given project and location.
def create_server(request, options = nil) -> ::Gapic::Operationcreate_server via a request object, either of type
Google::Cloud::Ftp::V1::CreateServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::CreateServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_server(parent: nil, server_id: nil, server: nil, request_id: nil) -> ::Gapic::Operationcreate_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Value for parent.
- server_id (::String) — Required. A unique ID for the server. Must start with a lowercase letter, and end with a lowercase letter or number. Can contain lowercase letters, numbers, and hyphens. Maximum length is 30 characters.
- server (::Google::Cloud::Ftp::V1::Server, ::Hash) — Required. The resource being created
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::CreateServerRequest.new # Call the create_server method. result = client.create_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#create_user
def create_user(request, options = nil) -> ::Gapic::Operation
def create_user(parent: nil, user_id: nil, user: nil, request_id: nil) -> ::Gapic::OperationCreates a new User in a given project and location and Server.
def create_user(request, options = nil) -> ::Gapic::Operationcreate_user via a request object, either of type
Google::Cloud::Ftp::V1::CreateUserRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::CreateUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_user(parent: nil, user_id: nil, user: nil, request_id: nil) -> ::Gapic::Operationcreate_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Value for parent.
- user_id (::String) — Required. A unique user ID for the SFTP user. The user ID must start with a lowercase letter and can include lowercase letters, numbers, or hyphens.
- user (::Google::Cloud::Ftp::V1::User, ::Hash) — Required. The resource being created
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::CreateUserRequest.new # Call the create_user method. result = client.create_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_server
def delete_server(request, options = nil) -> ::Gapic::Operation
def delete_server(name: nil) -> ::Gapic::OperationDeletes a single Server.
def delete_server(request, options = nil) -> ::Gapic::Operationdelete_server via a request object, either of type
DeleteServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::DeleteServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_server(name: nil) -> ::Gapic::Operationdelete_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::DeleteServerRequest.new # Call the delete_server method. result = client.delete_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_user
def delete_user(request, options = nil) -> ::Gapic::Operation
def delete_user(name: nil, force: nil) -> ::Gapic::OperationDeletes a single User.
def delete_user(request, options = nil) -> ::Gapic::Operationdelete_user via a request object, either of type
DeleteUserRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::DeleteUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_user(name: nil, force: nil) -> ::Gapic::Operationdelete_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- force (::Boolean) — Optional. If set to true, the request will force the deletion of the User.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::DeleteUserRequest.new # Call the delete_user method. result = client.delete_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_server
def get_server(request, options = nil) -> ::Google::Cloud::Ftp::V1::Server
def get_server(name: nil, view: nil) -> ::Google::Cloud::Ftp::V1::ServerGets details of a single Server.
def get_server(request, options = nil) -> ::Google::Cloud::Ftp::V1::Serverget_server via a request object, either of type
GetServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::GetServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_server(name: nil, view: nil) -> ::Google::Cloud::Ftp::V1::Serverget_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- view (::Google::Cloud::Ftp::V1::ServerView) — Optional. The view of the Server resource to return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Ftp::V1::Server)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::GetServerRequest.new # Call the get_server method. result = client.get_server request # The returned object is of type Google::Cloud::Ftp::V1::Server. p result
#get_user
def get_user(request, options = nil) -> ::Google::Cloud::Ftp::V1::User
def get_user(name: nil, view: nil) -> ::Google::Cloud::Ftp::V1::UserGets details of a single User.
def get_user(request, options = nil) -> ::Google::Cloud::Ftp::V1::Userget_user via a request object, either of type
GetUserRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::GetUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_user(name: nil, view: nil) -> ::Google::Cloud::Ftp::V1::Userget_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the resource
- view (::Google::Cloud::Ftp::V1::UserView) — Optional. The view of the User resource to return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Ftp::V1::User)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::GetUserRequest.new # Call the get_user method. result = client.get_user request # The returned object is of type Google::Cloud::Ftp::V1::User. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new CloudFtp REST client object.
- (config) — Configure the CloudFtp client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new do |config| config.timeout = 10.0 end
#list_servers
def list_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>
def list_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>Lists Servers in a given project and location.
def list_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>list_servers via a request object, either of type
ListServersRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::ListServersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>list_servers via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListServersRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- view (::Google::Cloud::Ftp::V1::ServerView) — Optional. The view of the Server resource to return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::ListServersRequest.new # Call the list_servers method. result = client.list_servers request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Ftp::V1::Server. p item end
#list_users
def list_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>
def list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>Lists Users in a given project and location.
def list_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>list_users via a request object, either of type
ListUsersRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::ListUsersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>list_users via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Parent value for ListUsersRequest
- page_size (::Integer) — Optional. Requested page size. User may return fewer items than requested. The maximum value is 1000; The default value is 50 if the field is omitted (or set to 0).
- page_token (::String) — Optional. A token identifying a page of results the user should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- view (::Google::Cloud::Ftp::V1::UserView) — Optional. The view of the User resource to return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::ListUsersRequest.new # Call the list_users method. result = client.list_users request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Ftp::V1::User. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Ftp::V1::CloudFtp::Rest::OperationsGet the associated client for long-running operations.
#start_server
def start_server(request, options = nil) -> ::Gapic::Operation
def start_server(name: nil) -> ::Gapic::OperationStarts a stopping/stopped Server.
def start_server(request, options = nil) -> ::Gapic::Operationstart_server via a request object, either of type
StartServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::StartServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def start_server(name: nil) -> ::Gapic::Operationstart_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the resource
Format:
projects/{project}/locations/{location}/servers/{server}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::StartServerRequest.new # Call the start_server method. result = client.start_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#stop_server
def stop_server(request, options = nil) -> ::Gapic::Operation
def stop_server(name: nil) -> ::Gapic::OperationStops an active Server.
def stop_server(request, options = nil) -> ::Gapic::Operationstop_server via a request object, either of type
StopServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::StopServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def stop_server(name: nil) -> ::Gapic::Operationstop_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the resource.
Format:
projects/{project}/locations/{location}/servers/{server}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::StopServerRequest.new # Call the stop_server method. result = client.stop_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_server
def update_server(request, options = nil) -> ::Gapic::Operation
def update_server(update_mask: nil, server: nil, request_id: nil) -> ::Gapic::OperationUpdates the parameters of a single Server.
def update_server(request, options = nil) -> ::Gapic::Operationupdate_server via a request object, either of type
UpdateServerRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::UpdateServerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_server(update_mask: nil, server: nil, request_id: nil) -> ::Gapic::Operationupdate_server via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the Server resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.
- server (::Google::Cloud::Ftp::V1::Server, ::Hash) — Required. The resource being updated
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::UpdateServerRequest.new # Call the update_server method. result = client.update_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_user
def update_user(request, options = nil) -> ::Gapic::Operation
def update_user(update_mask: nil, user: nil) -> ::Gapic::OperationUpdates the parameters of a single User.
def update_user(request, options = nil) -> ::Gapic::Operationupdate_user via a request object, either of type
UpdateUserRequest or an equivalent Hash.
- request (::Google::Cloud::Ftp::V1::UpdateUserRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_user(update_mask: nil, user: nil) -> ::Gapic::Operationupdate_user via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.
- user (::Google::Cloud::Ftp::V1::User, ::Hash) — Required. The resource being updated
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/ftp/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Ftp::V1::CloudFtp::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Ftp::V1::UpdateUserRequest.new # Call the update_user method. result = client.update_user request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end