v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1391733.9 KB
organizations

Updates a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist. Note: the supplied policy will perform a full overwrite of all fields.

patch/v2/{+name}

Path parameters

namestring required

Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 71 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/custom. is not counted.

Query parameters

updateMaskstring

Field mask used to specify the fields to be overwritten in the policy. The fields specified in the update_mask are relative to the policy, not the full request.

Request body

methodTypesstring[]

All the operations being applied for this constraint.

conditionstring

A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: resource.instanceName.matches("(production|test)_(.+_)?[\d]+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.

namestring

Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 71 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/custom. is not counted.

descriptionstring

Detailed information about this custom policy constraint. The max length of the description is 2000 characters.

actionType'ACTION_TYPE_UNSPECIFIED' | 'ALLOW' | 'DENY'

Allow or deny type.

displayNamestring

One line display name for the UI. The max length of the display_name is 200 characters.

updateTimestring google-datetime

Output only. The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint methods were called.

resourceTypesstring[]

Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.

Response

Successful response