Skip to content

Commit cc761ba

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 36383f9 of spec repo
1 parent 70c4957 commit cc761ba

35 files changed

+3873
-87
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1002 additions & 18 deletions
Large diffs are not rendered by default.

features/v2/fleet_automation.feature

Lines changed: 179 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
@endpoint(fleet-automation) @endpoint(fleet-automation-v2)
22
Feature: Fleet Automation
3-
Manage automated deployments across your fleet of hosts. Use these
4-
endpoints to create, retrieve, and cancel deployments that apply
5-
configuration changes to multiple hosts at once.
3+
Manage automated deployments across your fleet of hosts. Fleet Automation
4+
provides two types of deployments: Configuration Deployments
5+
(`/configure`): - Apply configuration file changes to target hosts -
6+
Support merge-patch operations to update specific configuration fields -
7+
Support delete operations to remove configuration files - Useful for
8+
updating Datadog Agent settings, integration configs, and more Package
9+
Upgrade Deployments (`/upgrade`): - Upgrade packages (like the Datadog
10+
Agent) to specific versions - Deploy multiple packages in a single
11+
deployment - Automatically handles version validation and compatibility
12+
Use these endpoints to: - Create configuration or package deployments with
13+
targeted host queries - List all deployments with pagination - Get
14+
detailed deployment status including per-host information - Cancel
15+
deployments that are in progress
616

717
Background:
818
Given a valid "apiKeyAuth" key in the system
@@ -34,37 +44,109 @@ Feature: Fleet Automation
3444
Then the response status is 404 Not Found
3545

3646
@generated @skip @team:DataDog/fleet-automation
37-
Scenario: Create a deployment returns "Bad Request" response
47+
Scenario: Create a configuration deployment returns "Bad Request" response
3848
Given operation "CreateFleetDeploymentConfigure" enabled
3949
And new "CreateFleetDeploymentConfigure" request
4050
And body with value {"data": {"attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "deployment"}}
4151
When the request is sent
4252
Then the response status is 400 Bad Request
4353

4454
@generated @skip @team:DataDog/fleet-automation
45-
Scenario: Create a deployment returns "CREATED" response
55+
Scenario: Create a configuration deployment returns "CREATED" response
4656
Given operation "CreateFleetDeploymentConfigure" enabled
4757
And new "CreateFleetDeploymentConfigure" request
4858
And body with value {"data": {"attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "deployment"}}
4959
When the request is sent
5060
Then the response status is 201 CREATED
5161

5262
@generated @skip @team:DataDog/fleet-automation
53-
Scenario: Get a deployment by ID returns "Bad Request" response
63+
Scenario: Create a package upgrade deployment returns "Bad Request" response
64+
Given operation "CreateFleetDeploymentUpgrade" enabled
65+
And new "CreateFleetDeploymentUpgrade" request
66+
And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}}
67+
When the request is sent
68+
Then the response status is 400 Bad Request
69+
70+
@generated @skip @team:DataDog/fleet-automation
71+
Scenario: Create a package upgrade deployment returns "CREATED" response
72+
Given operation "CreateFleetDeploymentUpgrade" enabled
73+
And new "CreateFleetDeploymentUpgrade" request
74+
And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}}
75+
When the request is sent
76+
Then the response status is 201 CREATED
77+
78+
@generated @skip @team:DataDog/fleet-automation
79+
Scenario: Create a package upgrade deployment returns "Not Found" response
80+
Given operation "CreateFleetDeploymentUpgrade" enabled
81+
And new "CreateFleetDeploymentUpgrade" request
82+
And body with value {"data": {"attributes": {"filter_query": "env:prod AND service:web", "target_packages": [{"name": "datadog-agent", "version": "7.52.0"}]}, "type": "deployment"}}
83+
When the request is sent
84+
Then the response status is 404 Not Found
85+
86+
@generated @skip @team:DataDog/fleet-automation
87+
Scenario: Create a schedule returns "Bad Request" response
88+
Given operation "CreateFleetSchedule" enabled
89+
And new "CreateFleetSchedule" request
90+
And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}}
91+
When the request is sent
92+
Then the response status is 400 Bad Request
93+
94+
@generated @skip @team:DataDog/fleet-automation
95+
Scenario: Create a schedule returns "CREATED" response
96+
Given operation "CreateFleetSchedule" enabled
97+
And new "CreateFleetSchedule" request
98+
And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}}
99+
When the request is sent
100+
Then the response status is 201 CREATED
101+
102+
@generated @skip @team:DataDog/fleet-automation
103+
Scenario: Delete a schedule returns "Bad Request" response
104+
Given operation "DeleteFleetSchedule" enabled
105+
And new "DeleteFleetSchedule" request
106+
And request contains "id" parameter from "REPLACE.ME"
107+
When the request is sent
108+
Then the response status is 400 Bad Request
109+
110+
@generated @skip @team:DataDog/fleet-automation
111+
Scenario: Delete a schedule returns "Not Found" response
112+
Given operation "DeleteFleetSchedule" enabled
113+
And new "DeleteFleetSchedule" request
114+
And request contains "id" parameter from "REPLACE.ME"
115+
When the request is sent
116+
Then the response status is 404 Not Found
117+
118+
@generated @skip @team:DataDog/fleet-automation
119+
Scenario: Delete a schedule returns "Schedule successfully deleted." response
120+
Given operation "DeleteFleetSchedule" enabled
121+
And new "DeleteFleetSchedule" request
122+
And request contains "id" parameter from "REPLACE.ME"
123+
When the request is sent
124+
Then the response status is 204 Schedule successfully deleted.
125+
126+
@generated @skip @team:DataDog/fleet-automation
127+
Scenario: Get a configuration deployment by ID returns "Bad Request" response
54128
Given operation "GetFleetDeployment" enabled
55129
And new "GetFleetDeployment" request
56130
And request contains "deployment_id" parameter from "REPLACE.ME"
57131
When the request is sent
58132
Then the response status is 400 Bad Request
59133

