# Policy Troubleshooter V3 API - Class Google::Iam::V2::UpdatePolicyRequest (v0.12.0)

0.12.0 (latest) 0.11.1 0.10.0 0.9.1 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.2 0.2.0 0.1.0 Reference documentation and code samples for the Policy Troubleshooter V3 API class Google::Iam::V2::UpdatePolicyRequest.

Request message for `UpdatePolicy`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #policy

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

**Returns**

- ([::Google::Iam::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-iam-v3/latest/Google-Iam-V2-Policy)) --- Required. The policy to update.


  To prevent conflicting updates, the `etag` value must match the value that
  is stored in IAM. If the `etag` values do not match, the request fails with
  a `409` error code and `ABORTED` status.

### #policy=

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

**Parameter**

- **value** ([::Google::Iam::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-iam-v3/latest/Google-Iam-V2-Policy)) --- Required. The policy to update.


  To prevent conflicting updates, the `etag` value must match the value that
  is stored in IAM. If the `etag` values do not match, the request fails with
  a `409` error code and `ABORTED` status.
**Returns**

- ([::Google::Iam::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_troubleshooter-iam-v3/latest/Google-Iam-V2-Policy)) --- Required. The policy to update.


  To prevent conflicting updates, the `etag` value must match the value that
  is stored in IAM. If the `etag` values do not match, the request fails with
  a `409` error code and `ABORTED` status.