Reference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.
REST client for the StorageTransferService service.
Storage Transfer Service and its protos. Transfers data between between Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the StorageTransferService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all StorageTransferService clients ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the StorageTransferService 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_agent_pool
def create_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
def create_agent_pool(project_id: nil, agent_pool: nil, agent_pool_id: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
Creates an agent pool resource.
def create_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
create_agent_pool
via a request object, either of type
CreateAgentPoolRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::CreateAgentPoolRequest, ::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_agent_pool(project_id: nil, agent_pool: nil, agent_pool_id: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
create_agent_pool
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).
- project_id (::String) — Required. The ID of the Google Cloud project that owns the agent pool.
- agent_pool (::Google::Cloud::StorageTransfer::V1::AgentPool, ::Hash) — Required. The agent pool to create.
-
agent_pool_id (::String) — Required. The ID of the agent pool to create.
The
agent_pool_id
must meet the following requirements:- Length of 128 characters or less.
- Not start with the string
goog
. - Start with a lowercase ASCII character, followed by:
- Zero or more: lowercase Latin alphabet characters, numerals,
hyphens (
-
), periods (.
), underscores (_
), or tildes (~
). - One or more numerals or lowercase ASCII characters.
- Zero or more: lowercase Latin alphabet characters, numerals,
hyphens (
As expressed by the regular expression:
^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::CreateAgentPoolRequest.new # Call the create_agent_pool method. result = client.create_agent_pool request # The returned object is of type Google::Cloud::StorageTransfer::V1::AgentPool. p result
#create_transfer_job
def create_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
def create_transfer_job(transfer_job: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
Creates a transfer job that runs periodically.
def create_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
create_transfer_job
via a request object, either of type
CreateTransferJobRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::CreateTransferJobRequest, ::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_transfer_job(transfer_job: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
create_transfer_job
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).
- transfer_job (::Google::Cloud::StorageTransfer::V1::TransferJob, ::Hash) — Required. The job to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::CreateTransferJobRequest.new # Call the create_transfer_job method. result = client.create_transfer_job request # The returned object is of type Google::Cloud::StorageTransfer::V1::TransferJob. p result
#delete_agent_pool
def delete_agent_pool(request, options = nil) -> ::Google::Protobuf::Empty
def delete_agent_pool(name: nil) -> ::Google::Protobuf::Empty
Deletes an agent pool.
def delete_agent_pool(request, options = nil) -> ::Google::Protobuf::Empty
delete_agent_pool
via a request object, either of type
DeleteAgentPoolRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::DeleteAgentPoolRequest, ::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_agent_pool(name: nil) -> ::Google::Protobuf::Empty
delete_agent_pool
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. The name of the agent pool to delete.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::DeleteAgentPoolRequest.new # Call the delete_agent_pool method. result = client.delete_agent_pool request # The returned object is of type Google::Protobuf::Empty. p result
#delete_transfer_job
def delete_transfer_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_transfer_job(job_name: nil, project_id: nil) -> ::Google::Protobuf::Empty
Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
def delete_transfer_job(request, options = nil) -> ::Google::Protobuf::Empty
delete_transfer_job
via a request object, either of type
DeleteTransferJobRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::DeleteTransferJobRequest, ::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_transfer_job(job_name: nil, project_id: nil) -> ::Google::Protobuf::Empty
delete_transfer_job
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).
- job_name (::String) — Required. The job to delete.
- project_id (::String) — Required. The ID of the Google Cloud project that owns the job.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::DeleteTransferJobRequest.new # Call the delete_transfer_job method. result = client.delete_transfer_job request # The returned object is of type Google::Protobuf::Empty. p result
#get_agent_pool
def get_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
def get_agent_pool(name: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
Gets an agent pool.
def get_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
get_agent_pool
via a request object, either of type
GetAgentPoolRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::GetAgentPoolRequest, ::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_agent_pool(name: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
get_agent_pool
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. The name of the agent pool to get.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::GetAgentPoolRequest.new # Call the get_agent_pool method. result = client.get_agent_pool request # The returned object is of type Google::Cloud::StorageTransfer::V1::AgentPool. p result
#get_google_service_account
def get_google_service_account(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount
def get_google_service_account(project_id: nil) -> ::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount
Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.
def get_google_service_account(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount
get_google_service_account
via a request object, either of type
GetGoogleServiceAccountRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::GetGoogleServiceAccountRequest, ::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_google_service_account(project_id: nil) -> ::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount
get_google_service_account
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).
- project_id (::String) — Required. The ID of the Google Cloud project that the Google service account is associated with.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::GetGoogleServiceAccountRequest.new # Call the get_google_service_account method. result = client.get_google_service_account request # The returned object is of type Google::Cloud::StorageTransfer::V1::GoogleServiceAccount. p result
#get_transfer_job
def get_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
def get_transfer_job(job_name: nil, project_id: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
Gets a transfer job.
def get_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
get_transfer_job
via a request object, either of type
GetTransferJobRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::GetTransferJobRequest, ::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_transfer_job(job_name: nil, project_id: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
get_transfer_job
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).
- job_name (::String) — Required. The job to get.
- project_id (::String) — Required. The ID of the Google Cloud project that owns the job.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::GetTransferJobRequest.new # Call the get_transfer_job method. result = client.get_transfer_job request # The returned object is of type Google::Cloud::StorageTransfer::V1::TransferJob. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new StorageTransferService REST client object.
- (config) — Configure the StorageTransferService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_agent_pools
def list_agent_pools(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>
def list_agent_pools(project_id: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>
Lists agent pools.
def list_agent_pools(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>
list_agent_pools
via a request object, either of type
ListAgentPoolsRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::ListAgentPoolsRequest, ::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_agent_pools(project_id: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>
list_agent_pools
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).
- project_id (::String) — Required. The ID of the Google Cloud project that owns the job.
-
filter (::String) — An optional list of query parameters specified as JSON text in the
form of:
{"agentPoolNames":["agentpool1","agentpool2",...]}
Since
agentPoolNames
support multiple values, its values must be specified with array notation. When the filter is either empty or not provided, the list returns all agent pools for the project. -
page_size (::Integer) — The list page size. The max allowed value is
256
. - page_token (::String) — The list page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::ListAgentPoolsRequest.new # Call the list_agent_pools method. result = client.list_agent_pools 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::StorageTransfer::V1::AgentPool. p item end
#list_transfer_jobs
def list_transfer_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>
def list_transfer_jobs(filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>
Lists transfer jobs.
def list_transfer_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>
list_transfer_jobs
via a request object, either of type
ListTransferJobsRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::ListTransferJobsRequest, ::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_transfer_jobs(filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>
list_transfer_jobs
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).
-
filter (::String) — Required. A list of query parameters specified as JSON text in the form of:
{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...]}
Since
jobNames
andjobStatuses
support multiple values, their values must be specified with array notation.projectId
is required.jobNames
andjobStatuses
are optional. The valid values forjobStatuses
are case-insensitive: ENABLED, DISABLED, and DELETED. - page_size (::Integer) — The list page size. The max allowed value is 256.
- page_token (::String) — The list page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::ListTransferJobsRequest.new # Call the list_transfer_jobs method. result = client.list_transfer_jobs 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::StorageTransfer::V1::TransferJob. p item end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Operations
Get the associated client for long-running operations.
#pause_transfer_operation
def pause_transfer_operation(request, options = nil) -> ::Google::Protobuf::Empty
def pause_transfer_operation(name: nil) -> ::Google::Protobuf::Empty
Pauses a transfer operation.
def pause_transfer_operation(request, options = nil) -> ::Google::Protobuf::Empty
pause_transfer_operation
via a request object, either of type
PauseTransferOperationRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::PauseTransferOperationRequest, ::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 pause_transfer_operation(name: nil) -> ::Google::Protobuf::Empty
pause_transfer_operation
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. The name of the transfer operation.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::PauseTransferOperationRequest.new # Call the pause_transfer_operation method. result = client.pause_transfer_operation request # The returned object is of type Google::Protobuf::Empty. p result
#resume_transfer_operation
def resume_transfer_operation(request, options = nil) -> ::Google::Protobuf::Empty
def resume_transfer_operation(name: nil) -> ::Google::Protobuf::Empty
Resumes a transfer operation that is paused.
def resume_transfer_operation(request, options = nil) -> ::Google::Protobuf::Empty
resume_transfer_operation
via a request object, either of type
ResumeTransferOperationRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::ResumeTransferOperationRequest, ::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 resume_transfer_operation(name: nil) -> ::Google::Protobuf::Empty
resume_transfer_operation
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. The name of the transfer operation.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::ResumeTransferOperationRequest.new # Call the resume_transfer_operation method. result = client.resume_transfer_operation request # The returned object is of type Google::Protobuf::Empty. p result
#run_transfer_job
def run_transfer_job(request, options = nil) -> ::Gapic::Operation
def run_transfer_job(job_name: nil, project_id: nil) -> ::Gapic::Operation
Starts a new operation for the specified transfer job.
A TransferJob
has a maximum of one active TransferOperation
. If this
method is called while a TransferOperation
is active, an error is
returned.
def run_transfer_job(request, options = nil) -> ::Gapic::Operation
run_transfer_job
via a request object, either of type
RunTransferJobRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::RunTransferJobRequest, ::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 run_transfer_job(job_name: nil, project_id: nil) -> ::Gapic::Operation
run_transfer_job
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).
- job_name (::String) — Required. The name of the transfer job.
- project_id (::String) — Required. The ID of the Google Cloud project that owns the transfer job.
- (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/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::RunTransferJobRequest.new # Call the run_transfer_job method. result = client.run_transfer_job 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
- (String)
#update_agent_pool
def update_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
def update_agent_pool(agent_pool: nil, update_mask: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
Updates an existing agent pool resource.
def update_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
update_agent_pool
via a request object, either of type
UpdateAgentPoolRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::UpdateAgentPoolRequest, ::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_agent_pool(agent_pool: nil, update_mask: nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPool
update_agent_pool
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).
-
agent_pool (::Google::Cloud::StorageTransfer::V1::AgentPool, ::Hash) —
Required. The agent pool to update.
agent_pool
is expected to specify following fields:bandwidth_limit An
UpdateAgentPoolRequest
with any other fields is rejected with the error INVALID_ARGUMENT.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
The field mask of the fields in
agentPool
to update in this request. The followingagentPool
fields can be updated:
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::UpdateAgentPoolRequest.new # Call the update_agent_pool method. result = client.update_agent_pool request # The returned object is of type Google::Cloud::StorageTransfer::V1::AgentPool. p result
#update_transfer_job
def update_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
def update_transfer_job(job_name: nil, project_id: nil, transfer_job: nil, update_transfer_job_field_mask: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already.
Note: The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED).
def update_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
update_transfer_job
via a request object, either of type
UpdateTransferJobRequest or an equivalent Hash.
- request (::Google::Cloud::StorageTransfer::V1::UpdateTransferJobRequest, ::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_transfer_job(job_name: nil, project_id: nil, transfer_job: nil, update_transfer_job_field_mask: nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJob
update_transfer_job
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).
- job_name (::String) — Required. The name of job to update.
- project_id (::String) — Required. The ID of the Google Cloud project that owns the job.
-
transfer_job (::Google::Cloud::StorageTransfer::V1::TransferJob, ::Hash) — Required. The job to update.
transferJob
is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. AnUpdateTransferJobRequest
that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requiresstoragetransfer.jobs.delete
permission. -
update_transfer_job_field_mask (::Google::Protobuf::FieldMask, ::Hash) — The field mask of the fields in
transferJob
that are to be updated in this request. Fields intransferJob
that can be updated are: description, transfer_spec, notification_config, logging_config, and status. To update thetransfer_spec
of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error INVALID_ARGUMENT.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/storage_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::StorageTransfer::V1::StorageTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::StorageTransfer::V1::UpdateTransferJobRequest.new # Call the update_transfer_job method. result = client.update_transfer_job request # The returned object is of type Google::Cloud::StorageTransfer::V1::TransferJob. p result