v1

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

CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this OrgPolicyOverlay. The resources to scan are inferred from these specified changes.

post/v1/{+parent}/orgPolicyViolationsPreviews

Path parameters

parentstring required

Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: organizations/my-example-org/locations/global

Query parameters

orgPolicyViolationsPreviewIdstring

Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.

Request body

violationsCountinteger

Output only. The number of OrgPolicyViolations in this OrgPolicyViolationsPreview. This count may differ from resource_summary.noncompliant_count because each OrgPolicyViolation is specific to a resource and constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.

customConstraintsstring[]

Output only. The names of the constraints against which all OrgPolicyViolations were evaluated. If OrgPolicyOverlay only contains PolicyOverlay then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in CustomConstraintOverlay. Format: organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms

createTimestring google-datetime

Output only. Time when this OrgPolicyViolationsPreview was created.

namestring

Output only. The resource name of the OrgPolicyViolationsPreview. It has the following format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview} Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f

state'PREVIEW_STATE_UNSPECIFIED' | 'PREVIEW_PENDING' | 'PREVIEW_RUNNING' | 'PREVIEW_SUCCEEDED' | 'PREVIEW_FAILED'

Output only. The state of the OrgPolicyViolationsPreview.

Response

Successful response