Service Client: Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::PolicyTroubleshooterClient
Client stub representing the remote PolicyTroubleshooter gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to policytroubleshooter.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter - Compiled Protocol Buffers messages for google/cloud/policytroubleshooter/iam/v3beta/troubleshooter.proto
SYNOPSIS
use Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter;
my $msg = Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::TroubleshootIamPolicyRequest->new({
access_tuple => $access_tuple,
});
# Read or update a field
my $val = $msg->access_tuple();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::TroubleshootIamPolicyRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/policytroubleshooter/iam/v3beta/troubleshooter.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::TroubleshootIamPolicyRequest
Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.iam.v3beta.PolicyTroubleshooter.TroubleshootIamPolicy].
Inherits from Protobuf::Message.
Accessors
$msg->access_tuple()/$msg->access_tuple($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AccessTuple)The information to use for checking whether a principal has a permission for a resource.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::TroubleshootIamPolicyResponse
Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.iam.v3beta.PolicyTroubleshooter.TroubleshootIamPolicy].
Inherits from Protobuf::Message.
Accessors
$msg->overall_access_state()/$msg->overall_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::TroubleshootIamPolicyResponse::OverallAccessState)Indicates whether the principal has the specified permission for the specified resource, based on evaluating all types of the applicable IAM policies.
$msg->access_tuple()/$msg->access_tuple($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AccessTuple)The access tuple from the request, including any provided context used to evaluate the condition.
$msg->allow_policy_explanation()/$msg->allow_policy_explanation($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowPolicyExplanation)An explanation of how the applicable IAM allow policies affect the final access state.
$msg->deny_policy_explanation()/$msg->deny_policy_explanation($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyPolicyExplanation)An explanation of how the applicable IAM deny policies affect the final access state.
Enum: TroubleshootIamPolicyResponse::OverallAccessState
OVERALL_ACCESS_STATE_UNSPECIFIED=>0CAN_ACCESS=>1CANNOT_ACCESS=>2UNKNOWN_INFO=>3UNKNOWN_CONDITIONAL=>4
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AccessTuple
Information about the principal, resource, and permission to check.
Inherits from Protobuf::Message.
Accessors
$msg->principal()/$msg->principal($value)Type:
StringRequired. The email address of the principal whose access you want to check. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`.
The principal must be a Google Account or a service account. Other types of principals are not supported.
$msg->full_resource_name()/$msg->full_resource_name($value)Type:
StringRequired. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
$msg->permission()/$msg->permission($value)Type:
StringRequired. The IAM permission to check for, either in the `v1` permission format or the `v2` permission format.
For a complete list of IAM permissions in the `v1` format, see https://cloud.google.com/iam/help/permissions/reference.
For a list of IAM permissions in the `v2` format, see https://cloud.google.com/iam/help/deny/supported-permissions.
For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.
$msg->permission_fqdn()/$msg->permission_fqdn($value)Type:
StringOutput only. The permission that Policy Troubleshooter checked for, in the `v2` format.
$msg->condition_context()/$msg->condition_context($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext)Optional. Additional context for the request, such as the request time or IP address. This context allows Policy Troubleshooter to troubleshoot conditional role bindings and deny rules.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext
Additional context for troubleshooting conditional role bindings and deny rules.
Inherits from Protobuf::Message.
Accessors
$msg->resource()/$msg->resource($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext::Resource)Represents a target resource that is involved with a network activity. If multiple resources are involved with an activity, this must be the primary one.
$msg->destination()/$msg->destination($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext::Peer)The destination of a network activity, such as accepting a TCP connection. In a multi-hop network activity, the destination represents the receiver of the last hop.
$msg->request()/$msg->request($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext::Request)Represents a network request, such as an HTTP request.
$msg->effective_tags()/$msg->effective_tags($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionContext::EffectiveTag)Output only. The effective tags on the resource. The effective tags are fetched during troubleshooting.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowPolicyExplanation
Details about how the relevant IAM allow policies affect the final access state.
Inherits from Protobuf::Message.
Accessors
$msg->allow_access_state()/$msg->allow_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::AllowAccessState)Indicates whether the principal has the specified permission for the specified resource, based on evaluating all applicable IAM allow policies.
$msg->explained_policies()/$msg->explained_policies($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedAllowPolicy)List of IAM allow policies that were evaluated to check the principal's permissions, with annotations to indicate how each policy contributed to the final result.
The list of policies includes the policy for the resource itself, as well as allow policies that are inherited from higher levels of the resource hierarchy, including the organization, the folder, and the project.
To learn more about the resource hierarchy, see https://cloud.google.com/iam/help/resource-hierarchy.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of the allow policy type to the overall access state.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedAllowPolicy
Details about how a specific IAM allow policy contributed to the final access state.
Inherits from Protobuf::Message.
Accessors
$msg->allow_access_state()/$msg->allow_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::AllowAccessState)Required. Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource.
This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `overall_access_state` field in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
$msg->full_resource_name()/$msg->full_resource_name($value)Type:
StringThe full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
If the sender of the request does not have access to the policy, this field is omitted.
For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
$msg->binding_explanations()/$msg->binding_explanations($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowBindingExplanation)Details about how each role binding in the policy affects the principal's ability, or inability, to use the permission for the resource. The order of the role bindings matches the role binding order in the policy.
If the sender of the request does not have access to the policy, this field is omitted.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
If the sender of the request does not have access to the policy, this field is omitted.
$msg->policy()/$msg->policy($value)Type:
Message(Google::Iam::V1::Policy::Policy)The IAM allow policy attached to the resource.
If the sender of the request does not have access to the policy, this field is empty.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowBindingExplanation
Details about how a role binding in an allow policy affects a principal's ability to use a permission.
Inherits from Protobuf::Message.
Accessors
$msg->allow_access_state()/$msg->allow_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::AllowAccessState)Required. Indicates whether _this role binding_ gives the specified permission to the specified principal on the specified resource.
This field does _not_ indicate whether the principal actually has the permission on the resource. There might be another role binding that overrides this role binding. To determine whether the principal actually has the permission, use the `overall_access_state` field in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
$msg->role()/$msg->role($value)Type:
StringThe role that this role binding grants. For example, `roles/compute.admin`.
For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.
$msg->role_permission()/$msg->role_permission($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::RolePermissionInclusionState)Indicates whether the role granted by this role binding contains the specified permission.
$msg->role_permission_relevance()/$msg->role_permission_relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.
$msg->combined_membership()/$msg->combined_membership($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowBindingExplanation::AnnotatedAllowMembership)The combined result of all memberships. Indicates if the principal is included in any role binding, either directly or indirectly.
$msg->memberships()/$msg->memberships($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::AllowBindingExplanation::MembershipsEntry)Indicates whether each role binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the role binding, and each value indicates whether the principal in the role binding includes the principal in the request.
For example, suppose that a role binding includes the following principals:
* `user:alice@example.com` * `group:product-eng@example.com`
You want to troubleshoot access for `user:bob@example.com`. This user is a member of the group `group:product-eng@example.com`.
For the first principal in the role binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `NOT_INCLUDED`.
For the second principal in the role binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `INCLUDED`.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of this role binding to the overall determination for the entire policy.
$msg->condition()/$msg->condition($value)Type:
Message(Google::Type::Expr::Expr)A condition expression that specifies when the role binding grants access.
To learn about IAM Conditions, see https://cloud.google.com/iam/help/conditions/overview.
$msg->condition_explanation()/$msg->condition_explanation($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionExplanation)Condition evaluation state for this role binding.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyPolicyExplanation
Details about how the relevant IAM deny policies affect the final access state.
Inherits from Protobuf::Message.
Accessors
$msg->deny_access_state()/$msg->deny_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::DenyAccessState)Indicates whether the principal is denied the specified permission for the specified resource, based on evaluating all applicable IAM deny policies.
$msg->explained_resources()/$msg->explained_resources($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedDenyResource)List of resources with IAM deny policies that were evaluated to check the principal's denied permissions, with annotations to indicate how each policy contributed to the final result.
The list of resources includes the policy for the resource itself, as well as policies that are inherited from higher levels of the resource hierarchy, including the organization, the folder, and the project. The order of the resources starts from the resource and climbs up the resource hierarchy.
To learn more about the resource hierarchy, see https://cloud.google.com/iam/help/resource-hierarchy.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of the deny policy result to the overall access state.
$msg->permission_deniable()/$msg->permission_deniable($value)Type:
BoolIndicates whether the permission to troubleshoot is supported in deny policies.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedDenyResource
Details about how a specific resource contributed to the deny policy evaluation.
Inherits from Protobuf::Message.
Accessors
$msg->deny_access_state()/$msg->deny_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::DenyAccessState)Required. Indicates whether any policies attached to _this resource_ deny the specific permission to the specified principal for the specified resource.
This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `overall_access_state` field in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
$msg->full_resource_name()/$msg->full_resource_name($value)Type:
StringThe full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
If the sender of the request does not have access to the policy, this field is omitted.
For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
$msg->explained_policies()/$msg->explained_policies($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedDenyPolicy)List of IAM deny policies that were evaluated to check the principal's denied permissions, with annotations to indicate how each policy contributed to the final result.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
If the sender of the request does not have access to the policy, this field is omitted.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ExplainedDenyPolicy
Details about how a specific IAM deny policy [Policy][google.iam.v2.Policy] contributed to the access check.
Inherits from Protobuf::Message.
Accessors
$msg->deny_access_state()/$msg->deny_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::DenyAccessState)Required. Indicates whether _this policy_ denies the specified permission to the specified principal for the specified resource.
This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `overall_access_state` field in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
$msg->policy()/$msg->policy($value)Type:
Message(Google::Iam::V2::Policy::Policy)The IAM deny policy attached to the resource.
If the sender of the request does not have access to the policy, this field is omitted.
$msg->rule_explanations()/$msg->rule_explanations($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation)Details about how each rule in the policy affects the principal's inability to use the permission for the resource. The order of the deny rule matches the order of the rules in the deny policy.
If the sender of the request does not have access to the policy, this field is omitted.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
If the sender of the request does not have access to the policy, this field is omitted.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation
Details about how a deny rule in a deny policy affects a principal's ability to use a permission.
Inherits from Protobuf::Message.
Accessors
$msg->deny_access_state()/$msg->deny_access_state($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::DenyAccessState)Required. Indicates whether _this rule_ denies the specified permission to the specified principal for the specified resource.
This field does _not_ indicate whether the principal is actually denied on the permission for the resource. There might be another rule that overrides this rule. To determine whether the principal actually has the permission, use the `overall_access_state` field in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyResponse].
$msg->combined_denied_permission()/$msg->combined_denied_permission($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::AnnotatedPermissionMatching)Indicates whether the permission in the request is listed as a denied permission in the deny rule.
$msg->denied_permissions()/$msg->denied_permissions($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::DeniedPermissionsEntry)Lists all denied permissions in the deny rule and indicates whether each permission matches the permission in the request.
Each key identifies a denied permission in the rule, and each value indicates whether the denied permission matches the permission in the request.
$msg->combined_exception_permission()/$msg->combined_exception_permission($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::AnnotatedPermissionMatching)Indicates whether the permission in the request is listed as an exception permission in the deny rule.
$msg->exception_permissions()/$msg->exception_permissions($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::ExceptionPermissionsEntry)Lists all exception permissions in the deny rule and indicates whether each permission matches the permission in the request.
Each key identifies a exception permission in the rule, and each value indicates whether the exception permission matches the permission in the request.
$msg->combined_denied_principal()/$msg->combined_denied_principal($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::AnnotatedDenyPrincipalMatching)Indicates whether the principal is listed as a denied principal in the deny rule, either directly or through membership in a principal set.
$msg->denied_principals()/$msg->denied_principals($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::DeniedPrincipalsEntry)Lists all denied principals in the deny rule and indicates whether each principal matches the principal in the request, either directly or through membership in a principal set.
Each key identifies a denied principal in the rule, and each value indicates whether the denied principal matches the principal in the request.
$msg->combined_exception_principal()/$msg->combined_exception_principal($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::AnnotatedDenyPrincipalMatching)Indicates whether the principal is listed as an exception principal in the deny rule, either directly or through membership in a principal set.
$msg->exception_principals()/$msg->exception_principals($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::DenyRuleExplanation::ExceptionPrincipalsEntry)Lists all exception principals in the deny rule and indicates whether each principal matches the principal in the request, either directly or through membership in a principal set.
Each key identifies a exception principal in the rule, and each value indicates whether the exception principal matches the principal in the request.
$msg->relevance()/$msg->relevance($value)Type:
Enum(Google::Cloud::Policytroubleshooter::Iam::V3beta::HeuristicRelevance)The relevance of this role binding to the overall determination for the entire policy.
$msg->condition()/$msg->condition($value)Type:
Message(Google::Type::Expr::Expr)A condition expression that specifies when the deny rule denies the principal access.
To learn about IAM Conditions, see https://cloud.google.com/iam/help/conditions/overview.
$msg->condition_explanation()/$msg->condition_explanation($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionExplanation)Condition evaluation state for this role binding.
Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionExplanation
Explanation for how a condition affects a principal's access
Inherits from Protobuf::Message.
Accessors
$msg->value()/$msg->value($value)Type:
Message(Google::Protobuf::Struct::Value)Value of the condition.
$msg->errors()/$msg->errors($value)Type:
Message(Google::Rpc::Status::Status)Any errors that prevented complete evaluation of the condition expression.
$msg->evaluation_states()/$msg->evaluation_states($value)Type:
Message(Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::ConditionExplanation::EvaluationState)The value of each statement of the condition expression. The value can be `true`, `false`, or `null`. The value is `null` if the statement can't be evaluated.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Policytroubleshooter::Iam::V3beta::Troubleshooter::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.