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.



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

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)


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

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



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

def policy_rules
  @policy_rules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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