Class: Google::Apis::SecuritypostureV1::OrgPolicyConstraintCustom

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 custom organization policy constraint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OrgPolicyConstraintCustom

Returns a new instance of OrgPolicyConstraintCustom.



1023
1024
1025
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1023

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

Instance Attribute Details

#custom_constraintGoogle::Apis::SecuritypostureV1::GoogleCloudSecuritypostureV1CustomConstraint

A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined. When you create a custom constraint, it is not enforced automatically. You must use an organization policy to enforce the constraint. Corresponds to the JSON property customConstraint



1016
1017
1018
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1016

def custom_constraint
  @custom_constraint
end

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

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



1021
1022
1023
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1021

def policy_rules
  @policy_rules
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1028
1029
1030
1031
# File 'lib/google/apis/securityposture_v1/classes.rb', line 1028

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