# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::OsConfigZonalService::Client (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.16.0 0.15.2 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.

Client for the OsConfigZonalService service.


Zonal OS Config API

<br />

The OS Config service is the server-side component that allows users to
manage package installations and patch jobs for Compute Engine VM instances.

## Inherits

- Object

## Includes

- [Google::Cloud::OsConfig::V1::OsConfigZonalService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the OsConfigZonalService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration "Google::Cloud::OsConfig::V1::OsConfigZonalService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all OsConfigZonalService clients
::Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the OsConfigZonalService Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client#Google__Cloud__OsConfig__V1__OsConfigZonalService__Client_configure_class_ "Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration "Google::Cloud::OsConfig::V1::OsConfigZonalService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration))

### #create_os_policy_assignment

    def create_os_policy_assignment(request, options = nil) -> ::Gapic::Operation
    def create_os_policy_assignment(parent: nil, os_policy_assignment: nil, os_policy_assignment_id: nil) -> ::Gapic::Operation

Create an OS policy assignment.


This method also creates the first revision of the OS policy assignment.

This method returns a long running operation (LRO) that contains the
rollout details. The rollout can be cancelled by cancelling the LRO.

<br />

For more information, see [Method:
projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
**Overloads**

    def create_os_policy_assignment(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_os_policy_assignment` via a request object, either of type [CreateOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-CreateOSPolicyAssignmentRequest "Google::Cloud::OsConfig::V1::CreateOSPolicyAssignmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::CreateOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-CreateOSPolicyAssignmentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_os_policy_assignment(parent: nil, os_policy_assignment: nil, os_policy_assignment_id: nil) -> ::Gapic::Operation

Pass arguments to `create_os_policy_assignment` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent resource name in the form: projects/{project}/locations/{location}
- **os_policy_assignment** ([::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment), ::Hash) --- Required. The OS policy assignment to be created.
- **os_policy_assignment_id** (::String) ---

  Required. The logical name of the OS policy assignment in the project
  with the following restrictions:
  - Must contain only lowercase letters, numbers, and hyphens.
  - Must start with a letter.
  - Must be between 1-63 characters.
  - Must end with a number or a letter.
  - Must be unique within the project.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::CreateOSPolicyAssignmentRequest.new

# Call the create_os_policy_assignment method.
result = client.create_os_policy_assignment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_os_policy_assignment

    def delete_os_policy_assignment(request, options = nil) -> ::Gapic::Operation
    def delete_os_policy_assignment(name: nil) -> ::Gapic::Operation

Delete the OS policy assignment.


This method creates a new revision of the OS policy assignment.

This method returns a long running operation (LRO) that contains the
rollout details. The rollout can be cancelled by cancelling the LRO.

If the LRO completes and is not cancelled, all revisions associated with
the OS policy assignment are deleted.

<br />

For more information, see [Method:
projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
**Overloads**

    def delete_os_policy_assignment(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_os_policy_assignment` via a request object, either of type [DeleteOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-DeleteOSPolicyAssignmentRequest "Google::Cloud::OsConfig::V1::DeleteOSPolicyAssignmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::DeleteOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-DeleteOSPolicyAssignmentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_os_policy_assignment(name: nil) -> ::Gapic::Operation

Pass arguments to `delete_os_policy_assignment` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The name of the OS policy assignment to be deleted
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::DeleteOSPolicyAssignmentRequest.new

# Call the delete_os_policy_assignment method.
result = client.delete_os_policy_assignment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #get_inventory

    def get_inventory(request, options = nil) -> ::Google::Cloud::OsConfig::V1::Inventory
    def get_inventory(name: nil, view: nil) -> ::Google::Cloud::OsConfig::V1::Inventory

Get inventory data for the specified VM instance. If the VM has no
associated inventory, the message `NOT_FOUND` is returned.
**Overloads**

    def get_inventory(request, options = nil) -> ::Google::Cloud::OsConfig::V1::Inventory

Pass arguments to `get_inventory` via a request object, either of type [GetInventoryRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetInventoryRequest "Google::Cloud::OsConfig::V1::GetInventoryRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::GetInventoryRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetInventoryRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_inventory(name: nil, view: nil) -> ::Google::Cloud::OsConfig::V1::Inventory

Pass arguments to `get_inventory` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. API resource name for inventory resource.


  Format:
  `projects/{project}/locations/{location}/instances/{instance}/inventory`

  For `{project}`, either `project-number` or `project-id` can be provided.
  For `{instance}`, either Compute Engine `instance-id` or `instance-name`
  can be provided.
- **view** ([::Google::Cloud::OsConfig::V1::InventoryView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-InventoryView)) --- Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsConfig::V1::Inventory](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-Inventory))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsConfig::V1::Inventory](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-Inventory))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::GetInventoryRequest.new

# Call the get_inventory method.
result = client.get_inventory request

# The returned object is of type Google::Cloud::OsConfig::V1::Inventory.
p result
```

### #get_os_policy_assignment

    def get_os_policy_assignment(request, options = nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignment
    def get_os_policy_assignment(name: nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignment

Retrieve an existing OS policy assignment.


<br />

This method always returns the latest revision. In order to retrieve a
previous revision of the assignment, also provide the revision ID in the
`name` parameter.
**Overloads**

    def get_os_policy_assignment(request, options = nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignment

Pass arguments to `get_os_policy_assignment` via a request object, either of type [GetOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetOSPolicyAssignmentRequest "Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetOSPolicyAssignmentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_os_policy_assignment(name: nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignment

Pass arguments to `get_os_policy_assignment` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The resource name of OS policy assignment.


  Format:
  `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentRequest.new

# Call the get_os_policy_assignment method.
result = client.get_os_policy_assignment request

# The returned object is of type Google::Cloud::OsConfig::V1::OSPolicyAssignment.
p result
```

### #get_os_policy_assignment_report

    def get_os_policy_assignment_report(request, options = nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport
    def get_os_policy_assignment_report(name: nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport

Get the OS policy asssignment report for the specified Compute Engine VM
instance.
**Overloads**

    def get_os_policy_assignment_report(request, options = nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport

Pass arguments to `get_os_policy_assignment_report` via a request object, either of type [GetOSPolicyAssignmentReportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetOSPolicyAssignmentReportRequest "Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentReportRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentReportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetOSPolicyAssignmentReportRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_os_policy_assignment_report(name: nil) -> ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport

Pass arguments to `get_os_policy_assignment_report` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. API resource name for OS policy assignment report.


  Format:
  `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`

  For `{project}`, either `project-number` or `project-id` can be provided.
  For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
  can be provided.
  For `{assignment_id}`, the OSPolicyAssignment id must be provided.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::GetOSPolicyAssignmentReportRequest.new

# Call the get_os_policy_assignment_report method.
result = client.get_os_policy_assignment_report request

# The returned object is of type Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
p result
```

### #get_vulnerability_report

    def get_vulnerability_report(request, options = nil) -> ::Google::Cloud::OsConfig::V1::VulnerabilityReport
    def get_vulnerability_report(name: nil) -> ::Google::Cloud::OsConfig::V1::VulnerabilityReport

Gets the vulnerability report for the specified VM instance. Only VMs with
inventory data have vulnerability reports associated with them.
**Overloads**

    def get_vulnerability_report(request, options = nil) -> ::Google::Cloud::OsConfig::V1::VulnerabilityReport

Pass arguments to `get_vulnerability_report` via a request object, either of type [GetVulnerabilityReportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetVulnerabilityReportRequest "Google::Cloud::OsConfig::V1::GetVulnerabilityReportRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::GetVulnerabilityReportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-GetVulnerabilityReportRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_vulnerability_report(name: nil) -> ::Google::Cloud::OsConfig::V1::VulnerabilityReport

Pass arguments to `get_vulnerability_report` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. API resource name for vulnerability resource.


  Format:
  `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`

  For `{project}`, either `project-number` or `project-id` can be provided.
  For `{instance}`, either Compute Engine `instance-id` or `instance-name`
  can be provided.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsConfig::V1::VulnerabilityReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-VulnerabilityReport))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsConfig::V1::VulnerabilityReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-VulnerabilityReport))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::GetVulnerabilityReportRequest.new

