Class: Google::Apis::CloudbuildV2::CloudBuildService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/cloudbuild_v2/service.rb

Overview

Cloud Build API

Creates and manages builds on Google Cloud Platform.

Examples:

require 'google/apis/cloudbuild_v2'

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

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudbuild.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCloudBuildService

Returns a new instance of CloudBuildService.



47
48
49
50
51
52
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-cloudbuild_v2',
        client_version: Google::Apis::CloudbuildV2::GEM_VERSION)
  @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.



40
41
42
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 40

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.



45
46
47
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#access_project_location_connection_repository_read_token(repository, fetch_read_token_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::FetchReadTokenResponse

Fetches read token of a given repository.

Parameters:

  • repository (String)

    Required. The resource name of the repository in the format projects/*/ locations/*/connections/*/repositories/*.

  • fetch_read_token_request_object (Google::Apis::CloudbuildV2::FetchReadTokenRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



540
541
542
543
544
545
546
547
548
549
550
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 540

def access_project_location_connection_repository_read_token(repository, fetch_read_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+repository}:accessReadToken', options)
  command.request_representation = Google::Apis::CloudbuildV2::FetchReadTokenRequest::Representation
  command.request_object = fetch_read_token_request_object
  command.response_representation = Google::Apis::CloudbuildV2::FetchReadTokenResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::FetchReadTokenResponse
  command.params['repository'] = repository unless repository.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#access_project_location_connection_repository_read_write_token(repository, fetch_read_write_token_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::FetchReadWriteTokenResponse

Fetches read/write token of a given repository.

Parameters:

  • repository (String)

    Required. The resource name of the repository in the format projects/*/ locations/*/connections/*/repositories/*.

  • fetch_read_write_token_request_object (Google::Apis::CloudbuildV2::FetchReadWriteTokenRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



574
575
576
577
578
579
580
581
582
583
584
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 574

def access_project_location_connection_repository_read_write_token(repository, fetch_read_write_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+repository}:accessReadWriteToken', options)
  command.request_representation = Google::Apis::CloudbuildV2::FetchReadWriteTokenRequest::Representation
  command.request_object = fetch_read_write_token_request_object
  command.response_representation = Google::Apis::CloudbuildV2::FetchReadWriteTokenResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::FetchReadWriteTokenResponse
  command.params['repository'] = repository unless repository.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_repository_create_repositories(parent, batch_create_repositories_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Creates multiple repositories inside a connection.

Parameters:

  • parent (String)

    Required. The connection to contain all the repositories being created. Format: projects//locations//connections/* The parent field in the CreateRepositoryRequest messages must either be empty or match this field.

  • batch_create_repositories_request_object (Google::Apis::CloudbuildV2::BatchCreateRepositoriesRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



609
610
611
612
613
614
615
616
617
618
619
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 609

def batch_repository_create_repositories(parent, batch_create_repositories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/repositories:batchCreate', options)
  command.request_representation = Google::Apis::CloudbuildV2::BatchCreateRepositoriesRequest::Representation
  command.request_object = batch_create_repositories_request_object
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  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

#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::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::CloudbuildV2::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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



841
842
843
844
845
846
847
848
849
850
851
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 841

def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+name}:cancel', options)
  command.request_representation = Google::Apis::CloudbuildV2::CancelOperationRequest::Representation
  command.request_object = cancel_operation_request_object
  command.response_representation = Google::Apis::CloudbuildV2::Empty::Representation
  command.response_class = Google::Apis::CloudbuildV2::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_location_connection(parent, connection_object = nil, connection_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Creates a Connection.

Parameters:

  • parent (String)

    Required. Project and location where the connection will be created. Format: projects/*/locations/*.

  • connection_object (Google::Apis::CloudbuildV2::Connection) (defaults to: nil)
  • connection_id (String) (defaults to: nil)

    Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 153

def create_project_location_connection(parent, connection_object = nil, connection_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/connections', options)
  command.request_representation = Google::Apis::CloudbuildV2::Connection::Representation
  command.request_object = connection_object
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['connectionId'] = connection_id unless connection_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

#create_project_location_connection_repository(parent, repository_object = nil, repository_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Creates a Repository.

Parameters:

  • parent (String)

    Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.

  • repository_object (Google::Apis::CloudbuildV2::Repository) (defaults to: nil)
  • repository_id (String) (defaults to: nil)

    Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



648
649
650
651
652
653
654
655
656
657
658
659
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 648

def create_project_location_connection_repository(parent, repository_object = nil, repository_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/repositories', options)
  command.request_representation = Google::Apis::CloudbuildV2::Repository::Representation
  command.request_object = repository_object
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['repositoryId'] = repository_id unless repository_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_location_connection(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Deletes a single connection.

Parameters:

  • name (String)

    Required. The name of the Connection to delete. Format: projects/*/locations/* /connections/*.

  • etag (String) (defaults to: nil)

    The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned.

  • validate_only (Boolean) (defaults to: nil)

    If set, validate the request, but do not actually post it.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



193
194
195
196
197
198
199
200
201
202
203
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 193

def delete_project_location_connection(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  command.params['name'] = name unless name.nil?
  command.query['etag'] = etag unless etag.nil?
  command.query['validateOnly'] = validate_only unless validate_only.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_location_connection_repository(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Deletes a single repository.

Parameters:

  • name (String)

    Required. The name of the Repository to delete. Format: projects/*/locations/* /connections/*/repositories/*.

  • etag (String) (defaults to: nil)

    The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned.

  • validate_only (Boolean) (defaults to: nil)

    If set, validate the request, but do not actually post it.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



688
689
690
691
692
693
694
695
696
697
698
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 688

def delete_project_location_connection_repository(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  command.params['name'] = name unless name.nil?
  command.query['etag'] = etag unless etag.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#fetch_project_location_connection_linkable_repositories(connection, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::FetchLinkableRepositoriesResponse

FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.

Parameters:

  • connection (String)

    Required. The name of the Connection. Format: projects/*/locations/*/ connections/*.

  • page_size (Fixnum) (defaults to: nil)

    Number of results to return in the list. Default to 20.

  • page_token (String) (defaults to: nil)

    Page start.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



231
232
233
234
235
236
237
238
239
240
241
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 231

def fetch_project_location_connection_linkable_repositories(connection, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+connection}:fetchLinkableRepositories', options)
  command.response_representation = Google::Apis::CloudbuildV2::FetchLinkableRepositoriesResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::FetchLinkableRepositoriesResponse
  command.params['connection'] = connection unless connection.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#fetch_project_location_connection_repository_git_refs(repository, page_size: nil, page_token: nil, ref_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::FetchGitRefsResponse

Fetch the list of branches or tags for a given repository.

Parameters:

  • repository (String)

    Required. The resource name of the repository in the format projects/*/ locations/*/connections/*/repositories/*.

  • page_size (Fixnum) (defaults to: nil)

    Optional. Number of results to return in the list. Default to 100.

  • page_token (String) (defaults to: nil)

    Optional. Page start.

  • ref_type (String) (defaults to: nil)

    Type of refs to fetch

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



727
728
729
730
731
732
733
734
735
736
737
738
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 727

def fetch_project_location_connection_repository_git_refs(repository, page_size: nil, page_token: nil, ref_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+repository}:fetchGitRefs', options)
  command.response_representation = Google::Apis::CloudbuildV2::FetchGitRefsResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::FetchGitRefsResponse
  command.params['repository'] = repository unless repository.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['refType'] = ref_type unless ref_type.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(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Location

Gets information about a location.

Parameters:

  • name (String)

    Resource name for the location.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



74
75
76
77
78
79
80
81
82
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 74

def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Location::Representation
  command.response_class = Google::Apis::CloudbuildV2::Location
  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_connection(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Connection

Gets details of a single connection.

Parameters:

  • name (String)

    Required. The name of the Connection to retrieve. Format: projects/*/ locations/*/connections/*.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



264
265
266
267
268
269
270
271
272
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 264

def get_project_location_connection(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Connection::Representation
  command.response_class = Google::Apis::CloudbuildV2::Connection
  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_connection_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Policy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

  • options_requested_policy_version (Fixnum) (defaults to: nil)

    Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the IAM documentation.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



308
309
310
311
312
313
314
315
316
317
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 308

def get_project_location_connection_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+resource}:getIamPolicy', options)
  command.response_representation = Google::Apis::CloudbuildV2::Policy::Representation
  command.response_class = Google::Apis::CloudbuildV2::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.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_connection_repository(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Repository

Gets details of a single repository.

Parameters:

  • name (String)

    Required. The name of the Repository to retrieve. Format: projects/*/ locations/*/connections/*/repositories/*.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



761
762
763
764
765
766
767
768
769
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 761

def get_project_location_connection_repository(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Repository::Representation
  command.response_class = Google::Apis::CloudbuildV2::Repository
  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::CloudbuildV2::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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



874
875
876
877
878
879
880
881
882
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 874

def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::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

#list_project_location_connection_repositories(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::ListRepositoriesResponse

Lists Repositories in a given connection.

Parameters:

  • parent (String)

    Required. The parent, which owns this collection of Repositories. Format: projects/*/locations/*/connections/*.

  • filter (String) (defaults to: nil)

    A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal AIP-160. e. g. remote_uri:"https://github.com*".

  • page_size (Fixnum) (defaults to: nil)

    Number of results to return in the list.

  • page_token (String) (defaults to: nil)

    Page start.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 800

def list_project_location_connection_repositories(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+parent}/repositories', options)
  command.response_representation = Google::Apis::CloudbuildV2::ListRepositoriesResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::ListRepositoriesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.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_location_connections(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::ListConnectionsResponse

Lists Connections in a given project and location.

Parameters:

  • parent (String)

    Required. The parent, which owns this collection of Connections. Format: projects/*/locations/*.

  • page_size (Fixnum) (defaults to: nil)

    Number of results to return in the list.

  • page_token (String) (defaults to: nil)

    Page start.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



344
345
346
347
348
349
350
351
352
353
354
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 344

def list_project_location_connections(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+parent}/connections', options)
  command.response_representation = Google::Apis::CloudbuildV2::ListConnectionsResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::ListConnectionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.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_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::ListLocationsResponse

Lists information about the supported locations for this service.

Parameters:

  • name (String)

    The resource that owns the locations collection, if applicable.

  • filter (String) (defaults to: nil)

    A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return. If not set, the service selects a default.

  • page_token (String) (defaults to: nil)

    A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 114

def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}/locations', options)
  command.response_representation = Google::Apis::CloudbuildV2::ListLocationsResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::ListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.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_location_connection(name, connection_object = nil, allow_missing: nil, etag: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Operation

Updates a single connection.

Parameters:

  • name (String)

    Immutable. The resource name of the connection, in the format projects/ project/locations/location/connections/connection_id``.

  • connection_object (Google::Apis::CloudbuildV2::Connection) (defaults to: nil)
  • allow_missing (Boolean) (defaults to: nil)

    If set to true, and the connection is not found a new connection will be created. In this situation update_mask is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties).

  • etag (String) (defaults to: nil)

    The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned.

  • update_mask (String) (defaults to: nil)

    The list of fields to be updated.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 389

def patch_project_location_connection(name, connection_object = nil, allow_missing: nil, etag: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::CloudbuildV2::Connection::Representation
  command.request_object = connection_object
  command.response_representation = Google::Apis::CloudbuildV2::Operation::Representation
  command.response_class = Google::Apis::CloudbuildV2::Operation
  command.params['name'] = name unless name.nil?
  command.query['allowMissing'] = allow_missing unless allow_missing.nil?
  command.query['etag'] = etag unless etag.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

#process_project_location_connection_webhook(parent, http_body_object = nil, webhook_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Empty

ProcessWebhook is called by the external SCM for notifying of events.

Parameters:

  • parent (String)

    Required. Project and location where the webhook will be received. Format: projects/*/locations/*.

  • http_body_object (Google::Apis::CloudbuildV2::HttpBody) (defaults to: nil)
  • webhook_key (String) (defaults to: nil)

    Arbitrary additional key to find the maching repository for a webhook event if needed.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 429

def process_project_location_connection_webhook(parent, http_body_object = nil, webhook_key: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/connections:processWebhook', options)
  command.request_representation = Google::Apis::CloudbuildV2::HttpBody::Representation
  command.request_object = http_body_object
  command.response_representation = Google::Apis::CloudbuildV2::Empty::Representation
  command.response_class = Google::Apis::CloudbuildV2::Empty
  command.params['parent'] = parent unless parent.nil?
  command.query['webhookKey'] = webhook_key unless webhook_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_connection_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::Policy

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::CloudbuildV2::SetIamPolicyRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



467
468
469
470
471
472
473
474
475
476
477
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 467

def set_connection_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', options)
  command.request_representation = Google::Apis::CloudbuildV2::SetIamPolicyRequest::Representation
  command.request_object = set_iam_policy_request_object
  command.response_representation = Google::Apis::CloudbuildV2::Policy::Representation
  command.response_class = Google::Apis::CloudbuildV2::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#test_connection_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbuildV2::TestIamPermissionsResponse

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::CloudbuildV2::TestIamPermissionsRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



506
507
508
509
510
511
512
513
514
515
516
# File 'lib/google/apis/cloudbuild_v2/service.rb', line 506

def test_connection_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::CloudbuildV2::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_request_object
  command.response_representation = Google::Apis::CloudbuildV2::TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::CloudbuildV2::TestIamPermissionsResponse
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end