Class InstanceOSPoliciesCompliance (2.48.0)

public final class InstanceOSPoliciesCompliance extends GeneratedMessageV3 implements InstanceOSPoliciesComplianceOrBuilder

This API resource represents the OS policies compliance data for a Compute Engine virtual machine (VM) instance at a given point in time.

A Compute Engine VM can have multiple OS policy assignments, and each assignment can have multiple OS policies. As a result, multiple OS policies could be applied to a single VM.

You can use this API resource to determine both the compliance state of your VM as well as the compliance state of an individual OS policy.

For more information, see View compliance.

Protobuf type google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance

Static Fields

DETAILED_STATE_FIELD_NUMBER (deprecated)

public static final int DETAILED_STATE_FIELD_NUMBER
Field Value
Type Description
int

DETAILED_STATE_REASON_FIELD_NUMBER (deprecated)

public static final int DETAILED_STATE_REASON_FIELD_NUMBER
Field Value
Type Description
int

INSTANCE_FIELD_NUMBER (deprecated)

public static final int INSTANCE_FIELD_NUMBER
Field Value
Type Description
int

LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER (deprecated)

public static final int LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER
Field Value
Type Description
int

LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER (deprecated)

public static final int LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER (deprecated)

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OS_POLICY_COMPLIANCES_FIELD_NUMBER (deprecated)

public static final int OS_POLICY_COMPLIANCES_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER (deprecated)

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance() (deprecated)

public static InstanceOSPoliciesCompliance getDefaultInstance()
Returns
Type Description
InstanceOSPoliciesCompliance

getDescriptor() (deprecated)

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder() (deprecated)

public static InstanceOSPoliciesCompliance.Builder newBuilder()
Returns
Type Description
InstanceOSPoliciesCompliance.Builder

newBuilder(InstanceOSPoliciesCompliance prototype) (deprecated)

public static InstanceOSPoliciesCompliance.Builder newBuilder(InstanceOSPoliciesCompliance prototype)
Parameter
Name Description
prototype InstanceOSPoliciesCompliance
Returns
Type Description
InstanceOSPoliciesCompliance.Builder

parseDelimitedFrom(InputStream input) (deprecated)

public static InstanceOSPoliciesCompliance parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseFrom(byte[] data) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseFrom(InputStream input) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) (deprecated)

public static InstanceOSPoliciesCompliance parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceOSPoliciesCompliance
Exceptions
Type Description
InvalidProtocolBufferException

parser() (deprecated)

public static Parser<InstanceOSPoliciesCompliance> parser()
Returns
Type Description
Parser<InstanceOSPoliciesCompliance>

Methods

equals(Object obj) (deprecated)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType() (deprecated)

public InstanceOSPoliciesCompliance getDefaultInstanceForType()
Returns
Type Description
InstanceOSPoliciesCompliance

getDetailedState() (deprecated)

public String getDetailedState()

Output only. Detailed compliance state of the VM. This field is populated only when compliance state is UNKNOWN.

It may contain one of the following values:

  • no-compliance-data: Compliance data is not available for this VM.
  • no-agent-detected: OS Config agent is not detected for this VM.
  • config-not-supported-by-agent: The version of the OS Config agent running on this VM does not support configuration management.
  • inactive: VM is not running.
  • internal-service-errors: There were internal service errors encountered while enforcing compliance.
  • agent-errors: OS config agent encountered errors while enforcing compliance.

string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The detailedState.

getDetailedStateBytes() (deprecated)

public ByteString getDetailedStateBytes()

Output only. Detailed compliance state of the VM. This field is populated only when compliance state is UNKNOWN.

It may contain one of the following values:

  • no-compliance-data: Compliance data is not available for this VM.
  • no-agent-detected: OS Config agent is not detected for this VM.
  • config-not-supported-by-agent: The version of the OS Config agent running on this VM does not support configuration management.
  • inactive: VM is not running.
  • internal-service-errors: There were internal service errors encountered while enforcing compliance.
  • agent-errors: OS config agent encountered errors while enforcing compliance.

string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for detailedState.

