Class: Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint
- Inherits:
-
Object
- Object
- Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/asset/v1/asset_service.rb
Overview
The definition of a custom constraint.
Defined Under Namespace
Modules: ActionType, MethodType
Instance Attribute Summary collapse
-
#action_type ⇒ ::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType
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<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>
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 Attribute Details
#action_type ⇒ ::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType
Returns Allow or deny type.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#condition ⇒ ::String
Returns Organization Policy condition/expression. For example:
resource.instanceName.matches("[production|test]_.*_(\d)+")'
or,
resource.management.auto_upgrade == true
.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#description ⇒ ::String
Returns Detailed information about this custom policy constraint.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#display_name ⇒ ::String
Returns One line display name for the UI.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#method_types ⇒ ::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>
Returns All the operations being applied for this constraint.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#name ⇒ ::String
Returns 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".
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#resource_types ⇒ ::Array<::String>
Returns The Resource Instance type on which this policy applies to. Format will
be of the form : "
compute.googleapis.com/Instance
.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2129 class CustomConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The operation in which this constraint will be applied. For example: # If the constraint applies only when create VMs, the method_types will be # "CREATE" only. If the constraint applied when create or delete VMs, the # method_types will be "CREATE" and "DELETE". module MethodType # Unspecified. Will results in user error. METHOD_TYPE_UNSPECIFIED = 0 # Constraint applied when creating the resource. CREATE = 1 # Constraint applied when updating the resource. UPDATE = 2 # Constraint applied when deleting the resource. DELETE = 3 end # Allow or deny type. module ActionType # Unspecified. Will results in user error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |