Class: Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
- Inherits:
-
Object
- Object
- Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/orgpolicy_v2/classes.rb,
lib/google/apis/orgpolicy_v2/representations.rb,
lib/google/apis/orgpolicy_v2/representations.rb
Overview
Currently used for Managed Constraints. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint
Instance Attribute Summary collapse
-
#action_type ⇒ String
Allow or deny type.
-
#condition ⇒ String
Org policy condition/expression.
-
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
-
#parameters ⇒ Hash<String,Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter>
Stores Structure of parameters used by Constraint condition.
-
#resource_types ⇒ Array<String>
The resource instance type on which this policy applies.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
constructor
A new instance of GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition
Returns a new instance of GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition.
184 185 186 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 184 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action_type ⇒ String
Allow or deny type.
Corresponds to the JSON property actionType
158 159 160 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 158 def action_type @action_type end |
#condition ⇒ String
Org policy condition/expression. For example: resource.instanceName.matches("[
production|test]_.*_(\d)+")
or, resource.management.auto_upgrade == true
The max length of the condition is 1000 characters.
Corresponds to the JSON property condition
165 166 167 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 165 def condition @condition end |
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
Corresponds to the JSON property methodTypes
170 171 172 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 170 def method_types @method_types end |
#parameters ⇒ Hash<String,Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter>
Stores Structure of parameters used by Constraint condition. Key of map
represents name of the parameter.
Corresponds to the JSON property parameters
176 177 178 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 176 def parameters @parameters end |
#resource_types ⇒ Array<String>
The resource instance type on which this policy applies. Format will be of the
form : /
Example: * compute.googleapis.com/Instance
.
Corresponds to the JSON property resourceTypes
182 183 184 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 182 def resource_types @resource_types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
189 190 191 192 193 194 195 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 189 def update!(**args) @action_type = args[:action_type] if args.key?(:action_type) @condition = args[:condition] if args.key?(:condition) @method_types = args[:method_types] if args.key?(:method_types) @parameters = args[:parameters] if args.key?(:parameters) @resource_types = args[:resource_types] if args.key?(:resource_types) end |