NAME

Google::Cloud::Osconfig::V1::OsPolicyAssignments - Compiled Protocol Buffers messages for google/cloud/osconfig/v1/os_policy_assignments.proto

SYNOPSIS

use Google::Cloud::Osconfig::V1::OsPolicyAssignments;

my $msg = Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment->new({
    name => $name,
    description => $description,
    os_policies => $os_policies,
    instance_filter => $instance_filter,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/osconfig/v1/os_policy_assignments.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment

OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances.

An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script.

For more information, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Resource name.

    Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`

    This field is ignored when you create an OS policy assignment.

  • $msg->description() / $msg->description($value)

    Type: String

    OS policy assignment description. Length of the description is limited to 1024 characters.

  • $msg->os_policies() / $msg->os_policies($value)

    Type: Message (Google::Cloud::Osconfig::V1::OsPolicy::OSPolicy)

    Required. List of OS policies to be applied to the VMs.

  • $msg->instance_filter() / $msg->instance_filter($value)

    Type: Message (Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment::InstanceFilter)

    Required. Filter to select VMs.

  • $msg->rollout() / $msg->rollout($value)

    Type: Message (Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment::Rollout)

    Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.

  • $msg->revision_id() / $msg->revision_id($value)

    Type: String

    Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment

  • $msg->revision_create_time() / $msg->revision_create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The timestamp that the revision was created.

  • $msg->etag() / $msg->etag($value)

    Type: String

    The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.

  • $msg->rollout_state() / $msg->rollout_state($value)

    Type: Enum (Google::Cloud::Osconfig::V1::OSPolicyAssignment::RolloutState)

    Output only. OS policy assignment rollout state

  • $msg->baseline() / $msg->baseline($value)

    Type: Bool

    Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision.

    For a given OS policy assignment, there is only one revision with a value of `true` for this field.

  • $msg->deleted() / $msg->deleted($value)

    Type: Bool

    Output only. Indicates that this revision deletes the OS policy assignment.

  • $msg->reconciling() / $msg->reconciling($value)

    Type: Bool

    Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING

  • $msg->uid() / $msg->uid($value)

    Type: String

    Output only. Server generated unique id for the OS policy assignment resource.

Enum: OSPolicyAssignment::RolloutState

  • ROLLOUT_STATE_UNSPECIFIED => 0

  • IN_PROGRESS => 1

  • CANCELLING => 2

  • CANCELLED => 3

  • SUCCEEDED => 4

Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignmentOperationMetadata

OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.

Inherits from Protobuf::Message.

Accessors

Enum: OSPolicyAssignmentOperationMetadata::APIMethod

  • API_METHOD_UNSPECIFIED => 0

  • CREATE => 1

  • UPDATE => 2

  • DELETE => 3

Enum: OSPolicyAssignmentOperationMetadata::RolloutState

  • ROLLOUT_STATE_UNSPECIFIED => 0

  • IN_PROGRESS => 1

  • CANCELLING => 2

  • CANCELLED => 3

  • SUCCEEDED => 4

Google::Cloud::Osconfig::V1::OsPolicyAssignments::CreateOSPolicyAssignmentRequest

A request message to create an OS policy assignment

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The parent resource name in the form: projects/{project}/locations/{location}

  • $msg->os_policy_assignment() / $msg->os_policy_assignment($value)

    Type: Message (Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment)

    Required. The OS policy assignment to be created.

  • $msg->os_policy_assignment_id() / $msg->os_policy_assignment_id($value)

    Type: 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.

Google::Cloud::Osconfig::V1::OsPolicyAssignments::UpdateOSPolicyAssignmentRequest

A request message to update an OS policy assignment

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Osconfig::V1::OsPolicyAssignments::GetOSPolicyAssignmentRequest

A request message to get an OS policy assignment

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of OS policy assignment.

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

Google::Cloud::Osconfig::V1::OsPolicyAssignments::ListOSPolicyAssignmentsRequest

A request message to list OS policy assignments for a parent resource

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The parent resource name.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of assignments to return.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.

Google::Cloud::Osconfig::V1::OsPolicyAssignments::ListOSPolicyAssignmentsResponse

A response message for listing all assignments under given parent.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Osconfig::V1::OsPolicyAssignments::ListOSPolicyAssignmentRevisionsRequest

A request message to list revisions for a OS policy assignment

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the OS policy assignment to list revisions for.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of revisions to return.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.

Google::Cloud::Osconfig::V1::OsPolicyAssignments::ListOSPolicyAssignmentRevisionsResponse

A response message for listing all revisions for a OS policy assignment.

Inherits from Protobuf::Message.

Accessors

  • $msg->os_policy_assignments() / $msg->os_policy_assignments($value)

    Type: Message (Google::Cloud::Osconfig::V1::OsPolicyAssignments::OSPolicyAssignment)

    The OS policy assignment revisions

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    The pagination token to retrieve the next page of OS policy assignment revisions.

Google::Cloud::Osconfig::V1::OsPolicyAssignments::DeleteOSPolicyAssignmentRequest

A request message for deleting a OS policy assignment.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the OS policy assignment to be deleted

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Osconfig::V1::OsPolicyAssignments::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.