Skip to main content

org_policy_violations

Creates, updates, deletes, gets or lists an org_policy_violations resource.

Overview​

Nameorg_policy_violations
TypeResource
Idgoogle.policysimulator.org_policy_violations

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the OrgPolicyViolation. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
customConstraintobjectThe custom constraint being violated. (id: GoogleCloudOrgpolicyV2CustomConstraint)
errorobjectThe Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (id: GoogleRpcStatus)
resourceobjectThe resource violating the constraint. (id: GoogleCloudPolicysimulatorV1ResourceContext)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_locations_org_policy_violations_previews_org_policy_violations_listselectorganizationsId, locationsId, orgPolicyViolationsPreviewsIdpageSize, pageTokenListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
orgPolicyViolationsPreviewsIdstring
organizationsIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.

SELECT
name,
customConstraint,
error,
resource
FROM google.policysimulator.org_policy_violations
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orgPolicyViolationsPreviewsId = '{{ orgPolicyViolationsPreviewsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;