class Google::Apis::CloudbuildV1alpha1::CloudBuildService
Cloud Build
API
Creates and manages builds on Google
Cloud Platform.
@example
require 'google/apis/cloudbuild_v1alpha1' Cloudbuild = Google::Apis::CloudbuildV1alpha1 # Alias the module service = Cloudbuild::CloudBuildService.new
Attributes
@return [String]
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.
@return [String]
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.
Public Class Methods
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 45 def initialize super('https://cloudbuild.googleapis.com/', '', client_name: 'google-apis-cloudbuild_v1alpha1', client_version: Google::Apis::CloudbuildV1alpha1::GEM_VERSION) @batch_path = 'batch' end
Public Instance Methods
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`. @param [String] name
The name of the operation resource to be cancelled.
@param [Google::Apis::CloudbuildV1alpha1::CancelOperationRequest] cancel_operation_request_object @param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::Empty]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/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, 'v1alpha1/{+name}:cancel', options) command.request_representation = Google::Apis::CloudbuildV1alpha1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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
Creates a `WorkerPool` to run the builds, and returns the new worker pool. @param [String] parent
ID of the parent project.
@param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object @param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 144 def create_project_worker_pool(parent, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha1/{+parent}/workerPools', options) command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation command.request_object = worker_pool_object command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool 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
Deletes a `WorkerPool` by its project ID and WorkerPool
name. @param [String] name
The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"
@param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::Empty]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 177 def delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1alpha1/{+name}', options) command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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
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. @param [String] name
The name of the operation resource.
@param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::Operation] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::Operation]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 113 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha1/{+name}', options) command.response_representation = Google::Apis::CloudbuildV1alpha1::Operation::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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
Returns information about a `WorkerPool`. @param [String] name
The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"
@param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 208 def get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha1/{+name}', options) command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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's `WorkerPool`s. @param [String] parent
ID of the parent project.
@param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 238 def list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha1/{+parent}/workerPools', options) command.response_representation = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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
Update a `WorkerPool`. @param [String] name
The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"
@param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object @param [String] fields
Selector specifying which fields to include in a partial response.
@param [String] quota_user
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.
@param [Google::Apis::RequestOptions] options
Request-specific options
@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object @yieldparam err [StandardError] error object if request failed
@return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 270 def patch_project_worker_pool(name, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1alpha1/{+name}', options) command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation command.request_object = worker_pool_object command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation command.response_class = Google::Apis::CloudbuildV1alpha1::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
Protected Instance Methods
# File lib/google/apis/cloudbuild_v1alpha1/service.rb, line 284 def apply_command_defaults(command) command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? end