Reference documentation and code samples for the Cloud Build V2 API class Google::Cloud::Build::V2::RepositoryManager::Client.
Client for the RepositoryManager service.
Manages connections to source code repositories.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the RepositoryManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all RepositoryManager clients ::Google::Cloud::Build::V2::RepositoryManager::Client.configure do |config| config.timeout = 10.0 end
#batch_create_repositories
def batch_create_repositories(request, options = nil) -> ::Gapic::Operation
def batch_create_repositories(parent: nil, requests: nil) -> ::Gapic::Operation
Creates multiple repositories inside a connection.
def batch_create_repositories(request, options = nil) -> ::Gapic::Operation
batch_create_repositories
via a request object, either of type
BatchCreateRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_create_repositories(parent: nil, requests: nil) -> ::Gapic::Operation
batch_create_repositories
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- 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.
- requests (::Array<::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash>) — Required. The request messages specifying the repositories to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new # Call the batch_create_repositories method. result = client.batch_create_repositories request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the RepositoryManager Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_connection
def create_connection(request, options = nil) -> ::Gapic::Operation
def create_connection(parent: nil, connection: nil, connection_id: nil) -> ::Gapic::Operation
Creates a Connection.
def create_connection(request, options = nil) -> ::Gapic::Operation
create_connection
via a request object, either of type
CreateConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::CreateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_connection(parent: nil, connection: nil, connection_id: nil) -> ::Gapic::Operation
create_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Project and location where the connection will be created.
Format:
projects/*/locations/*
. - connection (::Google::Cloud::Build::V2::Connection, ::Hash) — Required. The Connection to create.
- connection_id (::String) — 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 -._~%!$&'()*+,;=@.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::CreateConnectionRequest.new # Call the create_connection method. result = client.create_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#create_repository
def create_repository(request, options = nil) -> ::Gapic::Operation
def create_repository(parent: nil, repository: nil, repository_id: nil) -> ::Gapic::Operation
Creates a Repository.
def create_repository(request, options = nil) -> ::Gapic::Operation
create_repository
via a request object, either of type
CreateRepositoryRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_repository(parent: nil, repository: nil, repository_id: nil) -> ::Gapic::Operation
create_repository
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- 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 (::Google::Cloud::Build::V2::Repository, ::Hash) — Required. The repository to create.
- repository_id (::String) — 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 -._~%!$&'()*+,;=@.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::CreateRepositoryRequest.new # Call the create_repository method. result = client.create_repository request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_connection
def delete_connection(request, options = nil) -> ::Gapic::Operation
def delete_connection(name: nil, etag: nil, validate_only: nil) -> ::Gapic::Operation
Deletes a single connection.
def delete_connection(request, options = nil) -> ::Gapic::Operation
delete_connection
via a request object, either of type
DeleteConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::DeleteConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_connection(name: nil, etag: nil, validate_only: nil) -> ::Gapic::Operation
delete_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Connection to delete.
Format:
projects/*/locations/*/connections/*
. - etag (::String) — 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) — If set, validate the request, but do not actually post it.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::DeleteConnectionRequest.new # Call the delete_connection method. result = client.delete_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_repository
def delete_repository(request, options = nil) -> ::Gapic::Operation
def delete_repository(name: nil, etag: nil, validate_only: nil) -> ::Gapic::Operation
Deletes a single repository.
def delete_repository(request, options = nil) -> ::Gapic::Operation
delete_repository
via a request object, either of type
DeleteRepositoryRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::DeleteRepositoryRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_repository(name: nil, etag: nil, validate_only: nil) -> ::Gapic::Operation
delete_repository
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Repository to delete.
Format:
projects/*/locations/*/connections/*/repositories/*
. - etag (::String) — 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) — If set, validate the request, but do not actually post it.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::DeleteRepositoryRequest.new # Call the delete_repository method. result = client.delete_repository request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#fetch_git_refs
def fetch_git_refs(request, options = nil) -> ::Google::Cloud::Build::V2::FetchGitRefsResponse
def fetch_git_refs(repository: nil, ref_type: nil) -> ::Google::Cloud::Build::V2::FetchGitRefsResponse
Fetch the list of branches or tags for a given repository.
def fetch_git_refs(request, options = nil) -> ::Google::Cloud::Build::V2::FetchGitRefsResponse
fetch_git_refs
via a request object, either of type
FetchGitRefsRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::FetchGitRefsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_git_refs(repository: nil, ref_type: nil) -> ::Google::Cloud::Build::V2::FetchGitRefsResponse
fetch_git_refs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
repository (::String) — Required. The resource name of the repository in the format
projects/*/locations/*/connections/*/repositories/*
. - ref_type (::Google::Cloud::Build::V2::FetchGitRefsRequest::RefType) — Type of refs to fetch
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Build::V2::FetchGitRefsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::FetchGitRefsRequest.new # Call the fetch_git_refs method. result = client.fetch_git_refs request # The returned object is of type Google::Cloud::Build::V2::FetchGitRefsResponse. p result
#fetch_linkable_repositories
def fetch_linkable_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
def fetch_linkable_repositories(connection: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.
def fetch_linkable_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
fetch_linkable_repositories
via a request object, either of type
FetchLinkableRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_linkable_repositories(connection: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
fetch_linkable_repositories
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
connection (::String) — Required. The name of the Connection.
Format:
projects/*/locations/*/connections/*
. - page_size (::Integer) — Number of results to return in the list. Default to 20.
- page_token (::String) — Page start.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new # Call the fetch_linkable_repositories method. result = client.fetch_linkable_repositories request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Build::V2::Repository. p item end
#fetch_read_token
def fetch_read_token(request, options = nil) -> ::Google::Cloud::Build::V2::FetchReadTokenResponse
def fetch_read_token(repository: nil) -> ::Google::Cloud::Build::V2::FetchReadTokenResponse
Fetches read token of a given repository.
def fetch_read_token(request, options = nil) -> ::Google::Cloud::Build::V2::FetchReadTokenResponse
fetch_read_token
via a request object, either of type
FetchReadTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::FetchReadTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_read_token(repository: nil) -> ::Google::Cloud::Build::V2::FetchReadTokenResponse
fetch_read_token
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
repository (::String) — Required. The resource name of the repository in the format
projects/*/locations/*/connections/*/repositories/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Build::V2::FetchReadTokenResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::FetchReadTokenRequest.new # Call the fetch_read_token method. result = client.fetch_read_token request # The returned object is of type Google::Cloud::Build::V2::FetchReadTokenResponse. p result
#fetch_read_write_token
def fetch_read_write_token(request, options = nil) -> ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse
def fetch_read_write_token(repository: nil) -> ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse
Fetches read/write token of a given repository.
def fetch_read_write_token(request, options = nil) -> ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse
fetch_read_write_token
via a request object, either of type
FetchReadWriteTokenRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def fetch_read_write_token(repository: nil) -> ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse
fetch_read_write_token
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
repository (::String) — Required. The resource name of the repository in the format
projects/*/locations/*/connections/*/repositories/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Build::V2::FetchReadWriteTokenResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new # Call the fetch_read_write_token method. result = client.fetch_read_write_token request # The returned object is of type Google::Cloud::Build::V2::FetchReadWriteTokenResponse. p result
#get_connection
def get_connection(request, options = nil) -> ::Google::Cloud::Build::V2::Connection
def get_connection(name: nil) -> ::Google::Cloud::Build::V2::Connection
Gets details of a single connection.
def get_connection(request, options = nil) -> ::Google::Cloud::Build::V2::Connection
get_connection
via a request object, either of type
GetConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::GetConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_connection(name: nil) -> ::Google::Cloud::Build::V2::Connection
get_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Connection to retrieve.
Format:
projects/*/locations/*/connections/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Build::V2::Connection)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::GetConnectionRequest.new # Call the get_connection method. result = client.get_connection request # The returned object is of type Google::Cloud::Build::V2::Connection. p result
#get_repository
def get_repository(request, options = nil) -> ::Google::Cloud::Build::V2::Repository
def get_repository(name: nil) -> ::Google::Cloud::Build::V2::Repository
Gets details of a single repository.
def get_repository(request, options = nil) -> ::Google::Cloud::Build::V2::Repository
get_repository
via a request object, either of type
GetRepositoryRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::GetRepositoryRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_repository(name: nil) -> ::Google::Cloud::Build::V2::Repository
get_repository
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the Repository to retrieve.
Format:
projects/*/locations/*/connections/*/repositories/*
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Build::V2::Repository)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::GetRepositoryRequest.new # Call the get_repository method. result = client.get_repository request # The returned object is of type Google::Cloud::Build::V2::Repository. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new RepositoryManager client object.
- (config) — Configure the RepositoryManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| config.timeout = 10.0 end
#list_connections
def list_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>
def list_connections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>
Lists Connections in a given project and location.
def list_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>
list_connections
via a request object, either of type
ListConnectionsRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::ListConnectionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_connections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>
list_connections
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent, which owns this collection of Connections.
Format:
projects/*/locations/*
. - page_size (::Integer) — Number of results to return in the list.
- page_token (::String) — Page start.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::ListConnectionsRequest.new # Call the list_connections method. result = client.list_connections request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Build::V2::Connection. p item end
#list_repositories
def list_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
def list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
Lists Repositories in a given connection.
def list_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
list_repositories
via a request object, either of type
ListRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::ListRepositoriesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>
list_repositories
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent, which owns this collection of Repositories.
Format:
projects/*/locations/*/connections/*
. - page_size (::Integer) — Number of results to return in the list.
- page_token (::String) — Page start.
-
filter (::String) — 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*"
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::ListRepositoriesRequest.new # Call the list_repositories method. result = client.list_repositories request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Build::V2::Repository. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Build::V2::RepositoryManager::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_connection
def update_connection(request, options = nil) -> ::Gapic::Operation
def update_connection(connection: nil, update_mask: nil, allow_missing: nil, etag: nil) -> ::Gapic::Operation
Updates a single connection.
def update_connection(request, options = nil) -> ::Gapic::Operation
update_connection
via a request object, either of type
UpdateConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::Build::V2::UpdateConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_connection(connection: nil, update_mask: nil, allow_missing: nil, etag: nil) -> ::Gapic::Operation
update_connection
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- connection (::Google::Cloud::Build::V2::Connection, ::Hash) — Required. The Connection to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
-
allow_missing (::Boolean) — 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) — 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/build/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Build::V2::RepositoryManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Build::V2::UpdateConnectionRequest.new # Call the update_connection method. result = client.update_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end