Class: Google::Apis::SecuritypostureV1::OrgPolicyConstraint

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

A predefined organization policy constraint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OrgPolicyConstraint

Returns a new instance of OrgPolicyConstraint.



992
993
994
# File 'lib/google/apis/securityposture_v1/classes.rb', line 992

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

Instance Attribute Details

#canned_constraint_idString

Required. A unique identifier for the constraint. Corresponds to the JSON property cannedConstraintId

Returns:

  • (String)


985
986
987
# File 'lib/google/apis/securityposture_v1/classes.rb', line 985

def canned_constraint_id
  @canned_constraint_id
end

#policy_rulesArray<Google::Apis::SecuritypostureV1::GoogleCloudSecuritypostureV1PolicyRule>

Required. The rules enforced by the constraint. Corresponds to the JSON property policyRules



990
991
992
# File 'lib/google/apis/securityposture_v1/classes.rb', line 990

def policy_rules
  @policy_rules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



997
998
999
1000
# File 'lib/google/apis/securityposture_v1/classes.rb', line 997

def update!(**args)
  @canned_constraint_id = args[:canned_constraint_id] if args.key?(:canned_constraint_id)
  @policy_rules = args[:policy_rules] if args.key?(:policy_rules)
end