60134
@generated @skip @team:DataDog/fleet-automation
61-
Scenario: Get a deployment by ID returns "Not Found" response
135+
Scenario: Get a configuration deployment by ID returns "Not Found" response
62136
Given operation "GetFleetDeployment" enabled
63137
And new "GetFleetDeployment" request
64138
And request contains "deployment_id" parameter from "REPLACE.ME"
65139
When the request is sent
66140
Then the response status is 404 Not Found
67141

142+
@generated @skip @team:DataDog/fleet-automation
143+
Scenario: Get a configuration deployment by ID returns "OK" response
144+
Given operation "GetFleetDeployment" enabled
145+
And new "GetFleetDeployment" request
146+
And request contains "deployment_id" parameter from "REPLACE.ME"
147+
When the request is sent
148+
Then the response status is 200 OK
149+
68150
@skip @team:DataDog/fleet-automation
69151
Scenario: Get a deployment by ID returns "OK" response
70152
Given operation "GetFleetDeployment" enabled
@@ -74,6 +156,31 @@ Feature: Fleet Automation
74156
When the request is sent
75157
Then the response status is 200 OK
76158

159+
@generated @skip @team:DataDog/fleet-automation
160+
Scenario: Get a schedule by ID returns "Bad Request" response
161+
Given operation "GetFleetSchedule" enabled
162+
And new "GetFleetSchedule" request
163+
And request contains "id" parameter from "REPLACE.ME"
164+
When the request is sent
165+
Then the response status is 400 Bad Request
166+
167+
@generated @skip @team:DataDog/fleet-automation
168+
Scenario: Get a schedule by ID returns "Not Found" response
169+
Given operation "GetFleetSchedule" enabled
170+
And new "GetFleetSchedule" request
171+
And request contains "id" parameter from "REPLACE.ME"
172+
When the request is sent
173+
Then the response status is 404 Not Found
174+
175+
@skip @team:DataDog/fleet-automation
176+
Scenario: Get a schedule by ID returns "OK" response
177+
Given operation "GetFleetSchedule" enabled
178+
And there is a valid "fleet_schedule" in the system
179+
And new "GetFleetSchedule" request
180+
And request contains "id" parameter from "REPLACE.ME"
181+
When the request is sent
182+
Then the response status is 200 OK
183+
77184
@generated @skip @team:DataDog/fleet-automation
78185
Scenario: List all deployments returns "Bad Request" response
79186
Given operation "ListFleetDeployments" enabled
@@ -87,3 +194,68 @@ Feature: Fleet Automation
87194
And new "ListFleetDeployments" request
88195
When the request is sent
89196
Then the response status is 200 OK
197+
198+
@generated @skip @team:DataDog/fleet-automation
199+
Scenario: List all schedules returns "Bad Request" response
200+
Given operation "ListFleetSchedules" enabled
201+
And new "ListFleetSchedules" request
202+
When the request is sent
203+
Then the response status is 400 Bad Request
204+
205+
@generated @skip @team:DataDog/fleet-automation
206+
Scenario: List all schedules returns "OK" response
207+
Given operation "ListFleetSchedules" enabled
208+
And new "ListFleetSchedules" request
209+
When the request is sent
210+
Then the response status is 200 OK
211+
212+
@generated @skip @team:DataDog/fleet-automation
213+
Scenario: Trigger a schedule deployment returns "Bad Request" response
214+
Given operation "TriggerFleetSchedule" enabled
215+
And new "TriggerFleetSchedule" request
216+
And request contains "id" parameter from "REPLACE.ME"
217+
When the request is sent
218+
Then the response status is 400 Bad Request
219+
220+
@generated @skip @team:DataDog/fleet-automation
221+
Scenario: Trigger a schedule deployment returns "CREATED - Deployment successfully created and started." response
222+
Given operation "TriggerFleetSchedule" enabled
223+
And new "TriggerFleetSchedule" request
224+
And request contains "id" parameter from "REPLACE.ME"
225+
When the request is sent
226+
Then the response status is 201 CREATED - Deployment successfully created and started.
227+
228+
@generated @skip @team:DataDog/fleet-automation
229+
Scenario: Trigger a schedule deployment returns "Not Found" response
230+
Given operation "TriggerFleetSchedule" enabled
231+
And new "TriggerFleetSchedule" request
232+
And request contains "id" parameter from "REPLACE.ME"
233+
When the request is sent
234+
Then the response status is 404 Not Found
235+
236+
@generated @skip @team:DataDog/fleet-automation
237+
Scenario: Update a schedule returns "Bad Request" response
238+
Given operation "UpdateFleetSchedule" enabled
239+
And new "UpdateFleetSchedule" request
240+
And request contains "id" parameter from "REPLACE.ME"
241+
And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}}
242+
When the request is sent
243+
Then the response status is 400 Bad Request
244+
245+
@generated @skip @team:DataDog/fleet-automation
246+
Scenario: Update a schedule returns "Not Found" response
247+
Given operation "UpdateFleetSchedule" enabled
248+
And new "UpdateFleetSchedule" request
249+
And request contains "id" parameter from "REPLACE.ME"
250+
And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}}
251+
When the request is sent
252+
Then the response status is 404 Not Found
253+
254+
@generated @skip @team:DataDog/fleet-automation
255+
Scenario: Update a schedule returns "OK" response
256+
Given operation "UpdateFleetSchedule" enabled
257+
And new "UpdateFleetSchedule" request
258+
And request contains "id" parameter from "REPLACE.ME"
259+
And body with value {"data": {"attributes": {"name": "Weekly Production Agent Updates", "query": "env:prod AND service:web", "rule": {"days_of_week": ["Mon", "Wed", "Fri"], "maintenance_window_duration": 1200, "start_maintenance_window": "02:00", "timezone": "America/New_York"}, "status": "active", "version_to_latest": 0}, "type": "schedule"}}
260+
When the request is sent
261+
Then the response status is 200 OK

