Class: Google::Apis::SecuritycenterV1beta2::SecurityPosture

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/securitycenter_v1beta2/classes.rb,
lib/google/apis/securitycenter_v1beta2/representations.rb,
lib/google/apis/securitycenter_v1beta2/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SecurityPosture

Returns a new instance of SecurityPosture.



6851
6852
6853
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6851

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#changed_policy ⇒ String

The name of the updated policy, for example, projects/project_id/policies/ constraint_name`. Corresponds to the JSON propertychangedPolicy`

Returns:

  • (String)


6811
6812
6813
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6811

def changed_policy
  @changed_policy
end

#name ⇒ String

Name of the posture, for example, CIS-Posture. Corresponds to the JSON property name

Returns:

  • (String)


6816
6817
6818
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6816

def name
  @name
end

#policy ⇒ String

The ID of the updated policy, for example, compute-policy-1. Corresponds to the JSON property policy

Returns:

  • (String)


6821
6822
6823
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6821

def policy
  @policy
end

#policy_drift_details ⇒ Array<Google::Apis::SecuritycenterV1beta2::PolicyDriftDetails>

The details about a change in an updated policy that violates the deployed posture. Corresponds to the JSON property policyDriftDetails



6827
6828
6829
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6827

def policy_drift_details
  @policy_drift_details
end

#policy_set ⇒ String

The name of the updated policyset, for example, cis-policyset. Corresponds to the JSON property policySet

Returns:

  • (String)


6832
6833
6834
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6832

def policy_set
  @policy_set
end

#posture_deployment ⇒ String

The name of the posture deployment, for example, organizations/org_id/ posturedeployments/posture_deployment_id`. Corresponds to the JSON propertypostureDeployment`

Returns:

  • (String)


6838
6839
6840
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6838

def posture_deployment
  @posture_deployment
end

#posture_deployment_resource ⇒ String

The project, folder, or organization on which the posture is deployed, for example, projects/project_number`. Corresponds to the JSON propertypostureDeploymentResource`

Returns:

  • (String)


6844
6845
6846
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6844

def posture_deployment_resource
  @posture_deployment_resource
end

#revision_id ⇒ String

The version of the posture, for example, c7cfa2a8. Corresponds to the JSON property revisionId

Returns:

  • (String)


6849
6850
6851
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6849

def revision_id
  @revision_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 6856

def update!(**args)
  @changed_policy = args[:changed_policy] if args.key?(:changed_policy)
  @name = args[:name] if args.key?(:name)
  @policy = args[:policy] if args.key?(:policy)
  @policy_drift_details = args[:policy_drift_details] if args.key?(:policy_drift_details)
  @policy_set = args[:policy_set] if args.key?(:policy_set)
  @posture_deployment = args[:posture_deployment] if args.key?(:posture_deployment)
  @posture_deployment_resource = args[:posture_deployment_resource] if args.key?(:posture_deployment_resource)
  @revision_id = args[:revision_id] if args.key?(:revision_id)
end