Class SecurityPosture (2.51.0)

public final class SecurityPosture extends GeneratedMessageV3 implements SecurityPostureOrBuilder

Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.

Protobuf type google.cloud.securitycenter.v2.SecurityPosture

Static Fields

CHANGED_POLICY_FIELD_NUMBER

public static final int CHANGED_POLICY_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

POLICY_DRIFT_DETAILS_FIELD_NUMBER

public static final int POLICY_DRIFT_DETAILS_FIELD_NUMBER
Field Value
Type Description
int

POLICY_FIELD_NUMBER

public static final int POLICY_FIELD_NUMBER
Field Value
Type Description
int

POLICY_SET_FIELD_NUMBER

public static final int POLICY_SET_FIELD_NUMBER
Field Value
Type Description
int

POSTURE_DEPLOYMENT_FIELD_NUMBER

public static final int POSTURE_DEPLOYMENT_FIELD_NUMBER
Field Value
Type Description
int

POSTURE_DEPLOYMENT_RESOURCE_FIELD_NUMBER

public static final int POSTURE_DEPLOYMENT_RESOURCE_FIELD_NUMBER
Field Value
Type Description
int

REVISION_ID_FIELD_NUMBER

public static final int REVISION_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SecurityPosture getDefaultInstance()
Returns
Type Description
SecurityPosture

getDescriptor()

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

newBuilder()

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

newBuilder(SecurityPosture prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getChangedPolicy()

public String getChangedPolicy()

The name of the updated policy, for example, projects/{project_id}/policies/{constraint_name}.

string changed_policy = 5;

Returns
Type Description
String

The changedPolicy.

getChangedPolicyBytes()

public ByteString getChangedPolicyBytes()

The name of the updated policy, for example, projects/{project_id}/policies/{constraint_name}.

string changed_policy = 5;

Returns
Type Description
ByteString

The bytes for changedPolicy.

getDefaultInstanceForType()

public SecurityPosture getDefaultInstanceForType()
Returns
Type Description
SecurityPosture

getName()

public String getName()

Name of the posture, for example, CIS-Posture.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the posture, for example, CIS-Posture.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getPolicy()

public String getPolicy()

The ID of the updated policy, for example, compute-policy-1.

string policy = 7;

Returns
Type Description
String

The policy.

getPolicyBytes()

public ByteString getPolicyBytes()

The ID of the updated policy, for example, compute-policy-1.

string policy = 7;

Returns
Type Description
ByteString

The bytes for policy.

getPolicyDriftDetails(int index)

public SecurityPosture.PolicyDriftDetails getPolicyDriftDetails(int index)

The details about a change in an updated policy that violates the deployed posture.

repeated .google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails policy_drift_details = 8;

Parameter
Name Description
index int
Returns
Type Description
SecurityPosture.PolicyDriftDetails

getPolicyDriftDetailsCount()

public int getPolicyDriftDetailsCount()

The details about a change in an updated policy that violates the deployed posture.

repeated .google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails policy_drift_details = 8;

Returns
Type Description
int

getPolicyDriftDetailsList()

public List<SecurityPosture.PolicyDriftDetails> getPolicyDriftDetailsList()

The details about a change in an updated policy that violates the deployed posture.

repeated .google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails policy_drift_details = 8;

Returns
Type Description
List<PolicyDriftDetails>

getPolicyDriftDetailsOrBuilder(int index)

public SecurityPosture.PolicyDriftDetailsOrBuilder getPolicyDriftDetailsOrBuilder(int index)

The details about a change in an updated policy that violates the deployed posture.

repeated .google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails policy_drift_details = 8;

Parameter
Name Description
index int
Returns
Type Description
SecurityPosture.PolicyDriftDetailsOrBuilder

getPolicyDriftDetailsOrBuilderList()

public List<? extends SecurityPosture.PolicyDriftDetailsOrBuilder> getPolicyDriftDetailsOrBuilderList()

The details about a change in an updated policy that violates the deployed posture.

repeated .google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails policy_drift_details = 8;

Returns
Type Description
List<? extends com.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetailsOrBuilder>

getPolicySet()

public String getPolicySet()

The name of the updated policy set, for example, cis-policyset.

string policy_set = 6;

Returns
Type Description
String

The policySet.

getPolicySetBytes()

public ByteString getPolicySetBytes()

The name of the updated policy set, for example, cis-policyset.

string policy_set = 6;

Returns
Type Description
ByteString

The bytes for policySet.

getPostureDeployment()

public String getPostureDeployment()

The name of the posture deployment, for example, organizations/{org_id}/posturedeployments/{posture_deployment_id}.

string posture_deployment = 4;

Returns
Type Description
String

The postureDeployment.

getPostureDeploymentBytes()

public ByteString getPostureDeploymentBytes()

The name of the posture deployment, for example, organizations/{org_id}/posturedeployments/{posture_deployment_id}.

string posture_deployment = 4;

Returns
Type Description
ByteString

The bytes for postureDeployment.

getPostureDeploymentResource()

public String getPostureDeploymentResource()

The project, folder, or organization on which the posture is deployed, for example, projects/{project_number}.

string posture_deployment_resource = 3;

Returns
Type Description
String

The postureDeploymentResource.

getPostureDeploymentResourceBytes()

public ByteString getPostureDeploymentResourceBytes()

The project, folder, or organization on which the posture is deployed, for example, projects/{project_number}.

string posture_deployment_resource = 3;

Returns
Type Description
ByteString

The bytes for postureDeploymentResource.

getRevisionId()

public String getRevisionId()

The version of the posture, for example, c7cfa2a8.

string revision_id = 2;

Returns
Type Description
String

The revisionId.

getRevisionIdBytes()

public ByteString getRevisionIdBytes()

The version of the posture, for example, c7cfa2a8.

string revision_id = 2;

Returns
Type Description
ByteString

The bytes for revisionId.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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