- Resource: Violation
- State
- Remediation
- Instructions
- Gcloud
- Console
- RemediationType
- ExceptionContext
- ViolationType
- Methods
Resource: Violation
A compliance violation that's detected by Assured Workloads monitoring. A violation is created when an organization policy or a resource in a workload (or a Data Boundary scope) changes in a way that doesn't comply with the controls of the applicable compliance regime or framework.
| JSON representation |
|---|
{ "name": string, "description": string, "beginTime": string, "updateTime": string, "resolveTime": string, "category": string, "state": enum ( |
| Fields | |
|---|---|
name |
Output only. Immutable. The resource name of the violation. Format: |
description |
Output only. A description of the violation. For example, |
beginTime |
Output only. The time of the event that triggered the violation. 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: |
updateTime |
Output only. The time when the violation record was last updated. 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: |
resolveTime |
Output only. The time of the event that resolved the violation. This field is empty if the violation is unresolved. 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: |
category |
Output only. The category that the violation is mapped to. For example, |
state |
Output only. The state of the violation. |
orgPolicyConstraint |
Output only. Immutable. Deprecated: This field is deprecated and might be removed in a future version of the API. Use The organization policy constraint that was changed in a non-compliant way, which resulted in this violation. |
auditLogLink |
Output only. Immutable. A link to the Cloud Audit Logs entries for the violated resource. Format: |
nonCompliantOrgPolicy |
Output only. Immutable. The name of the organization policy that was modified with a non-compliant change and resulted in this violation. Formats:
|
remediation |
Output only. The remediation guidance for the violation. |
acknowledged |
Whether the violation has been acknowledged. |
exceptionAuditLogLink |
Output only. Immutable. A link to the Cloud Audit Logs entries that contain the business justification that was provided when the violation was acknowledged. Format: |
exceptionContexts[] |
Output only. The details of all of the acknowledgements (exceptions) for the violation. |
violationType |
Output only. The type of the violation. |
associatedOrgPolicyViolationId |
Optional. Output only. For resource violations, the ID of the organization policy violation that caused this resource violation. This field is empty for organization policy violations. |
parentProjectNumber |
Optional. Output only. For resource violations, the number of the project that contains the non-compliant resource. This field is empty for organization policy violations. |
resourceType |
Optional. Output only. For resource violations, the type of the non-compliant resource. For example, |
resourceName |
Optional. Output only. For resource violations, the full resource name of the non-compliant resource. For example, |
childResourceViolationCount |
Optional. Output only. For organization policy violations, the number of resource violations that are associated with this violation. This field is |
affectedFrameworks[] |
Output only. The IDs of the compliance frameworks that are affected by this violation. For example, |
remediationMarkdown |
Output only. The remediation instructions for the violation, in Markdown format. This field is only populated by |
acknowledgementTime |
Optional. The time when the violation was first acknowledged. To find the most recent time that the violation was acknowledged, check 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: |
State
The state of a violation.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Default value. The state isn't specified. |
RESOLVED |
The violation is resolved. |
UNRESOLVED |
The violation is unresolved and hasn't been acknowledged. |
EXCEPTION |
The violation is unresolved and has been acknowledged as an exception. |
Remediation
Remediation guidance to resolve a compliance violation.
| JSON representation |
|---|
{ "instructions": { object ( |
| Fields | |
|---|---|
instructions |
Required. The instructions to resolve the violation. |
compliantValues[] |
The values that can resolve the violation. For example, for list organization policy violations, this field contains the list of allowed or denied values. |
remediationType |
Output only. The remediation type, which is based on the type of organization policy values that were violated. |
Instructions
Instructions to remediate a violation.
| JSON representation |
|---|
{ "gcloudInstructions": { object ( |
| Fields | |
|---|---|
gcloudInstructions |
Instructions to resolve the violation by using the gcloud CLI. |
consoleInstructions |
Instructions to resolve the violation by using the Google Cloud console. |
Gcloud
Instructions to remediate a violation by using the Google Cloud CLI.
| JSON representation |
|---|
{ "gcloudCommands": [ string ], "steps": [ string ], "additionalLinks": [ string ] } |
| Fields | |
|---|---|
gcloudCommands[] |
The gcloud CLI commands that resolve the violation. |
steps[] |
The steps to resolve the violation by using the gcloud CLI. |
additionalLinks[] |
Additional URLs with more information about the steps. |
Console
Instructions to remediate a violation by using the Google Cloud console.
| JSON representation |
|---|
{ "consoleUris": [ string ], "steps": [ string ], "additionalLinks": [ string ] } |
| Fields | |
|---|---|
consoleUris[] |
Links to the Google Cloud console pages where the violation can be resolved. |
steps[] |
The steps to resolve the violation by using the Google Cloud console. |
additionalLinks[] |
Additional URLs with more information about the steps. |
RemediationType
The type of remediation, which is based on the kind of violation. For example, violations that are caused by changes in a boolean organization policy require different remediation instructions than violations that are caused by changes in the allowed values of a list organization policy.
| Enums | |
|---|---|
REMEDIATION_TYPE_UNSPECIFIED |
Default value. The remediation type isn't specified. |
REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION |
Remediation for a boolean organization policy violation. |
REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION |
Remediation for a list organization policy violation where the monitoring rule specifies allowed values. |
REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION |
Remediation for a list organization policy violation where the monitoring rule specifies denied values. |
REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION |
Remediation for a gcp.restrictCmekCryptoKeyProjects organization policy violation. |
REMEDIATION_RESOURCE_VIOLATION |
Remediation for a resource violation. |
REMEDIATION_RESOURCE_VIOLATION_NON_CMEK_SERVICES |
Remediation for a resource violation that's caused by the gcp.restrictNonCmekServices organization policy. |
ExceptionContext
Details about an acknowledgement (exception) of a violation.
| JSON representation |
|---|
{ "comment": string, "acknowledgementTime": string, "userName": string } |
| Fields | |
|---|---|
comment |
The business justification that was provided when the violation was acknowledged. |
acknowledgementTime |
The time when the violation was acknowledged. 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: |
userName |
The name of the user (or service account) who acknowledged the violation. |
ViolationType
The type of a violation.
| Enums | |
|---|---|
VIOLATION_TYPE_UNSPECIFIED |
Default value. The violation type isn't specified. |
ORG_POLICY |
A violation that's caused by a non-compliant change to an organization policy. |
RESOURCE |
A violation that's caused by a non-compliant resource. |
Methods |
|
|---|---|
|
Acknowledges an existing violation. |
|
Retrieves an Assured Workloads violation by its resource name. |
|
Lists the Violations in the AssuredWorkload Environment. |