features/v2/given.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@
1212
"tag": "Fleet Automation",
1313
"operationId": "CreateFleetDeploymentConfigure"
1414
},
15+
{
16+
"parameters": [
17+
{
18+
"name": "body",
19+
"value": "{\n \"data\": {\n \"type\": \"deployment\",\n \"attributes\": {\n \"filter_query\": \"env:prod AND service:{{ unique_lower }}\",\n \"target_packages\": [\n {\n \"name\": \"datadog-agent\",\n \"version\": \"7.52.0\"\n }\n ]\n }\n }\n}"
20+
}
21+
],
22+
"source": "data",
23+
"step": "there is a valid \"package_deployment\" in the system",
24+
"key": "package_deployment",
25+
"tag": "Fleet Automation",
26+
"operationId": "CreateFleetDeploymentUpgrade"
27+
},
28+
{
29+
"parameters": [
30+
{
31+
"name": "body",
32+
"value": "{\n \"data\": {\n \"type\": \"schedule\",\n \"attributes\": {\n \"name\": \"Weekly {{ unique }} Updates\",\n \"query\": \"env:prod AND service:{{ unique_lower }}\",\n \"status\": \"active\",\n \"version_to_latest\": 0,\n \"rule\": {\n \"days_of_week\": [\"Mon\"],\n \"start_maintenance_window\": \"02:00\",\n \"maintenance_window_duration\": 120,\n \"timezone\": \"America/New_York\"\n }\n }\n }\n}"
33+
}
34+
],
35+
"source": "data",
36+
"step": "there is a valid \"fleet_schedule\" in the system",
37+
"key": "schedule",
38+
"tag": "Fleet Automation",
39+
"operationId": "CreateFleetSchedule"
40+
},
1541
{
1642
"parameters": [
1743
{

features/v2/undo.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@
1818
"type": "unsafe"
1919
}
2020
},
21+
"CreateFleetDeploymentUpgrade": {
22+
"tag": "Fleet Automation",
23+
"undo": {
24+
"operationId": "CancelFleetDeployment",
25+
"parameters": [
26+
{
27+
"name": "deployment_id",
28+
"source": "data.id"
29+
}
30+
],
31+
"type": "unsafe"
32+
}
33+
},
2134
"GetFleetDeployment": {
2235
"tag": "Fleet Automation",
2336
"undo": {
@@ -30,6 +43,56 @@
3043
"type": "idempotent"
3144
}
3245
},
46+
"ListFleetSchedules": {
47+
"tag": "Fleet Automation",
48+
"undo": {
49+
"type": "safe"
50+
}
51+
},
52+
"CreateFleetSchedule": {
53+
"tag": "Fleet Automation",
54+
"undo": {
55+
"operationId": "DeleteFleetSchedule",
56+
"parameters": [
57+
{
58+
"name": "id",
59+
"source": "data.id"
60+
}
61+
],
62+
"type": "unsafe"
63+
}
64+
},
65+
"DeleteFleetSchedule": {
66+
"tag": "Fleet Automation",
67+
"undo": {
68+
"type": "unsafe"
69+
}
70+
},
71+
"GetFleetSchedule": {
72+
"tag": "Fleet Automation",
73+
"undo": {
74+
"type": "safe"
75+
}
76+
},
77+
"UpdateFleetSchedule": {
78+
"tag": "Fleet Automation",
79+
"undo": {
80+
"type": "idempotent"
81+
}
82+
},
83+
"TriggerFleetSchedule": {
84+
"tag": "Fleet Automation",
85+
"undo": {
86+
"operationId": "CancelFleetDeployment",
87+
"parameters": [
88+
{
89+
"name": "deployment_id",
90+
"source": "data.id"
91+
}
92+
],
93+
"type": "unsafe"
94+
}
95+
},
3396
"ListDatastores": {
3497
"tag": "Actions Datastores",
3598
"undo": {

0 commit comments

Comments
 (0)