Class: Google::Apis::StoragetransferV1::StoragetransferService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::StoragetransferV1::StoragetransferService
- Defined in:
- generated/google/apis/storagetransfer_v1/service.rb
Overview
Google Storage Transfer API
Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Cancels a transfer.
-
#create_transfer_job(transfer_job_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Creates a transfer job that runs periodically.
-
#delete_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
This method is not supported and the server returns
UNIMPLEMENTED. -
#get_google_service_account(project_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::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.
-
#get_transfer_job(job_name, project_id: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Gets a transfer job.
-
#get_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Operation
Gets the latest state of a long-running operation.
-
#initialize ⇒ StoragetransferService
constructor
A new instance of StoragetransferService.
-
#list_transfer_jobs(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::ListTransferJobsResponse
Lists transfer jobs.
-
#list_transfer_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#patch_transfer_job(job_name, update_transfer_job_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Updates a transfer job.
-
#pause_transfer_operation(name, pause_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Pauses a transfer operation.
-
#resume_transfer_operation(name, resume_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Resumes a transfer operation that is paused.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ StoragetransferService
Returns a new instance of StoragetransferService
46 47 48 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 46 def initialize super('https://storagetransfer.googleapis.com/', '') end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#cancel_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Cancels a transfer. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.
249 250 251 252 253 254 255 256 257 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 249 def cancel_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#create_transfer_job(transfer_job_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Creates a transfer job that runs periodically.
183 184 185 186 187 188 189 190 191 192 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 183 def create_transfer_job(transfer_job_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/transferJobs', ) command.request_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.request_object = transfer_job_object command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.response_class = Google::Apis::StoragetransferV1::TransferJob command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#delete_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
This method is not supported and the server returns UNIMPLEMENTED.
345 346 347 348 349 350 351 352 353 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 345 def delete_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_google_service_account(project_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::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 Platform Console 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.
431 432 433 434 435 436 437 438 439 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 431 def get_google_service_account(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/googleServiceAccounts/{projectId}', ) command.response_representation = Google::Apis::StoragetransferV1::GoogleServiceAccount::Representation command.response_class = Google::Apis::StoragetransferV1::GoogleServiceAccount command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_transfer_job(job_name, project_id: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Gets a transfer job.
110 111 112 113 114 115 116 117 118 119 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 110 def get_transfer_job(job_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+jobName}', ) command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.response_class = Google::Apis::StoragetransferV1::TransferJob command.params['jobName'] = job_name unless job_name.nil? command.query['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#get_transfer_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
281 282 283 284 285 286 287 288 289 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 281 def get_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::StoragetransferV1::Operation::Representation command.response_class = Google::Apis::StoragetransferV1::Operation command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_transfer_jobs(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::ListTransferJobsResponse
Lists transfer jobs.
152 153 154 155 156 157 158 159 160 161 162 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 152 def list_transfer_jobs(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/transferJobs', ) command.response_representation = Google::Apis::StoragetransferV1::ListTransferJobsResponse::Representation command.response_class = Google::Apis::StoragetransferV1::ListTransferJobsResponse command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#list_transfer_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns UNIMPLEMENTED.
NOTE: the name binding below allows API services to override the binding
to use different resource name schemes, such as users/*/operations.
389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 389 def list_transfer_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::StoragetransferV1::ListOperationsResponse::Representation command.response_class = Google::Apis::StoragetransferV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#patch_transfer_job(job_name, update_transfer_job_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::TransferJob
Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Updating the scheduling of a job is not allowed.
74 75 76 77 78 79 80 81 82 83 84 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 74 def patch_transfer_job(job_name, update_transfer_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+jobName}', ) command.request_representation = Google::Apis::StoragetransferV1::UpdateTransferJobRequest::Representation command.request_object = update_transfer_job_request_object command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.response_class = Google::Apis::StoragetransferV1::TransferJob command.params['jobName'] = job_name unless job_name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#pause_transfer_operation(name, pause_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Pauses a transfer operation.
313 314 315 316 317 318 319 320 321 322 323 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 313 def pause_transfer_operation(name, pause_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:pause', ) command.request_representation = Google::Apis::StoragetransferV1::PauseTransferOperationRequest::Representation command.request_object = pause_transfer_operation_request_object command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |
#resume_transfer_operation(name, resume_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StoragetransferV1::Empty
Resumes a transfer operation that is paused.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'generated/google/apis/storagetransfer_v1/service.rb', line 216 def resume_transfer_operation(name, resume_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:resume', ) command.request_representation = Google::Apis::StoragetransferV1::ResumeTransferOperationRequest::Representation command.request_object = resume_transfer_operation_request_object command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end |