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

Returns a new instance of CloudBuildService.


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

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.

Returns:

  • (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.


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

def key
  @key
end

#quota_userString

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.

Returns:

  • (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.


43
44
45
# File 'generated/google/apis/cloudbuild_v1alpha1/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::CloudbuildV1alpha1::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.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • cancel_operation_request_object (Google::Apis::CloudbuildV1alpha1::CancelOperationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


78
79
80
81
82
83
84
85
86
87
88
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 78

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

#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.

Parameters:

  • parent (String)

    ID of the parent project.

  • worker_pool_object (Google::Apis::CloudbuildV1alpha1::WorkerPool) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


142
143
144
145
146
147
148
149
150
151
152
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 142

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 name.

Parameters:

  • name (String)

    The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


175
176
177
178
179
180
181
182
183
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 175

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

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


111
112
113
114
115
116
117
118
119
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 111

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

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

Returns information about a WorkerPool.

Parameters:

  • name (String)

    The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


206
207
208
209
210
211
212
213
214
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 206

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.

Parameters:

  • parent (String)

    ID of the parent project.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


236
237
238
239
240
241
242
243
244
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 236

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.

Parameters:

  • name (String)

    The field will contain name of the resource requested, for example: "projects/ project-1/workerPools/workerpool-name"

  • worker_pool_object (Google::Apis::CloudbuildV1alpha1::WorkerPool) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


268
269
270
271
272
273
274
275
276
277
278
# File 'generated/google/apis/cloudbuild_v1alpha1/service.rb', line 268

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