Skip to content

Commit 088da48

Browse files
author
ci.datadog-api-spec
committed
pre-commit fixes
1 parent 8ded1f7 commit 088da48

File tree

2,650 files changed

+90890
-91661
lines changed

Some content is hidden

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

2,650 files changed

+90890
-91661
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Validate API key returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AuthenticationApi(configuration);
9+
10+
apiInstance
11+
.validate()
12+
.then((data: v1.AuthenticationValidationResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.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+
* Create an AWS integration returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiCreateAWSAccountRequest = {
11+
body: {
12+
accountId: "1234567",
13+
accountSpecificNamespaceRules: {
14+
auto_scaling: false,
15+
opswork: false,
16+
},
17+
cspmResourceCollectionEnabled: true,
18+
excludedRegions: ["us-east-1", "us-west-2"],
19+
filterTags: ["$KEY:$VALUE"],
20+
hostTags: ["$KEY:$VALUE"],
21+
metricsCollectionEnabled: false,
22+
resourceCollectionEnabled: true,
23+
roleName: "DatadogAWSIntegrationRole",
24+
},
25+
};
26+
27+
apiInstance
28+
.createAWSAccount(params)
29+
.then((data: v1.AWSAccountCreateResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.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+
* Set an AWS tag filter returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiCreateAWSTagFilterRequest = {
11+
body: {
12+
accountId: "1234567",
13+
namespace: "elb",
14+
tagFilterStr: "prod*",
15+
},
16+
};
17+
18+
apiInstance
19+
.createAWSTagFilter(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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Generate a new external ID returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiCreateNewAWSExternalIDRequest = {
11+
body: {
12+
accountId: "1234567",
13+
accountSpecificNamespaceRules: {
14+
auto_scaling: false,
15+
opswork: false,
16+
},
17+
cspmResourceCollectionEnabled: true,
18+
excludedRegions: ["us-east-1", "us-west-2"],
19+
filterTags: ["$KEY:$VALUE"],
20+
hostTags: ["$KEY:$VALUE"],
21+
metricsCollectionEnabled: false,
22+
resourceCollectionEnabled: true,
23+
roleName: "DatadogAWSIntegrationRole",
24+
},
25+
};
26+
27+
apiInstance
28+
.createNewAWSExternalID(params)
29+
.then((data: v1.AWSAccountCreateResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.catch((error: any) => console.error(error));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Delete an AWS integration returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiDeleteAWSAccountRequest = {
11+
body: {
12+
accountId: "1234567",
13+
roleName: "DatadogAWSIntegrationRole",
14+
},
15+
};
16+
17+
apiInstance
18+
.deleteAWSAccount(params)
19+
.then((data: any) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.catch((error: any) => console.error(error));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Delete a tag filtering entry returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiDeleteAWSTagFilterRequest = {
11+
body: {
12+
accountId: "FAKEAC0FAKEAC2FAKEAC",
13+
namespace: "elb",
14+
},
15+
};
16+
17+
apiInstance
18+
.deleteAWSTagFilter(params)
19+
.then((data: any) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.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+
* List all AWS integrations returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
apiInstance
11+
.listAWSAccounts()
12+
.then((data: v1.AWSAccountListResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.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+
* Get all AWS tag filters returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiListAWSTagFiltersRequest = {
11+
accountId: "account_id",
12+
};
13+
14+
apiInstance
15+
.listAWSTagFilters(params)
16+
.then((data: v1.AWSTagFilterListResponse) => {
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+
* List namespace rules returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
apiInstance
11+
.listAvailableAWSNamespaces()
12+
.then((data: string[]) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.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 an AWS integration returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSIntegrationApi(configuration);
9+
10+
const params: v1.AWSIntegrationApiUpdateAWSAccountRequest = {
11+
body: {
12+
accountId: "123456789012",
13+
accountSpecificNamespaceRules: {
14+
auto_scaling: false,
15+
},
16+
cspmResourceCollectionEnabled: true,
17+
excludedRegions: ["us-east-1", "us-west-2"],
18+
filterTags: ["$KEY:$VALUE"],
19+
hostTags: ["$KEY:$VALUE"],
20+
metricsCollectionEnabled: false,
21+
resourceCollectionEnabled: true,
22+
roleName: "datadog-role",
23+
},
24+
accountId: "123456789012",
25+
roleName: "datadog-role",
26+
};
27+
28+
apiInstance
29+
.updateAWSAccount(params)
30+
.then((data: any) => {
31+
console.log(
32+
"API called successfully. Returned data: " + JSON.stringify(data)
33+
);
34+
})
35+
.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+
* Check that an AWS Lambda Function exists returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
9+
10+
const params: v1.AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest = {
11+
body: {
12+
accountId: "1234567",
13+
lambdaArn:
14+
"arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
15+
},
16+
};
17+
18+
apiInstance
19+
.checkAWSLogsLambdaAsync(params)
20+
.then((data: v1.AWSLogsAsyncResponse) => {
21+
console.log(
22+
"API called successfully. Returned data: " + JSON.stringify(data)
23+
);
24+
})
25+
.catch((error: any) => console.error(error));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Check permissions for log services returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
9+
10+
const params: v1.AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest = {
11+
body: {
12+
accountId: "1234567",
13+
services: ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"],
14+
},
15+
};
16+
17+
apiInstance
18+
.checkAWSLogsServicesAsync(params)
19+
.then((data: v1.AWSLogsAsyncResponse) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.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+
* Add AWS Log Lambda ARN returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
9+
10+
const params: v1.AWSLogsIntegrationApiCreateAWSLambdaARNRequest = {
11+
body: {
12+
accountId: "1234567",
13+
lambdaArn:
14+
"arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
15+
},
16+
};
17+
18+
apiInstance
19+
.createAWSLambdaARN(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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Delete an AWS Logs integration returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
9+
10+
const params: v1.AWSLogsIntegrationApiDeleteAWSLambdaARNRequest = {
11+
body: {
12+
accountId: "1234567",
13+
lambdaArn:
14+
"arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
15+
},
16+
};
17+
18+
apiInstance
19+
.deleteAWSLambdaARN(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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Enable an AWS Logs integration returns "OK" response
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
9+
10+
const params: v1.AWSLogsIntegrationApiEnableAWSLogServicesRequest = {
11+
body: {
12+
accountId: "1234567",
13+
services: ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"],
14+
},
15+
};
16+
17+
apiInstance
18+
.enableAWSLogServices(params)
19+
.then((data: any) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)