violations
Creates, updates, deletes, gets or lists a violations
resource.
Overview
Name | violations |
Type | Resource |
Id | google.cloudcontrolspartner.violations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation} |
description | string | Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value. |
beginTime | string | Output only. Time of the event which triggered the Violation. |
category | string | Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. |
folderId | string | The folder_id of the violation |
nonCompliantOrgPolicy | string | Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name} |
remediation | object | Represents remediation guidance to resolve compliance violation for AssuredWorkload |
resolveTime | string | Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. |
state | string | Output only. State of the violation |
updateTime | string | Output only. The last time when the Violation record was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | customersId, locationsId, organizationsId, violationsId, workloadsId | Gets details of a single Violation. |
list | SELECT | customersId, locationsId, organizationsId, workloadsId | Lists Violations for a workload Callers may also choose to read across multiple Customers or for a single customer as per AIP-159 by using '-' (the hyphen or dash character) as a wildcard character instead of {customer} & {workload}. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload} |
SELECT
examples
Lists Violations for a workload Callers may also choose to read across multiple Customers or for a single customer as per AIP-159 by using '-' (the hyphen or dash character) as a wildcard character instead of {customer} & {workload}. Format: organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}
SELECT
name,
description,
beginTime,
category,
folderId,
nonCompliantOrgPolicy,
remediation,
resolveTime,
state,
updateTime
FROM google.cloudcontrolspartner.violations
WHERE customersId = '{{ customersId }}'
AND locationsId = '{{ locationsId }}'
AND organizationsId = '{{ organizationsId }}'
AND workloadsId = '{{ workloadsId }}';