Skip to content

Commit d487e42

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 84372280 of spec repo (#661)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 5ea77da commit d487e42

File tree

13 files changed

+263
-8
lines changed

13 files changed

+263
-8
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.6.2",
7-
"regenerated": "2022-05-24 10:04:37.035844",
8-
"spec_repo_commit": "068bc4e7"
7+
"regenerated": "2022-05-24 12:50:01.847831",
8+
"spec_repo_commit": "84372280"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-24 10:04:37.047700",
13-
"spec_repo_commit": "068bc4e7"
12+
"regenerated": "2022-05-24 12:50:01.860166",
13+
"spec_repo_commit": "84372280"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10453,6 +10453,7 @@ components:
1045310453
- packetsReceived
1045410454
- networkHop
1045510455
- receivedMessage
10456+
- grpcHealthcheckStatus
1045610457
- connection
1045710458
example: statusCode
1045810459
type: string
@@ -10472,6 +10473,7 @@ components:
1047210473
- PACKETS_RECEIVED
1047310474
- NETWORK_HOP
1047410475
- RECEIVED_MESSAGE
10476+
- GRPC_HEALTHCHECK_STATUS
1047510477
- CONNECTION
1047610478
SyntheticsBasicAuth:
1047710479
description: Object to handle basic authentication when performing the test.
@@ -11976,7 +11978,7 @@ components:
1197611978
SyntheticsTestDetailsSubType:
1197711979
description: 'The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
1197811980

11979-
`dns`, `icmp`, `udp`, `websocket` or `multi`.'
11981+
`dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.'
1198011982
enum:
1198111983
- http
1198211984
- ssl
@@ -11986,6 +11988,7 @@ components:
1198611988
- icmp
1198711989
- udp
1198811990
- websocket
11991+
- grpc
1198911992
example: http
1199011993
type: string
1199111994
x-enum-varnames:
@@ -11997,6 +12000,7 @@ components:
1199712000
- ICMP
1199812001
- UDP
1199912002
- WEBSOCKET
12003+
- GRPC
1200012004
SyntheticsTestDetailsType:
1200112005
description: Type of the Synthetic test, either `api` or `browser`.
1200212006
enum:
@@ -12023,6 +12027,12 @@ components:
1202312027
type: string
1202412028
description: Headers to include when performing the test.
1202512029
type: object
12030+
SyntheticsTestMetadata:
12031+
additionalProperties:
12032+
description: A single Metadatum.
12033+
type: string
12034+
description: Metadata to include when performing the gRPC test.
12035+
type: object
1202612036
SyntheticsTestMonitorStatus:
1202712037
description: 'The status of your Synthetic monitor.
1202812038

@@ -12200,6 +12210,8 @@ components:
1220012210
message:
1220112211
description: Message to send for UDP or WebSocket tests.
1220212212
type: string
12213+
metadata:
12214+
$ref: '#/components/schemas/SyntheticsTestMetadata'
1220312215
method:
1220412216
$ref: '#/components/schemas/HTTPMethod'
1220512217
noSavingResponseBody:
@@ -12228,6 +12240,9 @@ components:
1222812240

1222912241
the same IP address and TCP port number.'
1223012242
type: string
12243+
service:
12244+
description: gRPC service on which you want to perform the healthcheck.
12245+
type: string
1223112246
shouldTrackHops:
1223212247
description: Turns on a traceroute probe to discover all gateways along
1223312248
the path to the host destination.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2022-05-24T11:58:25.551Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"log": {
3+
"_recordingName": "Synthetics/Create an API GRPC test returns \"OK - Returns the created test details.\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "746da63feac18f9cb2dc81a9a1e775e0",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 673,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 578,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"target\":1,\"type\":\"grpcHealthcheckStatus\"}],\"request\":{\"host\":\"localhost\",\"message\":\"\",\"metadata\":{},\"method\":\"GET\",\"port\":50051,\"service\":\"Hello\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_grpc_test_payload.json\",\"name\":\"Test-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response-1653393505\",\"options\":{\"min_failure_duration\":0,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response-1653393505\",\"monitor_options\":{\"renotify_interval\":0},\"tick_every\":60},\"subtype\":\"grpc\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/api"
39+
},
40+
"response": {
41+
"bodySize": 953,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 953,
45+
"text": "{\"status\":\"live\",\"public_id\":\"b42-9bj-kdp\",\"tags\":[\"testing:api\"],\"org_id\":321813,\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_grpc_test_payload.json\",\"deleted_at\":null,\"name\":\"Test-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response-1653393505\",\"monitor_id\":72307136,\"type\":\"api\",\"created_at\":\"2022-05-24T11:58:26.204508+00:00\",\"modified_at\":\"2022-05-24T11:58:26.204508+00:00\",\"subtype\":\"grpc\",\"config\":{\"request\":{\"service\":\"Hello\",\"port\":50051,\"host\":\"localhost\",\"message\":\"\",\"method\":\"GET\",\"metadata\":{}},\"assertions\":[{\"operator\":\"is\",\"type\":\"grpcHealthcheckStatus\",\"target\":1}]},\"options\":{\"monitor_options\":{\"include_tags\":true,\"notify_no_data\":false,\"notify_audit\":false,\"new_host_delay\":300,\"renotify_interval\":0},\"tick_every\":60,\"monitor_name\":\"Test-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response-1653393505\",\"min_failure_duration\":0,\"min_location_failed\":1}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 666,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2022-05-24T11:58:25.572Z",
61+
"time": 827
62+
},
63+
{
64+
"_id": "7e4144b4be0d4d8583ec2c49f6939ac1",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 30,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
},
76+
{
77+
"_fromType": "array",
78+
"name": "content-type",
79+
"value": "application/json"
80+
}
81+
],
82+
"headersSize": 568,
83+
"httpVersion": "HTTP/1.1",
84+
"method": "POST",
85+
"postData": {
86+
"mimeType": "application/json",
87+
"params": [],
88+
"text": "{\"public_ids\":[\"b42-9bj-kdp\"]}"
89+
},
90+
"queryString": [],
91+
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/delete"
92+
},
93+
"response": {
94+
"bodySize": 95,
95+
"content": {
96+
"mimeType": "application/json",
97+
"size": 95,
98+
"text": "{\"deleted_tests\":[{\"deleted_at\":\"2022-05-24T11:58:31.800773+00:00\",\"public_id\":\"b42-9bj-kdp\"}]}"
99+
},
100+
"cookies": [],
101+
"headers": [
102+
{
103+
"name": "content-type",
104+
"value": "application/json"
105+
}
106+
],
107+
"headersSize": 665,
108+
"httpVersion": "HTTP/1.1",
109+
"redirectURL": "",
110+
"status": 200,
111+
"statusText": "OK"
112+
},
113+
"startedDateTime": "2022-05-24T11:58:26.429Z",
114+
"time": 5488
115+
}
116+
],
117+
"pages": [],
118+
"version": "1.2"
119+
}
120+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/**
2+
* Create an API GRPC test returns "OK - Returns the created test details." response
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.SyntheticsApi(configuration);
9+
10+
const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
11+
body: {
12+
config: {
13+
assertions: [
14+
{
15+
operator: "is",
16+
target: 1,
17+
type: "grpcHealthcheckStatus",
18+
},
19+
],
20+
request: {
21+
host: "localhost",
22+
port: 50051,
23+
service: "Hello",
24+
method: "GET",
25+
message: "",
26+
metadata: {},
27+
},
28+
},
29+
locations: ["aws:us-east-2"],
30+
message: "BDD test payload: synthetics_api_grpc_test_payload.json",
31+
name: "Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response",
32+
options: {
33+
minFailureDuration: 0,
34+
minLocationFailed: 1,
35+
monitorOptions: {
36+
renotifyInterval: 0,
37+
},
38+
monitorName:
39+
"Example-Create_an_API_GRPC_test_returns_OK_Returns_the_created_test_details_response",
40+
tickEvery: 60,
41+
},
42+
subtype: "grpc",
43+
tags: ["testing:api"],
44+
type: "api",
45+
},
46+
};
47+
48+
apiInstance
49+
.createSyntheticsAPITest(params)
50+
.then((data: v1.SyntheticsAPITest) => {
51+
console.log(
52+
"API called successfully. Returned data: " + JSON.stringify(data)
53+
);
54+
})
55+
.catch((error: any) => console.error(error));

features/v1/synthetics.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ Feature: Synthetics
9999
When the request is sent
100100
Then the response status is 402 Quota reached for private locations
101101

102+
@team:DataDog/synthetics-app
103+
Scenario: Create an API GRPC test returns "OK - Returns the created test details." response
104+
Given new "CreateSyntheticsAPITest" request
105+
And body from file "synthetics_api_grpc_test_payload.json"
106+
When the request is sent
107+
Then the response status is 200 OK - Returns the created test details.
108+
And the response "name" is equal to "{{ unique }}"
109+
102110
@team:DataDog/synthetics-app
103111
Scenario: Create an API HTTP test returns "OK - Returns the created test details." response
104112
Given new "CreateSyntheticsAPITest" request
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"config": {
3+
"assertions": [
4+
{
5+
"operator": "is",
6+
"target": 1,
7+
"type": "grpcHealthcheckStatus"
8+
}
9+
],
10+
"request": {
11+
"host": "localhost",
12+
"port": 50051,
13+
"service": "Hello",
14+
"method": "GET",
15+
"message": "",
16+
"metadata": {}
17+
}
18+
},
19+
"locations": ["aws:us-east-2"],
20+
"message": "BDD test payload: synthetics_api_grpc_test_payload.json",
21+
"name": "{{ unique }}",
22+
"options": {
23+
"min_failure_duration": 0,
24+
"min_location_failed": 1,
25+
"monitor_options": {
26+
"renotify_interval": 0
27+
},
28+
"monitor_name": "{{ unique }}",
29+
"tick_every": 60
30+
},
31+
"subtype": "grpc",
32+
"tags": ["testing:api"],
33+
"type": "api"
34+
}

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ const enumsMap: { [key: string]: any[] } = {
876876
"packetsReceived",
877877
"networkHop",
878878
"receivedMessage",
879+
"grpcHealthcheckStatus",
879880
"connection",
880881
],
881882
SyntheticsBasicAuthNTLMType: ["ntlm"],
@@ -996,6 +997,7 @@ const enumsMap: { [key: string]: any[] } = {
996997
"icmp",
997998
"udp",
998999
"websocket",
1000+
"grpc",
9991001
],
10001002
SyntheticsTestDetailsType: ["api", "browser"],
10011003
SyntheticsTestExecutionRule: ["blocking", "non_blocking", "skipped"],

packages/datadog-api-client-v1/models/SyntheticsAPITest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class SyntheticsAPITest {
5050
"status"?: SyntheticsTestPauseStatus;
5151
/**
5252
* The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
53-
* `dns`, `icmp`, `udp`, `websocket` or `multi`.
53+
* `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.
5454
*/
5555
"subtype"?: SyntheticsTestDetailsSubType;
5656
/**

packages/datadog-api-client-v1/models/SyntheticsAssertionType.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type SyntheticsAssertionType =
2020
| typeof PACKETS_RECEIVED
2121
| typeof NETWORK_HOP
2222
| typeof RECEIVED_MESSAGE
23+
| typeof GRPC_HEALTHCHECK_STATUS
2324
| typeof CONNECTION;
2425
export const BODY = "body";
2526
export const HEADER = "header";
@@ -36,4 +37,5 @@ export const PACKET_LOSS_PERCENTAGE = "packetLossPercentage";
3637
export const PACKETS_RECEIVED = "packetsReceived";
3738
export const NETWORK_HOP = "networkHop";
3839
export const RECEIVED_MESSAGE = "receivedMessage";
40+
export const GRPC_HEALTHCHECK_STATUS = "grpcHealthcheckStatus";
3941
export const CONNECTION = "connection";

0 commit comments

Comments
 (0)