#[non_exhaustive]pub struct SecurityPosture {
pub name: String,
pub revision_id: String,
pub posture_deployment_resource: String,
pub posture_deployment: String,
pub changed_policy: String,
pub policy_set: String,
pub policy: String,
pub policy_drift_details: Vec<PolicyDriftDetails>,
/* private fields */
}Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringName of the posture, for example, CIS-Posture.
revision_id: StringThe version of the posture, for example, c7cfa2a8.
posture_deployment_resource: StringThe project, folder, or organization on which the posture is deployed,
for example, projects/{project_number}.
posture_deployment: StringThe name of the posture deployment, for example,
organizations/{org_id}/posturedeployments/{posture_deployment_id}.
changed_policy: StringThe name of the updated policy, for example,
projects/{project_id}/policies/{constraint_name}.
policy_set: StringThe name of the updated policy set, for example, cis-policyset.
policy: StringThe ID of the updated policy, for example, compute-policy-1.
policy_drift_details: Vec<PolicyDriftDetails>The details about a change in an updated policy that violates the deployed posture.
Implementations§
Source§impl SecurityPosture
impl SecurityPosture
pub fn new() -> Self
Sourcepub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_posture_deployment_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_posture_deployment_resource<T: Into<String>>(self, v: T) -> Self
Sets the value of posture_deployment_resource.
§Example
let x = SecurityPosture::new().set_posture_deployment_resource("example");Sourcepub fn set_posture_deployment<T: Into<String>>(self, v: T) -> Self
pub fn set_posture_deployment<T: Into<String>>(self, v: T) -> Self
Sets the value of posture_deployment.
§Example
let x = SecurityPosture::new().set_posture_deployment("example");Sourcepub fn set_changed_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_changed_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of changed_policy.
§Example
let x = SecurityPosture::new().set_changed_policy("example");Sourcepub fn set_policy_set<T: Into<String>>(self, v: T) -> Self
pub fn set_policy_set<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_policy<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_policy_drift_details<T, V>(self, v: T) -> Self
pub fn set_policy_drift_details<T, V>(self, v: T) -> Self
Sets the value of policy_drift_details.
§Example
use google_cloud_securitycenter_v2::model::security_posture::PolicyDriftDetails;
let x = SecurityPosture::new()
.set_policy_drift_details([
PolicyDriftDetails::default()/* use setters */,
PolicyDriftDetails::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SecurityPosture
impl Clone for SecurityPosture
Source§fn clone(&self) -> SecurityPosture
fn clone(&self) -> SecurityPosture
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more