# Call the get_vulnerability_report method.
result = client.get_vulnerability_report request

# The returned object is of type Google::Cloud::OsConfig::V1::VulnerabilityReport.
p result
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new OsConfigZonalService client object.
**Yields**

- (config) --- Configure the OsConfigZonalService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_inventories

    def list_inventories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::Inventory>
    def list_inventories(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::Inventory>

List inventory data for all VM instances in the specified zone.
**Overloads**

    def list_inventories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::Inventory>

Pass arguments to `list_inventories` via a request object, either of type [ListInventoriesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListInventoriesRequest "Google::Cloud::OsConfig::V1::ListInventoriesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::ListInventoriesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListInventoriesRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_inventories(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::Inventory>

Pass arguments to `list_inventories` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent resource name.


  Format: `projects/{project}/locations/{location}/instances/-`

  For `{project}`, either `project-number` or `project-id` can be provided.
- **view** ([::Google::Cloud::OsConfig::V1::InventoryView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-InventoryView)) --- Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.
- **page_size** (::Integer) --- The maximum number of results to return.
- **page_token** (::String) --- A pagination token returned from a previous call to `ListInventories` that indicates where this listing should continue from.
- **filter** (::String) --- If provided, this field specifies the criteria that must be met by a `Inventory` API resource to be included in the response.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::Inventory](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-Inventory)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::Inventory](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-Inventory)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::ListInventoriesRequest.new

