# Policy Simulator V1 API - Class Google::Cloud::OrgPolicy::V2::UpdatePolicyRequest (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::OrgPolicy::V2::UpdatePolicyRequest.

The request sent to the \[UpdatePolicyRequest\]
\[google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy\] method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #policy

    def policy() -> ::Google::Cloud::OrgPolicy::V2::Policy

**Returns**

- ([::Google::Cloud::OrgPolicy::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-OrgPolicy-V2-Policy)) --- Required. Policy to update.

### #policy=

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

**Parameter**

- **value** ([::Google::Cloud::OrgPolicy::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-OrgPolicy-V2-Policy)) --- Required. Policy to update.
**Returns**

- ([::Google::Cloud::OrgPolicy::V2::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-OrgPolicy-V2-Policy)) --- Required. Policy to update.

### #update_mask

    def update_mask() -> ::Google::Protobuf::FieldMask

**Returns**

- ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Protobuf-FieldMask)) --- Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.

### #update_mask=

    def update_mask=(value) -> ::Google::Protobuf::FieldMask

**Parameter**

- **value** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Protobuf-FieldMask)) --- Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
**Returns**

- ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Protobuf-FieldMask)) --- Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.