Class: Google::Apis::CloudbuildV1::CloudBuildService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudbuildV1::CloudBuildService
- Defined in:
- generated/google/apis/cloudbuild_v1/service.rb
Overview
Google Cloud Container Builder API
Builds container images in the cloud.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Build
Cancels a requested build in progress.
-
#cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Operation
Starts a build with the specified configuration.
-
#create_project_trigger(project_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Creates a new BuildTrigger.
-
#delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Empty
Deletes an BuildTrigger by its project ID and trigger ID.
-
#get_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Build
Returns information about a previously requested build.
-
#get_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Gets information about a BuildTrigger.
-
#initialize ⇒ CloudBuildService
constructor
A new instance of CloudBuildService.
-
#list_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::ListBuildsResponse
Lists previously requested builds.
-
#list_project_triggers(project_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::ListBuildTriggersResponse
Lists existing BuildTrigger.
-
#patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Updates an BuildTrigger by its project ID and trigger ID.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Google::Apis::Core::Logging
Constructor Details
#initialize ⇒ CloudBuildService
Returns a new instance of CloudBuildService
45 46 47 48 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 45 def initialize super('https://cloudbuild.googleapis.com/', '') @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.
43 44 45 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 43 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.
38 39 40 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 38 def quota_user @quota_user end |
Instance Method Details
#cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Build
Cancels a requested build in progress.
185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 185 def cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', ) command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation command.request_object = cancel_build_request_object command.response_representation = Google::Apis::CloudbuildV1::Build::Representation command.response_class = Google::Apis::CloudbuildV1::Build command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless 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 |
#cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::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
.
477 478 479 480 481 482 483 484 485 486 487 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 477 def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1::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_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Operation
Starts a build with the specified configuration. The long-running Operation returned by this method will include the ID of the build, which can be passed to GetBuild to determine its status (e.g., success or failure).
150 151 152 153 154 155 156 157 158 159 160 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 150 def create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/builds', ) command.request_representation = Google::Apis::CloudbuildV1::Build::Representation command.request_object = build_object command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation command.response_class = Google::Apis::CloudbuildV1::Operation 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 |
#create_project_trigger(project_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Creates a new BuildTrigger. This API is experimental.
322 323 324 325 326 327 328 329 330 331 332 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 322 def create_project_trigger(project_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', ) command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.request_object = build_trigger_object command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.response_class = Google::Apis::CloudbuildV1::BuildTrigger 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 |
#delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Empty
Deletes an BuildTrigger by its project ID and trigger ID. This API is experimental.
357 358 359 360 361 362 363 364 365 366 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 357 def delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', ) command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1::Empty command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_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_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::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.
437 438 439 440 441 442 443 444 445 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 437 def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation command.response_class = Google::Apis::CloudbuildV1::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 |
#get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::Build
Returns information about a previously requested build. The Build that is returned includes its status (e.g., success or failure, or in-progress), and timing information.
74 75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 74 def get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', ) command.response_representation = Google::Apis::CloudbuildV1::Build::Representation command.response_class = Google::Apis::CloudbuildV1::Build command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless 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_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Gets information about a BuildTrigger. This API is experimental.
221 222 223 224 225 226 227 228 229 230 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 221 def get_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/triggers/{triggerId}', ) command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.response_class = Google::Apis::CloudbuildV1::BuildTrigger command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_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 |
#list_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::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 allows API services to override the binding
to use different resource name schemes, such as users/*/operations
. To
override the binding, API services can add a binding such as
"/v1/
name=users/*/operations"
to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.
402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 402 def list_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::CloudbuildV1::ListOperationsResponse::Representation command.response_class = Google::Apis::CloudbuildV1::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 |
#list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::ListBuildsResponse
Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 113 def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/builds', ) command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.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_project_triggers(project_id, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::ListBuildTriggersResponse
Lists existing BuildTrigger. This API is experimental.
253 254 255 256 257 258 259 260 261 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 253 def list_project_triggers(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/triggers', ) command.response_representation = Google::Apis::CloudbuildV1::ListBuildTriggersResponse::Representation command.response_class = Google::Apis::CloudbuildV1::ListBuildTriggersResponse 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 |
#patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1::BuildTrigger
Updates an BuildTrigger by its project ID and trigger ID. This API is experimental.
287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'generated/google/apis/cloudbuild_v1/service.rb', line 287 def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/projects/{projectId}/triggers/{triggerId}', ) command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.request_object = build_trigger_object command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.response_class = Google::Apis::CloudbuildV1::BuildTrigger command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_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 |