Class OSPolicyAssignment (2.5.2)

Stay organized with collections Save and categorize content based on your preferences.
public final class OSPolicyAssignment extends GeneratedMessageV3 implements OSPolicyAssignmentOrBuilder

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.

Protobuf type google.cloud.osconfig.v1.OSPolicyAssignment

Static Fields

BASELINE_FIELD_NUMBER

public static final int BASELINE_FIELD_NUMBER
Field Value
TypeDescription
int

DELETED_FIELD_NUMBER

public static final int DELETED_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

INSTANCE_FILTER_FIELD_NUMBER

public static final int INSTANCE_FILTER_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OS_POLICIES_FIELD_NUMBER

public static final int OS_POLICIES_FIELD_NUMBER
Field Value
TypeDescription
int

RECONCILING_FIELD_NUMBER

public static final int RECONCILING_FIELD_NUMBER
Field Value
TypeDescription
int

REVISION_CREATE_TIME_FIELD_NUMBER

public static final int REVISION_CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

REVISION_ID_FIELD_NUMBER

public static final int REVISION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

ROLLOUT_FIELD_NUMBER

public static final int ROLLOUT_FIELD_NUMBER
Field Value
TypeDescription
int

ROLLOUT_STATE_FIELD_NUMBER

public static final int ROLLOUT_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OSPolicyAssignment getDefaultInstance()
Returns
TypeDescription
OSPolicyAssignment

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OSPolicyAssignment.Builder newBuilder()
Returns
TypeDescription
OSPolicyAssignment.Builder

newBuilder(OSPolicyAssignment prototype)

public static OSPolicyAssignment.Builder newBuilder(OSPolicyAssignment prototype)
Parameter
NameDescription
prototypeOSPolicyAssignment
Returns
TypeDescription
OSPolicyAssignment.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicyAssignment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OSPolicyAssignment parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicyAssignment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicyAssignment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OSPolicyAssignment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OSPolicyAssignment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OSPolicyAssignment> parser()
Returns
TypeDescription
Parser<OSPolicyAssignment>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBaseline()

public boolean getBaseline()

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.

bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The baseline.

getDefaultInstanceForType()

public OSPolicyAssignment getDefaultInstanceForType()
Returns
TypeDescription
OSPolicyAssignment

getDeleted()

public boolean getDeleted()

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

bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The deleted.

getDescription()

public String getDescription()

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

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

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

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getEtag()

public String getEtag()

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

string etag = 8;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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

string etag = 8;

Returns
TypeDescription
ByteString

The bytes for etag.

getInstanceFilter()

public OSPolicyAssignment.InstanceFilter getInstanceFilter()

Required. Filter to select VMs.

.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.InstanceFilter

The instanceFilter.

getInstanceFilterOrBuilder()

public OSPolicyAssignment.InstanceFilterOrBuilder getInstanceFilterOrBuilder()

Required. Filter to select VMs.

.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
OSPolicyAssignment.InstanceFilterOrBuilder

getName()

public String getName()

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.