1- // Copyright 2020 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -31,11 +31,11 @@ option ruby_package = "Google::Cloud::OrgPolicy::V2";
3131// example, you could enforce a constraint that controls which cloud services
3232// can be activated across an organization, or whether a Compute Engine instance
3333// can have serial port connections established. `Constraints` can be configured
34- // by the organization's policy adminstrator to fit the needs of the organzation
35- // by setting a `policy` that includes `constraints` at different locations in
36- // the organization's resource hierarchy. Policies are inherited down the
37- // resource hierarchy from higher levels, but can also be overridden. For
38- // details about the inheritance rules please read about
34+ // by the organization's policy administrator to fit the needs of the
35+ // organization by setting a `policy` that includes `constraints` at different
36+ // locations in the organization's resource hierarchy. Policies are inherited
37+ // down the resource hierarchy from higher levels, but can also be overridden.
38+ // For details about the inheritance rules please read about
3939// [`policies`][google.cloud.OrgPolicy.v2.Policy].
4040//
4141// `Constraints` have a default behavior determined by the `constraint_default`
@@ -49,6 +49,24 @@ message Constraint {
4949 pattern : "organizations/{organization}/constraints/{constraint}"
5050 };
5151
52+ // Specifies the default behavior in the absence of any `Policy` for the
53+ // `Constraint`. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`.
54+ //
55+ // Immutable after creation.
56+ enum ConstraintDefault {
57+ // This is only used for distinguishing unset values and should never be
58+ // used.
59+ CONSTRAINT_DEFAULT_UNSPECIFIED = 0 ;
60+
61+ // Indicate that all values are allowed for list constraints.
62+ // Indicate that enforcement is off for boolean constraints.
63+ ALLOW = 1 ;
64+
65+ // Indicate that all values are denied for list constraints.
66+ // Indicate that enforcement is on for boolean constraints.
67+ DENY = 2 ;
68+ }
69+
5270 // A `Constraint` that allows or disallows a list of string values, which are
5371 // configured by an Organization's policy administrator with a `Policy`.
5472 message ListConstraint {
@@ -73,24 +91,6 @@ message Constraint {
7391
7492 }
7593
76- // Specifies the default behavior in the absence of any `Policy` for the
77- // `Constraint`. This must not be `CONSTRAINT_DEFAULT_UNSPECIFIED`.
78- //
79- // Immutable after creation.
80- enum ConstraintDefault {
81- // This is only used for distinguishing unset values and should never be
82- // used.
83- CONSTRAINT_DEFAULT_UNSPECIFIED = 0 ;
84-
85- // Indicate that all values are allowed for list constraints.
86- // Indicate that enforcement is off for boolean constraints.
87- ALLOW = 1 ;
88-
89- // Indicate that all values are denied for list constraints.
90- // Indicate that enforcement is on for boolean constraints.
91- DENY = 2 ;
92- }
93-
9494 // Immutable. The resource name of the Constraint. Must be in one of
9595 // the following forms:
9696 // * `projects/{project_number}/constraints/{constraint_name}`
0 commit comments