Reference documentation and code samples for the Secure Source Manager V1 API class Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.
REST client for the SecureSourceManager service.
Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance's API hostname to access them. The API hostname looks like the following:
https://[instance-id]-[project-number]-api.[location].sourcemanager.dev
For example,
https://my-instance-702770452863-api.us-central1.sourcemanager.dev
Data Plane endpoints are denoted with Host: Data Plane.
All other endpoints are found in the normal Cloud API location, namely,
securcesourcemanager.googleapis.com
.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the SecureSourceManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SecureSourceManager clients ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the SecureSourceManager 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_branch_rule
def create_branch_rule(request, options = nil) -> ::Gapic::Operation
def create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) -> ::Gapic::Operation
CreateBranchRule creates a branch rule in a given repository.
def create_branch_rule(request, options = nil) -> ::Gapic::Operation
create_branch_rule
via a request object, either of type
CreateBranchRuleRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::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_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) -> ::Gapic::Operation
create_branch_rule
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)
- branch_rule (::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash)
- branch_rule_id (::String)
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new # Call the create_branch_rule method. result = client.create_branch_rule 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_instance
def create_instance(request, options = nil) -> ::Gapic::Operation
def create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) -> ::Gapic::Operation
Creates a new instance in a given project and location.
def create_instance(request, options = nil) -> ::Gapic::Operation
create_instance
via a request object, either of type
CreateInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) -> ::Gapic::Operation
create_instance
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. Value for parent.
- instance_id (::String) — Required. ID of the instance to be created.
- instance (::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash) — Required. The resource being created.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new # Call the create_instance method. result = client.create_instance 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 new repository in a given project and location.
Host: Data Plane
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::SecureSourceManager::V1::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 project in which to create the repository. Values are of the
form
projects/{project_number}/locations/{location_id}
- repository (::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash) — Required. The resource being created.
- repository_id (::String) — Required. The ID to use for the repository, which will become the final component of the repository's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::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_branch_rule
def delete_branch_rule(request, options = nil) -> ::Gapic::Operation
def delete_branch_rule(name: nil, allow_missing: nil) -> ::Gapic::Operation
DeleteBranchRule deletes a branch rule.
def delete_branch_rule(request, options = nil) -> ::Gapic::Operation
delete_branch_rule
via a request object, either of type
DeleteBranchRuleRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::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_branch_rule(name: nil, allow_missing: nil) -> ::Gapic::Operation
delete_branch_rule
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)
- allow_missing (::Boolean) — Optional. If set to true, and the branch rule is not found, the request will succeed but no action will be taken on the server.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new # Call the delete_branch_rule method. result = client.delete_branch_rule 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_instance
def delete_instance(request, options = nil) -> ::Gapic::Operation
def delete_instance(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single instance.
def delete_instance(request, options = nil) -> ::Gapic::Operation
delete_instance
via a request object, either of type
DeleteInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::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_instance(name: nil, request_id: nil) -> ::Gapic::Operation
delete_instance
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. Name of the resource.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new # Call the delete_instance method. result = client.delete_instance 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, allow_missing: nil) -> ::Gapic::Operation
Deletes a Repository.
Host: Data Plane
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::SecureSourceManager::V1::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, allow_missing: 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. Name of the repository to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.
- allow_missing (::Boolean) — Optional. If set to true, and the repository is not found, the request will succeed but no action will be taken on the server.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::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
#get_branch_rule
def get_branch_rule(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::BranchRule
def get_branch_rule(name: nil) -> ::Google::Cloud::SecureSourceManager::V1::BranchRule
GetBranchRule gets a branch rule.
def get_branch_rule(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::BranchRule
get_branch_rule
via a request object, either of type
GetBranchRuleRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::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_branch_rule(name: nil) -> ::Google::Cloud::SecureSourceManager::V1::BranchRule
get_branch_rule
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. Name of the repository to retrieve.
The format is
projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::SecureSourceManager::V1::BranchRule)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new # Call the get_branch_rule method. result = client.get_branch_rule request # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. p result
#get_iam_policy_repo
def get_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
def get_iam_policy_repo(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
Get IAM policy for a repository.
def get_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
get_iam_policy_repo
via a request object, either of type
Iam::V1::GetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy_repo(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
get_iam_policy_repo
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).
- resource (::String) — REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
-
options (::Google::Iam::V1::GetPolicyOptions, ::Hash) — OPTIONAL: A
GetPolicyOptions
object for specifying options toGetIamPolicy
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::Policy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::Policy)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::GetIamPolicyRequest.new # Call the get_iam_policy_repo method. result = client.get_iam_policy_repo request # The returned object is of type Google::Iam::V1::Policy. p result
#get_instance
def get_instance(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Instance
def get_instance(name: nil) -> ::Google::Cloud::SecureSourceManager::V1::Instance
Gets details of a single instance.
def get_instance(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Instance
get_instance
via a request object, either of type
GetInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::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_instance(name: nil) -> ::Google::Cloud::SecureSourceManager::V1::Instance
get_instance
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. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::SecureSourceManager::V1::Instance)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new # Call the get_instance method. result = client.get_instance request # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. p result
#get_repository
def get_repository(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Repository
def get_repository(name: nil) -> ::Google::Cloud::SecureSourceManager::V1::Repository
Gets metadata of a repository.
Host: Data Plane
def get_repository(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Repository
get_repository
via a request object, either of type
GetRepositoryRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::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::SecureSourceManager::V1::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. Name of the repository to retrieve.
The format is
projects/{project_number}/locations/{location_id}/repositories/{repository_id}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::SecureSourceManager::V1::Repository)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new # Call the get_repository method. result = client.get_repository request # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new SecureSourceManager REST client object.
- (config) — Configure the SecureSourceManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| config.timeout = 10.0 end
#list_branch_rules
def list_branch_rules(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>
def list_branch_rules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>
ListBranchRules lists branch rules in a given repository.
def list_branch_rules(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>
list_branch_rules
via a request object, either of type
ListBranchRulesRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::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_branch_rules(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>
list_branch_rules
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)
- page_size (::Integer)
- page_token (::String)
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new # Call the list_branch_rules method. result = client.list_branch_rules 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::SecureSourceManager::V1::BranchRule. p item end
#list_instances
def list_instances(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse
Lists Instances in a given project and location.
def list_instances(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse
list_instances
via a request object, either of type
ListInstancesRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse
list_instances
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. Parent value for ListInstancesRequest.
- page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — A token identifying a page of results the server should return.
- filter (::String) — Filter for filtering results.
- order_by (::String) — Hint for how to order the results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new # Call the list_instances method. result = client.list_instances 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::SecureSourceManager::V1::Instance. p item end
#list_repositories
def list_repositories(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>
def list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>
Lists Repositories in a given project and location.
Host: Data Plane
def list_repositories(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>
list_repositories
via a request object, either of type
ListRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::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, instance: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::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. Parent value for ListRepositoriesRequest.
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — A token identifying a page of results the server should return.
- filter (::String) — Optional. Filter results.
-
instance (::String) — Optional. The name of the instance in which the repository is hosted,
formatted as
projects/{project_number}/locations/{location_id}/instances/{instance_id}
. When listing repositories via securesourcemanager.googleapis.com (Control Plane API), this field is required. When listing repositories via *.sourcemanager.dev (Data Plane API), this field is ignored.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::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::SecureSourceManager::V1::Repository. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Operations
Get the associated client for long-running operations.
#set_iam_policy_repo
def set_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
def set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
Set IAM policy on a repository.
def set_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
set_iam_policy_repo
via a request object, either of type
Iam::V1::SetIamPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
set_iam_policy_repo
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).
- resource (::String) — REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
-
policy (::Google::Iam::V1::Policy, ::Hash) — REQUIRED: The complete policy to be applied to the
resource
. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. -
update_mask (::Google::Protobuf::FieldMask, ::Hash) — OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
the fields in the mask will be modified. If no mask is provided, the
following default mask is used:
paths: "bindings, etag"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::Policy)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::Policy)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::SetIamPolicyRequest.new # Call the set_iam_policy_repo method. result = client.set_iam_policy_repo request # The returned object is of type Google::Iam::V1::Policy. p result
#test_iam_permissions_repo
def test_iam_permissions_repo(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
def test_iam_permissions_repo(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Test IAM permissions on a repository. IAM permission checks are not required on this method.
def test_iam_permissions_repo(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
test_iam_permissions_repo
via a request object, either of type
Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
- request (::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions_repo(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
test_iam_permissions_repo
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).
- resource (::String) — REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
-
permissions (::Array<::String>) — The set of permissions to check for the
resource
. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Iam::V1::TestIamPermissionsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Iam::V1::TestIamPermissionsResponse)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V1::TestIamPermissionsRequest.new # Call the test_iam_permissions_repo method. result = client.test_iam_permissions_repo request # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. p result
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_branch_rule
def update_branch_rule(request, options = nil) -> ::Gapic::Operation
def update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) -> ::Gapic::Operation
UpdateBranchRule updates a branch rule.
def update_branch_rule(request, options = nil) -> ::Gapic::Operation
update_branch_rule
via a request object, either of type
UpdateBranchRuleRequest or an equivalent Hash.
- request (::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::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_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) -> ::Gapic::Operation
update_branch_rule
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).
- branch_rule (::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash)
- validate_only (::Boolean) — Optional. If set, validate the request and preview the review, but do not actually post it. (https://google.aip.dev/163, for declarative friendly)
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the branchRule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/secure_source_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new # Call the update_branch_rule method. result = client.update_branch_rule 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