Reference documentation and code samples for the Policy Troubleshooter V3 API class Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.
Client for the PolicyTroubleshooter 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 PolicyTroubleshooter Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all PolicyTroubleshooter clients ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the PolicyTroubleshooter 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)
#initialize
def initialize() { |config| ... } -> Client
Create a new PolicyTroubleshooter client object.
- (config) — Configure the PolicyTroubleshooter client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.new # Create a client using a custom configuration client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.new do |config| config.timeout = 10.0 end
#troubleshoot_iam_policy
def troubleshoot_iam_policy(request, options = nil) -> ::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse
def troubleshoot_iam_policy(access_tuple: nil) -> ::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse
Checks whether a principal has a specific permission for a specific resource, and explains why the principal does or doesn't have that permission.
def troubleshoot_iam_policy(request, options = nil) -> ::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse
troubleshoot_iam_policy
via a request object, either of type
TroubleshootIamPolicyRequest or an equivalent Hash.
- request (::Google::Cloud::PolicyTroubleshooter::Iam::V3::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::Iam::V3::TroubleshootIamPolicyResponse
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).
- access_tuple (::Google::Cloud::PolicyTroubleshooter::Iam::V3::AccessTuple, ::Hash) — The information to use for checking whether a principal has a permission for a resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/policy_troubleshooter/iam/v3" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest.new # Call the troubleshoot_iam_policy method. result = client.troubleshoot_iam_policy request # The returned object is of type Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse. p result