#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecurityPosture
impl Debug for SecurityPosture
Source§impl Default for SecurityPosture
impl Default for SecurityPosture
Source§fn default() -> SecurityPosture
fn default() -> SecurityPosture
Source§impl Message for SecurityPosture
impl Message for SecurityPosture
Source§impl PartialEq for SecurityPosture
impl PartialEq for SecurityPosture
impl StructuralPartialEq for SecurityPosture
Auto Trait Implementations§
impl Freeze for SecurityPosture
impl RefUnwindSafe for SecurityPosture
impl Send for SecurityPosture
impl Sync for SecurityPosture
impl Unpin for SecurityPosture
impl UnsafeUnpin for SecurityPosture
impl UnwindSafe for SecurityPosture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request