Class: Google::Apis::SecuritypostureV1::Violation

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

Overview

Details of a violation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Violation

Returns a new instance of Violation.



1726
1727
1728
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1726

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

Instance Attribute Details

#asset_idString

The full resource name of the asset that caused the violation. For details about the format of the full resource name for each asset type, see Resource name format. Corresponds to the JSON property assetId

Returns:

  • (String)


1694
1695
1696
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1694

def asset_id
  @asset_id
end

#next_stepsString

A description of the steps that you can take to fix the violation. Corresponds to the JSON property nextSteps

Returns:

  • (String)


1699
1700
1701
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1699

def next_steps
  @next_steps
end

#policy_idString

The policy that was violated. Corresponds to the JSON property policyId

Returns:

  • (String)


1704
1705
1706
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1704

def policy_id
  @policy_id
end

#severityString

The severity of the violation. Corresponds to the JSON property severity

Returns:

  • (String)


1709
1710
1711
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1709

def severity
  @severity
end

#violated_assetGoogle::Apis::SecuritypostureV1::AssetDetails

Details of a Cloud Asset Inventory asset that caused a violation. Corresponds to the JSON property violatedAsset



1714
1715
1716
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1714

def violated_asset
  @violated_asset
end

#violated_policyGoogle::Apis::SecuritypostureV1::PolicyDetails

Details of a policy that was violated. Corresponds to the JSON property violatedPolicy



1719
1720
1721
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1719

def violated_policy
  @violated_policy
end

#violated_postureGoogle::Apis::SecuritypostureV1::PostureDetails

Details of a posture deployment. Corresponds to the JSON property violatedPosture



1724
1725
1726
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1724

def violated_posture
  @violated_posture
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1731
1732
1733
1734
1735
1736
1737
1738
1739
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1731

def update!(**args)
  @asset_id = args[:asset_id] if args.key?(:asset_id)
  @next_steps = args[:next_steps] if args.key?(:next_steps)
  @policy_id = args[:policy_id] if args.key?(:policy_id)
  @severity = args[:severity] if args.key?(:severity)
  @violated_asset = args[:violated_asset] if args.key?(:violated_asset)
  @violated_policy = args[:violated_policy] if args.key?(:violated_policy)
  @violated_posture = args[:violated_posture] if args.key?(:violated_posture)
end