# Policy Simulator V1 API - Class Google::Cloud::PolicySimulator::V1::ExplainedPolicy (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.4.0 0.3.2 0.2.0 0.1.1 Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::ExplainedPolicy.

Details about how a specific IAM \[Policy\]\[google.iam.v1.Policy\] contributed
to the access check.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #access

    def access() -> ::Google::Cloud::PolicySimulator::V1::AccessState

**Returns**

- ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- 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 `access` field in the
  \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].

### #access=

    def access=(value) -> ::Google::Cloud::PolicySimulator::V1::AccessState

**Parameter**

- **value** ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- 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 `access` field in the
  \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].
**Returns**

- ([::Google::Cloud::PolicySimulator::V1::AccessState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-AccessState)) --- 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 `access` field in the
  \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].

### #binding_explanations

    def binding_explanations() -> ::Array<::Google::Cloud::PolicySimulator::V1::BindingExplanation>

**Returns**

- (::Array\<[::Google::Cloud::PolicySimulator::V1::BindingExplanation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-BindingExplanation)\>) --- Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.

### #binding_explanations=

    def binding_explanations=(value) -> ::Array<::Google::Cloud::PolicySimulator::V1::BindingExplanation>

**Parameter**

- **value** (::Array\<[::Google::Cloud::PolicySimulator::V1::BindingExplanation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-BindingExplanation)\>) --- Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.
**Returns**

- (::Array\<[::Google::Cloud::PolicySimulator::V1::BindingExplanation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-BindingExplanation)\>) --- Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.

### #full_resource_name

    def full_resource_name() -> ::String

**Returns**

- (::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 user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") 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.

### #full_resource_name=

    def full_resource_name=(value) -> ::String

**Parameter**

- **value** (::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 user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") 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.
**Returns**

- (::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 user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") 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.

### #policy

    def policy() -> ::Google::Iam::V1::Policy

**Returns**

- ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Iam-V1-Policy)) --- The IAM policy attached to the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is empty.

### #policy=

    def policy=(value) -> ::Google::Iam::V1::Policy

**Parameter**

- **value** ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Iam-V1-Policy)) --- The IAM policy attached to the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is empty.
**Returns**

- ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Iam-V1-Policy)) --- The IAM policy attached to the resource.


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is empty.

### #relevance

    def relevance() -> ::Google::Cloud::PolicySimulator::V1::HeuristicRelevance

**Returns**

- ([::Google::Cloud::PolicySimulator::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-HeuristicRelevance)) --- The relevance of this policy to the overall determination in the \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.

### #relevance=

    def relevance=(value) -> ::Google::Cloud::PolicySimulator::V1::HeuristicRelevance

**Parameter**

- **value** ([::Google::Cloud::PolicySimulator::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-HeuristicRelevance)) --- The relevance of this policy to the overall determination in the \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.
**Returns**

- ([::Google::Cloud::PolicySimulator::V1::HeuristicRelevance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-HeuristicRelevance)) --- The relevance of this policy to the overall determination in the \[TroubleshootIamPolicyResponse\]\[google.cloud.policytroubleshooter.v3.TroubleshootIamPolicyResponse\].


  If the user who created the
  [Replay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-Replay "Google::Cloud::PolicySimulator::V1::Replay (class)") does not have
  access to the policy, this field is omitted.