Class: Google::Apis::CloudassetV1::GoogleCloudAssetV1CustomConstraint
- Inherits:
-
Object
- Object
- Google::Apis::CloudassetV1::GoogleCloudAssetV1CustomConstraint
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudasset_v1/classes.rb,
lib/google/apis/cloudasset_v1/representations.rb,
lib/google/apis/cloudasset_v1/representations.rb
Overview
The definition of a custom constraint.
Instance Attribute Summary collapse
-
#action_type ⇒ String
Allow or deny type.
-
#condition ⇒ String
Organization Policy condition/expression.
-
#description ⇒ String
Detailed information about this custom policy constraint.
-
#display_name ⇒ String
One line display name for the UI.
-
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
-
#name ⇒ String
Name of the constraint.
-
#resource_types ⇒ Array<String>
The Resource Instance type on which this policy applies to.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAssetV1CustomConstraint
constructor
A new instance of GoogleCloudAssetV1CustomConstraint.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAssetV1CustomConstraint
Returns a new instance of GoogleCloudAssetV1CustomConstraint.
1711 1712 1713 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1711 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action_type ⇒ String
Allow or deny type.
Corresponds to the JSON property actionType
1673 1674 1675 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1673 def action_type @action_type end |
#condition ⇒ String
Organization Policy condition/expression. For example: resource.instanceName.
matches("[production|test]_.*_(\d)+")' or, resource.management.auto_upgrade =
= true
Corresponds to the JSON property condition
1680 1681 1682 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1680 def condition @condition end |
#description ⇒ String
Detailed information about this custom policy constraint.
Corresponds to the JSON property description
1685 1686 1687 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1685 def description @description end |
#display_name ⇒ String
One line display name for the UI.
Corresponds to the JSON property displayName
1690 1691 1692 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1690 def display_name @display_name end |
#method_types ⇒ Array<String>
All the operations being applied for this constraint.
Corresponds to the JSON property methodTypes
1695 1696 1697 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1695 def method_types @method_types end |
#name ⇒ String
Name of the constraint. This is unique within the organization. Format of the
name should be * organizations/organization_id/customConstraints/
custom_constraint_id`Example : "organizations/123/customConstraints/custom.
createOnlyE2TypeVms"
Corresponds to the JSON propertyname`
1703 1704 1705 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1703 def name @name end |
#resource_types ⇒ Array<String>
The Resource Instance type on which this policy applies to. Format will be of
the form : "/" Example: * compute.googleapis.com/Instance.
Corresponds to the JSON property resourceTypes
1709 1710 1711 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1709 def resource_types @resource_types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1716 1717 1718 1719 1720 1721 1722 1723 1724 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 1716 def update!(**args) @action_type = args[:action_type] if args.key?(:action_type) @condition = args[:condition] if args.key?(:condition) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @method_types = args[:method_types] if args.key?(:method_types) @name = args[:name] if args.key?(:name) @resource_types = args[:resource_types] if args.key?(:resource_types) end |