# Call the list_inventories method.
result = client.list_inventories request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::OsConfig::V1::Inventory.
  p item
end
```

### #list_os_policy_assignment_reports

    def list_os_policy_assignment_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport>
    def list_os_policy_assignment_reports(parent: nil, page_size: nil, filter: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport>

List OS policy asssignment reports for all Compute Engine VM instances in
the specified zone.
**Overloads**

    def list_os_policy_assignment_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport>

Pass arguments to `list_os_policy_assignment_reports` via a request object, either of type [ListOSPolicyAssignmentReportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentReportsRequest "Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentReportsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentReportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentReportsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_os_policy_assignment_reports(parent: nil, page_size: nil, filter: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport>

Pass arguments to `list_os_policy_assignment_reports` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent resource name.


  Format:
  `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`

  For `{project}`, either `project-number` or `project-id` can be provided.
  For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
  provided. If '-' is provided, the response will include
  OSPolicyAssignmentReports for all instances in the project/location.
  For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
  is provided, the response will include OSPolicyAssignmentReports for all
  OSPolicyAssignments in the project/location.
  Either {instance} or {assignment} must be `-`.

  For example:
  `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
  returns all reports for the instance
  `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
  returns all the reports for the given assignment across all instances.
  `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
  returns all the reports for all assignments across all instances.
- **page_size** (::Integer) --- The maximum number of results to return.
- **filter** (::String) --- If provided, this field specifies the criteria that must be met by the `OSPolicyAssignmentReport` API resource that is included in the response.
- **page_token** (::String) --- A pagination token returned from a previous call to the `ListOSPolicyAssignmentReports` method that indicates where this listing should continue from.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentReportsRequest.new

# Call the list_os_policy_assignment_reports method.
result = client.list_os_policy_assignment_reports request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
  p item
end
```

### #list_os_policy_assignment_revisions

    def list_os_policy_assignment_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>
    def list_os_policy_assignment_revisions(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

List the OS policy assignment revisions for a given OS policy assignment.
**Overloads**

    def list_os_policy_assignment_revisions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

Pass arguments to `list_os_policy_assignment_revisions` via a request object, either of type [ListOSPolicyAssignmentRevisionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentRevisionsRequest "Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentRevisionsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentRevisionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentRevisionsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_os_policy_assignment_revisions(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

Pass arguments to `list_os_policy_assignment_revisions` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the OS policy assignment to list revisions for.
- **page_size** (::Integer) --- The maximum number of revisions to return.
- **page_token** (::String) --- A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentRevisionsRequest.new

# Call the list_os_policy_assignment_revisions method.
result = client.list_os_policy_assignment_revisions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
  p item
end
```

### #list_os_policy_assignments

    def list_os_policy_assignments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>
    def list_os_policy_assignments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

List the OS policy assignments under the parent resource.


<br />

