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.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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
.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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".
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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
.
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 |
# File 'proto_docs/google/cloud/asset/v1/asset_service.rb', line 2175 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 # Constraint applied when removing an IAM grant. REMOVE_GRANT = 4 # Constraint applied when enforcing forced tagging. GOVERN_TAGS = 5 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 |