Secure Source Manager V1 API - Class Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client (v0.1.0)

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.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

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

Overloads
def create_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_instance via a request object, either of type CreateInstanceRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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).

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Overloads
def create_repository(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_repository via a request object, either of type CreateRepositoryRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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]-/.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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_instance

def delete_instance(request, options = nil) -> ::Gapic::Operation
def delete_instance(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single instance.

Overloads
def delete_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_instance via a request object, either of type DeleteInstanceRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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).

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Overloads
def delete_repository(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_repository via a request object, either of type DeleteRepositoryRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Overloads
def get_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to get_iam_policy_repo via a request object, either of type Iam::V1::GetIamPolicyRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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 to GetIamPolicy.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Google::Iam::V1::Policy)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Google::Iam::V1::Policy)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def get_instance(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Instance
Pass arguments to get_instance via a request object, either of type GetInstanceRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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

Overloads
def get_repository(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::Repository
Pass arguments to get_repository via a request object, either of type GetRepositoryRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameter
  • name (::String) — Required. Name of the repository to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new SecureSourceManager REST client object.

Yields
  • (config) — Configure the SecureSourceManager client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# 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_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.

Overloads
def list_instances(request, options = nil) -> ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse
Pass arguments to list_instances via a request object, either of type ListInstancesRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>

Lists Repositories in a given project and location.

Host: Data Plane

Overloads
def list_repositories(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>
Pass arguments to list_repositories via a request object, either of type ListRepositoriesRequest or an equivalent Hash.
Parameters
  • 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) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

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

Overloads
def set_iam_policy_repo(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to set_iam_policy_repo via a request object, either of type Iam::V1::SetIamPolicyRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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"

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Google::Iam::V1::Policy)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Google::Iam::V1::Policy)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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.

Overloads
def test_iam_permissions_repo(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Pass arguments to test_iam_permissions_repo via a request object, either of type Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Google::Iam::V1::TestIamPermissionsResponse)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Google::Iam::V1::TestIamPermissionsResponse)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

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