# REST Resource: organizations.locations.reports

- [Resource: Report](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Report)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Report.SCHEMA_REPRESENTATION)
- [IaCValidationReport](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#IaCValidationReport)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#IaCValidationReport.SCHEMA_REPRESENTATION)
- [Violation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Violation)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Violation.SCHEMA_REPRESENTATION)
- [PostureDetails](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PostureDetails)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PostureDetails.SCHEMA_REPRESENTATION)
- [Severity](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Severity)
- [AssetDetails](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#AssetDetails)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#AssetDetails.SCHEMA_REPRESENTATION)
- [PolicyDetails](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PolicyDetails)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PolicyDetails.SCHEMA_REPRESENTATION)
- [ConstraintType](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#ConstraintType)
- [Methods](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#METHODS_SUMMARY)

## Resource: Report

Details of a report.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, // Union field `type` can be only one of the following: "iacValidationReport": { object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#IaCValidationReport`) } // End of list of possible types for union field `type`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The name of the report, in the format `organizations/{organization}/locations/global/reports/{report_id}`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the report was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the report was last updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| Union field `type`. The type of report. `type` can be only one of the following: ||
| `iacValidationReport` | ``object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#IaCValidationReport`)`` Output only. An infrastructure-as-code (IaC) validation report. |

## IaCValidationReport

Details of an infrastructure-as-code (IaC) validation report.

| JSON representation |
|---|
| ``` { "violations": [ { object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Violation`) } ], "note": string } ``` |

| Fields ||
|---|---|
| `violations[]` | ``object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Violation`)`` A list of every `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Violation` found in the IaC configuration. |
| `note` | `string` Additional information about the report. |

## Violation

Details of a violation.

| JSON representation |
|---|
| ``` { "assetId": string, "policyId": string, "violatedPosture": { object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PostureDetails`) }, "severity": enum (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Severity`), "nextSteps": string, "violatedAsset": { object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#AssetDetails`) }, "violatedPolicy": { object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PolicyDetails`) } } ``` |

| Fields ||
|---|---|
| `assetId` | `string` The full resource name of the asset that caused the violation. For details about the format of the full resource name for each asset type, see [Resource name format](https://cloud.google.com/asset-inventory/docs/resource-name-format). |
| `policyId` | `string` The policy that was violated. |
| `violatedPosture` | ``object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PostureDetails`)`` Details for the posture that was violated. This field is present only if the violated policy belongs to a deployed posture. |
| `severity` | ``enum (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Severity`)`` The severity of the violation. |
| `nextSteps` | `string` A description of the steps that you can take to fix the violation. |
| `violatedAsset` | ``object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#AssetDetails`)`` Details of the Cloud Asset Inventory asset that caused the violation. |
| `violatedPolicy` | ``object (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#PolicyDetails`)`` Details of the policy that was violated. |

## PostureDetails

Details of a posture deployment.

| JSON representation |
|---|
| ``` { "postureDeployment": string, "postureDeploymentTargetResource": string, "posture": string, "postureRevisionId": string, "policySet": string } ``` |

| Fields ||
|---|---|
| `postureDeployment` | `string` The name of the posture deployment, in the format `organizations/{organization}/locations/global/postureDeployments/{deployment_id}`. |
| `postureDeploymentTargetResource` | `string` The organization, folder, or project where the posture is deployed. Uses one of the following formats: - `organizations/{organization_number}` - `folders/{folder_number}` - `projects/{project_number}` |
| `posture` | `string` The posture used in the deployment, in the format `organizations/{organization}/locations/global/postures/{postureId}`. |
| `postureRevisionId` | `string` The revision ID of the posture used in the deployment. |
| `policySet` | `string` The identifier for the `PolicySet` that the relevant policy belongs to. |

## Severity

The severity of a violation.

| Enums ||
|---|---|
| `SEVERITY_UNSPECIFIED` | Default value. This value is unused. |
| `CRITICAL` | Critical severity. |
| `HIGH` | High severity. |
| `MEDIUM` | Medium severity. |
| `LOW` | Low severity. |

## AssetDetails

Details of a Cloud Asset Inventory asset that caused a violation.

| JSON representation |
|---|
| ``` { "asset": string, "assetType": string } ``` |

| Fields ||
|---|---|
| `asset` | `string` Information about the Cloud Asset Inventory asset that violated a policy. The format of this information can change at any time without prior notice. Your application must not depend on this information in any way. |
| `assetType` | `string` The type of Cloud Asset Inventory asset. For a list of asset types, see [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). |

## PolicyDetails

Details of a policy that was violated.

| JSON representation |
|---|
| ``` { "constraint": string, "constraintType": enum (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#ConstraintType`), "complianceStandards": [ string ], "description": string } ``` |

| Fields ||
|---|---|
| `constraint` | `string` Information about the constraint that was violated. The format of this information can change at any time without prior notice. Your application must not depend on this information in any way. |
| `constraintType` | ``enum (`https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#ConstraintType`)`` The type of constraint that was violated. |
| `complianceStandards[]` | `string` The compliance standards that the policy maps to. For example, `CIS-2.0 1.15`. |
| `description` | `string` A description of the policy. |

## ConstraintType

A type of constraint that can be violated.

| Enums ||
|---|---|
| `CONSTRAINT_TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE` | A custom module for Security Health Analytics. |
| `ORG_POLICY_CUSTOM` | A custom organization policy constraint. |
| `SECURITY_HEALTH_ANALYTICS_MODULE` | A built-in detector for Security Health Analytics. |
| `ORG_POLICY` | A predefined organization policy constraint. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports/createIaCValidationReport` | Validates a specified infrastructure-as-code (IaC) configuration, and creates a `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Report` with the validation results. |
| ### `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports/get` | Gets details for a `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Report`. |
| ### `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports/list` | Lists every `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.reports#Report` in a given organization and location. |