Class: Google::Apis::CloudbuildV1alpha1::CloudBuildService

Inherits:
Google::Apis::Core::BaseService show all
Defined in:
generated/google/apis/cloudbuild_v1alpha1/service.rb

Overview

Cloud Build API

Creates and manages builds on Google Cloud Platform.

Examples:

require 'google/apis/cloudbuild_v1alpha1'

Cloudbuild = Google::Apis::CloudbuildV1alpha1 # Alias the module
service = Cloudbuild::CloudBuildService.new

See Also:

Instance Attribute Summary collapse

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

Methods inherited from Google::Apis::Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Google::Apis::Core::Logging

#logger

Constructor Details

#initializeCloudBuildService


45
46
47
48
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 45

def initialize
  super('https://cloudbuild.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString


38
39
40
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 38

def key
  @key
end

#quota_userString


43
44
45
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#create_project_worker_pool(parent, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha1::WorkerPool

Creates a WorkerPool to run the builds, and returns the new worker pool. This API is experimental.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


72
73
74
75
76
77
78
79
80
81
82
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 72

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

#delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha1::Empty

Deletes a WorkerPool by its project ID and WorkerPool ID. This API is experimental.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


106
107
108
109
110
111
112
113
114
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 106

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

#get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha1::WorkerPool

Returns information about a WorkerPool. This API is experimental.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


138
139
140
141
142
143
144
145
146
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 138

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_worker_pools(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse

List project's WorkerPools. This API is experimental.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


169
170
171
172
173
174
175
176
177
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 169

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

#patch_project_worker_pool(name, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV1alpha1::WorkerPool

Update a WorkerPool. This API is experimental.

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Raises:


202
203
204
205
206
207
208
209
210
211
212
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 202

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