# GoogleCloudAnalysis

- [JSON representation](https://docs.cloud.google.com/deploy/docs/api/reference/rest/v1/GoogleCloudAnalysis#SCHEMA_REPRESENTATION)
- [AlertPolicyCheck](https://docs.cloud.google.com/deploy/docs/api/reference/rest/v1/GoogleCloudAnalysis#AlertPolicyCheck)
  - [JSON representation](https://docs.cloud.google.com/deploy/docs/api/reference/rest/v1/GoogleCloudAnalysis#AlertPolicyCheck.SCHEMA_REPRESENTATION)

GoogleCloudAnalysis is a set of Google Cloud-based checks to perform on the deployment.

| JSON representation |
|---|
| ``` { "alertPolicyChecks": [ { object (`https://docs.cloud.google.com/deploy/docs/api/reference/rest/v1/GoogleCloudAnalysis#AlertPolicyCheck`) } ] } ``` |

| Fields ||
|---|---|
| `alertPolicyChecks[]` | ``object (`https://docs.cloud.google.com/deploy/docs/api/reference/rest/v1/GoogleCloudAnalysis#AlertPolicyCheck`)`` Optional. A list of Cloud Monitoring Alert Policy checks to perform as part of the analysis. |

## AlertPolicyCheck

AlertPolicyCheck configures a set of Cloud Monitoring alerting policies that will be periodically polled for alerts. If any of the listed policies have an active alert, the analysis check will fail.

| JSON representation |
|---|
| ``` { "id": string, "alertPolicies": [ string ], "labels": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `id` | `string` Required. The ID of the analysis check. |
| `alertPolicies[]` | `string` Required. The Cloud Monitoring Alert Policies to check for active alerts. Format is `projects/{project}/alertPolicies/{alertPolicy}`. |
| `labels` | `map (key: string, value: string)` Optional. A set of labels to filter active alerts. If set, only alerts having all of the specified labels will be considered. Otherwise, all active alerts will be considered. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |