Reference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::StorageTransferService::Client.
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::ConfigurationConfigure 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::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure 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::AgentPoolCreates an agent pool resource.
def create_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPoolcreate_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::AgentPoolcreate_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_idmust 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])?$.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::TransferJobCreates a transfer job that runs periodically.
def create_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJobcreate_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::TransferJobcreate_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::EmptyDeletes an agent pool.
def delete_agent_pool(request, options = nil) -> ::Google::Protobuf::Emptydelete_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::Emptydelete_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::EmptyDeletes a transfer job. Deleting a transfer job sets its status to DELETED.
def delete_transfer_job(request, options = nil) -> ::Google::Protobuf::Emptydelete_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::Emptydelete_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::AgentPoolGets an agent pool.
def get_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPoolget_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::AgentPoolget_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::GoogleServiceAccountReturns 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::GoogleServiceAccountget_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::GoogleServiceAccountget_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::GoogleServiceAccount)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::TransferJobGets a transfer job.
def get_transfer_job(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::TransferJobget_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::TransferJobget_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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| ... } -> ClientCreate a new StorageTransferService 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::Client.new # Create a client using a custom configuration client = ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Client.new do |config| config.timeout = 10.0 end
#list_agent_pools
def list_agent_pools(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>
def list_agent_pools(project_id: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>Lists agent pools.
def list_agent_pools(request, options = nil) -> ::Gapic::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::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
agentPoolNamessupport 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::AgentPool>)
- (::Google::Cloud::Error) — if the RPC 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::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::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>
def list_transfer_jobs(filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>Lists transfer jobs.
def list_transfer_jobs(request, options = nil) -> ::Gapic::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::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",...], "dataBackend":"QUERY_REPLICATION_CONFIGS", "sourceBucket":"source-bucket-name", "sinkBucket":"sink-bucket-name", }The JSON formatting in the example is for display only; provide the query parameters without spaces or line breaks.
projectIdis required.- Since
jobNamesandjobStatusessupport multiple values, their values must be specified with array notation.jobNamesandjobStatusesare optional. Valid values are case-insensitive: - Specify
"dataBackend":"QUERY_REPLICATION_CONFIGS"to return a list of cross-bucket replication jobs. - Limit the results to jobs from a particular bucket with
sourceBucketand/or to a particular bucket withsinkBucket.
- page_size (::Integer) — The list page size. The max allowed value is 256.
- page_token (::String) — The list page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::StorageTransfer::V1::TransferJob>)
- (::Google::Cloud::Error) — if the RPC 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::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() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::StorageTransfer::V1::StorageTransferService::OperationsGet 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::EmptyPauses a transfer operation.
def pause_transfer_operation(request, options = nil) -> ::Google::Protobuf::Emptypause_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::Emptypause_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::EmptyResumes a transfer operation that is paused.
def resume_transfer_operation(request, options = nil) -> ::Google::Protobuf::Emptyresume_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::Emptyresume_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::OperationStarts 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::Operationrun_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::Operationrun_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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() -> StringThe 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::AgentPoolUpdates an existing agent pool resource.
def update_agent_pool(request, options = nil) -> ::Google::Cloud::StorageTransfer::V1::AgentPoolupdate_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::AgentPoolupdate_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_poolis expected to specify following fields:bandwidth_limit An
UpdateAgentPoolRequestwith any other fields is rejected with the error INVALID_ARGUMENT.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
The field mask of the fields in
agentPoolto update in this request. The followingagentPoolfields can be updated:
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::AgentPool)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::TransferJobUpdates 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::TransferJobupdate_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::TransferJobupdate_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.
transferJobis expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. AnUpdateTransferJobRequestthat specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requiresstoragetransfer.jobs.deletepermission. -
update_transfer_job_field_mask (::Google::Protobuf::FieldMask, ::Hash) — The field mask of the fields in
transferJobthat are to be updated in this request. Fields intransferJobthat can be updated are: description, transfer_spec, notification_config, logging_config, and status. To update thetransfer_specof the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error INVALID_ARGUMENT.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::StorageTransfer::V1::TransferJob)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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