# Policy Simulator V1 API - Module Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.4.0 0.3.2 0.2.0 0.1.1 Reference documentation and code samples for the Policy Simulator V1 API module Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType.

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`.


<br />

`UPDATE` only custom constraints are not supported. Use `CREATE` or
`CREATE, UPDATE`.

## Constants

### METHOD_TYPE_UNSPECIFIED

**value:** 0  
This is only used for distinguishing unset values and should never be
used. Results in an error.

### CREATE

**value:** 1  
Constraint applied when creating the resource.

### UPDATE

**value:** 2  
Constraint applied when updating the resource.

### DELETE

**value:** 3  
Constraint applied when deleting the resource.
Not currently supported.

### REMOVE_GRANT

**value:** 4  
Constraint applied when removing an IAM grant.

### GOVERN_TAGS

**value:** 5  
Constraint applied when enforcing forced tagging.