Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.
| JSON representation |
|---|
{
"etag": string,
"updateTime": string,
"rules": [
{
object ( |
| Fields | |
|---|---|
etag |
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a When the policy is returned from either a When the policy is returned from a |
updateTime |
Output only. The time stamp this was previously updated. This represents the last time a call to Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
rules[] |
In policies for boolean constraints, the following requirements apply:
|
inheritFromParent |
Determines the inheritance behavior for this policy. If |
reset |
Ignores policies set above this resource and restores the |
PolicyRule
A rule used to express this policy.
| JSON representation |
|---|
{ "condition": { object ( |
| Fields | |
|---|---|
condition |
A condition that determines whether this rule is used to evaluate the policy. When set, the The
For example: The
For example: The
For example: The
For example: |
parameters |
Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: |
Union field
|
|
values |
List of values to be used for this policy rule. This field can be set only in policies for list constraints. |
allowAll |
Setting this to true means that all values are allowed. This field can be set only in policies for list constraints. |
denyAll |
Setting this to true means that all values are denied. This field can be set only in policies for list constraints. |
enforce |
If |
StringValues
A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (Organizations, Folders, Projects) that are allowed or denied. This is achieved by using the under: and optional is: prefixes. The under: prefix is used to denote resource subtree values. The is: prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats:
projects/<project-id>(for example,projects/tokyo-rain-123)folders/<folder-id>(for example,folders/1234)organizations/<organization-id>(for example,organizations/1234)
The supportsUnder field of the associated Constraint defines whether ancestry prefixes can be used.
| JSON representation |
|---|
{ "allowedValues": [ string ], "deniedValues": [ string ] } |
| Fields | |
|---|---|
allowedValues[] |
List of values allowed at this resource. |
deniedValues[] |
List of values denied at this resource. |