Skip to content

Commit 2977f2c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[FA] Add get agent-s endpoints (#3043)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent bbc12a6 commit 2977f2c

File tree

33 files changed

+2643
-20
lines changed

33 files changed

+2643
-20
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 650 additions & 1 deletion
Large diffs are not rendered by default.

cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 571,
29+
"headersSize": 570,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
@@ -79,7 +79,7 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 614,
82+
"headersSize": 613,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "POST",
8585
"postData": {
@@ -164,7 +164,7 @@
164164
"value": "*/*"
165165
}
166166
],
167-
"headersSize": 544,
167+
"headersSize": 543,
168168
"httpVersion": "HTTP/1.1",
169169
"method": "DELETE",
170170
"queryString": [],

cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
},
142142
"cookies": [],
143143
"headers": [],
144-
"headersSize": 623,
144+
"headersSize": 622,
145145
"httpVersion": "HTTP/1.1",
146146
"redirectURL": "",
147147
"status": 204,
@@ -184,7 +184,7 @@
184184
"value": "application/vnd.api+json"
185185
}
186186
],
187-
"headersSize": 683,
187+
"headersSize": 682,
188188
"httpVersion": "HTTP/1.1",
189189
"redirectURL": "",
190190
"status": 404,
@@ -221,7 +221,7 @@
221221
},
222222
"cookies": [],
223223
"headers": [],
224-
"headersSize": 623,
224+
"headersSize": 622,
225225
"httpVersion": "HTTP/1.1",
226226
"redirectURL": "",
227227
"status": 204,

cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"value": "application/vnd.api+json"
5252
}
5353
],
54-
"headersSize": 683,
54+
"headersSize": 682,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
@@ -94,7 +94,7 @@
9494
"value": "application/vnd.api+json"
9595
}
9696
],
97-
"headersSize": 681,
97+
"headersSize": 680,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
@@ -131,7 +131,7 @@
131131
},
132132
"cookies": [],
133133
"headers": [],
134-
"headersSize": 623,
134+
"headersSize": 622,
135135
"httpVersion": "HTTP/1.1",
136136
"redirectURL": "",
137137
"status": 204,

cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"value": "application/vnd.api+json"
5252
}
5353
],
54-
"headersSize": 683,
54+
"headersSize": 682,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
@@ -79,7 +79,7 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 614,
82+
"headersSize": 613,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "POST",
8585
"postData": {
@@ -104,7 +104,7 @@
104104
"value": "application/vnd.api+json"
105105
}
106106
],
107-
"headersSize": 682,
107+
"headersSize": 681,
108108
"httpVersion": "HTTP/1.1",
109109
"redirectURL": "",
110110
"status": 200,

cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"url": "https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules"
9292
},
9393
"response": {
94-
"bodySize": 577,
94+
"bodySize": 575,
9595
"content": {
9696
"mimeType": "application/vnd.api+json",
9797
"size": 577,
@@ -134,7 +134,7 @@
134134
"url": "https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d"
135135
},
136136
"response": {
137-
"bodySize": 577,
137+
"bodySize": 575,
138138
"content": {
139139
"mimeType": "application/vnd.api+json",
140140
"size": 577,

cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 607,
82+
"headersSize": 606,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "PUT",
8585
"postData": {
@@ -127,7 +127,7 @@
127127
"value": "*/*"
128128
}
129129
],
130-
"headersSize": 544,
130+
"headersSize": 543,
131131
"httpVersion": "HTTP/1.1",
132132
"method": "DELETE",
133133
"queryString": [],

cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 614,
82+
"headersSize": 612,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "POST",
8585
"postData": {
@@ -217,7 +217,7 @@
217217
"value": "*/*"
218218
}
219219
],
220-
"headersSize": 544,
220+
"headersSize": 543,
221221
"httpVersion": "HTTP/1.1",
222222
"method": "DELETE",
223223
"queryString": [],
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));

0 commit comments

Comments
 (0)