- Resource: OrgPolicyViolationsPreview
- PreviewState
- OrgPolicyOverlay
- PolicyOverlay
- CustomConstraintOverlay
- ResourceCounts
- Methods
Resource: OrgPolicyViolationsPreview
OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made.
The list of violations are modeled as child resources and retrieved via a [ListOrgPolicyViolations][] API call. There are potentially more [OrgPolicyViolations][] than could fit in an embedded field. Thus, the use of a child resource instead of a field.
| JSON representation |
|---|
{ "name": string, "state": enum ( |
| Fields | |
|---|---|
name |
Output only. The resource name of the
Example: |
state |
Output only. The state of the |
overlay |
Required. The proposed changes we are previewing violations for. |
violationsCount |
Output only. The number of [OrgPolicyViolations][] in this |
resourceCounts |
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy. |
customConstraints[] |
Output only. The names of the constraints against which all If Format: Example: |
createTime |
Output only. Time when this 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: |
PreviewState
The current state of an OrgPolicyViolationsPreview.
| Enums | |
|---|---|
PREVIEW_STATE_UNSPECIFIED |
The state is unspecified. |
PREVIEW_PENDING |
The OrgPolicyViolationsPreview has not been created yet. |
PREVIEW_RUNNING |
The OrgPolicyViolationsPreview is currently being created. |
PREVIEW_SUCCEEDED |
The OrgPolicyViolationsPreview creation finished successfully. |
PREVIEW_FAILED |
The OrgPolicyViolationsPreview creation failed with an error. |
OrgPolicyOverlay
The proposed changes to OrgPolicy.
| JSON representation |
|---|
{ "policies": [ { object ( |
| Fields | |
|---|---|
policies[] |
Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated. |
customConstraints[] |
Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single customConstraint is supported in the overlay at a time. For evaluating multiple constraints, multiple |
PolicyOverlay
A change to an OrgPolicy.
| JSON representation |
|---|
{
"policyParent": string,
"policy": {
object ( |
| Fields | |
|---|---|
policyParent |
Optional. The parent of the policy we are attaching to. Example: "projects/123456" |
policy |
Optional. The new or updated OrgPolicy. |
CustomConstraintOverlay
A change to an OrgPolicy custom constraint.
| JSON representation |
|---|
{
"customConstraintParent": string,
"customConstraint": {
object ( |
| Fields | |
|---|---|
customConstraintParent |
Optional. Resource the constraint is attached to. Example: "organization/987654" |
customConstraint |
Optional. The new or updated custom constraint. |
ResourceCounts
A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
| JSON representation |
|---|
{ "scanned": integer, "noncompliant": integer, "compliant": integer, "unenforced": integer, "errors": integer } |
| Fields | |
|---|---|
scanned |
Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error |
noncompliant |
Output only. Number of scanned resources with at least one violation. |
compliant |
Output only. Number of scanned resources with zero violations. |
unenforced |
Output only. Number of resources where the constraint was not enforced, i.e. the Policy set |
errors |
Output only. Number of resources that returned an error when scanned. |
Methods |
|
|---|---|
|
CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. |
|
GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. |
|
ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. |