Skip to content

Commit d98eebc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c2b4dbf of spec repo
1 parent 8e8717b commit d98eebc

File tree

9 files changed

+185
-5
lines changed

9 files changed

+185
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2021-12-20 09:54:39.711096",
8-
"spec_repo_commit": "d90592c"
7+
"regenerated": "2021-12-21 20:50:02.866420",
8+
"spec_repo_commit": "c2b4dbf"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-12-20 09:54:39.731653",
13-
"spec_repo_commit": "d90592c"
12+
"regenerated": "2021-12-21 20:50:02.885160",
13+
"spec_repo_commit": "c2b4dbf"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6191,6 +6191,7 @@ components:
61916191
- slo alert
61926192
- event-v2 alert
61936193
- audit alert
6194+
- ci-pipelines alert
61946195
example: query alert
61956196
type: string
61966197
x-enum-varnames:
@@ -6207,6 +6208,7 @@ components:
62076208
- SLO_ALERT
62086209
- EVENT_V2_ALERT
62096210
- AUDIT_ALERT
6211+
- CI_PIPELINES_ALERT
62106212
MonitorUpdateRequest:
62116213
description: Object describing a monitor update request.
62126214
properties:
@@ -20069,7 +20071,32 @@ paths:
2006920071

2007020072

2007120073
**NOTE** Only available on US1-FED and in closed beta on US1, EU, US3, and
20072-
US5.'
20074+
US5.
20075+
20076+
20077+
**CI Pipelines Alert Query**
20078+
20079+
20080+
Example: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window)
20081+
operator #`
20082+
20083+
20084+
- **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
20085+
20086+
- **`rollup_method`** The stats roll-up method - supports `count`, `avg`,
20087+
and `cardinality`.
20088+
20089+
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure
20090+
or the facet name you want to use.
20091+
20092+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
20093+
20094+
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
20095+
20096+
- **`#`** an integer or decimal number used to set the threshold.
20097+
20098+
20099+
**NOTE** Only available in closed beta on US1, EU, US3 and US5.'
2007320100
operationId: CreateMonitor
2007420101
requestBody:
2007520102
content:

api/v1/datadog/api_monitors.go

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1/datadog/docs/MonitorType.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
* `AUDIT_ALERT` (value: `"audit alert"`)
3131

32+
* `CI_PIPELINES_ALERT` (value: `"ci-pipelines alert"`)
33+
3234

3335
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3436

api/v1/datadog/docs/MonitorsApi.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,19 @@ Example: `audits(query).rollup(rollup_method[, measure]).last(time_window) opera
237237

238238
**NOTE** Only available on US1-FED and in closed beta on US1, EU, US3, and US5.
239239

240+
**CI Pipelines Alert Query**
241+
242+
Example: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator #`
243+
244+
- **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
245+
- **`rollup_method`** The stats roll-up method - supports `count`, `avg`, and `cardinality`.
246+
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
247+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
248+
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
249+
- **`#`** an integer or decimal number used to set the threshold.
250+
251+
**NOTE** Only available in closed beta on US1, EU, US3 and US5.
252+
240253
### Example
241254

