IAM Policy Troubleshooter V1 API - Class Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client (v0.11.0)

Reference documentation and code samples for the IAM Policy Troubleshooter V1 API class Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client.

REST client for the IamChecker service.

IAM Policy Troubleshooter service.

This service helps you troubleshoot access issues for Google Cloud resources.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the IamChecker 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 IamChecker clients
::Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the IamChecker 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

#initialize

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

Create a new IamChecker REST client object.

Yields
  • (config) — Configure the IamChecker client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client.new do |config|
  config.timeout = 10.0
end

#troubleshoot_iam_policy

def troubleshoot_iam_policy(request, options = nil) -> ::Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyResponse
def troubleshoot_iam_policy(access_tuple: nil) -> ::Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyResponse

Checks whether a principal has a specific permission for a specific resource, and explains why the principal does or does not have that permission.

Overloads
def troubleshoot_iam_policy(request, options = nil) -> ::Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyResponse
Pass arguments to troubleshoot_iam_policy via a request object, either of type TroubleshootIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyRequest, ::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 troubleshoot_iam_policy(access_tuple: nil) -> ::Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyResponse
Pass arguments to troubleshoot_iam_policy 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
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/policy_troubleshooter/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PolicyTroubleshooter::V1::IamChecker::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyRequest.new

# Call the troubleshoot_iam_policy method.
result = client.troubleshoot_iam_policy request

# The returned object is of type Google::Cloud::PolicyTroubleshooter::V1::TroubleshootIamPolicyResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)