You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="firstline">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.</p>
<pre>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.
92
+
93
+
Args:
94
+
name: string, Immutable. 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" (required)
95
+
body: object, The request body.
96
+
The object takes the form of:
97
+
98
+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
99
+
"actionType": "A String", # Allow or deny type.
"description": "A String", # Detailed information about this custom policy constraint.
102
+
"displayName": "A String", # One line display name for the UI.
103
+
"methodTypes": [ # All the operations being applied for this constraint.
104
+
"A String",
105
+
],
106
+
"name": "A String", # Immutable. 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"
107
+
"resourceTypes": [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : "/" Example: * `compute.googleapis.com/Instance`.
108
+
"A String",
109
+
],
110
+
}
111
+
112
+
x__xgafv: string, V1 error format.
113
+
Allowed values
114
+
1 - v1 error format
115
+
2 - v2 error format
116
+
117
+
Returns:
118
+
An object of the form:
119
+
120
+
{ # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.
121
+
"actionType": "A String", # Allow or deny type.
"description": "A String", # Detailed information about this custom policy constraint.
124
+
"displayName": "A String", # One line display name for the UI.
125
+
"methodTypes": [ # All the operations being applied for this constraint.
126
+
"A String",
127
+
],
128
+
"name": "A String", # Immutable. 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"
129
+
"resourceTypes": [ # Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : "/" Example: * `compute.googleapis.com/Instance`.
Copy file name to clipboardExpand all lines: googleapiclient/discovery_cache/documents/orgpolicy.v2.json
+96-1Lines changed: 96 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -362,6 +362,38 @@
362
362
}
363
363
}
364
364
},
365
+
"customConstraints": {
366
+
"methods": {
367
+
"patch": {
368
+
"description": "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.",
"description": "Immutable. 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\"",
"description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can applied policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.",
"description": "Detailed information about this custom policy constraint.",
875
+
"type": "string"
876
+
},
877
+
"displayName": {
878
+
"description": "One line display name for the UI.",
879
+
"type": "string"
880
+
},
881
+
"methodTypes": {
882
+
"description": "All the operations being applied for this constraint.",
883
+
"items": {
884
+
"enum": [
885
+
"METHOD_TYPE_UNSPECIFIED",
886
+
"CREATE",
887
+
"UPDATE",
888
+
"DELETE"
889
+
],
890
+
"enumDescriptions": [
891
+
"Unspecified. Will results in user error.",
892
+
"Constraint applied when creating the resource.",
893
+
"Constraint applied when updating the resource.",
894
+
"Constraint applied when deleting the resource."
895
+
],
896
+
"type": "string"
897
+
},
898
+
"type": "array"
899
+
},
900
+
"name": {
901
+
"description": "Immutable. 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\"",
902
+
"type": "string"
903
+
},
904
+
"resourceTypes": {
905
+
"description": "Immutable. The Resource Instance type on which this policy applies to. Format will be of the form : \"/\" Example: * `compute.googleapis.com/Instance`.",
0 commit comments