242255
```go

api/v1/datadog/model_monitor_type.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2021-12-21T19:40:30.344Z
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"message":"some message Notify: @hipchat-channel","name":"Test-Create_a_ci_pipelines_monitor_returns_OK_response-1640115630","options":{"thresholds":{"critical":1}},"priority":3,"query":"ci-pipelines(\"ci_level:pipeline @git.branch:staging* @ci.status:error\").rollup(\"count\").by(\"@git.branch,@ci.pipeline.name\").last(\"5m\") \u003e= 1","tags":["test:testcreateacipipelinesmonitorreturnsokresponse1640115630","env:ci"],"type":"ci-pipelines alert"}
5+
form: {}
6+
headers:
7+
Accept:
8+
- '*/*'
9+
Accept-Encoding:
10+
- gzip,deflate
11+
Connection:
12+
- close
13+
Content-Length:
14+
- '447'
15+
Content-Type:
16+
- application/json
17+
Host:
18+
- api.datadoghq.com
19+
User-Agent:
20+
- datadog-api-spec/scripts/bdd-runner
21+
X-Datadog-Parent-Id:
22+
- '7511871995723507420'
23+
X-Datadog-Trace-Id:
24+
- '2911593932664148235'
25+
method: POST
26+
url: https://api.datadoghq.com/api/v1/monitor
27+
response:
28+
body: '["1f8b08000000000004038c534d8fdb2010fd2b16a77ed816e44b0952ab48edadd2f6b2b76e85089ed8a3c5e0059c2a8af6bf77889dfd907ae805310cf3e6bd37706101620a6812342a780b9149375a5bb2a45bdaff6289f2322f26804ea00d0e38804507b1f70e930f01d2185cf48f04357817416c565c88f566c959c9c09da441f6bb640d58a036b7064f23843393cc60f582f8e1814265e10456de0e8b7d8ba93e04ed4c2723d142d77e2af6066b0ad2182584e0c303fb58137f3b0e19c38f2ee593c399a237f5652ebb01d74ef7906f591d13dd5bf714145fbf148268f710a36e81f845df433187c59d4f783ccb62dfe1603a9d2a5a9c034b1548cad6dbcd7221165baa1f6d42265318a164b91121dd938bd5b7ab8d4a2b127a6312d56ca59abd543f7fd07672b37a67e734056ac5167c212ab1a816e25eece48acb25afd77cb7db89cf9c4b9ebd9f2f2b9d987c45e19ccf291f98bc5c898bd56abd129b92919cc666b2c7e0db7da3936e7cdb3dd5c6f7043809991e08f41aedbf2f3e97cc87566547c88ead58921fbec123e6e9ff0ff121a00f98e87950a93f41d0d6aa3c6e20a76e40138d775942bff3c577624d64d379c842debeaf425b0889727e48484f35cb77d7912a3d3648361db58d3431ebcd63263b87112d38930f2ea40d9db163036afa22d3885347f3eabc6dae9886c8a3d1648fa8395538f8a33a1f93a23fa0b3aa3c82b9b1f32adbfcd2ab0d7e1c0e6715b11f6cd67bfd6473faf9f92f000000ffff0300454b7c1cb2030000"]'
29+
code: 200
30+
duration: ''
31+
headers:
32+
Cache-Control:
33+
- no-cache
34+
Connection:
35+
- close
36+
Content-Encoding:
37+
- gzip
38+
Content-Security-Policy:
39+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
40+
Content-Type:
41+
- application/json
42+
Date:
43+
- Tue, 21 Dec 2021 19:40:30 GMT
44+
Pragma:
45+
- no-cache
46+
Strict-Transport-Security:
47+
- max-age=15724800;
48+
Transfer-Encoding:
49+
- chunked
50+
Vary:
51+
- Accept-Encoding
52+
X-Content-Type-Options:
53+
- nosniff
54+
X-Frame-Options:
55+
- SAMEORIGIN
56+
X-Ratelimit-Limit:
57+
- '500'
58+
X-Ratelimit-Period:
59+
- '10'
60+
X-Ratelimit-Remaining:
61+
- '499'
62+
X-Ratelimit-Reset:
63+
- '10'
64+
status: 200 OK
65+
- request:
66+
body: ''
67+
form: {}
68+
headers:
69+
Accept:
70+
- '*/*'
71+
Accept-Encoding:
72+
- gzip,deflate
73+
Connection:
74+
- close
75+
Host:
76+
- api.datadoghq.com
77+
User-Agent:
78+
- datadog-api-spec/scripts/bdd-runner
79+
X-Datadog-Parent-Id:
80+
- '62517800563126146'
81+
X-Datadog-Trace-Id:
82+
- '2911593932664148235'
83+
method: DELETE
84+
url: https://api.datadoghq.com/api/v1/monitor/58632128
85+
response:
86+
body: '["1f8b0800000000000403aa564a49cd492d494d89cfcdcfcb2cc92f8acf4c51b232b53033363234b2a805000000ffff0300c11ed5301f000000"]'
87+
code: 200
88+
duration: ''
89+
headers:
90+
Cache-Control:
91+
- no-cache
92+
Connection:
93+
- close
94+
Content-Encoding:
95+
- gzip
96+
Content-Security-Policy:
97+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
98+
Content-Type:
99+
- application/json
100+
Date:
101+
- Tue, 21 Dec 2021 19:40:30 GMT
102+
Pragma:
103+
- no-cache
104+
Strict-Transport-Security:
105+
- max-age=15724800;
106+
Transfer-Encoding:
107+
- chunked
108+
Vary:
109+
- Accept-Encoding
110+
X-Content-Type-Options:
111+
- nosniff
112+
X-Frame-Options:
113+
- SAMEORIGIN
114+
status: 200 OK
115+
version: 1

tests/scenarios/features/v1/monitors.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ Feature: Monitors
3030
When the request is sent
3131
Then the response status is 200 OK
3232

33+
@team:DataDog/monitor-app
34+
Scenario: Create a ci-pipelines monitor returns "OK" response
35+
Given new "CreateMonitor" request
36+
And body with value {"name": "{{ unique }}","type": "ci-pipelines alert","query": "ci-pipelines(\"ci_level:pipeline @git.branch:staging* @ci.status:error\").rollup(\"count\").by(\"@git.branch,@ci.pipeline.name\").last(\"5m\") >= 1","message": "some message Notify: @hipchat-channel", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options":{"thresholds":{"critical":1}}}
37+
When the request is sent
38+
Then the response status is 200 OK
39+
3340
@team:DataDog/monitor-app
3441
Scenario: Create a monitor returns "Bad Request" response
3542
Given new "CreateMonitor" request

0 commit comments

Comments
 (0)