Class InstanceOSPoliciesCompliance (2.4.3)

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

public static final int DETAILED_STATE_FIELD_NUMBER
Field Value
TypeDescription
int

DETAILED_STATE_REASON_FIELD_NUMBER

public static final int DETAILED_STATE_REASON_FIELD_NUMBER
Field Value
TypeDescription
int

INSTANCE_FIELD_NUMBER

public static final int INSTANCE_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER

public static final int LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER

public static final int LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OS_POLICY_COMPLIANCES_FIELD_NUMBER

public static final int OS_POLICY_COMPLIANCES_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static InstanceOSPoliciesCompliance getDefaultInstance()
Returns
TypeDescription
InstanceOSPoliciesCompliance

getDescriptor()

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

newBuilder()

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

newBuilder(InstanceOSPoliciesCompliance prototype)

public static InstanceOSPoliciesCompliance.Builder newBuilder(InstanceOSPoliciesCompliance prototype)
Parameter
NameDescription
prototypeInstanceOSPoliciesCompliance
Returns
TypeDescription
InstanceOSPoliciesCompliance.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public InstanceOSPoliciesCompliance getDefaultInstanceForType()
Returns
TypeDescription
InstanceOSPoliciesCompliance

getDetailedState()

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
TypeDescription
String

The detailedState.

getDetailedStateBytes()

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
TypeDescription
ByteString

The bytes for detailedState.

getDetailedStateReason()

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
TypeDescription
String

The detailedStateReason.

getDetailedStateReasonBytes()

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
TypeDescription
ByteString

The bytes for detailedStateReason.

getInstance()

public String getInstance()

Output only. The Compute Engine VM instance name.

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

Returns
TypeDescription
String

The instance.

getInstanceBytes()

public ByteString getInstanceBytes()

Output only. The Compute Engine VM instance name.

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

Returns
TypeDescription
ByteString

The bytes for instance.

getLastComplianceCheckTime()

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
TypeDescription
Timestamp

The lastComplianceCheckTime.

getLastComplianceCheckTimeOrBuilder()

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
TypeDescription
TimestampOrBuilder

getLastComplianceRunId()

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
TypeDescription
String

The lastComplianceRunId.

getLastComplianceRunIdBytes()

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
TypeDescription
ByteString

The bytes for lastComplianceRunId.

getName()

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
TypeDescription
String

The name.

getNameBytes()

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
TypeDescription
ByteString

The bytes for name.

getOsPolicyCompliances(int index)

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
NameDescription
indexint
Returns
TypeDescription
InstanceOSPoliciesCompliance.OSPolicyCompliance

getOsPolicyCompliancesCount()

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
TypeDescription