Class: Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition
- Inherits:
-
Object
- Object
- Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/orgpolicy/v2/constraint.rb
Overview
Custom constraint definition. Defines this as a managed constraint.
Defined Under Namespace
Modules: ActionType, MethodType Classes: Parameter, ParametersEntry
Instance Attribute Summary collapse
-
#action_type ⇒ ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::ActionType
Allow or deny type.
-
#condition ⇒ ::String
Org policy condition/expression.
-
#method_types ⇒ ::Array<::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::MethodType>
All the operations being applied for this constraint.
-
#parameters ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter}
Stores the structure of
Parametersused by the constraint condition. -
#resource_types ⇒ ::Array<::String>
The resource instance type on which this policy applies.
Instance Attribute Details
#action_type ⇒ ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::ActionType
Returns Allow or deny type.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'proto_docs/google/cloud/orgpolicy/v2/constraint.rb', line 131 class CustomConstraintDefinition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a parameter structure. # @!attribute [rw] type # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Type of the parameter. # @!attribute [rw] default_value # @return [::Google::Protobuf::Value] # Sets the value of the parameter in an assignment if no value is given. # @!attribute [rw] valid_values_expr # @return [::String] # Provides a CEL expression to specify the acceptable parameter values # during assignment. # For example, parameterName in ("parameterValue1", "parameterValue2") # @!attribute [rw] metadata # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] # Defines subproperties primarily used by the UI to display user-friendly # information. # @!attribute [rw] item # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Determines the parameter's value structure. # For example, `LIST<STRING>` can be specified by defining `type: LIST`, # and `item: STRING`. class Parameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines Metadata structure. # @!attribute [rw] description # @return [::String] # Detailed description of what this `parameter` is and use of it. # Mutable. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # All valid types of parameter. module Type # This is only used for distinguishing unset values and should never be # used. Results in an error. TYPE_UNSPECIFIED = 0 # List parameter type. LIST = 1 # String parameter type. STRING = 2 # Boolean parameter type. BOOLEAN = 3 end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] class ParametersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The operation for which this constraint will be applied. To apply this # constraint only when creating new resources, the `method_types` should be # `CREATE` only. To apply this constraint when creating or deleting # resources, the `method_types` should be `CREATE` and `DELETE`. # # `UPDATE`-only custom constraints are not supported. Use `CREATE` or # `CREATE, UPDATE`. module MethodType # This is only used for distinguishing unset values and should never be # used. Results in an 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. # Not currently supported. 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 # This is only used for distinguishing unset values and should never be # used. Results in an error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#condition ⇒ ::String
Returns 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.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'proto_docs/google/cloud/orgpolicy/v2/constraint.rb', line 131 class CustomConstraintDefinition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a parameter structure. # @!attribute [rw] type # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Type of the parameter. # @!attribute [rw] default_value # @return [::Google::Protobuf::Value] # Sets the value of the parameter in an assignment if no value is given. # @!attribute [rw] valid_values_expr # @return [::String] # Provides a CEL expression to specify the acceptable parameter values # during assignment. # For example, parameterName in ("parameterValue1", "parameterValue2") # @!attribute [rw] metadata # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] # Defines subproperties primarily used by the UI to display user-friendly # information. # @!attribute [rw] item # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Determines the parameter's value structure. # For example, `LIST<STRING>` can be specified by defining `type: LIST`, # and `item: STRING`. class Parameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines Metadata structure. # @!attribute [rw] description # @return [::String] # Detailed description of what this `parameter` is and use of it. # Mutable. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # All valid types of parameter. module Type # This is only used for distinguishing unset values and should never be # used. Results in an error. TYPE_UNSPECIFIED = 0 # List parameter type. LIST = 1 # String parameter type. STRING = 2 # Boolean parameter type. BOOLEAN = 3 end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] class ParametersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The operation for which this constraint will be applied. To apply this # constraint only when creating new resources, the `method_types` should be # `CREATE` only. To apply this constraint when creating or deleting # resources, the `method_types` should be `CREATE` and `DELETE`. # # `UPDATE`-only custom constraints are not supported. Use `CREATE` or # `CREATE, UPDATE`. module MethodType # This is only used for distinguishing unset values and should never be # used. Results in an 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. # Not currently supported. 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 # This is only used for distinguishing unset values and should never be # used. Results in an error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#method_types ⇒ ::Array<::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::MethodType>
Returns All the operations being applied for this constraint.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'proto_docs/google/cloud/orgpolicy/v2/constraint.rb', line 131 class CustomConstraintDefinition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a parameter structure. # @!attribute [rw] type # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Type of the parameter. # @!attribute [rw] default_value # @return [::Google::Protobuf::Value] # Sets the value of the parameter in an assignment if no value is given. # @!attribute [rw] valid_values_expr # @return [::String] # Provides a CEL expression to specify the acceptable parameter values # during assignment. # For example, parameterName in ("parameterValue1", "parameterValue2") # @!attribute [rw] metadata # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] # Defines subproperties primarily used by the UI to display user-friendly # information. # @!attribute [rw] item # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Determines the parameter's value structure. # For example, `LIST<STRING>` can be specified by defining `type: LIST`, # and `item: STRING`. class Parameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines Metadata structure. # @!attribute [rw] description # @return [::String] # Detailed description of what this `parameter` is and use of it. # Mutable. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # All valid types of parameter. module Type # This is only used for distinguishing unset values and should never be # used. Results in an error. TYPE_UNSPECIFIED = 0 # List parameter type. LIST = 1 # String parameter type. STRING = 2 # Boolean parameter type. BOOLEAN = 3 end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] class ParametersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The operation for which this constraint will be applied. To apply this # constraint only when creating new resources, the `method_types` should be # `CREATE` only. To apply this constraint when creating or deleting # resources, the `method_types` should be `CREATE` and `DELETE`. # # `UPDATE`-only custom constraints are not supported. Use `CREATE` or # `CREATE, UPDATE`. module MethodType # This is only used for distinguishing unset values and should never be # used. Results in an 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. # Not currently supported. 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 # This is only used for distinguishing unset values and should never be # used. Results in an error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |
#parameters ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter}
Returns Stores the structure of
Parameters
used by the constraint condition. The key of map represents the name of
the parameter.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'proto_docs/google/cloud/orgpolicy/v2/constraint.rb', line 131 class CustomConstraintDefinition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a parameter structure. # @!attribute [rw] type # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Type of the parameter. # @!attribute [rw] default_value # @return [::Google::Protobuf::Value] # Sets the value of the parameter in an assignment if no value is given. # @!attribute [rw] valid_values_expr # @return [::String] # Provides a CEL expression to specify the acceptable parameter values # during assignment. # For example, parameterName in ("parameterValue1", "parameterValue2") # @!attribute [rw] metadata # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] # Defines subproperties primarily used by the UI to display user-friendly # information. # @!attribute [rw] item # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Determines the parameter's value structure. # For example, `LIST<STRING>` can be specified by defining `type: LIST`, # and `item: STRING`. class Parameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines Metadata structure. # @!attribute [rw] description # @return [::String] # Detailed description of what this `parameter` is and use of it. # Mutable. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # All valid types of parameter. module Type # This is only used for distinguishing unset values and should never be # used. Results in an error. TYPE_UNSPECIFIED = 0 # List parameter type. LIST = 1 # String parameter type. STRING = 2 # Boolean parameter type. BOOLEAN = 3 end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] class ParametersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The operation for which this constraint will be applied. To apply this # constraint only when creating new resources, the `method_types` should be # `CREATE` only. To apply this constraint when creating or deleting # resources, the `method_types` should be `CREATE` and `DELETE`. # # `UPDATE`-only custom constraints are not supported. Use `CREATE` or # `CREATE, UPDATE`. module MethodType # This is only used for distinguishing unset values and should never be # used. Results in an 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. # Not currently supported. 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 # This is only used for distinguishing unset values and should never be # used. Results in an 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. Format will be
of the form : <service name>/<type> Example:
compute.googleapis.com/Instance.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'proto_docs/google/cloud/orgpolicy/v2/constraint.rb', line 131 class CustomConstraintDefinition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a parameter structure. # @!attribute [rw] type # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Type of the parameter. # @!attribute [rw] default_value # @return [::Google::Protobuf::Value] # Sets the value of the parameter in an assignment if no value is given. # @!attribute [rw] valid_values_expr # @return [::String] # Provides a CEL expression to specify the acceptable parameter values # during assignment. # For example, parameterName in ("parameterValue1", "parameterValue2") # @!attribute [rw] metadata # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Metadata] # Defines subproperties primarily used by the UI to display user-friendly # information. # @!attribute [rw] item # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter::Type] # Determines the parameter's value structure. # For example, `LIST<STRING>` can be specified by defining `type: LIST`, # and `item: STRING`. class Parameter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines Metadata structure. # @!attribute [rw] description # @return [::String] # Detailed description of what this `parameter` is and use of it. # Mutable. class Metadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # All valid types of parameter. module Type # This is only used for distinguishing unset values and should never be # used. Results in an error. TYPE_UNSPECIFIED = 0 # List parameter type. LIST = 1 # String parameter type. STRING = 2 # Boolean parameter type. BOOLEAN = 3 end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::OrgPolicy::V2::Constraint::CustomConstraintDefinition::Parameter] class ParametersEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The operation for which this constraint will be applied. To apply this # constraint only when creating new resources, the `method_types` should be # `CREATE` only. To apply this constraint when creating or deleting # resources, the `method_types` should be `CREATE` and `DELETE`. # # `UPDATE`-only custom constraints are not supported. Use `CREATE` or # `CREATE, UPDATE`. module MethodType # This is only used for distinguishing unset values and should never be # used. Results in an 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. # Not currently supported. 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 # This is only used for distinguishing unset values and should never be # used. Results in an error. ACTION_TYPE_UNSPECIFIED = 0 # Allowed action type. ALLOW = 1 # Deny action type. DENY = 2 end end |