Skip to content

Commit 3221d44

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 39fe4b2 of spec repo
1 parent 2977f2c commit 3221d44

33 files changed

+2495
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 440 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Synthetics: Create a test suite returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiCreateSyntheticsSuiteRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
message: "Notification message",
15+
name: "Example suite name",
16+
options: {},
17+
tags: ["env:production"],
18+
tests: [],
19+
type: "suite",
20+
},
21+
type: "suite",
22+
},
23+
},
24+
};
25+
26+
apiInstance
27+
.createSyntheticsSuite(params)
28+
.then((data: v2.SyntheticsSuiteResponse) => {
29+
console.log(
30+
"API called successfully. Returned data: " + JSON.stringify(data)
31+
);
32+
})
33+
.catch((error: any) => console.error(error));
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Synthetics: Bulk delete suites returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiDeleteSyntheticsSuitesRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
publicIds: [""],
15+
},
16+
type: "delete_suites_request",
17+
},
18+
},
19+
};
20+
21+
apiInstance
22+
.deleteSyntheticsSuites(params)
23+
.then((data: v2.DeletedSuitesResponse) => {
24+
console.log(
25+
"API called successfully. Returned data: " + JSON.stringify(data)
26+
);
27+
})
28+
.catch((error: any) => console.error(error));
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Synthetics: edit a test suite returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiEditSyntheticsSuiteRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
message: "Notification message",
15+
name: "Example suite name",
16+
options: {},
17+
tags: ["env:production"],
18+
tests: [
19+
{
20+
alertingCriticality: "critical",
21+
publicId: "",
22+
},
23+
],
24+
type: "suite",
25+
},
26+
type: "suite",
27+
},
28+
},
29+
publicId: "public_id",
30+
};
31+
32+
apiInstance
33+
.editSyntheticsSuite(params)
34+
.then((data: v2.SyntheticsSuiteResponse) => {
35+
console.log(
36+
"API called successfully. Returned data: " + JSON.stringify(data)
37+
);
38+
})
39+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Synthetics: Get a suite returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SyntheticsApi(configuration);
9+
10+
const params: v2.SyntheticsApiGetSyntheticsSuiteRequest = {
11+
publicId: "public_id",
12+
};
13+
14+
apiInstance
15+
.getSyntheticsSuite(params)
16+
.then((data: v2.SyntheticsSuiteResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Search Synthetics suites returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SyntheticsApi(configuration);
9+
10+
apiInstance
11+
.searchSuites()
12+
.then((data: v2.SyntheticsSuiteSearchResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8907,6 +8907,61 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
89078907
},
89088908
"operationResponseType": "OnDemandConcurrencyCapResponse",
89098909
},
8910+
"v2.CreateSyntheticsSuite": {
8911+
"body": {
8912+
"type": "SuiteCreateEditRequest",
8913+
"format": "",
8914+
},
8915+
"operationResponseType": "SyntheticsSuiteResponse",
8916+
},
8917+
"v2.DeleteSyntheticsSuites": {
8918+
"body": {
8919+
"type": "DeletedSuitesRequestDeleteRequest",
8920+
"format": "",
8921+
},
8922+
"operationResponseType": "DeletedSuitesResponse",
8923+
},
8924+
"v2.SearchSuites": {
8925+
"query": {
8926+
"type": "string",
8927+
"format": "",
8928+
},
8929+
"sort": {
8930+
"type": "string",
8931+
"format": "",
8932+
},
8933+
"facetsOnly": {
8934+
"type": "boolean",
8935+
"format": "",
8936+
},
8937+
"start": {
8938+
"type": "number",
8939+
"format": "int64",
8940+
},
8941+
"count": {
8942+
"type": "number",
8943+
"format": "int64",
8944+
},
8945+
"operationResponseType": "SyntheticsSuiteSearchResponse",
8946+
},
8947+
"v2.GetSyntheticsSuite": {
8948+
"publicId": {
8949+
"type": "string",
8950+
"format": "",
8951+
},
8952+
"operationResponseType": "SyntheticsSuiteResponse",
8953+
},
8954+
"v2.EditSyntheticsSuite": {
8955+
"publicId": {
8956+
"type": "string",
8957+
"format": "",
8958+
},
8959+
"body": {
8960+
"type": "SuiteCreateEditRequest",
8961+
"format": "",
8962+
},
8963+
"operationResponseType": "SyntheticsSuiteResponse",
8964+
},
89108965
"v2.ListTeams": {
89118966
"pageNumber": {
89128967
"type": "number",

features/v2/synthetics.feature

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,73 @@ Feature: Synthetics
2727
When the request is sent
2828
Then the response status is 200 OK
2929
And the response "data.attributes.on_demand_concurrency_cap" is equal to 20
30+
31+
@generated @skip @team:DataDog/synthetics-managing
32+
Scenario: Search Synthetics suites returns "API error response." response
33+
Given new "SearchSuites" request
34+
When the request is sent
35+
Then the response status is 400 API error response.
36+
37+
@team:DataDog/synthetics-managing
38+
Scenario: Search Synthetics suites returns "OK" response
39+
Given new "SearchSuites" request
40+
When the request is sent
41+
Then the response status is 200 OK
42+
43+
@generated @skip @team:DataDog/synthetics-managing
44+
Scenario: Synthetics: Bulk delete suites returns "API error response." response
45+
Given new "DeleteSyntheticsSuites" request
46+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
47+
When the request is sent
48+
Then the response status is 400 API error response.
49+
50+
@generated @skip @team:DataDog/synthetics-managing
51+
Scenario: Synthetics: Bulk delete suites returns "OK" response
52+
Given new "DeleteSyntheticsSuites" request
53+
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
54+
When the request is sent
55+
Then the response status is 200 OK
56+
57+
@generated @skip @team:DataDog/synthetics-managing
58+
Scenario: Synthetics: Create a test suite returns "API error response." response
59+
Given new "CreateSyntheticsSuite" request
60+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
61+
When the request is sent
62+
Then the response status is 400 API error response.
63+
64+
@team:DataDog/synthetics-managing
65+
Scenario: Synthetics: Create a test suite returns "OK" response
66+
Given new "CreateSyntheticsSuite" request
67+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suite"}}
68+
When the request is sent
69+
Then the response status is 200 OK
70+
71+
@generated @skip @team:DataDog/synthetics-managing
72+
Scenario: Synthetics: Get a suite returns "API error response." response
73+
Given new "GetSyntheticsSuite" request
74+
And request contains "public_id" parameter from "REPLACE.ME"
75+
When the request is sent
76+
Then the response status is 404 API error response.
77+
78+
@generated @skip @team:DataDog/synthetics-managing
79+
Scenario: Synthetics: Get a suite returns "OK" response
80+
Given new "GetSyntheticsSuite" request
81+
And request contains "public_id" parameter from "REPLACE.ME"
82+
When the request is sent
83+
Then the response status is 200 OK
84+
85+
@generated @skip @team:DataDog/synthetics-managing
86+
Scenario: Synthetics: edit a test suite returns "API error response." response
87+
Given new "EditSyntheticsSuite" request
88+
And request contains "public_id" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
90+
When the request is sent
91+
Then the response status is 400 API error response.
92+
93+
@generated @skip @team:DataDog/synthetics-managing
94+
Scenario: Synthetics: edit a test suite returns "OK" response
95+
Given new "EditSyntheticsSuite" request
96+
And request contains "public_id" parameter from "REPLACE.ME"
97+
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
98+
When the request is sent
99+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4413,6 +4413,43 @@
44134413
"type": "safe"
44144414
}
44154415
},
4416+
"CreateSyntheticsSuite": {
4417+
"tag": "Synthetics",
4418+
"undo": {
4419+
"operationId": "DeleteSyntheticsSuites",
4420+
"parameters": [
4421+
{
4422+
"name": "body",
4423+
"template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ public_id }}\"]}}"
4424+
}
4425+
],
4426+
"type": "unsafe"
4427+
}
4428+
},
4429+
"DeleteSyntheticsSuites": {
4430+
"tag": "Synthetics",
4431+
"undo": {
4432+
"type": "idempotent"
4433+
}
4434+
},
4435+
"SearchSuites": {
4436+
"tag": "Synthetics",
4437+
"undo": {
4438+
"type": "safe"
4439+
}
4440+
},
4441+
"GetSyntheticsSuite": {
4442+
"tag": "Synthetics",
4443+
"undo": {
4444+
"type": "safe"
4445+
}
4446+
},
4447+
"EditSyntheticsSuite": {
4448+
"tag": "Synthetics",
4449+
"undo": {
4450+
"type": "idempotent"
4451+
}
4452+
},
44164453
"ListTagPipelinesRulesets": {
44174454
"tag": "Cloud Cost Management",
44184455
"undo": {

0 commit comments

Comments
 (0)