Service Client: Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::Troubleshooter - Compiled Protocol Buffers messages for google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto

SYNOPSIS

use Google::Cloud::Policytroubleshooter::Iam::V3::Troubleshooter;

my $msg = Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::Troubleshooter::TroubleshootIamPolicyRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/policytroubleshooter/iam/v3/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::V3::Troubleshooter::TroubleshootIamPolicyRequest

Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter.TroubleshootIamPolicy].

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Policytroubleshooter::Iam::V3::Troubleshooter::TroubleshootIamPolicyResponse

Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.iam.v3.PolicyTroubleshooter.TroubleshootIamPolicy].

Inherits from Protobuf::Message.

Accessors

Enum: TroubleshootIamPolicyResponse::OverallAccessState

  • OVERALL_ACCESS_STATE_UNSPECIFIED => 0

  • CAN_ACCESS => 1

  • CANNOT_ACCESS => 2

  • UNKNOWN_INFO => 3

  • UNKNOWN_CONDITIONAL => 4

Google::Cloud::Policytroubleshooter::Iam::V3::Troubleshooter::AccessTuple

Information about the principal, resource, and permission to check.

Inherits from Protobuf::Message.

Accessors

  • $msg->principal() / $msg->principal($value)

    Type: String

    Required. 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: String

    Required. 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: String

    Required. 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: String

    Output 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::V3::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::V3::Troubleshooter::ConditionContext

Additional context for troubleshooting conditional role bindings and deny rules.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::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::V3::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::V3::HeuristicRelevance)

    The relevance of the allow policy type to the overall access state.

Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::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.v3.TroubleshootIamPolicyResponse].

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    The 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::V3::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::V3::HeuristicRelevance)

    The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.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::V3::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::V3::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.v3.TroubleshootIamPolicyResponse].

  • $msg->role() / $msg->role($value)

    Type: String

    The 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::V3::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::V3::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::V3::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::V3::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::V3::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::V3::Troubleshooter::ConditionExplanation)

    Condition evaluation state for this role binding.

Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::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::V3::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::V3::HeuristicRelevance)

    The relevance of the deny policy result to the overall access state.

  • $msg->permission_deniable() / $msg->permission_deniable($value)

    Type: Bool

    Indicates whether the permission to troubleshoot is supported in deny policies.

Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::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.v3.TroubleshootIamPolicyResponse].

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    The 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::V3::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::V3::HeuristicRelevance)

    The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].

    If the sender of the request does not have access to the policy, this field is omitted.

Google::Cloud::Policytroubleshooter::Iam::V3::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::V3::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.v3.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::V3::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::V3::HeuristicRelevance)

    The relevance of this policy to the overall access state in the [TroubleshootIamPolicyResponse][google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyResponse].

    If the sender of the request does not have access to the policy, this field is omitted.

Google::Cloud::Policytroubleshooter::Iam::V3::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

Google::Cloud::Policytroubleshooter::Iam::V3::Troubleshooter::ConditionExplanation

Explanation for how a condition affects a principal's access

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Policytroubleshooter::Iam::V3::Troubleshooter::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.