For each OS policy assignment, the latest revision is returned.
**Overloads**

    def list_os_policy_assignments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

Pass arguments to `list_os_policy_assignments` via a request object, either of type [ListOSPolicyAssignmentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentsRequest "Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListOSPolicyAssignmentsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_os_policy_assignments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::OSPolicyAssignment>

Pass arguments to `list_os_policy_assignments` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent resource name.
- **page_size** (::Integer) --- The maximum number of assignments to return.
- **page_token** (::String) --- A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::ListOSPolicyAssignmentsRequest.new

# Call the list_os_policy_assignments method.
result = client.list_os_policy_assignments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
  p item
end
```

### #list_vulnerability_reports

    def list_vulnerability_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>
    def list_vulnerability_reports(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>

List vulnerability reports for all VM instances in the specified zone.
**Overloads**

    def list_vulnerability_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>

Pass arguments to `list_vulnerability_reports` via a request object, either of type [ListVulnerabilityReportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListVulnerabilityReportsRequest "Google::Cloud::OsConfig::V1::ListVulnerabilityReportsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::ListVulnerabilityReportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-ListVulnerabilityReportsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_vulnerability_reports(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::VulnerabilityReport>

Pass arguments to `list_vulnerability_reports` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent resource name.


  Format: `projects/{project}/locations/{location}/instances/-`

  For `{project}`, either `project-number` or `project-id` can be provided.
- **page_size** (::Integer) --- The maximum number of results to return.
- **page_token** (::String) --- A pagination token returned from a previous call to `ListVulnerabilityReports` that indicates where this listing should continue from.
- **filter** (::String) ---

  This field supports filtering by the severity level for the vulnerability.
  For a list of severity levels, see [Severity levels for
  vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities).

  The filter field follows the rules described in the
  [AIP-160](https://google.aip.dev/160) guidelines as follows:
  - **Filter for a specific severity type** : you can list reports that
    contain
    vulnerabilities that are classified as medium by specifying
    `vulnerabilities.details.severity:MEDIUM`.

  - **Filter for a range of severities** : you can list reports that have
    vulnerabilities that are classified as critical or high by specifying
    `vulnerabilities.details.severity:HIGH OR
    vulnerabilities.details.severity:CRITICAL`

**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::VulnerabilityReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-VulnerabilityReport)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::OsConfig::V1::VulnerabilityReport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-VulnerabilityReport)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::ListVulnerabilityReportsRequest.new

# Call the list_vulnerability_reports method.
result = client.list_vulnerability_reports request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::OsConfig::V1::VulnerabilityReport.
  p item
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::OsConfig::V1::OsConfigZonalService::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::OsConfig::V1::OsConfigZonalService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OsConfigZonalService-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_os_policy_assignment

    def update_os_policy_assignment(request, options = nil) -> ::Gapic::Operation
    def update_os_policy_assignment(os_policy_assignment: nil, update_mask: nil) -> ::Gapic::Operation

Update an existing OS policy assignment.


This method creates a new revision of the OS policy assignment.

This method returns a long running operation (LRO) that contains the
rollout details. The rollout can be cancelled by cancelling the LRO.

<br />

For more information, see [Method:
projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
**Overloads**

    def update_os_policy_assignment(request, options = nil) -> ::Gapic::Operation

Pass arguments to `update_os_policy_assignment` via a request object, either of type [UpdateOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-UpdateOSPolicyAssignmentRequest "Google::Cloud::OsConfig::V1::UpdateOSPolicyAssignmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsConfig::V1::UpdateOSPolicyAssignmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-UpdateOSPolicyAssignmentRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_os_policy_assignment(os_policy_assignment: nil, update_mask: nil) -> ::Gapic::Operation

Pass arguments to `update_os_policy_assignment` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **os_policy_assignment** ([::Google::Cloud::OsConfig::V1::OSPolicyAssignment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignment), ::Hash) --- Required. The updated OS policy assignment.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. Field mask that controls which fields of the assignment should be updated.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_config/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsConfig::V1::OsConfigZonalService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsConfig::V1::UpdateOSPolicyAssignmentRequest.new

# Call the update_os_policy_assignment method.
result = client.update_os_policy_assignment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```