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
Custom constraint definition. Defines this as a managed constraint.
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 the structure of
Parametersused by the 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.
196 197 198 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 196 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action_type ⇒ String
Allow or deny type.
Corresponds to the JSON property actionType
170 171 172 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 170 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
177 178 179 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 177 def condition @condition end |
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
Corresponds to the JSON property methodTypes
182 183 184 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 182 def method_types @method_types end |
#parameters ⇒ Hash<String,Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinitionParameter>
Stores the structure of Parameters used by the constraint condition. The key
of map represents the name of the parameter.
Corresponds to the JSON property parameters
188 189 190 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 188 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
194 195 196 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 194 def resource_types @resource_types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
201 202 203 204 205 206 207 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 201 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 |