Skip to content

Commit 2a8bdda

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a4861ac of spec repo
1 parent 64e5402 commit 2a8bdda

File tree

48 files changed

+5200
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5200
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 849 additions & 2 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Create deployment gate returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createDeploymentGate"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
const params: v2.DeploymentGatesApiCreateDeploymentGateRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
dryRun: false,
16+
env: "production",
17+
identifier: "my-gate",
18+
service: "my-service",
19+
},
20+
type: "deployment_gate",
21+
},
22+
},
23+
};
24+
25+
apiInstance
26+
.createDeploymentGate(params)
27+
.then((data: v2.DeploymentGateResponse) => {
28+
console.log(
29+
"API called successfully. Returned data: " + JSON.stringify(data)
30+
);
31+
})
32+
.catch((error: any) => console.error(error));
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Create deployment rule returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createDeploymentRule"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
const params: v2.DeploymentGatesApiCreateDeploymentRuleRequest = {
15+
body: {
16+
data: {
17+
attributes: {
18+
dryRun: false,
19+
name: "My deployment rule",
20+
options: {
21+
excludedResources: [],
22+
},
23+
type: "faulty_deployment_detection",
24+
},
25+
type: "deployment_rule",
26+
},
27+
},
28+
gateId: DEPLOYMENT_GATE_DATA_ID,
29+
};
30+
31+
apiInstance
32+
.createDeploymentRule(params)
33+
.then((data: v2.DeploymentRuleResponse) => {
34+
console.log(
35+
"API called successfully. Returned data: " + JSON.stringify(data)
36+
);
37+
})
38+
.catch((error: any) => console.error(error));
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Delete deployment gate returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteDeploymentGate"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
const params: v2.DeploymentGatesApiDeleteDeploymentGateRequest = {
15+
id: DEPLOYMENT_GATE_DATA_ID,
16+
};
17+
18+
apiInstance
19+
.deleteDeploymentGate(params)
20+
.then((data: any) => {
21+
console.log(
22+
"API called successfully. Returned data: " + JSON.stringify(data)
23+
);
24+
})
25+
.catch((error: any) => console.error(error));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Delete deployment rule returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteDeploymentRule"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
// there is a valid "deployment_rule" in the system
15+
const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string;
16+
17+
const params: v2.DeploymentGatesApiDeleteDeploymentRuleRequest = {
18+
gateId: DEPLOYMENT_GATE_DATA_ID,
19+
id: DEPLOYMENT_RULE_DATA_ID,
20+
};
21+
22+
apiInstance
23+
.deleteDeploymentRule(params)
24+
.then((data: any) => {
25+
console.log(
26+
"API called successfully. Returned data: " + JSON.stringify(data)
27+
);
28+
})
29+
.catch((error: any) => console.error(error));
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Get deployment gate returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getDeploymentGate"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
const params: v2.DeploymentGatesApiGetDeploymentGateRequest = {
15+
id: DEPLOYMENT_GATE_DATA_ID,
16+
};
17+
18+
apiInstance
19+
.getDeploymentGate(params)
20+
.then((data: v2.DeploymentGateResponse) => {
21+
console.log(
22+
"API called successfully. Returned data: " + JSON.stringify(data)
23+
);
24+
})
25+
.catch((error: any) => console.error(error));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Get deployment rule returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getDeploymentRule"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
// there is a valid "deployment_rule" in the system
15+
const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string;
16+
17+
const params: v2.DeploymentGatesApiGetDeploymentRuleRequest = {
18+
gateId: DEPLOYMENT_GATE_DATA_ID,
19+
id: DEPLOYMENT_RULE_DATA_ID,
20+
};
21+
22+
apiInstance
23+
.getDeploymentRule(params)
24+
.then((data: v2.DeploymentRuleResponse) => {
25+
console.log(
26+
"API called successfully. Returned data: " + JSON.stringify(data)
27+
);
28+
})
29+
.catch((error: any) => console.error(error));
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Update deployment gate returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateDeploymentGate"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
const params: v2.DeploymentGatesApiUpdateDeploymentGateRequest = {
15+
body: {
16+
data: {
17+
attributes: {
18+
dryRun: false,
19+
},
20+
id: "12345678-1234-1234-1234-123456789012",
21+
type: "deployment_gate",
22+
},
23+
},
24+
id: DEPLOYMENT_GATE_DATA_ID,
25+
};
26+
27+
apiInstance
28+
.updateDeploymentGate(params)
29+
.then((data: v2.DeploymentGateResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.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+
* Update deployment rule returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateDeploymentRule"] = true;
9+
const apiInstance = new v2.DeploymentGatesApi(configuration);
10+
11+
// there is a valid "deployment_gate" in the system
12+
const DEPLOYMENT_GATE_DATA_ID = process.env.DEPLOYMENT_GATE_DATA_ID as string;
13+
14+
// there is a valid "deployment_rule" in the system
15+
const DEPLOYMENT_RULE_DATA_ID = process.env.DEPLOYMENT_RULE_DATA_ID as string;
16+
17+
const params: v2.DeploymentGatesApiUpdateDeploymentRuleRequest = {
18+
body: {
19+
data: {
20+
attributes: {
21+
dryRun: false,
22+
name: "Updated deployment rule",
23+
options: {
24+
excludedResources: [],
25+
},
26+
},
27+
type: "deployment_rule",
28+
},
29+
},
30+
gateId: DEPLOYMENT_GATE_DATA_ID,
31+
id: DEPLOYMENT_RULE_DATA_ID,
32+
};
33+
34+
apiInstance
35+
.updateDeploymentRule(params)
36+
.then((data: v2.DeploymentRuleResponse) => {
37+
console.log(
38+
"API called successfully. Returned data: " + JSON.stringify(data)
39+
);
40+
})
41+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5240,6 +5240,86 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
52405240
},
52415241
"operationResponseType": "CancelDataDeletionResponseBody",
52425242
},
5243+
"v2.CreateDeploymentGate": {
5244+
"body": {
5245+
"type": "CreateDeploymentGateParams",
5246+
"format": "",
5247+
},
5248+
"operationResponseType": "DeploymentGateResponse",
5249+
},
5250+
"v2.CreateDeploymentRule": {
5251+
"gateId": {
5252+
"type": "string",
5253+
"format": "",
5254+
},
5255+
"body": {
5256+
"type": "CreateDeploymentRuleParams",
5257+
"format": "",
5258+
},
5259+
"operationResponseType": "DeploymentRuleResponse",
5260+
},
5261+
"v2.GetDeploymentRule": {
5262+
"gateId": {
5263+
"type": "string",
5264+
"format": "",
5265+
},
5266+
"id": {
5267+
"type": "string",
5268+
"format": "",
5269+
},
5270+
"operationResponseType": "DeploymentRuleResponse",
5271+
},
5272+
"v2.UpdateDeploymentRule": {
5273+
"gateId": {
5274+
"type": "string",
5275+
"format": "",
5276+
},
5277+
"id": {
5278+
"type": "string",
5279+
"format": "",
5280+
},
5281+
"body": {
5282+
"type": "UpdateDeploymentRuleParams",
5283+
"format": "",
5284+
},
5285+
"operationResponseType": "DeploymentRuleResponse",
5286+
},
5287+
"v2.DeleteDeploymentRule": {
5288+
"gateId": {
5289+
"type": "string",
5290+
"format": "",
5291+
},
5292+
"id": {
5293+
"type": "string",
5294+
"format": "",
5295+
},
5296+
"operationResponseType": "{}",
5297+
},
5298+
"v2.GetDeploymentGate": {
5299+
"id": {
5300+
"type": "string",
5301+
"format": "",
5302+
},
5303+
"operationResponseType": "DeploymentGateResponse",
5304+
},
5305+
"v2.UpdateDeploymentGate": {
5306+
"id": {
5307+
"type": "string",
5308+
"format": "",
5309+
},
5310+
"body": {
5311+
"type": "UpdateDeploymentGateParams",
5312+
"format": "",
5313+
},
5314+
"operationResponseType": "DeploymentGateResponse",
5315+
},
5316+
"v2.DeleteDeploymentGate": {
5317+
"id": {
5318+
"type": "string",
5319+
"format": "",
5320+
},
5321+
"operationResponseType": "{}",
5322+
},
52435323
"v2.GetDomainAllowlist": {
52445324
"operationResponseType": "DomainAllowlistResponse",
52455325
},

0 commit comments

Comments
 (0)