project_alert_management_alert
Gets or lists a project_alert_management_alert resource.
Overview​
| Name | project_alert_management_alert |
| Type | Resource |
| Id | gitlab.projects.project_alert_management_alert |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the alert. |
name | string | Name or title of the object. |
created_at | string | Timestamp the alert was created. |
description | string | Description of the alert. |
details | string | Alert details. |
details_url | string | URL of the alert detail page. |
ended_at | string | Timestamp the alert ended. |
event_count | integer | Number of events of the alert. |
hosts | array | |
iid | string | Internal ID of the alert. |
monitoring_tool | string | Monitoring tool the alert came from. |
runbook | string | Runbook for the alert as defined in alert details. |
service | string | Service the alert came from. |
severity | string | Severity of the alert. (CRITICAL, HIGH, MEDIUM, LOW, INFO, UNKNOWN) |
started_at | string | Timestamp the alert was raised. |
status | string | Status of the alert. (TRIGGERED, ACKNOWLEDGED, RESOLVED, IGNORED) |
title | string | Title of the alert. |
updated_at | string | Timestamp the alert was last updated. |
web_url | string | URL of the alert. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | full_path, host | assignee_username, domain, iid, search, sort | A single Alert Management alert of the project. Generated from the GitLab GraphQL schema field Project.alertManagementAlert (AlertManagementAlert). |
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.
| Name | Datatype | Description |
|---|---|---|
full_path | string | Full path of the project, for example gitlab-org/gitlab |
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
assignee_username | string | Username of a user assigned to the issue. |
domain | string | Filter query for given domain. |
iid | string | IID of the alert. For example, "1". |
search | string | Search query for title, description, service, or monitoring_tool. |
sort | string | Sort alerts by the criteria. |
SELECT examples​
- get
A single Alert Management alert of the project. Generated from the GitLab GraphQL schema field Project.alertManagementAlert (AlertManagementAlert).
SELECT
id,
name,
created_at,
description,
details,
details_url,
ended_at,
event_count,
hosts,
iid,
monitoring_tool,
runbook,
service,
severity,
started_at,
status,
title,
updated_at,
web_url
FROM gitlab.projects.project_alert_management_alert
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND assignee_username = '{{ assignee_username }}'
AND domain = '{{ domain }}'
AND iid = '{{ iid }}'
AND search = '{{ search }}'
AND sort = '{{ sort }}'
;