Skip to content

Commit bcbff25

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a7f7c3e of spec repo
1 parent b7b888c commit bcbff25

34 files changed

+2550
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 441 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
alerting: {},
18+
},
19+
tags: ["env:production"],
20+
tests: [
21+
{
22+
alertingCriticality: "critical",
23+
publicId: "",
24+
},
25+
],
26+
type: "suite",
27+
},
28+
type: "suite",
29+
},
30+
},
31+
};
32+
33+
apiInstance
34+
.createSyntheticsSuite(params)
35+
.then((data: v2.SyntheticsSuiteResponse) => {
36+
console.log(
37+
"API called successfully. Returned data: " + JSON.stringify(data)
38+
);
39+
})
40+
.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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
alerting: {},
18+
},
19+
tags: ["env:production"],
20+
tests: [
21+
{
22+
alertingCriticality: "critical",
23+
publicId: "",
24+
},
25+
],
26+
type: "suite",
27+
},
28+
type: "suite",
29+
},
30+
},
31+
publicId: "public_id",
32+
};
33+
34+
apiInstance
35+
.editSyntheticsSuite(params)
36+
.then((data: v2.SyntheticsSuiteResponse) => {
37+
console.log(
38+
"API called successfully. Returned data: " + JSON.stringify(data)
39+
);
40+
})
41+
.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
@@ -8725,6 +8725,61 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
87258725
},
87268726
"operationResponseType": "OnDemandConcurrencyCapResponse",
87278727
},
8728+
"v2.CreateSyntheticsSuite": {
8729+
"body": {
8730+
"type": "SuiteCreateEditRequest",
8731+
"format": "",
8732+
},
8733+
"operationResponseType": "SyntheticsSuiteResponse",
8734+
},
8735+
"v2.DeleteSyntheticsSuites": {
8736+
"body": {
8737+
"type": "DeletedSuitesRequestDeleteRequest",
8738+
"format": "",
8739+
},
8740+
"operationResponseType": "DeletedSuitesResponse",
8741+
},
8742+
"v2.SearchSuites": {
8743+
"query": {
8744+
"type": "string",
8745+
"format": "",
8746+
},
8747+
"sort": {
8748+
"type": "string",
8749+
"format": "",
8750+
},
8751+
"facetsOnly": {
8752+
"type": "boolean",
8753+
"format": "",
8754+
},
8755+
"start": {
8756+
"type": "number",
8757+
"format": "int64",
8758+
},
8759+
"count": {
8760+
"type": "number",
8761+
"format": "int64",
8762+
},
8763+
"operationResponseType": "SyntheticsSuiteSearchResponse",
8764+
},
8765+
"v2.GetSyntheticsSuite": {
8766+
"publicId": {
8767+
"type": "string",
8768+
"format": "",
8769+
},
8770+
"operationResponseType": "SyntheticsSuiteResponse",
8771+
},
8772+
"v2.EditSyntheticsSuite": {
8773+
"publicId": {
8774+
"type": "string",
8775+
"format": "",
8776+
},
8777+
"body": {
8778+
"type": "SuiteCreateEditRequest",
8779+
"format": "",
8780+
},
8781+
"operationResponseType": "SyntheticsSuiteResponse",
8782+
},
87288783
"v2.ListTeams": {
87298784
"pageNumber": {
87308785
"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+
@generated @skip @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": {"alerting": {}}, "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+
@generated @skip @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": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "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": {"alerting": {}}, "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": {"alerting": {}}, "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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,6 +4284,40 @@
42844284
"type": "safe"
42854285
}
42864286
},
4287+
"CreateSyntheticsSuite": {
4288+
"tag": "Synthetics",
4289+
"undo": {
4290+
"operationId": "TODO",
4291+
"parameters": [],
4292+
"type": "unsafe"
4293+
}
4294+
},
4295+
"DeleteSyntheticsSuites": {
4296+
"tag": "Synthetics",
4297+
"undo": {
4298+
"operationId": "TODO",
4299+
"parameters": [],
4300+
"type": "unsafe"
4301+
}
4302+
},
4303+
"SearchSuites": {
4304+
"tag": "Synthetics",
4305+
"undo": {
4306+
"type": "safe"
4307+
}
4308+
},
4309+
"GetSyntheticsSuite": {
4310+
"tag": "Synthetics",
4311+
"undo": {
4312+
"type": "safe"
4313+
}
4314+
},
4315+
"EditSyntheticsSuite": {
4316+
"tag": "Synthetics",
4317+
"undo": {
4318+
"type": "idempotent"
4319+
}
4320+
},
42874321
"ListTagPipelinesRulesets": {
42884322
"tag": "Cloud Cost Management",
42894323
"undo": {

0 commit comments

Comments
 (0)