# Binary Authorization V1beta1 API - Class Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest (v0.19.0)

0.19.0 (latest) 0.18.0 0.17.1 0.16.0 0.15.1 0.14.0 0.13.1 0.12.2 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 Reference documentation and code samples for the Binary Authorization V1beta1 API class Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.

Request message for \[BinauthzManagementService.UpdatePolicy\]\[\].

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #policy

    def policy() -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy)) --- Required. A new or updated [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") value. The service will overwrite the [policy name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy#Google__Cloud__BinaryAuthorization__V1beta1__Policy_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Policy#name (method)") field with the resource name in the request URL, in the format `projects/*/policy`.

### #policy=

    def policy=(value) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

**Parameter**

- **value** ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy)) --- Required. A new or updated [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") value. The service will overwrite the [policy name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy#Google__Cloud__BinaryAuthorization__V1beta1__Policy_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Policy#name (method)") field with the resource name in the request URL, in the format `projects/*/policy`.
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy)) --- Required. A new or updated [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") value. The service will overwrite the [policy name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy#Google__Cloud__BinaryAuthorization__V1beta1__Policy_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Policy#name (method)") field with the resource name in the request URL, in the format `projects/*/policy`.