getDetailedStateReason() (deprecated)

public String getDetailedStateReason()

Output only. The reason for the detailed_state of the VM (if any).

string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The detailedStateReason.

getDetailedStateReasonBytes() (deprecated)

public ByteString getDetailedStateReasonBytes()

Output only. The reason for the detailed_state of the VM (if any).

string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for detailedStateReason.

getInstance() (deprecated)

public String getInstance()

Output only. The Compute Engine VM instance name.

string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The instance.

getInstanceBytes() (deprecated)

public ByteString getInstanceBytes()

Output only. The Compute Engine VM instance name.

string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for instance.

getLastComplianceCheckTime() (deprecated)

public Timestamp getLastComplianceCheckTime()

Output only. Timestamp of the last compliance check for the VM.

.google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The lastComplianceCheckTime.

getLastComplianceCheckTimeOrBuilder() (deprecated)

public TimestampOrBuilder getLastComplianceCheckTimeOrBuilder()

Output only. Timestamp of the last compliance check for the VM.

.google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getLastComplianceRunId() (deprecated)

public String getLastComplianceRunId()

Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose.

string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The lastComplianceRunId.

getLastComplianceRunIdBytes() (deprecated)

public ByteString getLastComplianceRunIdBytes()

Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose.

string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for lastComplianceRunId.

getName() (deprecated)

public String getName()

Output only. The InstanceOSPoliciesCompliance API resource name.

Format: projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes() (deprecated)

public ByteString getNameBytes()

Output only. The InstanceOSPoliciesCompliance API resource name.

Format: projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getOsPolicyCompliances(int index) (deprecated)

public InstanceOSPoliciesCompliance.OSPolicyCompliance getOsPolicyCompliances(int index)

Output only. Compliance data for each OSPolicy that is applied to the VM.

repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
InstanceOSPoliciesCompliance.OSPolicyCompliance

getOsPolicyCompliancesCount() (deprecated)

public int getOsPolicyCompliancesCount()

Output only. Compliance data for each OSPolicy that is applied to the VM.

repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getOsPolicyCompliancesList() (deprecated)

public List<InstanceOSPoliciesCompliance.OSPolicyCompliance> getOsPolicyCompliancesList()

Output only. Compliance data for each OSPolicy that is applied to the VM.

repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<OSPolicyCompliance>

getOsPolicyCompliancesOrBuilder(int index) (deprecated)

public InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder getOsPolicyCompliancesOrBuilder(int index)

Output only. Compliance data for each OSPolicy that is applied to the VM.

repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder

getOsPolicyCompliancesOrBuilderList() (deprecated)

public List<? extends InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder> getOsPolicyCompliancesOrBuilderList()

Output only. Compliance data for each OSPolicy that is applied to the VM.

repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder>

getParserForType() (deprecated)

public Parser<InstanceOSPoliciesCompliance> getParserForType()
Returns
Type Description
Parser<InstanceOSPoliciesCompliance>
Overrides

getSerializedSize() (deprecated)

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState() (deprecated)

public OSPolicyComplianceState getState()

Output only. Compliance state of the VM.

.google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
OSPolicyComplianceState

The state.

getStateValue() (deprecated)

public int getStateValue()

Output only. Compliance state of the VM.

.google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

hasLastComplianceCheckTime() (deprecated)

public boolean hasLastComplianceCheckTime()

Output only. Timestamp of the last compliance check for the VM.

.google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the lastComplianceCheckTime field is set.

hashCode() (deprecated)

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable() (deprecated)

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized() (deprecated)

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType() (deprecated)

public InstanceOSPoliciesCompliance.Builder newBuilderForType()
Returns
Type Description
InstanceOSPoliciesCompliance.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent) (deprecated)

protected InstanceOSPoliciesCompliance.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
InstanceOSPoliciesCompliance.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) (deprecated)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder() (deprecated)

public InstanceOSPoliciesCompliance.Builder toBuilder()
Returns
Type Description
InstanceOSPoliciesCompliance.Builder

writeTo(CodedOutputStream output) (deprecated)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException