Class: Google::Apis::CloudbuildV1alpha2::CloudBuildService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudbuildV1alpha2::CloudBuildService
- Defined in:
- lib/google/apis/cloudbuild_v1alpha2/service.rb
Overview
Cloud Build API
Creates and manages builds on Google Cloud Platform.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_project_worker_pool(parent, worker_pool_object = nil, worker_pool_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Creates a
WorkerPoolto run the builds, and returns the new worker pool. -
#delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::Empty
Deletes a
WorkerPool. -
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::Operation
Gets the latest state of a long-running operation.
-
#get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Returns details of a
WorkerPool. -
#initialize ⇒ CloudBuildService
constructor
A new instance of CloudBuildService.
-
#list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::ListWorkerPoolsResponse
Lists
WorkerPools by project. -
#patch_project_worker_pool(name, worker_pool_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Updates a
WorkerPool.
Constructor Details
#initialize ⇒ CloudBuildService
Returns a new instance of CloudBuildService.
45 46 47 48 49 50 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 45 def initialize super('https://cloudbuild.googleapis.com/', '', client_name: 'google-apis-cloudbuild_v1alpha2', client_version: Google::Apis::CloudbuildV1alpha2::GEM_VERSION) @batch_path = 'batch' 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.
38 39 40 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 38 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.
43 44 45 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED.
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 80 def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha2/{+name}:cancel', ) command.request_representation = Google::Apis::CloudbuildV1alpha2::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::CloudbuildV1alpha2::Empty::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_worker_pool(parent, worker_pool_object = nil, worker_pool_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Creates a WorkerPool to run the builds, and returns the new worker pool.
149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 149 def create_project_worker_pool(parent, worker_pool_object = nil, worker_pool_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha2/{+parent}/workerPools', ) command.request_representation = Google::Apis::CloudbuildV1alpha2::WorkerPool::Representation command.request_object = worker_pool_object command.response_representation = Google::Apis::CloudbuildV1alpha2::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::WorkerPool command.params['parent'] = parent unless parent.nil? command.query['workerPoolId'] = worker_pool_id unless worker_pool_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::Empty
Deletes a WorkerPool.
183 184 185 186 187 188 189 190 191 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 183 def delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1alpha2/{+name}', ) command.response_representation = Google::Apis::CloudbuildV1alpha2::Empty::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::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.
113 114 115 116 117 118 119 120 121 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 113 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha2/{+name}', ) command.response_representation = Google::Apis::CloudbuildV1alpha2::Operation::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Returns details of a WorkerPool.
214 215 216 217 218 219 220 221 222 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 214 def get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha2/{+name}', ) command.response_representation = Google::Apis::CloudbuildV1alpha2::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::WorkerPool command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::ListWorkerPoolsResponse
Lists WorkerPools by project.
245 246 247 248 249 250 251 252 253 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 245 def list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha2/{+parent}/workerPools', ) command.response_representation = Google::Apis::CloudbuildV1alpha2::ListWorkerPoolsResponse::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::ListWorkerPoolsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_worker_pool(name, worker_pool_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha2::WorkerPool
Updates a WorkerPool.
280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/google/apis/cloudbuild_v1alpha2/service.rb', line 280 def patch_project_worker_pool(name, worker_pool_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1alpha2/{+name}', ) command.request_representation = Google::Apis::CloudbuildV1alpha2::WorkerPool::Representation command.request_object = worker_pool_object command.response_representation = Google::Apis::CloudbuildV1alpha2::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha2::WorkerPool command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |