Skip to content

Commit 36870d3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8fef514 of spec repo
1 parent acfd9a2 commit 36870d3

27 files changed

+2595
-3
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 638 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get detailed information about an agent returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getFleetAgentInfo"] = true;
9+
const apiInstance = new v2.FleetAutomationApi(configuration);
10+
11+
const params: v2.FleetAutomationApiGetFleetAgentInfoRequest = {
12+
agentKey: "agent_key",
13+
};
14+
15+
apiInstance
16+
.getFleetAgentInfo(params)
17+
.then((data: v2.FleetAgentInfoResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* List all Datadog Agents returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listFleetAgents"] = true;
9+
const apiInstance = new v2.FleetAutomationApi(configuration);
10+
11+
apiInstance
12+
.listFleetAgents()
13+
.then((data: v2.FleetAgentsResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,40 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
23432343
"v2.ListFleetAgentVersions": {
23442344
"operationResponseType": "FleetAgentVersionsResponse",
23452345
},
2346+
"v2.ListFleetAgents": {
2347+
"pageNumber": {
2348+
"type": "number",
2349+
"format": "int64",
2350+
},
2351+
"pageSize": {
2352+
"type": "number",
2353+
"format": "int64",
2354+
},
2355+
"sortAttribute": {
2356+
"type": "string",
2357+
"format": "",
2358+
},
2359+
"sortDescending": {
2360+
"type": "boolean",
2361+
"format": "",
2362+
},
2363+
"tags": {
2364+
"type": "string",
2365+
"format": "",
2366+
},
2367+
"filter": {
2368+
"type": "string",
2369+
"format": "",
2370+
},
2371+
"operationResponseType": "FleetAgentsResponse",
2372+
},
2373+
"v2.GetFleetAgentInfo": {
2374+
"agentKey": {
2375+
"type": "string",
2376+
"format": "",
2377+
},
2378+
"operationResponseType": "FleetAgentInfoResponse",
2379+
},
23462380
"v2.ListFleetDeployments": {
23472381
"pageSize": {
23482382
"type": "number",

features/v2/fleet_automation.feature

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,51 @@ Feature: Fleet Automation
152152
When the request is sent
153153
Then the response status is 200 OK
154154

155+
@generated @skip @team:DataDog/fleet-automation
156+
Scenario: Get detailed information about an agent returns "Bad Request" response
157+
Given operation "GetFleetAgentInfo" enabled
158+
And new "GetFleetAgentInfo" request
159+
And request contains "agent_key" parameter from "REPLACE.ME"
160+
When the request is sent
161+
Then the response status is 400 Bad Request
162+
163+
@generated @skip @team:DataDog/fleet-automation
164+
Scenario: Get detailed information about an agent returns "Not Found" response
165+
Given operation "GetFleetAgentInfo" enabled
166+
And new "GetFleetAgentInfo" request
167+
And request contains "agent_key" parameter from "REPLACE.ME"
168+
When the request is sent
169+
Then the response status is 404 Not Found
170+
171+
@generated @skip @team:DataDog/fleet-automation
172+
Scenario: Get detailed information about an agent returns "OK" response
173+
Given operation "GetFleetAgentInfo" enabled
174+
And new "GetFleetAgentInfo" request
175+
And request contains "agent_key" parameter from "REPLACE.ME"
176+
When the request is sent
177+
Then the response status is 200 OK
178+
179+
@generated @skip @team:DataDog/fleet-automation
180+
Scenario: List all Datadog Agents returns "Bad Request" response
181+
Given operation "ListFleetAgents" enabled
182+
And new "ListFleetAgents" request
183+
When the request is sent
184+
Then the response status is 400 Bad Request
185+
186+
@generated @skip @team:DataDog/fleet-automation
187+
Scenario: List all Datadog Agents returns "Not Found" response
188+
Given operation "ListFleetAgents" enabled
189+
And new "ListFleetAgents" request
190+
When the request is sent
191+
Then the response status is 404 Not Found
192+
193+
@generated @skip @team:DataDog/fleet-automation
194+
Scenario: List all Datadog Agents returns "OK" response
195+
Given operation "ListFleetAgents" enabled
196+
And new "ListFleetAgents" request
197+
When the request is sent
198+
Then the response status is 200 OK
199+
155200
@generated @skip @team:DataDog/fleet-automation
156201
Scenario: List all available Agent versions returns "Bad Request" response
157202
Given operation "ListFleetAgentVersions" enabled

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"parameters": [
351351
{
352352
"name": "body",
353-
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}"
353+
"value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}"
354354
}
355355
],
356356
"step": "there is a valid \"deployment_gate\" in the system",

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
"type": "safe"
66
}
77
},
8+
"ListFleetAgents": {
9+
"tag": "Fleet Automation",
10+
"undo": {
11+
"type": "safe"
12+
}
13+
},
14+
"GetFleetAgentInfo": {
15+
"tag": "Fleet Automation",
16+
"undo": {
17+
"type": "safe"
18+
}
19+
},
820
"ListFleetDeployments": {
921
"tag": "Fleet Automation",
1022
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ export function createConfiguration(
227227
"v2.createFleetDeploymentUpgrade": false,
228228
"v2.createFleetSchedule": false,
229229
"v2.deleteFleetSchedule": false,
230+
"v2.getFleetAgentInfo": false,
230231
"v2.getFleetDeployment": false,
231232
"v2.getFleetSchedule": false,
233+
"v2.listFleetAgents": false,
232234
"v2.listFleetAgentVersions": false,
233235
"v2.listFleetDeployments": false,
234236
"v2.listFleetSchedules": false,

0 commit comments

Comments
 (0)