Cloud FTP V1 API - Class Google::Cloud::Ftp::V1::CloudFtp::Rest::Client (v0.1.1)

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

Configure the CloudFtp Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# 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::Configuration

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

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_server

def create_server(request, options = nil) -> ::Gapic::Operation
def create_server(parent: nil, server_id: nil, server: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Server in a given project and location.

Overloads
def create_server(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_server via a request object, either of type Google::Cloud::Ftp::V1::CreateServerRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to create_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).
Parameters
  • 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).

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Creates a new User in a given project and location and Server.

Overloads
def create_user(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_user via a request object, either of type Google::Cloud::Ftp::V1::CreateUserRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to create_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).
Parameters
  • 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).

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Deletes a single Server.

Overloads
def delete_server(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_server via a request object, either of type DeleteServerRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to delete_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).
Parameter
  • name (::String) — Required. Name of the resource
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Deletes a single User.

Overloads
def delete_user(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_user via a request object, either of type DeleteUserRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to delete_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).
Parameters
  • name (::String) — Required. Name of the resource
  • force (::Boolean) — Optional. If set to true, the request will force the deletion of the User.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Gets details of a single Server.

Overloads
def get_server(request, options = nil) -> ::Google::Cloud::Ftp::V1::Server
Pass arguments to get_server via a request object, either of type GetServerRequest or an equivalent Hash.
Parameters
  • 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::Server
Pass arguments to get_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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Gets details of a single User.

Overloads
def get_user(request, options = nil) -> ::Google::Cloud::Ftp::V1::User
Pass arguments to get_user via a request object, either of type GetUserRequest or an equivalent Hash.
Parameters
  • 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::User
Pass arguments to get_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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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| ... } -> Client

Create a new CloudFtp REST client object.

Yields
  • (config) — Configure the CloudFtp client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# 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.

Overloads
def list_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::Server>
Pass arguments to list_servers via a request object, either of type ListServersRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def list_users(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ftp::V1::User>
Pass arguments to list_users via a request object, either of type ListUsersRequest or an equivalent Hash.
Parameters
  • 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>
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::Ftp::V1::CloudFtp::Rest::Operations

Get the associated client for long-running operations.

#start_server

def start_server(request, options = nil) -> ::Gapic::Operation
def start_server(name: nil) -> ::Gapic::Operation

Starts a stopping/stopped Server.

Overloads
def start_server(request, options = nil) -> ::Gapic::Operation
Pass arguments to start_server via a request object, either of type StartServerRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to start_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).
Parameter
  • name (::String) — Required. Name of the resource Format: projects/{project}/locations/{location}/servers/{server}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Stops an active Server.

Overloads
def stop_server(request, options = nil) -> ::Gapic::Operation
Pass arguments to stop_server via a request object, either of type StopServerRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to stop_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).
Parameter
  • name (::String) — Required. Name of the resource. Format: projects/{project}/locations/{location}/servers/{server}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

The effective universe domain

Returns
  • (String)

#update_server

def update_server(request, options = nil) -> ::Gapic::Operation
def update_server(update_mask: nil, server: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Server.

Overloads
def update_server(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_server via a request object, either of type UpdateServerRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to update_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).
Parameters
  • 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).

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Updates the parameters of a single User.

Overloads
def update_user(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_user via a request object, either of type UpdateUserRequest or an equivalent Hash.
Parameters
  • 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::Operation
Pass arguments to update_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).
Parameters
  • 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
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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