Skip to content

Commit 4f97736

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6ee0878 of spec repo
1 parent 3ad7222 commit 4f97736

68 files changed

Lines changed: 7203 additions & 70 deletions

File tree

Some content is hidden

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

.generator/schemas/v2/openapi.yaml

Lines changed: 1679 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Mitigate governance detections returns "Accepted" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createGovernanceMitigation"] = true;
9+
const apiInstance = new v2.GovernanceControlsApi(configuration);
10+
11+
const params: v2.GovernanceControlsApiCreateGovernanceMitigationRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
detectionIds: ["3f9b2c1a-8d4e-4a6b-9c2f-1e7d5a0b3c4d"],
16+
detectionType: "unused_api_keys",
17+
mitigationType: "revoke_api_key",
18+
},
19+
type: "governance_control_detection",
20+
},
21+
},
22+
};
23+
24+
apiInstance
25+
.createGovernanceMitigation(params)
26+
.then((data: any) => {
27+
console.log(
28+
"API called successfully. Returned data: " + JSON.stringify(data)
29+
);
30+
})
31+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Get a governance control detection returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getGovernanceControlDetection"] = true;
9+
const apiInstance = new v2.GovernanceControlsApi(configuration);
10+
11+
const params: v2.GovernanceControlsApiGetGovernanceControlDetectionRequest = {
12+
detectionType: "detection_type",
13+
detectionId: "detection_id",
14+
};
15+
16+
apiInstance
17+
.getGovernanceControlDetection(params)
18+
.then((data: v2.GovernanceControlDetectionResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.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 governance control notification settings returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations[
9+
"v2.getGovernanceControlNotificationSettings"
10+
] = true;
11+
const apiInstance = new v2.GovernanceControlsApi(configuration);
12+
13+
const params: v2.GovernanceControlsApiGetGovernanceControlNotificationSettingsRequest =
14+
{
15+
detectionType: "detection_type",
16+
};
17+
18+
apiInstance
19+
.getGovernanceControlNotificationSettings(params)
20+
.then((data: v2.ControlNotificationSettingsResponse) => {
21+
console.log(
22+
"API called successfully. Returned data: " + JSON.stringify(data)
23+
);
24+
})
25+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* List governance control detections returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listGovernanceControlDetections"] = true;
9+
const apiInstance = new v2.GovernanceControlsApi(configuration);
10+
11+
const params: v2.GovernanceControlsApiListGovernanceControlDetectionsRequest = {
12+
detectionType: "detection_type",
13+
};
14+
15+
apiInstance
16+
.listGovernanceControlDetections(params)
17+
.then((data: v2.GovernanceControlDetectionsResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* Update a governance control detection returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateGovernanceControlDetection"] = true;
9+
const apiInstance = new v2.GovernanceControlsApi(configuration);
10+
11+
const params: v2.GovernanceControlsApiUpdateGovernanceControlDetectionRequest =
12+
{
13+
body: {
14+
data: {
15+
attributes: {
16+
assignedTeam: "platform-security",
17+
assignedTo: "11111111-2222-3333-4444-555555555555",
18+
mitigateAfter: new Date(2024, 3, 15, 0, 0, 0, 0),
19+
state: "exception",
20+
},
21+
type: "governance_control_detection",
22+
},
23+
},
24+
detectionType: "detection_type",
25+
detectionId: "detection_id",
26+
};
27+
28+
apiInstance
29+
.updateGovernanceControlDetection(params)
30+
.then((data: v2.GovernanceControlDetectionResponse) => {
31+
console.log(
32+
"API called successfully. Returned data: " + JSON.stringify(data)
33+
);
34+
})
35+
.catch((error: any) => console.error(error));
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Update governance control notification settings returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations[
9+
"v2.updateGovernanceControlNotificationSettings"
10+
] = true;
11+
const apiInstance = new v2.GovernanceControlsApi(configuration);
12+
13+
const params: v2.GovernanceControlsApiUpdateGovernanceControlNotificationSettingsRequest =
14+
{
15+
body: {
16+
data: {
17+
attributes: {
18+
eventSettings: [
19+
{
20+
enabled: true,
21+
eventType: "new_detection",
22+
targets: [
23+
{
24+
handle: "#governance-alerts",
25+
type: "slack",
26+
},
27+
],
28+
},
29+
],
30+
},
31+
type: "control_notification_settings",
32+
},
33+
},
34+
detectionType: "detection_type",
35+
};
36+
37+
apiInstance
38+
.updateGovernanceControlNotificationSettings(params)
39+
.then((data: v2.ControlNotificationSettingsResponse) => {
40+
console.log(
41+
"API called successfully. Returned data: " + JSON.stringify(data)
42+
);
43+
})
44+
.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+
* Get the governance console configuration returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getGovernanceConfig"] = true;
9+
const apiInstance = new v2.GovernanceSettingsApi(configuration);
10+
11+
apiInstance
12+
.getGovernanceConfig()
13+
.then((data: v2.GovernanceConfigResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.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+
* Get governance notification settings returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getGovernanceNotificationSettings"] = true;
9+
const apiInstance = new v2.GovernanceSettingsApi(configuration);
10+
11+
apiInstance
12+
.getGovernanceNotificationSettings()
13+
.then((data: v2.GovernanceNotificationSettingsResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.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 governance limits returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listGovernanceLimits"] = true;
9+
const apiInstance = new v2.GovernanceSettingsApi(configuration);
10+
11+
apiInstance
12+
.listGovernanceLimits()
13+
.then((data: v2.GovernanceLimitsResponse) => {
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)