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 that this policy applies to, in the format
/.
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.
199 200 201 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 199 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action_type ⇒ String
Allow or deny type.
Corresponds to the JSON property actionType
173 174 175 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 173 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
180 181 182 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 180 def condition @condition end |
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
Corresponds to the JSON property methodTypes
185 186 187 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 185 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
191 192 193 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 191 def parameters @parameters end |
#resource_types ⇒ Array<String>
The resource instance type that this policy applies to, in the format /.
Example: * compute.googleapis.com/Instance.
Corresponds to the JSON property resourceTypes
197 198 199 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 197 def resource_types @resource_types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
204 205 206 207 208 209 210 |
# File 'lib/google/apis/orgpolicy_v2/classes.rb', line 204 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 |