diff --git a/.apigentools-info b/.apigentools-info
index 8fd2082b5e59..cc3d6fe193df 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2025-03-31 17:39:57.837620",
- "spec_repo_commit": "3826157e"
+ "regenerated": "2025-04-01 16:28:05.429347",
+ "spec_repo_commit": "ad0591f6"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2025-03-31 17:39:57.854596",
- "spec_repo_commit": "3826157e"
+ "regenerated": "2025-04-01 16:28:05.444990",
+ "spec_repo_commit": "ad0591f6"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml
index 6c4f6966d1ad..faa68a8f984d 100644
--- a/.generator/schemas/v1/openapi.yaml
+++ b/.generator/schemas/v1/openapi.yaml
@@ -24076,7 +24076,7 @@ components:
an organization. Mute and unmute monitors. The ability to write monitors
is not required to set downtimes.
monitors_read: View monitors.
- monitors_write: Edit and delete individual monitors.
+ monitors_write: Edit, delete, and resolve individual monitors.
org_management: Edit org configurations, including authentication and
certain security preferences such as configuring SAML, renaming an org,
configuring allowed login methods, creating child orgs, subscribing
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 4aacf7eab58b..a826c938cf49 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -33942,7 +33942,7 @@ components:
an organization. Mute and unmute monitors. The ability to write monitors
is not required to set downtimes.
monitors_read: View monitors.
- monitors_write: Edit and delete individual monitors.
+ monitors_write: Edit, delete, and resolve individual monitors.
org_management: Edit org configurations, including authentication and
certain security preferences such as configuring SAML, renaming an org,
configuring allowed login methods, creating child orgs, subscribing
diff --git a/examples/v1/authentication/Validate.ts b/examples/v1/authentication/Validate.ts
deleted file mode 100644
index 1851c19492da..000000000000
--- a/examples/v1/authentication/Validate.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Validate API key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AuthenticationApi(configuration);
-
-apiInstance
- .validate()
- .then((data: v1.AuthenticationValidationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/CreateAWSAccount.ts b/examples/v1/aws-integration/CreateAWSAccount.ts
deleted file mode 100644
index 0dd8e3d2143e..000000000000
--- a/examples/v1/aws-integration/CreateAWSAccount.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create an AWS integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiCreateAWSAccountRequest = {
- body: {
- accountId: "163662907100",
- accountSpecificNamespaceRules: {
- auto_scaling: false,
- },
- cspmResourceCollectionEnabled: true,
- excludedRegions: ["us-east-1", "us-west-2"],
- extendedResourceCollectionEnabled: true,
- filterTags: ["$KEY:$VALUE"],
- hostTags: ["$KEY:$VALUE"],
- metricsCollectionEnabled: false,
- roleName: "DatadogAWSIntegrationRole",
- },
-};
-
-apiInstance
- .createAWSAccount(params)
- .then((data: v1.AWSAccountCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/CreateAWSEventBridgeSource.ts b/examples/v1/aws-integration/CreateAWSEventBridgeSource.ts
deleted file mode 100644
index 6e2534cca1e1..000000000000
--- a/examples/v1/aws-integration/CreateAWSEventBridgeSource.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Create an Amazon EventBridge source returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiCreateAWSEventBridgeSourceRequest = {
- body: {
- accountId: "123456789012",
- createEventBus: true,
- eventGeneratorName: "app-alerts",
- region: "us-east-1",
- },
-};
-
-apiInstance
- .createAWSEventBridgeSource(params)
- .then((data: v1.AWSEventBridgeCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/CreateAWSTagFilter.ts b/examples/v1/aws-integration/CreateAWSTagFilter.ts
deleted file mode 100644
index 1558ae1741eb..000000000000
--- a/examples/v1/aws-integration/CreateAWSTagFilter.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Set an AWS tag filter returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiCreateAWSTagFilterRequest = {
- body: {
- accountId: "123456789012",
- namespace: "elb",
- tagFilterStr: "prod*",
- },
-};
-
-apiInstance
- .createAWSTagFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/CreateNewAWSExternalID.ts b/examples/v1/aws-integration/CreateNewAWSExternalID.ts
deleted file mode 100644
index 6aa2162c4425..000000000000
--- a/examples/v1/aws-integration/CreateNewAWSExternalID.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Generate a new external ID returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiCreateNewAWSExternalIDRequest = {
- body: {
- accountId: "123456789012",
- accountSpecificNamespaceRules: {
- auto_scaling: false,
- opswork: false,
- },
- cspmResourceCollectionEnabled: true,
- excludedRegions: ["us-east-1", "us-west-2"],
- extendedResourceCollectionEnabled: true,
- filterTags: ["$KEY:$VALUE"],
- hostTags: ["$KEY:$VALUE"],
- metricsCollectionEnabled: false,
- resourceCollectionEnabled: true,
- roleName: "DatadogAWSIntegrationRole",
- },
-};
-
-apiInstance
- .createNewAWSExternalID(params)
- .then((data: v1.AWSAccountCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/DeleteAWSAccount.ts b/examples/v1/aws-integration/DeleteAWSAccount.ts
deleted file mode 100644
index a65ad825a069..000000000000
--- a/examples/v1/aws-integration/DeleteAWSAccount.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an AWS integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiDeleteAWSAccountRequest = {
- body: {
- accountId: "163662907100",
- roleName: "DatadogAWSIntegrationRole",
- },
-};
-
-apiInstance
- .deleteAWSAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/DeleteAWSEventBridgeSource.ts b/examples/v1/aws-integration/DeleteAWSEventBridgeSource.ts
deleted file mode 100644
index a5dddcedfc70..000000000000
--- a/examples/v1/aws-integration/DeleteAWSEventBridgeSource.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an Amazon EventBridge source returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiDeleteAWSEventBridgeSourceRequest = {
- body: {
- accountId: "123456789012",
- eventGeneratorName: "app-alerts-zyxw3210",
- region: "us-east-1",
- },
-};
-
-apiInstance
- .deleteAWSEventBridgeSource(params)
- .then((data: v1.AWSEventBridgeDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/DeleteAWSTagFilter.ts b/examples/v1/aws-integration/DeleteAWSTagFilter.ts
deleted file mode 100644
index f16e0db7b5c0..000000000000
--- a/examples/v1/aws-integration/DeleteAWSTagFilter.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a tag filtering entry returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiDeleteAWSTagFilterRequest = {
- body: {
- accountId: "FAKEAC0FAKEAC2FAKEAC",
- namespace: "elb",
- },
-};
-
-apiInstance
- .deleteAWSTagFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/ListAWSAccounts.ts b/examples/v1/aws-integration/ListAWSAccounts.ts
deleted file mode 100644
index 21fe77dbaffa..000000000000
--- a/examples/v1/aws-integration/ListAWSAccounts.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all AWS integrations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAWSAccounts()
- .then((data: v1.AWSAccountListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/ListAWSEventBridgeSources.ts b/examples/v1/aws-integration/ListAWSEventBridgeSources.ts
deleted file mode 100644
index 7b1503ba8716..000000000000
--- a/examples/v1/aws-integration/ListAWSEventBridgeSources.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all Amazon EventBridge sources returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAWSEventBridgeSources()
- .then((data: v1.AWSEventBridgeListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/ListAWSTagFilters.ts b/examples/v1/aws-integration/ListAWSTagFilters.ts
deleted file mode 100644
index ce18a0351c05..000000000000
--- a/examples/v1/aws-integration/ListAWSTagFilters.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all AWS tag filters returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiListAWSTagFiltersRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .listAWSTagFilters(params)
- .then((data: v1.AWSTagFilterListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/ListAvailableAWSNamespaces.ts b/examples/v1/aws-integration/ListAvailableAWSNamespaces.ts
deleted file mode 100644
index 00732ae9d697..000000000000
--- a/examples/v1/aws-integration/ListAvailableAWSNamespaces.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List namespace rules returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAvailableAWSNamespaces()
- .then((data: string[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-integration/UpdateAWSAccount.ts b/examples/v1/aws-integration/UpdateAWSAccount.ts
deleted file mode 100644
index c4b9bcfd3570..000000000000
--- a/examples/v1/aws-integration/UpdateAWSAccount.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update an AWS integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSIntegrationApi(configuration);
-
-const params: v1.AWSIntegrationApiUpdateAWSAccountRequest = {
- body: {
- accountId: "163662907100",
- accountSpecificNamespaceRules: {
- auto_scaling: false,
- },
- cspmResourceCollectionEnabled: false,
- excludedRegions: ["us-east-1", "us-west-2"],
- extendedResourceCollectionEnabled: true,
- filterTags: ["$KEY:$VALUE"],
- hostTags: ["$KEY:$VALUE"],
- metricsCollectionEnabled: true,
- roleName: "DatadogAWSIntegrationRole",
- },
- accountId: "163662907100",
- roleName: "DatadogAWSIntegrationRole",
-};
-
-apiInstance
- .updateAWSAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.ts b/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.ts
deleted file mode 100644
index 9ac8c5e0914a..000000000000
--- a/examples/v1/aws-logs-integration/CheckAWSLogsLambdaAsync.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Check that an AWS Lambda Function exists returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-const params: v1.AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest = {
- body: {
- accountId: "1234567",
- lambdaArn:
- "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
- },
-};
-
-apiInstance
- .checkAWSLogsLambdaAsync(params)
- .then((data: v1.AWSLogsAsyncResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.ts b/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.ts
deleted file mode 100644
index 9f57802fe351..000000000000
--- a/examples/v1/aws-logs-integration/CheckAWSLogsServicesAsync.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Check permissions for log services returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-const params: v1.AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest = {
- body: {
- accountId: "1234567",
- services: ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"],
- },
-};
-
-apiInstance
- .checkAWSLogsServicesAsync(params)
- .then((data: v1.AWSLogsAsyncResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/CreateAWSLambdaARN.ts b/examples/v1/aws-logs-integration/CreateAWSLambdaARN.ts
deleted file mode 100644
index d90c13b545f5..000000000000
--- a/examples/v1/aws-logs-integration/CreateAWSLambdaARN.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Add AWS Log Lambda ARN returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-const params: v1.AWSLogsIntegrationApiCreateAWSLambdaARNRequest = {
- body: {
- accountId: "1234567",
- lambdaArn:
- "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
- },
-};
-
-apiInstance
- .createAWSLambdaARN(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.ts b/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.ts
deleted file mode 100644
index e2e8cababad4..000000000000
--- a/examples/v1/aws-logs-integration/DeleteAWSLambdaARN.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an AWS Logs integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-const params: v1.AWSLogsIntegrationApiDeleteAWSLambdaARNRequest = {
- body: {
- accountId: "1234567",
- lambdaArn:
- "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest",
- },
-};
-
-apiInstance
- .deleteAWSLambdaARN(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/EnableAWSLogServices.ts b/examples/v1/aws-logs-integration/EnableAWSLogServices.ts
deleted file mode 100644
index c0ea38d27faf..000000000000
--- a/examples/v1/aws-logs-integration/EnableAWSLogServices.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Enable an AWS Logs integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-const params: v1.AWSLogsIntegrationApiEnableAWSLogServicesRequest = {
- body: {
- accountId: "1234567",
- services: ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"],
- },
-};
-
-apiInstance
- .enableAWSLogServices(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.ts b/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.ts
deleted file mode 100644
index 455b2b0b6503..000000000000
--- a/examples/v1/aws-logs-integration/ListAWSLogsIntegrations.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all AWS Logs integrations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-apiInstance
- .listAWSLogsIntegrations()
- .then((data: v1.AWSLogsListResponse[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/aws-logs-integration/ListAWSLogsServices.ts b/examples/v1/aws-logs-integration/ListAWSLogsServices.ts
deleted file mode 100644
index 1b19238501f2..000000000000
--- a/examples/v1/aws-logs-integration/ListAWSLogsServices.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get list of AWS log ready services returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
-
-apiInstance
- .listAWSLogsServices()
- .then((data: v1.AWSLogsListServicesResponse[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/azure-integration/CreateAzureIntegration.ts b/examples/v1/azure-integration/CreateAzureIntegration.ts
deleted file mode 100644
index 5521a094f356..000000000000
--- a/examples/v1/azure-integration/CreateAzureIntegration.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Create an Azure integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AzureIntegrationApi(configuration);
-
-const params: v1.AzureIntegrationApiCreateAzureIntegrationRequest = {
- body: {
- appServicePlanFilters: "key:value,filter:example",
- automute: true,
- clientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- clientSecret: "TestingRh2nx664kUy5dIApvM54T4AtO",
- containerAppFilters: "key:value,filter:example",
- cspmEnabled: true,
- customMetricsEnabled: true,
- errors: ["*"],
- hostFilters: "key:value,filter:example",
- newClientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- newTenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- resourceCollectionEnabled: true,
- tenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- },
-};
-
-apiInstance
- .createAzureIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/azure-integration/DeleteAzureIntegration.ts b/examples/v1/azure-integration/DeleteAzureIntegration.ts
deleted file mode 100644
index 443bbabc265d..000000000000
--- a/examples/v1/azure-integration/DeleteAzureIntegration.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an Azure integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AzureIntegrationApi(configuration);
-
-const params: v1.AzureIntegrationApiDeleteAzureIntegrationRequest = {
- body: {
- clientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- tenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- },
-};
-
-apiInstance
- .deleteAzureIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/azure-integration/ListAzureIntegration.ts b/examples/v1/azure-integration/ListAzureIntegration.ts
deleted file mode 100644
index c0a5100a88e7..000000000000
--- a/examples/v1/azure-integration/ListAzureIntegration.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all Azure integrations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AzureIntegrationApi(configuration);
-
-apiInstance
- .listAzureIntegration()
- .then((data: v1.AzureAccount[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.ts b/examples/v1/azure-integration/UpdateAzureHostFilters.ts
deleted file mode 100644
index a1e4ab762662..000000000000
--- a/examples/v1/azure-integration/UpdateAzureHostFilters.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Update Azure integration host filters returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AzureIntegrationApi(configuration);
-
-const params: v1.AzureIntegrationApiUpdateAzureHostFiltersRequest = {
- body: {
- appServicePlanFilters: "key:value,filter:example",
- automute: true,
- clientId: "testc7f6-1234-5678-9101-3fcbf464test",
- clientSecret: "TestingRh2nx664kUy5dIApvM54T4AtO",
- containerAppFilters: "key:value,filter:example",
- cspmEnabled: true,
- customMetricsEnabled: true,
- errors: ["*"],
- hostFilters: "key:value,filter:example",
- metricsEnabled: true,
- metricsEnabledDefault: true,
- newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",
- newTenantName: "new1c44-1234-5678-9101-cc00736ftest",
- resourceCollectionEnabled: true,
- resourceProviderConfigs: [
- {
- metricsEnabled: true,
- namespace: "Microsoft.Compute",
- },
- ],
- tenantName: "testc44-1234-5678-9101-cc00736ftest",
- usageMetricsEnabled: true,
- },
-};
-
-apiInstance
- .updateAzureHostFilters(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.ts b/examples/v1/azure-integration/UpdateAzureIntegration.ts
deleted file mode 100644
index 68e8e88564a3..000000000000
--- a/examples/v1/azure-integration/UpdateAzureIntegration.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update an Azure integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.AzureIntegrationApi(configuration);
-
-const params: v1.AzureIntegrationApiUpdateAzureIntegrationRequest = {
- body: {
- appServicePlanFilters: "key:value,filter:example",
- automute: true,
- clientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- clientSecret: "TestingRh2nx664kUy5dIApvM54T4AtO",
- containerAppFilters: "key:value,filter:example",
- cspmEnabled: true,
- customMetricsEnabled: true,
- errors: ["*"],
- hostFilters: "key:value,filter:example",
- newClientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- newTenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- resourceCollectionEnabled: true,
- tenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
- },
-};
-
-apiInstance
- .updateAzureIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboard-lists/CreateDashboardList.ts b/examples/v1/dashboard-lists/CreateDashboardList.ts
deleted file mode 100644
index a8b5425e2d15..000000000000
--- a/examples/v1/dashboard-lists/CreateDashboardList.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Create a dashboard list returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardListsApi(configuration);
-
-const params: v1.DashboardListsApiCreateDashboardListRequest = {
- body: {
- name: "Example-Dashboard-List",
- },
-};
-
-apiInstance
- .createDashboardList(params)
- .then((data: v1.DashboardList) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboard-lists/DeleteDashboardList.ts b/examples/v1/dashboard-lists/DeleteDashboardList.ts
deleted file mode 100644
index ca490d0566b0..000000000000
--- a/examples/v1/dashboard-lists/DeleteDashboardList.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a dashboard list returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-const params: v1.DashboardListsApiDeleteDashboardListRequest = {
- listId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .deleteDashboardList(params)
- .then((data: v1.DashboardListDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboard-lists/GetDashboardList.ts b/examples/v1/dashboard-lists/GetDashboardList.ts
deleted file mode 100644
index e2732aa2ae7f..000000000000
--- a/examples/v1/dashboard-lists/GetDashboardList.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a dashboard list returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-const params: v1.DashboardListsApiGetDashboardListRequest = {
- listId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .getDashboardList(params)
- .then((data: v1.DashboardList) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboard-lists/ListDashboardLists.ts b/examples/v1/dashboard-lists/ListDashboardLists.ts
deleted file mode 100644
index 260301f8c7f7..000000000000
--- a/examples/v1/dashboard-lists/ListDashboardLists.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all dashboard lists returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardListsApi(configuration);
-
-apiInstance
- .listDashboardLists()
- .then((data: v1.DashboardListListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboard-lists/UpdateDashboardList.ts b/examples/v1/dashboard-lists/UpdateDashboardList.ts
deleted file mode 100644
index 204a573953af..000000000000
--- a/examples/v1/dashboard-lists/UpdateDashboardList.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Update a dashboard list returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-const params: v1.DashboardListsApiUpdateDashboardListRequest = {
- body: {
- name: "updated Example-Dashboard-List",
- },
- listId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .updateDashboardList(params)
- .then((data: v1.DashboardList) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard.ts b/examples/v1/dashboards/CreateDashboard.ts
deleted file mode 100644
index 229c40d789f3..000000000000
--- a/examples/v1/dashboards/CreateDashboard.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Create a new dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with Profile Metrics Query",
- widgets: [
- {
- definition: {
- type: "timeseries",
- requests: [
- {
- profileMetricsQuery: {
- compute: {
- aggregation: "sum",
- facet: "@prof_core_cpu_cores",
- },
- search: {
- query: "runtime:jvm",
- },
- groupBy: [
- {
- facet: "service",
- limit: 10,
- sort: {
- aggregation: "sum",
- order: "desc",
- facet: "@prof_core_cpu_cores",
- },
- },
- ],
- },
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1024858348.ts b/examples/v1/dashboards/CreateDashboard_1024858348.ts
deleted file mode 100644
index 68a643d42bc1..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1024858348.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Create a new dashboard with a formulas and functions treemap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- type: "treemap",
- requests: [
- {
- formulas: [
- {
- formula: "hour_before(query1)",
- },
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "logs",
- name: "query1",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- responseFormat: "scalar",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1039800684.ts b/examples/v1/dashboards/CreateDashboard_1039800684.ts
deleted file mode 100644
index e8f0bb5f525e..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1039800684.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Create a new dashboard with logs_pattern_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- {
- width: "auto",
- field: "message",
- },
- ],
- query: {
- dataSource: "logs_pattern_stream",
- queryString: "",
- clusteringPatternFieldPath: "message",
- groupBy: [
- {
- facet: "service",
- },
- ],
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_109450134.ts b/examples/v1/dashboards/CreateDashboard_109450134.ts
deleted file mode 100644
index 9c247a5359aa..000000000000
--- a/examples/v1/dashboards/CreateDashboard_109450134.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Create a new dashboard with slo list widget with sort
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 60,
- height: 21,
- },
- definition: {
- titleSize: "16",
- titleAlign: "left",
- type: "slo_list",
- requests: [
- {
- query: {
- queryString: "env:prod AND service:my-app",
- limit: 75,
- sort: [
- {
- column: "status.sli",
- order: "asc",
- },
- ],
- },
- requestType: "slo_list",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1094917386.ts b/examples/v1/dashboards/CreateDashboard_1094917386.ts
deleted file mode 100644
index de4a28748db3..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1094917386.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Create a new dashboard with manage_status widget and show_priority parameter
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 50,
- height: 25,
- },
- definition: {
- type: "manage_status",
- summaryType: "monitors",
- displayFormat: "countsAndList",
- colorPreference: "text",
- hideZeroCounts: true,
- showLastTriggered: false,
- query: "",
- sort: "priority,asc",
- count: 50,
- start: 0,
- showPriority: false,
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1177423752.ts b/examples/v1/dashboards/CreateDashboard_1177423752.ts
deleted file mode 100644
index d408c316bd8b..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1177423752.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Create a new dashboard with heatmap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: undefined,
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "heatmap",
- requests: [
- {
- q: "avg:system.cpu.user{*} by {service}",
- style: {
- palette: "dog_classic",
- },
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1200099236.ts b/examples/v1/dashboards/CreateDashboard_1200099236.ts
deleted file mode 100644
index b7839fd6c0f6..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1200099236.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Create a new dashboard with hostmap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: undefined,
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 22,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "hostmap",
- requests: {
- fill: {
- q: "avg:system.cpu.user{*} by {host}",
- },
- },
- nodeType: "host",
- noMetricHosts: true,
- noGroupHosts: true,
- style: {
- palette: "green_to_orange",
- paletteFlip: false,
- },
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1213075383.ts b/examples/v1/dashboards/CreateDashboard_1213075383.ts
deleted file mode 100644
index 7271940a6718..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1213075383.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Create a new dashboard with toplist widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- style: {
- display: {
- type: "stacked",
- legend: "inline",
- },
- scaling: "relative",
- palette: "dog_classic",
- },
- type: "toplist",
- requests: [
- {
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {service}",
- aggregator: "avg",
- },
- ],
- formulas: [
- {
- formula: "query1",
- },
- ],
- sort: {
- count: 10,
- orderBy: [
- {
- type: "formula",
- index: 0,
- order: "desc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1284514532.ts b/examples/v1/dashboards/CreateDashboard_1284514532.ts
deleted file mode 100644
index 3a26908d1cbc..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1284514532.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create a new dashboard with a timeseries widget using formulas and functions cloud cost query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "Example Cloud Cost Query",
- titleSize: "16",
- titleAlign: "left",
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "cloud_cost",
- name: "query1",
- query:
- "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)",
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "bars",
- },
- ],
- time: {
- liveSpan: "week_to_date",
- },
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1307120899.ts b/examples/v1/dashboards/CreateDashboard_1307120899.ts
deleted file mode 100644
index 02e91e475ccb..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1307120899.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Create a new timeseries widget with ci_tests data source
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with ci_tests datasource",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {},
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "ci_tests",
- name: "query1",
- search: {
- query: "test_level:test",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1413226400.ts b/examples/v1/dashboards/CreateDashboard_1413226400.ts
deleted file mode 100644
index be65c288061c..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1413226400.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Create a new dashboard with a toplist widget with stacked type and no legend specified
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- style: {
- display: {
- type: "stacked",
- },
- scaling: "relative",
- palette: "dog_classic",
- },
- type: "toplist",
- requests: [
- {
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {service}",
- aggregator: "avg",
- },
- ],
- formulas: [
- {
- formula: "query1",
- },
- ],
- sort: {
- count: 10,
- orderBy: [
- {
- type: "group",
- name: "service",
- order: "asc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1423904722.ts b/examples/v1/dashboards/CreateDashboard_1423904722.ts
deleted file mode 100644
index ce48918b76b6..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1423904722.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create a new dashboard with slo list widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 60,
- height: 21,
- },
- definition: {
- titleSize: "16",
- titleAlign: "left",
- type: "slo_list",
- requests: [
- {
- query: {
- queryString: "env:prod AND service:my-app",
- limit: 75,
- },
- requestType: "slo_list",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1433408735.ts b/examples/v1/dashboards/CreateDashboard_1433408735.ts
deleted file mode 100644
index ad8a3dc3c66b..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1433408735.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Clients deserialize a dashboard with a empty time object
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "Example Cloud Cost Query",
- titleSize: "16",
- titleAlign: "left",
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "cloud_cost",
- name: "query1",
- query:
- "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)",
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "bars",
- },
- ],
- time: {},
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1442588603.ts b/examples/v1/dashboards/CreateDashboard_1442588603.ts
deleted file mode 100644
index efc0e7375080..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1442588603.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Create a distribution widget using a histogram request containing a formulas and functions APM Stats query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- definition: {
- title: "APM Stats - Request latency HOP",
- titleSize: "16",
- titleAlign: "left",
- showLegend: false,
- type: "distribution",
- xaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- yaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- requests: [
- {
- query: {
- primaryTagValue: "*",
- stat: "latency_distribution",
- dataSource: "apm_resource_stats",
- name: "query1",
- service: "azure-bill-import",
- groupBy: ["resource_name"],
- env: "staging",
- primaryTagName: "datacenter",
- operationName: "universal.http.client",
- },
- requestType: "histogram",
- style: {
- palette: "dog_classic",
- },
- },
- ],
- },
- layout: {
- x: 8,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_145494973.ts b/examples/v1/dashboards/CreateDashboard_145494973.ts
deleted file mode 100644
index 8ebaffa6bf9c..000000000000
--- a/examples/v1/dashboards/CreateDashboard_145494973.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Create a new dashboard with apm resource stats widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "query_table",
- requests: [
- {
- responseFormat: "scalar",
- queries: [
- {
- primaryTagValue: "edge-eu1.prod.dog",
- stat: "hits",
- name: "query1",
- service: "cassandra",
- dataSource: "apm_resource_stats",
- env: "ci",
- primaryTagName: "datacenter",
- operationName: "cassandra.query",
- groupBy: ["resource_name"],
- },
- ],
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1490099434.ts b/examples/v1/dashboards/CreateDashboard_1490099434.ts
deleted file mode 100644
index 5e71a4181987..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1490099434.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Create a new dashboard with query_table widget and cell_display_mode is trend
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 54,
- height: 32,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "query_table",
- requests: [
- {
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {host}",
- aggregator: "avg",
- },
- ],
- formulas: [
- {
- formula: "query1",
- conditionalFormats: [],
- cellDisplayMode: "trend",
- cellDisplayModeOptions: {
- trendType: "line",
- yScale: "shared",
- },
- },
- ],
- sort: {
- count: 500,
- orderBy: [
- {
- type: "formula",
- index: 0,
- order: "desc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- hasSearchBar: "auto",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_173805046.ts b/examples/v1/dashboards/CreateDashboard_173805046.ts
deleted file mode 100644
index 74051ace07d1..000000000000
--- a/examples/v1/dashboards/CreateDashboard_173805046.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Create a new dashboard with slo widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 60,
- height: 21,
- },
- definition: {
- titleSize: "16",
- titleAlign: "left",
- type: "slo",
- viewType: "detail",
- timeWindows: ["7d"],
- sloId: SLO_DATA_0_ID,
- showErrorBudget: true,
- viewMode: "overall",
- globalTimeTarget: "0",
- additionalQueryFilters: "!host:excluded_host",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1738608750.ts b/examples/v1/dashboards/CreateDashboard_1738608750.ts
deleted file mode 100644
index f9a7b747305d..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1738608750.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Create a new dashboard with free_text widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: undefined,
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 24,
- height: 6,
- },
- definition: {
- type: "free_text",
- text: "Example free text",
- color: "#4d4d4d",
- fontSize: "auto",
- textAlign: "left",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1754992756.ts b/examples/v1/dashboards/CreateDashboard_1754992756.ts
deleted file mode 100644
index 9a17b67644cd..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1754992756.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Create a new dashboard with powerpack widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "powerpack" in the system
-const POWERPACK_DATA_ID = process.env.POWERPACK_DATA_ID as string;
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with powerpack widget",
- layoutType: "ordered",
- widgets: [
- {
- definition: {
- type: "powerpack",
- powerpackId: POWERPACK_DATA_ID,
- templateVariables: {
- controlledExternally: [],
- controlledByPowerpack: [
- {
- name: "foo",
- prefix: "bar",
- values: ["baz", "qux", "quuz"],
- },
- ],
- },
- },
- layout: {
- x: 1,
- y: 1,
- width: 2,
- height: 2,
- isColumnBreak: false,
- },
- },
- ],
- description: "description",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_1877023900.ts b/examples/v1/dashboards/CreateDashboard_1877023900.ts
deleted file mode 100644
index 9f876b7f9334..000000000000
--- a/examples/v1/dashboards/CreateDashboard_1877023900.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create a new dashboard with list_stream widget with a valid sort parameter ASC
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "event_stream",
- queryString: "",
- eventSize: "l",
- sort: {
- column: "timestamp",
- order: "asc",
- },
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2029850837.ts b/examples/v1/dashboards/CreateDashboard_2029850837.ts
deleted file mode 100644
index 4b1a9aa1eb24..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2029850837.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Create a new dashboard with log_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 36,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "log_stream",
- indexes: ["main"],
- query: "",
- sort: {
- column: "time",
- order: "desc",
- },
- columns: ["host", "service"],
- showDateColumn: true,
- showMessageColumn: true,
- messageDisplay: "expanded-md",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2034634967.ts b/examples/v1/dashboards/CreateDashboard_2034634967.ts
deleted file mode 100644
index 171c3168fbf1..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2034634967.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Create a new dashboard with servicemap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "servicemap",
- service: "",
- filters: ["env:none", "environment:*"],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2064651578.ts b/examples/v1/dashboards/CreateDashboard_2064651578.ts
deleted file mode 100644
index f30ece721b15..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2064651578.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Create a new dashboard with team tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "change",
- requests: [
- {
- formulas: [
- {
- formula: "hour_before(query1)",
- },
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "logs",
- name: "query1",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- responseFormat: "scalar",
- compareTo: "hour_before",
- increaseGood: true,
- orderBy: "change",
- changeType: "absolute",
- orderDir: "desc",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- tags: ["team:foobar"],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2104498738.ts b/examples/v1/dashboards/CreateDashboard_2104498738.ts
deleted file mode 100644
index b3f75b835c3b..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2104498738.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a new dashboard with formulas and functions scatterplot widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- id: 5346764334358972,
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "scatterplot",
- requests: {
- table: {
- formulas: [
- {
- formula: "query1",
- dimension: "x",
- alias: "my-query1",
- },
- {
- formula: "query2",
- dimension: "y",
- alias: "my-query2",
- },
- ],
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {service}",
- aggregator: "avg",
- },
- {
- dataSource: "metrics",
- name: "query2",
- query: "avg:system.mem.used{*} by {service}",
- aggregator: "avg",
- },
- ],
- responseFormat: "scalar",
- },
- },
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2261785072.ts b/examples/v1/dashboards/CreateDashboard_2261785072.ts
deleted file mode 100644
index 99171aa543c1..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2261785072.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create a new dashboard with a timeseries widget and an overlay request
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- type: "timeseries",
- requests: [
- {
- onRightYaxis: false,
- queries: [
- {
- dataSource: "metrics",
- name: "mymetric",
- query: "avg:system.cpu.user{*}",
- },
- ],
- responseFormat: "timeseries",
- displayType: "line",
- },
- {
- responseFormat: "timeseries",
- queries: [
- {
- dataSource: "metrics",
- name: "mymetricoverlay",
- query: "avg:system.cpu.user{*}",
- },
- ],
- style: {
- palette: "purple",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "overlay",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2278756614.ts b/examples/v1/dashboards/CreateDashboard_2278756614.ts
deleted file mode 100644
index d71621fc208b..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2278756614.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Create a new dashboard with split graph widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 12,
- height: 8,
- },
- definition: {
- title: "",
- type: "split_group",
- sourceWidgetDefinition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "timeseries",
- requests: [
- {
- responseFormat: "timeseries",
- queries: [
- {
- name: "query1",
- dataSource: "metrics",
- query: "avg:system.cpu.user{*}",
- },
- ],
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- splitConfig: {
- splitDimensions: [
- {
- oneGraphPer: "service",
- },
- ],
- limit: 24,
- sort: {
- compute: {
- aggregation: "sum",
- metric: "system.cpu.user",
- },
- order: "desc",
- },
- staticSplits: [
- [
- {
- tagKey: "service",
- tagValues: ["cassandra"],
- },
- {
- tagKey: "datacenter",
- tagValues: [],
- },
- ],
- [
- {
- tagKey: "demo",
- tagValues: ["env"],
- },
- ],
- ],
- },
- size: "md",
- hasUniformYAxes: true,
- },
- },
- ],
- templateVariables: [],
- layoutType: "ordered",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2308247857.ts b/examples/v1/dashboards/CreateDashboard_2308247857.ts
deleted file mode 100644
index d21a15af5f27..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2308247857.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Create a new dashboard with alert_graph widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "monitor" in the system
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "alert_graph",
- alertId: "7",
- vizType: "timeseries",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2316374332.ts b/examples/v1/dashboards/CreateDashboard_2316374332.ts
deleted file mode 100644
index 7c99e1f495b2..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2316374332.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Create a new dashboard with alert_value widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "monitor" in the system
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 15,
- height: 8,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "alert_value",
- alertId: "7",
- unit: "auto",
- textAlign: "left",
- precision: 2,
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2336428357.ts b/examples/v1/dashboards/CreateDashboard_2336428357.ts
deleted file mode 100644
index e87be598e31a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2336428357.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Create a new dashboard with query_table widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 54,
- height: 32,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "query_table",
- requests: [
- {
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {host}",
- aggregator: "avg",
- },
- ],
- formulas: [
- {
- formula: "query1",
- conditionalFormats: [],
- cellDisplayMode: "bar",
- },
- ],
- sort: {
- count: 500,
- orderBy: [
- {
- type: "formula",
- index: 0,
- order: "desc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- hasSearchBar: "auto",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2338918735.ts b/examples/v1/dashboards/CreateDashboard_2338918735.ts
deleted file mode 100644
index ccd0a9e42125..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2338918735.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a new dashboard with list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "apm_issue_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2342457693.ts b/examples/v1/dashboards/CreateDashboard_2342457693.ts
deleted file mode 100644
index 32692892b08d..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2342457693.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Create a new dashboard with scatterplot widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "scatterplot",
- requests: {
- table: {
- formulas: [
- {
- formula: "query1",
- dimension: "x",
- alias: "",
- },
- {
- formula: "query2",
- dimension: "y",
- alias: "",
- },
- ],
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {service}",
- aggregator: "avg",
- },
- {
- dataSource: "metrics",
- name: "query2",
- query: "avg:system.mem.used{*} by {service}",
- aggregator: "avg",
- },
- ],
- responseFormat: "scalar",
- },
- },
- xaxis: {
- scale: "linear",
- includeZero: true,
- min: "auto",
- max: "auto",
- },
- yaxis: {
- scale: "linear",
- includeZero: true,
- min: "auto",
- max: "auto",
- },
- colorByGroups: [],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2349863258.ts b/examples/v1/dashboards/CreateDashboard_2349863258.ts
deleted file mode 100644
index a8367c47aaaa..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2349863258.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a new dashboard with query_value widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "query_value",
- requests: [
- {
- responseFormat: "scalar",
- queries: [
- {
- name: "query1",
- dataSource: "metrics",
- query: "avg:system.cpu.user{*}",
- aggregator: "avg",
- },
- ],
- },
- ],
- autoscale: true,
- precision: 2,
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2361531620.ts b/examples/v1/dashboards/CreateDashboard_2361531620.ts
deleted file mode 100644
index 3f798b99895c..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2361531620.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create a new dashboard with list_stream widget with a valid sort parameter DESC
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "event_stream",
- queryString: "",
- eventSize: "l",
- sort: {
- column: "timestamp",
- order: "desc",
- },
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2432046716.ts b/examples/v1/dashboards/CreateDashboard_2432046716.ts
deleted file mode 100644
index 1f46633c8744..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2432046716.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Create a new dashboard with event_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "event_stream",
- queryString: "",
- eventSize: "l",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2490110261.ts b/examples/v1/dashboards/CreateDashboard_2490110261.ts
deleted file mode 100644
index 3c115188d09a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2490110261.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Create a new dashboard with an audit logs query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with Audit Logs Query",
- widgets: [
- {
- definition: {
- type: "timeseries",
- requests: [
- {
- responseFormat: "timeseries",
- queries: [
- {
- search: {
- query: "",
- },
- dataSource: "audit",
- compute: {
- aggregation: "count",
- },
- name: "query1",
- indexes: ["*"],
- groupBy: [],
- },
- ],
- },
- ],
- },
- layout: {
- x: 2,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_252716965.ts b/examples/v1/dashboards/CreateDashboard_252716965.ts
deleted file mode 100644
index 108d5e9430f7..000000000000
--- a/examples/v1/dashboards/CreateDashboard_252716965.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a distribution widget using a histogram request containing a formulas and functions metrics query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "Metrics HOP",
- titleSize: "16",
- titleAlign: "left",
- showLegend: false,
- type: "distribution",
- customLinks: [
- {
- label: "Example",
- link: "https://example.org/",
- },
- ],
- xaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- yaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- requests: [
- {
- query: {
- query: "histogram:trace.Load{*}",
- dataSource: "metrics",
- name: "query1",
- },
- requestType: "histogram",
- style: {
- palette: "dog_classic",
- },
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2563642929.ts b/examples/v1/dashboards/CreateDashboard_2563642929.ts
deleted file mode 100644
index f8f1f19bfdf2..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2563642929.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Create a new dashboard with a toplist widget sorted by group
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- style: {
- display: {
- type: "stacked",
- legend: "inline",
- },
- scaling: "relative",
- palette: "dog_classic",
- },
- type: "toplist",
- requests: [
- {
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*} by {service}",
- aggregator: "avg",
- },
- ],
- formulas: [
- {
- formula: "query1",
- },
- ],
- sort: {
- count: 10,
- orderBy: [
- {
- type: "group",
- name: "service",
- order: "asc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2607944105.ts b/examples/v1/dashboards/CreateDashboard_2607944105.ts
deleted file mode 100644
index ca16aacc0c34..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2607944105.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Create a new dashboard with check_status widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 15,
- height: 8,
- },
- definition: {
- titleSize: "16",
- titleAlign: "left",
- type: "check_status",
- check: "datadog.agent.up",
- grouping: "check",
- tags: ["*"],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2610827685.ts b/examples/v1/dashboards/CreateDashboard_2610827685.ts
deleted file mode 100644
index 92411277927a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2610827685.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create a new dashboard with run-workflow widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "Run workflow title",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "run_workflow",
- workflowId: "2e055f16-8b6a-4cdd-b452-17a34c44b160",
- inputs: [
- {
- name: "environment",
- value: "$env.value",
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2618036642.ts b/examples/v1/dashboards/CreateDashboard_2618036642.ts
deleted file mode 100644
index 46d0279293b4..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2618036642.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Create a new dashboard with trace_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- {
- width: "auto",
- field: "service",
- },
- ],
- query: {
- dataSource: "trace_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2634813877.ts b/examples/v1/dashboards/CreateDashboard_2634813877.ts
deleted file mode 100644
index 95556a5763ce..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2634813877.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a new dashboard with event_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 38,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "event_stream",
- query: "example-query",
- tagsExecution: "and",
- eventSize: "s",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2644712913.ts b/examples/v1/dashboards/CreateDashboard_2644712913.ts
deleted file mode 100644
index 94df43a23a2d..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2644712913.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create a new dashboard with a query value widget using the percentile aggregator
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with QVW Percentile Aggregator",
- widgets: [
- {
- definition: {
- titleSize: "16",
- title: "",
- titleAlign: "left",
- precision: 2,
- time: {},
- autoscale: true,
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- responseFormat: "scalar",
- queries: [
- {
- query: "p90:dist.dd.dogweb.latency{*}",
- dataSource: "metrics",
- name: "query1",
- aggregator: "percentile",
- },
- ],
- },
- ],
- type: "query_value",
- },
- layout: {
- y: 0,
- x: 0,
- height: 2,
- width: 2,
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2652180930.ts b/examples/v1/dashboards/CreateDashboard_2652180930.ts
deleted file mode 100644
index 24404cb33f60..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2652180930.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Create a new dashboard with topology_map widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "topology_map",
- requests: [
- {
- requestType: "topology",
- query: {
- dataSource: "service_map",
- service: "",
- filters: ["env:none", "environment:*"],
- },
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2705593938.ts b/examples/v1/dashboards/CreateDashboard_2705593938.ts
deleted file mode 100644
index 78a955112fba..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2705593938.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create a new dashboard with sunburst widget and metrics data
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "sunburst",
- requests: [
- {
- responseFormat: "scalar",
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- query: "sum:system.mem.used{*} by {service}",
- dataSource: "metrics",
- name: "query1",
- aggregator: "sum",
- },
- ],
- style: {
- palette: "dog_classic",
- },
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2800096921.ts b/examples/v1/dashboards/CreateDashboard_2800096921.ts
deleted file mode 100644
index 60e26c4be0b8..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2800096921.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Create a new timeseries widget with ci_pipelines data source
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with ci_pipelines datasource",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {},
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "ci_pipelines",
- name: "query1",
- search: {
- query: "ci_level:job",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- metric: "@ci.queue_time",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2843286292.ts b/examples/v1/dashboards/CreateDashboard_2843286292.ts
deleted file mode 100644
index 10f97281a290..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2843286292.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Create a new dashboard with logs_transaction_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "logs_transaction_stream",
- queryString: "",
- groupBy: [
- {
- facet: "service",
- },
- ],
- compute: [
- {
- facet: "service",
- aggregation: "count",
- },
- ],
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2850365602.ts b/examples/v1/dashboards/CreateDashboard_2850365602.ts
deleted file mode 100644
index 98f347f871d3..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2850365602.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a new dashboard with template variable presets using values returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- description: undefined,
- layoutType: "ordered",
- notifyList: [],
- reflowType: "auto",
- restrictedRoles: [],
- templateVariablePresets: [
- {
- name: "my saved view",
- templateVariables: [
- {
- name: "datacenter",
- values: ["*", "my-host"],
- },
- ],
- },
- ],
- templateVariables: [
- {
- availableValues: ["my-host", "host1", "host2"],
- defaults: ["my-host"],
- name: "host1",
- prefix: "host",
- },
- ],
- title: "",
- widgets: [
- {
- definition: {
- requests: {
- fill: {
- q: "avg:system.cpu.user{*}",
- },
- },
- type: "hostmap",
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2917274132.ts b/examples/v1/dashboards/CreateDashboard_2917274132.ts
deleted file mode 100644
index a9b22d079bb2..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2917274132.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Create a new dashboard with manage_status widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 50,
- height: 25,
- },
- definition: {
- type: "manage_status",
- summaryType: "monitors",
- displayFormat: "countsAndList",
- colorPreference: "text",
- hideZeroCounts: true,
- showLastTriggered: false,
- query: "",
- sort: "status,asc",
- count: 50,
- start: 0,
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_2921337351.ts b/examples/v1/dashboards/CreateDashboard_2921337351.ts
deleted file mode 100644
index 663dfb0de0cd..000000000000
--- a/examples/v1/dashboards/CreateDashboard_2921337351.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Create a new dashboard with trace_service widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 72,
- height: 72,
- },
- definition: {
- title: "Service Summary",
- time: {},
- type: "trace_service",
- env: "none",
- service: "",
- spanName: "",
- showHits: true,
- showErrors: true,
- showLatency: true,
- showBreakdown: true,
- showDistribution: true,
- showResourceList: false,
- sizeFormat: "medium",
- displayFormat: "two_column",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3066042014.ts b/examples/v1/dashboards/CreateDashboard_3066042014.ts
deleted file mode 100644
index 0e84b08fface..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3066042014.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a new timeseries widget with new live span time format
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with new live span time",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {
- type: "live",
- unit: "minute",
- value: 8,
- },
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "ci_pipelines",
- name: "query1",
- search: {
- query: "ci_level:job",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- metric: "@ci.queue_time",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3117424216.ts b/examples/v1/dashboards/CreateDashboard_3117424216.ts
deleted file mode 100644
index 826c5fb7ba8b..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3117424216.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Create a new dashboard with logs_stream list_stream widget and storage parameter
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "logs_stream",
- queryString: "",
- storage: "hot",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3195475781.ts b/examples/v1/dashboards/CreateDashboard_3195475781.ts
deleted file mode 100644
index 614a288db537..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3195475781.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a new dashboard with ci_test_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "ci_test_stream",
- queryString: "test_level:suite",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3250131584.ts b/examples/v1/dashboards/CreateDashboard_3250131584.ts
deleted file mode 100644
index 9f61df702869..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3250131584.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Create a new dashboard with event_timeline widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: undefined,
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 9,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "event_timeline",
- query: "status:error priority:all",
- tagsExecution: "and",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3298564989.ts b/examples/v1/dashboards/CreateDashboard_3298564989.ts
deleted file mode 100644
index af76b07eee3f..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3298564989.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Create a new dashboard with llm_observability_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- responseFormat: "event_list",
- query: {
- dataSource: "llm_observability_stream",
- queryString: "@event_type:span @parent_id:undefined",
- indexes: [],
- },
- columns: [
- {
- field: "@status",
- width: "compact",
- },
- {
- field: "@content.prompt",
- width: "auto",
- },
- {
- field: "@content.response.content",
- width: "auto",
- },
- {
- field: "timestamp",
- width: "auto",
- },
- {
- field: "@ml_app",
- width: "auto",
- },
- {
- field: "service",
- width: "auto",
- },
- {
- field: "@meta.evaluations.quality",
- width: "auto",
- },
- {
- field: "@meta.evaluations.security",
- width: "auto",
- },
- {
- field: "@duration",
- width: "auto",
- },
- ],
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3451918078.ts b/examples/v1/dashboards/CreateDashboard_3451918078.ts
deleted file mode 100644
index a92483154f0e..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3451918078.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a new timeseries widget with new fixed span time format
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with new fixed span time",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {
- type: "fixed",
- from: 1712080128,
- to: 1712083128,
- },
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "ci_pipelines",
- name: "query1",
- search: {
- query: "ci_level:job",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- metric: "@ci.queue_time",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3513586382.ts b/examples/v1/dashboards/CreateDashboard_3513586382.ts
deleted file mode 100644
index bcc23d55bd26..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3513586382.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Create a geomap widget using an event_list request
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "geomap",
- requests: [
- {
- responseFormat: "event_list",
- query: {
- dataSource: "logs_stream",
- queryString: "",
- indexes: [],
- },
- columns: [
- {
- field: "@network.client.geoip.location.latitude",
- width: "auto",
- },
- {
- field: "@network.client.geoip.location.longitude",
- width: "auto",
- },
- {
- field: "@network.client.geoip.country.iso_code",
- width: "auto",
- },
- {
- field: "@network.client.geoip.subdivision.name",
- width: "auto",
- },
- {
- field: "classic",
- width: "auto",
- },
- {
- field: "",
- width: "auto",
- },
- ],
- },
- ],
- style: {
- palette: "hostmap_blues",
- paletteFlip: false,
- },
- view: {
- focus: "WORLD",
- },
- },
- layout: {
- x: 0,
- y: 0,
- width: 12,
- height: 6,
- },
- },
- ],
- templateVariables: [],
- layoutType: "ordered",
- notifyList: [],
- reflowType: "fixed",
- tags: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3520534424.ts b/examples/v1/dashboards/CreateDashboard_3520534424.ts
deleted file mode 100644
index cf13a9d64bd4..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3520534424.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Create a new dashboard with timeseries widget with custom_unit
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- showLegend: true,
- legendLayout: "auto",
- time: {},
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- numberFormat: {
- unitScale: {
- type: "canonical_unit",
- unitName: "apdex",
- },
- unit: {
- type: "canonical_unit",
- unitName: "fraction",
- },
- },
- },
- ],
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*}",
- },
- ],
- responseFormat: "timeseries",
- displayType: "line",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 12,
- height: 5,
- },
- },
- ],
- templateVariables: [],
- layoutType: "ordered",
- notifyList: [],
- reflowType: "fixed",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3562282606.ts b/examples/v1/dashboards/CreateDashboard_3562282606.ts
deleted file mode 100644
index 1000a45a0732..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3562282606.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a new dashboard with a change widget using formulas and functions slo query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "change",
- requests: [
- {
- formulas: [
- {
- formula: "hour_before(query1)",
- },
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- name: "query1",
- dataSource: "slo",
- sloId: SLO_DATA_0_ID,
- measure: "slo_status",
- groupMode: "overall",
- sloQueryType: "metric",
- additionalQueryFilters: "*",
- },
- ],
- responseFormat: "scalar",
- orderBy: "change",
- changeType: "absolute",
- increaseGood: true,
- orderDir: "asc",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3669695268.ts b/examples/v1/dashboards/CreateDashboard_3669695268.ts
deleted file mode 100644
index 833fdcc7f09a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3669695268.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Create a new dashboard with logs query table widget and storage parameter
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with query table widget and storage parameter",
- widgets: [
- {
- definition: {
- type: "query_table",
- requests: [
- {
- queries: [
- {
- dataSource: "logs",
- name: "query1",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- storage: "online_archives",
- },
- ],
- formulas: [
- {
- conditionalFormats: [],
- cellDisplayMode: "bar",
- formula: "query1",
- },
- ],
- sort: {
- count: 50,
- orderBy: [
- {
- type: "formula",
- index: 0,
- order: "desc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3777304439.ts b/examples/v1/dashboards/CreateDashboard_3777304439.ts
deleted file mode 100644
index def12ea4cce8..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3777304439.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Create a new dashboard with formula and function heatmap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 15,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "heatmap",
- requests: [
- {
- responseFormat: "timeseries",
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "avg:system.cpu.user{*}",
- },
- ],
- formulas: [
- {
- formula: "query1",
- },
- ],
- style: {
- palette: "dog_classic",
- },
- },
- ],
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3882428227.ts b/examples/v1/dashboards/CreateDashboard_3882428227.ts
deleted file mode 100644
index 76d05ded6493..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3882428227.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create a distribution widget using a histogram request containing a formulas and functions events query
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "Events Platform - Request latency HOP",
- titleSize: "16",
- titleAlign: "left",
- showLegend: false,
- type: "distribution",
- xaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- yaxis: {
- max: "auto",
- includeZero: true,
- scale: "linear",
- min: "auto",
- },
- requests: [
- {
- query: {
- search: {
- query: "",
- },
- dataSource: "events",
- compute: {
- metric: "@duration",
- aggregation: "min",
- },
- name: "query1",
- indexes: ["*"],
- groupBy: [],
- },
- requestType: "histogram",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 2,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_3982498788.ts b/examples/v1/dashboards/CreateDashboard_3982498788.ts
deleted file mode 100644
index c5e4ca8a3c48..000000000000
--- a/examples/v1/dashboards/CreateDashboard_3982498788.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Create a new dashboard with timeseries widget containing style attributes
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with timeseries widget",
- widgets: [
- {
- definition: {
- type: "timeseries",
- requests: [
- {
- q: "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()",
- onRightYaxis: false,
- style: {
- palette: "warm",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "bars",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_4026341408.ts b/examples/v1/dashboards/CreateDashboard_4026341408.ts
deleted file mode 100644
index b38ca8b4699e..000000000000
--- a/examples/v1/dashboards/CreateDashboard_4026341408.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a new dashboard with apm_issue_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "apm_issue_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_4076476470.ts b/examples/v1/dashboards/CreateDashboard_4076476470.ts
deleted file mode 100644
index ad1e9a132889..000000000000
--- a/examples/v1/dashboards/CreateDashboard_4076476470.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a new dashboard with rum_issue_stream list_stream widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "rum_issue_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_41622531.ts b/examples/v1/dashboards/CreateDashboard_41622531.ts
deleted file mode 100644
index 1361fd04a026..000000000000
--- a/examples/v1/dashboards/CreateDashboard_41622531.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Create a new dashboard with timeseries widget and formula style attributes
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with formula style",
- widgets: [
- {
- definition: {
- title: "styled timeseries",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {},
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- style: {
- paletteIndex: 4,
- palette: "classic",
- },
- },
- ],
- queries: [
- {
- query: "avg:system.cpu.user{*}",
- dataSource: "metrics",
- name: "query1",
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_417992286.ts b/examples/v1/dashboards/CreateDashboard_417992286.ts
deleted file mode 100644
index 1482352ee0e8..000000000000
--- a/examples/v1/dashboards/CreateDashboard_417992286.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Create a new dashboard with note widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 18,
- height: 24,
- },
- definition: {
- type: "note",
- content: "# Example Note",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_4262729673.ts b/examples/v1/dashboards/CreateDashboard_4262729673.ts
deleted file mode 100644
index c99f442a75e1..000000000000
--- a/examples/v1/dashboards/CreateDashboard_4262729673.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Create a new timeseries widget with legacy live span time format
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with legacy live span time",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {
- liveSpan: "5m",
- },
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "ci_pipelines",
- name: "query1",
- search: {
- query: "ci_level:job",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- metric: "@ci.queue_time",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_578885732.ts b/examples/v1/dashboards/CreateDashboard_578885732.ts
deleted file mode 100644
index 9e3f01839225..000000000000
--- a/examples/v1/dashboards/CreateDashboard_578885732.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Create a new dashboard with a formulas and functions change widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "change",
- requests: [
- {
- formulas: [
- {
- formula: "hour_before(query1)",
- },
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "logs",
- name: "query1",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- responseFormat: "scalar",
- compareTo: "hour_before",
- increaseGood: true,
- orderBy: "change",
- changeType: "absolute",
- orderDir: "desc",
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_651038379.ts b/examples/v1/dashboards/CreateDashboard_651038379.ts
deleted file mode 100644
index 8c3e3cfa554a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_651038379.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a new dashboard with image widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 12,
- height: 12,
- },
- definition: {
- type: "image",
- url: "https://example.com/image.png",
- sizing: "cover",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_765140092.ts b/examples/v1/dashboards/CreateDashboard_765140092.ts
deleted file mode 100644
index 21d186e5c25e..000000000000
--- a/examples/v1/dashboards/CreateDashboard_765140092.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Create a new dashboard with a query value widget using timeseries background
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with QVW Timeseries Background",
- widgets: [
- {
- definition: {
- titleSize: "16",
- title: "",
- titleAlign: "left",
- precision: 2,
- time: {},
- autoscale: true,
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- responseFormat: "scalar",
- queries: [
- {
- query: "sum:my.cool.count.metric{*}",
- dataSource: "metrics",
- name: "query1",
- aggregator: "percentile",
- },
- ],
- },
- ],
- type: "query_value",
- timeseriesBackground: {
- type: "area",
- yaxis: {
- includeZero: true,
- },
- },
- },
- layout: {
- y: 0,
- x: 0,
- height: 2,
- width: 2,
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_794302680.ts b/examples/v1/dashboards/CreateDashboard_794302680.ts
deleted file mode 100644
index 6c95ac98f4ea..000000000000
--- a/examples/v1/dashboards/CreateDashboard_794302680.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * Create a new dashboard with query_table widget and text formatting
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "query_table",
- requests: [
- {
- queries: [
- {
- aggregator: "avg",
- dataSource: "metrics",
- name: "query1",
- query:
- "avg:aws.stream.globalaccelerator.processed_bytes_in{*} by {aws_account,acceleratoripaddress}",
- },
- {
- aggregator: "avg",
- dataSource: "metrics",
- name: "query2",
- query:
- "avg:aws.stream.globalaccelerator.processed_bytes_out{*} by {aws_account,acceleratoripaddress}",
- },
- ],
- responseFormat: "scalar",
- textFormats: [
- [
- {
- match: {
- type: "is",
- value: "fruit",
- },
- palette: "white_on_red",
- replace: {
- type: "all",
- _with: "vegetable",
- },
- },
- {
- match: {
- type: "is",
- value: "animal",
- },
- palette: "custom_bg",
- customBgColor: "#632ca6",
- },
- {
- match: {
- type: "is",
- value: "robot",
- },
- palette: "red_on_white",
- },
- {
- match: {
- type: "is",
- value: "ai",
- },
- palette: "yellow_on_white",
- },
- ],
- [
- {
- match: {
- type: "is_not",
- value: "xyz",
- },
- palette: "white_on_yellow",
- },
- ],
- [
- {
- match: {
- type: "contains",
- value: "test",
- },
- palette: "white_on_green",
- replace: {
- type: "all",
- _with: "vegetable",
- },
- },
- ],
- [
- {
- match: {
- type: "does_not_contain",
- value: "blah",
- },
- palette: "black_on_light_red",
- },
- ],
- [
- {
- match: {
- type: "starts_with",
- value: "abc",
- },
- palette: "black_on_light_yellow",
- },
- ],
- [
- {
- match: {
- type: "ends_with",
- value: "xyz",
- },
- palette: "black_on_light_green",
- },
- {
- match: {
- type: "ends_with",
- value: "zzz",
- },
- palette: "green_on_white",
- },
- {
- match: {
- type: "is",
- value: "animal",
- },
- palette: "custom_text",
- customFgColor: "#632ca6",
- },
- ],
- ],
- formulas: [],
- },
- ],
- hasSearchBar: "never",
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_798168180.ts b/examples/v1/dashboards/CreateDashboard_798168180.ts
deleted file mode 100644
index 095439b2bbe0..000000000000
--- a/examples/v1/dashboards/CreateDashboard_798168180.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a new dashboard with apm dependency stats widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "query_table",
- requests: [
- {
- responseFormat: "scalar",
- queries: [
- {
- primaryTagValue: "edge-eu1.prod.dog",
- stat: "avg_duration",
- resourceName:
- "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?",
- name: "query1",
- service: "cassandra",
- dataSource: "apm_dependency_stats",
- env: "ci",
- primaryTagName: "datacenter",
- operationName: "cassandra.query",
- },
- ],
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_803346562.ts b/examples/v1/dashboards/CreateDashboard_803346562.ts
deleted file mode 100644
index 2a13389d829a..000000000000
--- a/examples/v1/dashboards/CreateDashboard_803346562.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create a new dashboard with distribution widget and apm stats data
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- widgets: [
- {
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- type: "distribution",
- requests: [
- {
- apmStatsQuery: {
- env: "prod",
- service: "cassandra",
- name: "cassandra.query",
- primaryTag: "datacenter:dc1",
- rowType: "service",
- },
- },
- ],
- },
- layout: {
- x: 0,
- y: 0,
- width: 4,
- height: 4,
- },
- },
- ],
- layoutType: "ordered",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_858397694.ts b/examples/v1/dashboards/CreateDashboard_858397694.ts
deleted file mode 100644
index 37107838df58..000000000000
--- a/examples/v1/dashboards/CreateDashboard_858397694.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Create a new dashboard with template variable defaults returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- description: undefined,
- layoutType: "ordered",
- notifyList: [],
- reflowType: "auto",
- restrictedRoles: [],
- templateVariables: [
- {
- availableValues: ["my-host", "host1", "host2"],
- defaults: ["my-host"],
- name: "host1",
- prefix: "host",
- },
- ],
- title: "",
- widgets: [
- {
- definition: {
- requests: {
- fill: {
- q: "avg:system.cpu.user{*}",
- },
- },
- type: "hostmap",
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_913313564.ts b/examples/v1/dashboards/CreateDashboard_913313564.ts
deleted file mode 100644
index 61c7d1a67281..000000000000
--- a/examples/v1/dashboards/CreateDashboard_913313564.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Create a new dashboard with iframe widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: "",
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 12,
- height: 12,
- },
- definition: {
- type: "iframe",
- url: "https://docs.datadoghq.com/api/latest/",
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_915214113.ts b/examples/v1/dashboards/CreateDashboard_915214113.ts
deleted file mode 100644
index 9b7f63a3992c..000000000000
--- a/examples/v1/dashboards/CreateDashboard_915214113.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Create a new dashboard with geomap widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard",
- description: undefined,
- widgets: [
- {
- layout: {
- x: 0,
- y: 0,
- width: 47,
- height: 30,
- },
- definition: {
- title: "",
- titleSize: "16",
- titleAlign: "left",
- time: {},
- type: "geomap",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- name: "query1",
- dataSource: "rum",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [
- {
- facet: "@geo.country_iso_code",
- limit: 250,
- sort: {
- order: "desc",
- aggregation: "count",
- },
- },
- ],
- },
- ],
- sort: {
- count: 250,
- orderBy: [
- {
- type: "formula",
- index: 0,
- order: "desc",
- },
- ],
- },
- responseFormat: "scalar",
- },
- ],
- style: {
- palette: "hostmap_blues",
- paletteFlip: false,
- },
- view: {
- focus: "WORLD",
- },
- },
- },
- ],
- templateVariables: [],
- layoutType: "free",
- notifyList: [],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_927141680.ts b/examples/v1/dashboards/CreateDashboard_927141680.ts
deleted file mode 100644
index d997825d2369..000000000000
--- a/examples/v1/dashboards/CreateDashboard_927141680.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Create a new dashboard with funnel widget
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with funnel widget",
- widgets: [
- {
- definition: {
- type: "funnel",
- requests: [
- {
- query: {
- dataSource: "rum",
- queryString: "",
- steps: [],
- },
- requestType: "funnel",
- },
- ],
- },
- },
- ],
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreateDashboard_985012506.ts b/examples/v1/dashboards/CreateDashboard_985012506.ts
deleted file mode 100644
index f97dfa5a5e22..000000000000
--- a/examples/v1/dashboards/CreateDashboard_985012506.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Create a new timeseries widget with incident_analytics data source
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiCreateDashboardRequest = {
- body: {
- title: "Example-Dashboard with incident_analytics datasource",
- widgets: [
- {
- definition: {
- title: "",
- showLegend: true,
- legendLayout: "auto",
- legendColumns: ["avg", "min", "max", "value", "sum"],
- time: {},
- type: "timeseries",
- requests: [
- {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "incident_analytics",
- name: "query1",
- search: {
- query: "test_level:test",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- responseFormat: "timeseries",
- style: {
- palette: "dog_classic",
- lineType: "solid",
- lineWidth: "normal",
- },
- displayType: "line",
- },
- ],
- },
- },
- ],
- layoutType: "ordered",
- reflowType: "auto",
- },
-};
-
-apiInstance
- .createDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/CreatePublicDashboard.ts b/examples/v1/dashboards/CreatePublicDashboard.ts
deleted file mode 100644
index 37efa39e83c8..000000000000
--- a/examples/v1/dashboards/CreatePublicDashboard.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a shared dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiCreatePublicDashboardRequest = {
- body: {
- dashboardId: DASHBOARD_ID,
- dashboardType: "custom_timeboard",
- shareType: "open",
- globalTime: {
- liveSpan: "1h",
- },
- },
-};
-
-apiInstance
- .createPublicDashboard(params)
- .then((data: v1.SharedDashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/DeleteDashboard.ts b/examples/v1/dashboards/DeleteDashboard.ts
deleted file mode 100644
index 5b18b5c0d27c..000000000000
--- a/examples/v1/dashboards/DeleteDashboard.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiDeleteDashboardRequest = {
- dashboardId: DASHBOARD_ID,
-};
-
-apiInstance
- .deleteDashboard(params)
- .then((data: v1.DashboardDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/DeleteDashboards.ts b/examples/v1/dashboards/DeleteDashboards.ts
deleted file mode 100644
index cd5df30b87cb..000000000000
--- a/examples/v1/dashboards/DeleteDashboards.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Delete dashboards returns "No Content" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiDeleteDashboardsRequest = {
- body: {
- data: [
- {
- id: DASHBOARD_ID,
- type: "dashboard",
- },
- ],
- },
-};
-
-apiInstance
- .deleteDashboards(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/DeletePublicDashboard.ts b/examples/v1/dashboards/DeletePublicDashboard.ts
deleted file mode 100644
index eeb0fea9b907..000000000000
--- a/examples/v1/dashboards/DeletePublicDashboard.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Revoke a shared dashboard URL returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiDeletePublicDashboardRequest = {
- token: "token",
-};
-
-apiInstance
- .deletePublicDashboard(params)
- .then((data: v1.DeleteSharedDashboardResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/DeletePublicDashboardInvitation.ts b/examples/v1/dashboards/DeletePublicDashboardInvitation.ts
deleted file mode 100644
index 3921e5d3c65d..000000000000
--- a/examples/v1/dashboards/DeletePublicDashboardInvitation.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Revoke shared dashboard invitations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiDeletePublicDashboardInvitationRequest = {
- body: {
- data: [
- {
- attributes: {
- email: "test@datadoghq.com",
- },
- type: "public_dashboard_invitation",
- },
- ],
- },
- token: "token",
-};
-
-apiInstance
- .deletePublicDashboardInvitation(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/GetDashboard.ts b/examples/v1/dashboards/GetDashboard.ts
deleted file mode 100644
index da9f89ea5ff9..000000000000
--- a/examples/v1/dashboards/GetDashboard.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiGetDashboardRequest = {
- dashboardId: DASHBOARD_ID,
-};
-
-apiInstance
- .getDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/GetDashboard_4262333854.ts b/examples/v1/dashboards/GetDashboard_4262333854.ts
deleted file mode 100644
index b6114b508e0e..000000000000
--- a/examples/v1/dashboards/GetDashboard_4262333854.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a dashboard returns 'author_name'
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiGetDashboardRequest = {
- dashboardId: DASHBOARD_ID,
-};
-
-apiInstance
- .getDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/GetPublicDashboard.ts b/examples/v1/dashboards/GetPublicDashboard.ts
deleted file mode 100644
index d2c2687da722..000000000000
--- a/examples/v1/dashboards/GetPublicDashboard.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a shared dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "shared_dashboard" in the system
-const SHARED_DASHBOARD_TOKEN = process.env.SHARED_DASHBOARD_TOKEN as string;
-
-const params: v1.DashboardsApiGetPublicDashboardRequest = {
- token: SHARED_DASHBOARD_TOKEN,
-};
-
-apiInstance
- .getPublicDashboard(params)
- .then((data: v1.SharedDashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/GetPublicDashboardInvitations.ts b/examples/v1/dashboards/GetPublicDashboardInvitations.ts
deleted file mode 100644
index 684281b333a0..000000000000
--- a/examples/v1/dashboards/GetPublicDashboardInvitations.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all invitations for a shared dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "shared_dashboard" in the system
-const SHARED_DASHBOARD_TOKEN = process.env.SHARED_DASHBOARD_TOKEN as string;
-
-const params: v1.DashboardsApiGetPublicDashboardInvitationsRequest = {
- token: SHARED_DASHBOARD_TOKEN,
-};
-
-apiInstance
- .getPublicDashboardInvitations(params)
- .then((data: v1.SharedDashboardInvites) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/ListDashboards.ts b/examples/v1/dashboards/ListDashboards.ts
deleted file mode 100644
index aa00398abd3d..000000000000
--- a/examples/v1/dashboards/ListDashboards.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all dashboards returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiListDashboardsRequest = {
- filterShared: false,
-};
-
-apiInstance
- .listDashboards(params)
- .then((data: v1.DashboardSummary) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/ListDashboards_1062671515.ts b/examples/v1/dashboards/ListDashboards_1062671515.ts
deleted file mode 100644
index b70748a1bb5a..000000000000
--- a/examples/v1/dashboards/ListDashboards_1062671515.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all dashboards returns "OK" response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiListDashboardsRequest = {
- count: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listDashboardsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/dashboards/ListDashboards_1773932563.ts b/examples/v1/dashboards/ListDashboards_1773932563.ts
deleted file mode 100644
index 722d2a4973d0..000000000000
--- a/examples/v1/dashboards/ListDashboards_1773932563.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get deleted dashboards returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-const params: v1.DashboardsApiListDashboardsRequest = {
- filterDeleted: true,
-};
-
-apiInstance
- .listDashboards(params)
- .then((data: v1.DashboardSummary) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/RestoreDashboards.ts b/examples/v1/dashboards/RestoreDashboards.ts
deleted file mode 100644
index ba598d1e6d80..000000000000
--- a/examples/v1/dashboards/RestoreDashboards.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Restore deleted dashboards returns "No Content" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiRestoreDashboardsRequest = {
- body: {
- data: [
- {
- id: DASHBOARD_ID,
- type: "dashboard",
- },
- ],
- },
-};
-
-apiInstance
- .restoreDashboards(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/SendPublicDashboardInvitation.ts b/examples/v1/dashboards/SendPublicDashboardInvitation.ts
deleted file mode 100644
index 39c2c89144f5..000000000000
--- a/examples/v1/dashboards/SendPublicDashboardInvitation.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Send shared dashboard invitation email returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "shared_dashboard" in the system
-const SHARED_DASHBOARD_TOKEN = process.env.SHARED_DASHBOARD_TOKEN as string;
-
-const params: v1.DashboardsApiSendPublicDashboardInvitationRequest = {
- body: {
- data: {
- attributes: {
- email: "exampledashboard@datadoghq.com",
- },
- type: "public_dashboard_invitation",
- },
- },
- token: SHARED_DASHBOARD_TOKEN,
-};
-
-apiInstance
- .sendPublicDashboardInvitation(params)
- .then((data: v1.SharedDashboardInvites) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/UpdateDashboard.ts b/examples/v1/dashboards/UpdateDashboard.ts
deleted file mode 100644
index c6c5605bced1..000000000000
--- a/examples/v1/dashboards/UpdateDashboard.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Update a dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiUpdateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- description: "Updated description",
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "apm_issue_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
- dashboardId: DASHBOARD_ID,
-};
-
-apiInstance
- .updateDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/UpdateDashboard_3454865944.ts b/examples/v1/dashboards/UpdateDashboard_3454865944.ts
deleted file mode 100644
index 18714ebb66e8..000000000000
--- a/examples/v1/dashboards/UpdateDashboard_3454865944.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Update a dashboard with tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v1.DashboardsApiUpdateDashboardRequest = {
- body: {
- layoutType: "ordered",
- title: "Example-Dashboard with list_stream widget",
- description: "Updated description",
- tags: ["team:foo", "team:bar"],
- widgets: [
- {
- definition: {
- type: "list_stream",
- requests: [
- {
- columns: [
- {
- width: "auto",
- field: "timestamp",
- },
- ],
- query: {
- dataSource: "apm_issue_stream",
- queryString: "",
- },
- responseFormat: "event_list",
- },
- ],
- },
- },
- ],
- },
- dashboardId: DASHBOARD_ID,
-};
-
-apiInstance
- .updateDashboard(params)
- .then((data: v1.Dashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/dashboards/UpdatePublicDashboard.ts b/examples/v1/dashboards/UpdatePublicDashboard.ts
deleted file mode 100644
index 3e27151ac6ef..000000000000
--- a/examples/v1/dashboards/UpdatePublicDashboard.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Update a shared dashboard returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DashboardsApi(configuration);
-
-// there is a valid "shared_dashboard" in the system
-const SHARED_DASHBOARD_TOKEN = process.env.SHARED_DASHBOARD_TOKEN as string;
-
-const params: v1.DashboardsApiUpdatePublicDashboardRequest = {
- body: {
- globalTime: {
- liveSpan: "15m",
- },
- shareList: [],
- shareType: "open",
- },
- token: SHARED_DASHBOARD_TOKEN,
-};
-
-apiInstance
- .updatePublicDashboard(params)
- .then((data: v1.SharedDashboard) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CancelDowntime.ts b/examples/v1/downtimes/CancelDowntime.ts
deleted file mode 100644
index 6b1229e9f213..000000000000
--- a/examples/v1/downtimes/CancelDowntime.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Cancel a downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-// there is a valid "downtime" in the system
-const DOWNTIME_ID = parseInt(process.env.DOWNTIME_ID as string);
-
-const params: v1.DowntimesApiCancelDowntimeRequest = {
- downtimeId: DOWNTIME_ID,
-};
-
-apiInstance
- .cancelDowntime(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CancelDowntimesByScope.ts b/examples/v1/downtimes/CancelDowntimesByScope.ts
deleted file mode 100644
index 71776cb7b968..000000000000
--- a/examples/v1/downtimes/CancelDowntimesByScope.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Cancel downtimes by scope returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-// there is a valid "downtime" in the system
-const DOWNTIME_SCOPE_0 = process.env.DOWNTIME_SCOPE_0 as string;
-
-const params: v1.DowntimesApiCancelDowntimesByScopeRequest = {
- body: {
- scope: DOWNTIME_SCOPE_0,
- },
-};
-
-apiInstance
- .cancelDowntimesByScope(params)
- .then((data: v1.CanceledDowntimesIds) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CreateDowntime.ts b/examples/v1/downtimes/CreateDowntime.ts
deleted file mode 100644
index 1ffc016a4688..000000000000
--- a/examples/v1/downtimes/CreateDowntime.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Schedule a downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiCreateDowntimeRequest = {
- body: {
- message: "Example-Downtime",
- start: Math.round(new Date().getTime() / 1000),
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- timezone: "Etc/UTC",
- scope: ["test:exampledowntime"],
- recurrence: {
- type: "weeks",
- period: 1,
- weekDays: ["Mon", "Tue", "Wed", "Thu", "Fri"],
- untilDate: Math.round(
- new Date(new Date().getTime() + 21 * 86400 * 1000).getTime() / 1000
- ),
- },
- notifyEndStates: ["alert", "no data", "warn"],
- notifyEndTypes: ["canceled", "expired"],
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CreateDowntime_1393233946.ts b/examples/v1/downtimes/CreateDowntime_1393233946.ts
deleted file mode 100644
index cafc854c0b56..000000000000
--- a/examples/v1/downtimes/CreateDowntime_1393233946.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Schedule a downtime with until occurrences
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiCreateDowntimeRequest = {
- body: {
- message: "Example-Downtime",
- recurrence: {
- period: 1,
- type: "weeks",
- untilOccurrences: 3,
- weekDays: ["Mon", "Tue", "Wed", "Thu", "Fri"],
- },
- scope: ["*"],
- start: Math.round(new Date().getTime() / 1000),
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- timezone: "Etc/UTC",
- monitorTags: ["tag0"],
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CreateDowntime_2908359488.ts b/examples/v1/downtimes/CreateDowntime_2908359488.ts
deleted file mode 100644
index de746307b7d6..000000000000
--- a/examples/v1/downtimes/CreateDowntime_2908359488.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Schedule a downtime until date
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiCreateDowntimeRequest = {
- body: {
- message: "Example-Downtime",
- recurrence: {
- period: 1,
- type: "weeks",
- untilDate: Math.round(
- new Date(new Date().getTime() + 21 * 86400 * 1000).getTime() / 1000
- ),
- weekDays: ["Mon", "Tue", "Wed", "Thu", "Fri"],
- },
- scope: ["*"],
- start: Math.round(new Date().getTime() / 1000),
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- timezone: "Etc/UTC",
- muteFirstRecoveryNotification: true,
- monitorTags: ["tag0"],
- notifyEndStates: ["alert"],
- notifyEndTypes: ["canceled"],
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CreateDowntime_3059354445.ts b/examples/v1/downtimes/CreateDowntime_3059354445.ts
deleted file mode 100644
index ab76773b7842..000000000000
--- a/examples/v1/downtimes/CreateDowntime_3059354445.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Schedule a downtime once a year
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiCreateDowntimeRequest = {
- body: {
- message: "Example-Downtime",
- recurrence: {
- period: 1,
- type: "years",
- },
- scope: ["*"],
- start: Math.round(new Date().getTime() / 1000),
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- timezone: "Etc/UTC",
- muteFirstRecoveryNotification: true,
- monitorTags: ["tag0"],
- notifyEndStates: ["alert", "warn"],
- notifyEndTypes: ["expired"],
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/CreateDowntime_3355644446.ts b/examples/v1/downtimes/CreateDowntime_3355644446.ts
deleted file mode 100644
index 426491255683..000000000000
--- a/examples/v1/downtimes/CreateDowntime_3355644446.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Schedule a monitor downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.DowntimesApiCreateDowntimeRequest = {
- body: {
- message: "Example-Downtime",
- start: Math.round(new Date().getTime() / 1000),
- timezone: "Etc/UTC",
- scope: ["test:exampledowntime"],
- monitorId: MONITOR_ID,
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/GetDowntime.ts b/examples/v1/downtimes/GetDowntime.ts
deleted file mode 100644
index 5c9ea0460c1c..000000000000
--- a/examples/v1/downtimes/GetDowntime.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-// there is a valid "downtime" in the system
-const DOWNTIME_ID = parseInt(process.env.DOWNTIME_ID as string);
-
-const params: v1.DowntimesApiGetDowntimeRequest = {
- downtimeId: DOWNTIME_ID,
-};
-
-apiInstance
- .getDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/ListDowntimes.ts b/examples/v1/downtimes/ListDowntimes.ts
deleted file mode 100644
index 6a6924a2435e..000000000000
--- a/examples/v1/downtimes/ListDowntimes.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all downtimes returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiListDowntimesRequest = {
- withCreator: true,
-};
-
-apiInstance
- .listDowntimes(params)
- .then((data: v1.Downtime[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/ListMonitorDowntimes.ts b/examples/v1/downtimes/ListMonitorDowntimes.ts
deleted file mode 100644
index 68c5b6bdb0d8..000000000000
--- a/examples/v1/downtimes/ListMonitorDowntimes.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get active downtimes for a monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-const params: v1.DowntimesApiListMonitorDowntimesRequest = {
- monitorId: 9223372036854775807,
-};
-
-apiInstance
- .listMonitorDowntimes(params)
- .then((data: v1.Downtime[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/downtimes/UpdateDowntime.ts b/examples/v1/downtimes/UpdateDowntime.ts
deleted file mode 100644
index 29f63e310e5a..000000000000
--- a/examples/v1/downtimes/UpdateDowntime.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Update a downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.DowntimesApi(configuration);
-
-// there is a valid "downtime" in the system
-const DOWNTIME_ID = parseInt(process.env.DOWNTIME_ID as string);
-
-const params: v1.DowntimesApiUpdateDowntimeRequest = {
- body: {
- message: "Example-Downtime-updated",
- muteFirstRecoveryNotification: true,
- notifyEndStates: ["alert", "no data", "warn"],
- notifyEndTypes: ["canceled", "expired"],
- },
- downtimeId: DOWNTIME_ID,
-};
-
-apiInstance
- .updateDowntime(params)
- .then((data: v1.Downtime) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/events/CreateEvent.ts b/examples/v1/events/CreateEvent.ts
deleted file mode 100644
index 9f33f5a27992..000000000000
--- a/examples/v1/events/CreateEvent.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Post an event returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.EventsApi(configuration);
-
-const params: v1.EventsApiCreateEventRequest = {
- body: {
- title: "Example-Event",
- text: "A text message.",
- tags: ["test:ExampleEvent"],
- },
-};
-
-apiInstance
- .createEvent(params)
- .then((data: v1.EventCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/events/CreateEvent_19927815.ts b/examples/v1/events/CreateEvent_19927815.ts
deleted file mode 100644
index 825c32d9e8a1..000000000000
--- a/examples/v1/events/CreateEvent_19927815.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Post an event with a long title returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.EventsApi(configuration);
-
-const params: v1.EventsApiCreateEventRequest = {
- body: {
- title:
- "Example-Event very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters",
- text: "A text message.",
- tags: ["test:ExampleEvent"],
- },
-};
-
-apiInstance
- .createEvent(params)
- .then((data: v1.EventCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/events/GetEvent.ts b/examples/v1/events/GetEvent.ts
deleted file mode 100644
index ef13cc6ca365..000000000000
--- a/examples/v1/events/GetEvent.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an event returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.EventsApi(configuration);
-
-const params: v1.EventsApiGetEventRequest = {
- eventId: 9223372036854775807,
-};
-
-apiInstance
- .getEvent(params)
- .then((data: v1.EventResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/events/ListEvents.ts b/examples/v1/events/ListEvents.ts
deleted file mode 100644
index 9a40e393d221..000000000000
--- a/examples/v1/events/ListEvents.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of events returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.EventsApi(configuration);
-
-const params: v1.EventsApiListEventsRequest = {
- start: 9223372036854775807,
- end: 9223372036854775807,
-};
-
-apiInstance
- .listEvents(params)
- .then((data: v1.EventListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/gcp-integration/CreateGCPIntegration.ts b/examples/v1/gcp-integration/CreateGCPIntegration.ts
deleted file mode 100644
index 2cbf16c87786..000000000000
--- a/examples/v1/gcp-integration/CreateGCPIntegration.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Create a GCP integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.GCPIntegrationApi(configuration);
-
-const params: v1.GCPIntegrationApiCreateGCPIntegrationRequest = {
- body: {
- authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
- authUri: "https://accounts.google.com/o/oauth2/auth",
- clientEmail: "252bf553ef04b351@example.com",
- clientId: "163662907116366290710",
- clientX509CertUrl:
- "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
- hostFilters: "key:value,filter:example",
- cloudRunRevisionFilters: ["dr:dre"],
- isCspmEnabled: true,
- isSecurityCommandCenterEnabled: true,
- isResourceChangeCollectionEnabled: true,
- privateKey: "private_key",
- privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
- projectId: "datadog-apitest",
- resourceCollectionEnabled: true,
- tokenUri: "https://accounts.google.com/o/oauth2/token",
- type: "service_account",
- },
-};
-
-apiInstance
- .createGCPIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/gcp-integration/DeleteGCPIntegration.ts b/examples/v1/gcp-integration/DeleteGCPIntegration.ts
deleted file mode 100644
index 21442d6db208..000000000000
--- a/examples/v1/gcp-integration/DeleteGCPIntegration.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a GCP integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.GCPIntegrationApi(configuration);
-
-const params: v1.GCPIntegrationApiDeleteGCPIntegrationRequest = {
- body: {
- clientEmail: "252bf553ef04b351@example.com",
- clientId: "163662907116366290710",
- projectId: "datadog-apitest",
- },
-};
-
-apiInstance
- .deleteGCPIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/gcp-integration/ListGCPIntegration.ts b/examples/v1/gcp-integration/ListGCPIntegration.ts
deleted file mode 100644
index 4ed558ed536f..000000000000
--- a/examples/v1/gcp-integration/ListGCPIntegration.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all GCP integrations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.GCPIntegrationApi(configuration);
-
-apiInstance
- .listGCPIntegration()
- .then((data: v1.GCPAccount[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/gcp-integration/UpdateGCPIntegration.ts b/examples/v1/gcp-integration/UpdateGCPIntegration.ts
deleted file mode 100644
index c4770db7ec8c..000000000000
--- a/examples/v1/gcp-integration/UpdateGCPIntegration.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Update a GCP integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.GCPIntegrationApi(configuration);
-
-const params: v1.GCPIntegrationApiUpdateGCPIntegrationRequest = {
- body: {
- authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
- authUri: "https://accounts.google.com/o/oauth2/auth",
- clientEmail: "252bf553ef04b351@example.com",
- clientId: "163662907116366290710",
- clientX509CertUrl:
- "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
- hostFilters: "key:value,filter:example",
- isCspmEnabled: true,
- isSecurityCommandCenterEnabled: true,
- isResourceChangeCollectionEnabled: true,
- privateKey: "private_key",
- privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
- projectId: "datadog-apitest",
- resourceCollectionEnabled: true,
- tokenUri: "https://accounts.google.com/o/oauth2/token",
- type: "service_account",
- },
-};
-
-apiInstance
- .updateGCPIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.ts b/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.ts
deleted file mode 100644
index 0ec69fe191f9..000000000000
--- a/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Update a GCP integration cloud run revision filters returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.GCPIntegrationApi(configuration);
-
-const params: v1.GCPIntegrationApiUpdateGCPIntegrationRequest = {
- body: {
- authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
- authUri: "https://accounts.google.com/o/oauth2/auth",
- clientEmail: "252bf553ef04b351@example.com",
- clientId: "163662907116366290710",
- clientX509CertUrl:
- "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
- hostFilters: "key:value,filter:example",
- cloudRunRevisionFilters: ["merp:derp"],
- isCspmEnabled: true,
- isSecurityCommandCenterEnabled: true,
- isResourceChangeCollectionEnabled: true,
- privateKey: "private_key",
- privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
- projectId: "datadog-apitest",
- resourceCollectionEnabled: true,
- tokenUri: "https://accounts.google.com/o/oauth2/token",
- type: "service_account",
- },
-};
-
-apiInstance
- .updateGCPIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/GetHostTotals.ts b/examples/v1/hosts/GetHostTotals.ts
deleted file mode 100644
index bb61d3bf7bcf..000000000000
--- a/examples/v1/hosts/GetHostTotals.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the total number of active hosts returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-apiInstance
- .getHostTotals()
- .then((data: v1.HostTotals) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/ListHosts.ts b/examples/v1/hosts/ListHosts.ts
deleted file mode 100644
index a6366650a107..000000000000
--- a/examples/v1/hosts/ListHosts.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all hosts for your organization returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-const params: v1.HostsApiListHostsRequest = {
- filter: "env:ci",
-};
-
-apiInstance
- .listHosts(params)
- .then((data: v1.HostListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/ListHosts_2975406675.ts b/examples/v1/hosts/ListHosts_2975406675.ts
deleted file mode 100644
index 336ac5674b08..000000000000
--- a/examples/v1/hosts/ListHosts_2975406675.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all hosts with metadata for your organization returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-const params: v1.HostsApiListHostsRequest = {
- includeHostsMetadata: true,
-};
-
-apiInstance
- .listHosts(params)
- .then((data: v1.HostListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/ListHosts_347346033.ts b/examples/v1/hosts/ListHosts_347346033.ts
deleted file mode 100644
index 264dfada581f..000000000000
--- a/examples/v1/hosts/ListHosts_347346033.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all hosts with metadata deserializes successfully
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-const params: v1.HostsApiListHostsRequest = {
- includeHostsMetadata: true,
-};
-
-apiInstance
- .listHosts(params)
- .then((data: v1.HostListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/MuteHost.ts b/examples/v1/hosts/MuteHost.ts
deleted file mode 100644
index dbb381203f82..000000000000
--- a/examples/v1/hosts/MuteHost.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Mute a host returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-const params: v1.HostsApiMuteHostRequest = {
- body: {
- end: 1579098130,
- message: "Muting this host for a test!",
- override: false,
- },
- hostName: "host_name",
-};
-
-apiInstance
- .muteHost(params)
- .then((data: v1.HostMuteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/hosts/UnmuteHost.ts b/examples/v1/hosts/UnmuteHost.ts
deleted file mode 100644
index c57c72362c04..000000000000
--- a/examples/v1/hosts/UnmuteHost.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Unmute a host returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.HostsApi(configuration);
-
-const params: v1.HostsApiUnmuteHostRequest = {
- hostName: "host_name",
-};
-
-apiInstance
- .unmuteHost(params)
- .then((data: v1.HostMuteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/ip-ranges/GetIPRanges.ts b/examples/v1/ip-ranges/GetIPRanges.ts
deleted file mode 100644
index 8d5acb0527d1..000000000000
--- a/examples/v1/ip-ranges/GetIPRanges.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List IP Ranges returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.IPRangesApi(configuration);
-
-apiInstance
- .getIPRanges()
- .then((data: v1.IPRanges) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/CreateAPIKey.ts b/examples/v1/key-management/CreateAPIKey.ts
deleted file mode 100644
index 01a7dd9f2e63..000000000000
--- a/examples/v1/key-management/CreateAPIKey.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Create an API key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiCreateAPIKeyRequest = {
- body: {
- name: "example user",
- },
-};
-
-apiInstance
- .createAPIKey(params)
- .then((data: v1.ApiKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/CreateApplicationKey.ts b/examples/v1/key-management/CreateApplicationKey.ts
deleted file mode 100644
index 2c391f205878..000000000000
--- a/examples/v1/key-management/CreateApplicationKey.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Create an application key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiCreateApplicationKeyRequest = {
- body: {
- name: "example user",
- },
-};
-
-apiInstance
- .createApplicationKey(params)
- .then((data: v1.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/DeleteAPIKey.ts b/examples/v1/key-management/DeleteAPIKey.ts
deleted file mode 100644
index 74754bf4d308..000000000000
--- a/examples/v1/key-management/DeleteAPIKey.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an API key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiDeleteAPIKeyRequest = {
- key: "key",
-};
-
-apiInstance
- .deleteAPIKey(params)
- .then((data: v1.ApiKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/DeleteApplicationKey.ts b/examples/v1/key-management/DeleteApplicationKey.ts
deleted file mode 100644
index 0bae81b6e40b..000000000000
--- a/examples/v1/key-management/DeleteApplicationKey.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an application key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiDeleteApplicationKeyRequest = {
- key: "key",
-};
-
-apiInstance
- .deleteApplicationKey(params)
- .then((data: v1.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/GetAPIKey.ts b/examples/v1/key-management/GetAPIKey.ts
deleted file mode 100644
index db0b96acfcef..000000000000
--- a/examples/v1/key-management/GetAPIKey.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get API key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiGetAPIKeyRequest = {
- key: "key",
-};
-
-apiInstance
- .getAPIKey(params)
- .then((data: v1.ApiKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/GetApplicationKey.ts b/examples/v1/key-management/GetApplicationKey.ts
deleted file mode 100644
index 9a462ded568f..000000000000
--- a/examples/v1/key-management/GetApplicationKey.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an application key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiGetApplicationKeyRequest = {
- key: "key",
-};
-
-apiInstance
- .getApplicationKey(params)
- .then((data: v1.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/ListAPIKeys.ts b/examples/v1/key-management/ListAPIKeys.ts
deleted file mode 100644
index 6c481da67e13..000000000000
--- a/examples/v1/key-management/ListAPIKeys.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all API keys returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-apiInstance
- .listAPIKeys()
- .then((data: v1.ApiKeyListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/ListApplicationKeys.ts b/examples/v1/key-management/ListApplicationKeys.ts
deleted file mode 100644
index 1839636649bb..000000000000
--- a/examples/v1/key-management/ListApplicationKeys.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all application keys returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-apiInstance
- .listApplicationKeys()
- .then((data: v1.ApplicationKeyListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/UpdateAPIKey.ts b/examples/v1/key-management/UpdateAPIKey.ts
deleted file mode 100644
index d61d8b0355cc..000000000000
--- a/examples/v1/key-management/UpdateAPIKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Edit an API key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiUpdateAPIKeyRequest = {
- body: {
- name: "example user",
- },
- key: "key",
-};
-
-apiInstance
- .updateAPIKey(params)
- .then((data: v1.ApiKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/key-management/UpdateApplicationKey.ts b/examples/v1/key-management/UpdateApplicationKey.ts
deleted file mode 100644
index 48476ac6648b..000000000000
--- a/examples/v1/key-management/UpdateApplicationKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Edit an application key returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.KeyManagementApi(configuration);
-
-const params: v1.KeyManagementApiUpdateApplicationKeyRequest = {
- body: {
- name: "example user",
- },
- key: "key",
-};
-
-apiInstance
- .updateApplicationKey(params)
- .then((data: v1.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/CreateLogsIndex.ts b/examples/v1/logs-indexes/CreateLogsIndex.ts
deleted file mode 100644
index f3da08f6645a..000000000000
--- a/examples/v1/logs-indexes/CreateLogsIndex.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Create an index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-const params: v1.LogsIndexesApiCreateLogsIndexRequest = {
- body: {
- dailyLimit: 300000000,
- dailyLimitReset: {
- resetTime: "14:00",
- resetUtcOffset: "+02:00",
- },
- dailyLimitWarningThresholdPercentage: 70,
- exclusionFilters: [
- {
- filter: {
- query: "*",
- sampleRate: 1.0,
- },
- name: "payment",
- },
- ],
- filter: {
- query: "source:python",
- },
- name: "main",
- numFlexLogsRetentionDays: 360,
- numRetentionDays: 15,
- },
-};
-
-apiInstance
- .createLogsIndex(params)
- .then((data: v1.LogsIndex) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/DeleteLogsIndex.ts b/examples/v1/logs-indexes/DeleteLogsIndex.ts
deleted file mode 100644
index 65e9fdbd571c..000000000000
--- a/examples/v1/logs-indexes/DeleteLogsIndex.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-const params: v1.LogsIndexesApiDeleteLogsIndexRequest = {
- name: "name",
-};
-
-apiInstance
- .deleteLogsIndex(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/GetLogsIndex.ts b/examples/v1/logs-indexes/GetLogsIndex.ts
deleted file mode 100644
index 7092f15e4053..000000000000
--- a/examples/v1/logs-indexes/GetLogsIndex.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-const params: v1.LogsIndexesApiGetLogsIndexRequest = {
- name: "name",
-};
-
-apiInstance
- .getLogsIndex(params)
- .then((data: v1.LogsIndex) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/GetLogsIndexOrder.ts b/examples/v1/logs-indexes/GetLogsIndexOrder.ts
deleted file mode 100644
index 223a4ec8739b..000000000000
--- a/examples/v1/logs-indexes/GetLogsIndexOrder.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get indexes order returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-apiInstance
- .getLogsIndexOrder()
- .then((data: v1.LogsIndexesOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/ListLogIndexes.ts b/examples/v1/logs-indexes/ListLogIndexes.ts
deleted file mode 100644
index 1b51c588b968..000000000000
--- a/examples/v1/logs-indexes/ListLogIndexes.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all indexes returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-apiInstance
- .listLogIndexes()
- .then((data: v1.LogsIndexListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/UpdateLogsIndex.ts b/examples/v1/logs-indexes/UpdateLogsIndex.ts
deleted file mode 100644
index 4c429dc47ef1..000000000000
--- a/examples/v1/logs-indexes/UpdateLogsIndex.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Update an index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-const params: v1.LogsIndexesApiUpdateLogsIndexRequest = {
- body: {
- dailyLimit: 300000000,
- dailyLimitReset: {
- resetTime: "14:00",
- resetUtcOffset: "+02:00",
- },
- dailyLimitWarningThresholdPercentage: 70,
- disableDailyLimit: false,
- exclusionFilters: [
- {
- filter: {
- query: "*",
- sampleRate: 1.0,
- },
- name: "payment",
- },
- ],
- filter: {
- query: "source:python",
- },
- numFlexLogsRetentionDays: 360,
- numRetentionDays: 15,
- },
- name: "name",
-};
-
-apiInstance
- .updateLogsIndex(params)
- .then((data: v1.LogsIndex) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-indexes/UpdateLogsIndexOrder.ts b/examples/v1/logs-indexes/UpdateLogsIndexOrder.ts
deleted file mode 100644
index b3a5b39ad68f..000000000000
--- a/examples/v1/logs-indexes/UpdateLogsIndexOrder.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Update indexes order returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsIndexesApi(configuration);
-
-const params: v1.LogsIndexesApiUpdateLogsIndexOrderRequest = {
- body: {
- indexNames: ["main", "payments", "web"],
- },
-};
-
-apiInstance
- .updateLogsIndexOrder(params)
- .then((data: v1.LogsIndexesOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline.ts b/examples/v1/logs-pipelines/CreateLogsPipeline.ts
deleted file mode 100644
index f61a47f79a1b..000000000000
--- a/examples/v1/logs-pipelines/CreateLogsPipeline.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Create a pipeline returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiCreateLogsPipelineRequest = {
- body: {
- filter: {
- query: "source:python",
- },
- name: "",
- processors: [
- {
- grok: {
- matchRules: "rule_name_1 foo\nrule_name_2 bar\n",
- supportRules: "rule_name_1 foo\nrule_name_2 bar\n",
- },
- isEnabled: false,
- samples: [],
- source: "message",
- type: "grok-parser",
- },
- ],
- tags: [],
- },
-};
-
-apiInstance
- .createLogsPipeline(params)
- .then((data: v1.LogsPipeline) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline_2707101123.ts b/examples/v1/logs-pipelines/CreateLogsPipeline_2707101123.ts
deleted file mode 100644
index 77b7361639f7..000000000000
--- a/examples/v1/logs-pipelines/CreateLogsPipeline_2707101123.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Create a pipeline with Span Id Remapper returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiCreateLogsPipelineRequest = {
- body: {
- filter: {
- query: "source:python",
- },
- name: "testPipeline",
- processors: [
- {
- type: "span-id-remapper",
- isEnabled: true,
- name: "test_filter",
- sources: ["dd.span_id"],
- },
- ],
- tags: [],
- },
-};
-
-apiInstance
- .createLogsPipeline(params)
- .then((data: v1.LogsPipeline) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/DeleteLogsPipeline.ts b/examples/v1/logs-pipelines/DeleteLogsPipeline.ts
deleted file mode 100644
index 6ef4cceaee83..000000000000
--- a/examples/v1/logs-pipelines/DeleteLogsPipeline.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a pipeline returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiDeleteLogsPipelineRequest = {
- pipelineId: "pipeline_id",
-};
-
-apiInstance
- .deleteLogsPipeline(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/GetLogsPipeline.ts b/examples/v1/logs-pipelines/GetLogsPipeline.ts
deleted file mode 100644
index f3eb3a4b51a3..000000000000
--- a/examples/v1/logs-pipelines/GetLogsPipeline.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a pipeline returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiGetLogsPipelineRequest = {
- pipelineId: "pipeline_id",
-};
-
-apiInstance
- .getLogsPipeline(params)
- .then((data: v1.LogsPipeline) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/GetLogsPipelineOrder.ts b/examples/v1/logs-pipelines/GetLogsPipelineOrder.ts
deleted file mode 100644
index 5e3c0d6b660d..000000000000
--- a/examples/v1/logs-pipelines/GetLogsPipelineOrder.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get pipeline order returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-apiInstance
- .getLogsPipelineOrder()
- .then((data: v1.LogsPipelinesOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/ListLogsPipelines.ts b/examples/v1/logs-pipelines/ListLogsPipelines.ts
deleted file mode 100644
index 1ed465bfa6d6..000000000000
--- a/examples/v1/logs-pipelines/ListLogsPipelines.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all pipelines returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-apiInstance
- .listLogsPipelines()
- .then((data: v1.LogsPipeline[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/UpdateLogsPipeline.ts b/examples/v1/logs-pipelines/UpdateLogsPipeline.ts
deleted file mode 100644
index 3605ecd66513..000000000000
--- a/examples/v1/logs-pipelines/UpdateLogsPipeline.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Update a pipeline returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiUpdateLogsPipelineRequest = {
- body: {
- filter: {
- query: "source:python",
- },
- name: "",
- processors: [
- {
- grok: {
- matchRules: "rule_name_1 foo\nrule_name_2 bar\n",
- supportRules: "rule_name_1 foo\nrule_name_2 bar\n",
- },
- isEnabled: false,
- samples: [],
- source: "message",
- type: "grok-parser",
- },
- ],
- tags: [],
- },
- pipelineId: "pipeline_id",
-};
-
-apiInstance
- .updateLogsPipeline(params)
- .then((data: v1.LogsPipeline) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.ts b/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.ts
deleted file mode 100644
index 7b38eb347a65..000000000000
--- a/examples/v1/logs-pipelines/UpdateLogsPipelineOrder.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Update pipeline order returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsPipelinesApi(configuration);
-
-const params: v1.LogsPipelinesApiUpdateLogsPipelineOrderRequest = {
- body: {
- pipelineIds: ["tags", "org_ids", "products"],
- },
-};
-
-apiInstance
- .updateLogsPipelineOrder(params)
- .then((data: v1.LogsPipelinesOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs/ListLogs.ts b/examples/v1/logs/ListLogs.ts
deleted file mode 100644
index af187b00d6a0..000000000000
--- a/examples/v1/logs/ListLogs.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Search logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsApi(configuration);
-
-const params: v1.LogsApiListLogsRequest = {
- body: {
- index: "retention-3,retention-15",
- query: "service:web* AND @http.status_code:[200 TO 299]",
- sort: "asc",
- time: {
- from: new Date(2020, 2, 2, 2, 2, 2, 202000),
- to: new Date(2020, 2, 20, 2, 2, 2, 202000),
- },
- },
-};
-
-apiInstance
- .listLogs(params)
- .then((data: v1.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs/ListLogs_235998668.ts b/examples/v1/logs/ListLogs_235998668.ts
deleted file mode 100644
index eef5c7e12ce9..000000000000
--- a/examples/v1/logs/ListLogs_235998668.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Search test logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsApi(configuration);
-
-const params: v1.LogsApiListLogsRequest = {
- body: {
- index: "main",
- query: "host:Test*",
- sort: "asc",
- time: {
- from: new Date(new Date().getTime() + -1 * 3600 * 1000),
- timezone: "Europe/Paris",
- to: new Date(),
- },
- },
-};
-
-apiInstance
- .listLogs(params)
- .then((data: v1.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs/SubmitLog.ts b/examples/v1/logs/SubmitLog.ts
deleted file mode 100644
index 84f6b4cb4c27..000000000000
--- a/examples/v1/logs/SubmitLog.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Send logs returns "Response from server (always 200 empty JSON)." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsApi(configuration);
-
-const params: v1.LogsApiSubmitLogRequest = {
- body: [
- {
- message: "Example-Log",
- ddtags: "host:ExampleLog",
- },
- ],
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs/SubmitLog_1920474053.ts b/examples/v1/logs/SubmitLog_1920474053.ts
deleted file mode 100644
index e70af6067d65..000000000000
--- a/examples/v1/logs/SubmitLog_1920474053.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Send gzip logs returns "Response from server (always 200 empty JSON)." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsApi(configuration);
-
-const params: v1.LogsApiSubmitLogRequest = {
- body: [
- {
- message: "Example-Log",
- ddtags: "host:ExampleLog",
- },
- ],
- contentEncoding: "gzip",
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/logs/SubmitLog_3418823904.ts b/examples/v1/logs/SubmitLog_3418823904.ts
deleted file mode 100644
index 62edfe176b83..000000000000
--- a/examples/v1/logs/SubmitLog_3418823904.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Send deflate logs returns "Response from server (always 200 empty JSON)." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.LogsApi(configuration);
-
-const params: v1.LogsApiSubmitLogRequest = {
- body: [
- {
- message: "Example-Log",
- ddtags: "host:ExampleLog",
- },
- ],
- contentEncoding: "deflate",
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/GetMetricMetadata.ts b/examples/v1/metrics/GetMetricMetadata.ts
deleted file mode 100644
index 1ce354c96330..000000000000
--- a/examples/v1/metrics/GetMetricMetadata.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get metric metadata returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiGetMetricMetadataRequest = {
- metricName: "metric_name",
-};
-
-apiInstance
- .getMetricMetadata(params)
- .then((data: v1.MetricMetadata) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/ListActiveMetrics.ts b/examples/v1/metrics/ListActiveMetrics.ts
deleted file mode 100644
index 91995e2e8fb7..000000000000
--- a/examples/v1/metrics/ListActiveMetrics.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get active metrics list returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiListActiveMetricsRequest = {
- from: 9223372036854775807,
-};
-
-apiInstance
- .listActiveMetrics(params)
- .then((data: v1.MetricsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/ListMetrics.ts b/examples/v1/metrics/ListMetrics.ts
deleted file mode 100644
index 8994abc136d9..000000000000
--- a/examples/v1/metrics/ListMetrics.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Search metrics returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiListMetricsRequest = {
- q: "q",
-};
-
-apiInstance
- .listMetrics(params)
- .then((data: v1.MetricSearchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/QueryMetrics.ts b/examples/v1/metrics/QueryMetrics.ts
deleted file mode 100644
index a22f705c3b09..000000000000
--- a/examples/v1/metrics/QueryMetrics.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Query timeseries points returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiQueryMetricsRequest = {
- from: Math.round(
- new Date(new Date().getTime() + -1 * 86400 * 1000).getTime() / 1000
- ),
- to: Math.round(new Date().getTime() / 1000),
- query: "system.cpu.idle{*}",
-};
-
-apiInstance
- .queryMetrics(params)
- .then((data: v1.MetricsQueryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/SubmitDistributionPoints.ts b/examples/v1/metrics/SubmitDistributionPoints.ts
deleted file mode 100644
index 651221ba9f9e..000000000000
--- a/examples/v1/metrics/SubmitDistributionPoints.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Submit distribution points returns "Payload accepted" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiSubmitDistributionPointsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1.dist",
- points: [[Math.round(new Date().getTime() / 1000), [1.0, 2.0]]],
- },
- ],
- },
-};
-
-apiInstance
- .submitDistributionPoints(params)
- .then((data: v1.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/SubmitDistributionPoints_3109558960.ts b/examples/v1/metrics/SubmitDistributionPoints_3109558960.ts
deleted file mode 100644
index 9f268e797d38..000000000000
--- a/examples/v1/metrics/SubmitDistributionPoints_3109558960.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Submit deflate distribution points returns "Payload accepted" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiSubmitDistributionPointsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1.dist",
- points: [[Math.round(new Date().getTime() / 1000), [1.0, 2.0]]],
- },
- ],
- },
- contentEncoding: "deflate",
-};
-
-apiInstance
- .submitDistributionPoints(params)
- .then((data: v1.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/SubmitMetrics.ts b/examples/v1/metrics/SubmitMetrics.ts
deleted file mode 100644
index 3c70e209ed47..000000000000
--- a/examples/v1/metrics/SubmitMetrics.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Submit metrics returns "Payload accepted" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiSubmitMetricsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1",
- type: "gauge",
- points: [[Math.round(new Date().getTime() / 1000), 1.1]],
- tags: ["test:ExampleMetric"],
- },
- ],
- },
-};
-
-apiInstance
- .submitMetrics(params)
- .then((data: v1.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/SubmitMetrics_2203981258.ts b/examples/v1/metrics/SubmitMetrics_2203981258.ts
deleted file mode 100644
index 73a206b146bd..000000000000
--- a/examples/v1/metrics/SubmitMetrics_2203981258.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Submit deflate metrics returns "Payload accepted" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiSubmitMetricsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1",
- type: "gauge",
- points: [[Math.round(new Date().getTime() / 1000), 1.1]],
- tags: ["test:ExampleMetric"],
- },
- ],
- },
- contentEncoding: "deflate",
-};
-
-apiInstance
- .submitMetrics(params)
- .then((data: v1.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/metrics/UpdateMetricMetadata.ts b/examples/v1/metrics/UpdateMetricMetadata.ts
deleted file mode 100644
index aaecc652a990..000000000000
--- a/examples/v1/metrics/UpdateMetricMetadata.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Edit metric metadata returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MetricsApi(configuration);
-
-const params: v1.MetricsApiUpdateMetricMetadataRequest = {
- body: {
- perUnit: "second",
- type: "count",
- unit: "byte",
- },
- metricName: "metric_name",
-};
-
-apiInstance
- .updateMetricMetadata(params)
- .then((data: v1.MetricMetadata) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CheckCanDeleteMonitor.ts b/examples/v1/monitors/CheckCanDeleteMonitor.ts
deleted file mode 100644
index 36b2ae0704bc..000000000000
--- a/examples/v1/monitors/CheckCanDeleteMonitor.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Check if a monitor can be deleted returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiCheckCanDeleteMonitorRequest = {
- monitorIds: [MONITOR_ID],
-};
-
-apiInstance
- .checkCanDeleteMonitor(params)
- .then((data: v1.CheckCanDeleteMonitorResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor.ts b/examples/v1/monitors/CreateMonitor.ts
deleted file mode 100644
index 8c17163c8e43..000000000000
--- a/examples/v1/monitors/CreateMonitor.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create a monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "log alert",
- query: `logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- restrictedRoles: [ROLE_DATA_ID],
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_1303514967.ts b/examples/v1/monitors/CreateMonitor_1303514967.ts
deleted file mode 100644
index 8fbb10f3aed5..000000000000
--- a/examples/v1/monitors/CreateMonitor_1303514967.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Create a Cost Monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example Monitor",
- type: "cost alert",
- query: `formula("exclude_null(query1)").last("7d").anomaly(direction="above", threshold=10) >= 5`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 5,
- warning: 3,
- },
- variables: [
- {
- dataSource: "cloud_cost",
- query:
- "sum:aws.cost.net.amortized.shared.resources.allocated{aws_product IN (amplify ,athena, backup, bedrock ) } by {aws_product}.rollup(sum, 86400)",
- name: "query1",
- aggregator: "sum",
- },
- ],
- includeTags: true,
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_1539578087.ts b/examples/v1/monitors/CreateMonitor_1539578087.ts
deleted file mode 100644
index f02c59d9f933..000000000000
--- a/examples/v1/monitors/CreateMonitor_1539578087.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Create a metric monitor with a custom schedule returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- message: "some message Notify: @hipchat-channel",
- name: "Example-Monitor",
- query: "avg(current_1mo):avg:system.load.5{*} > 0.5",
- tags: [],
- options: {
- thresholds: {
- critical: 0.5,
- },
- notifyAudit: false,
- includeTags: false,
- schedulingOptions: {
- evaluationWindow: {
- dayStarts: "04:00",
- monthStarts: 1,
- },
- customSchedule: {
- recurrences: [
- {
- rrule: "FREQ=DAILY;INTERVAL=1",
- timezone: "America/Los_Angeles",
- start: "2024-10-26T09:13:00",
- },
- ],
- },
- },
- },
- type: "query alert",
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_1969035628.ts b/examples/v1/monitors/CreateMonitor_1969035628.ts
deleted file mode 100644
index 0fa989fff9db..000000000000
--- a/examples/v1/monitors/CreateMonitor_1969035628.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a ci-tests formula and functions monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "ci-tests alert",
- query: `formula("query1 / query2 * 100").last("15m") >= 0.8`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 0.8,
- },
- variables: [
- {
- dataSource: "ci_tests",
- name: "query1",
- search: {
- query: "@test.status:fail",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- {
- dataSource: "ci_tests",
- name: "query2",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_2012680290.ts b/examples/v1/monitors/CreateMonitor_2012680290.ts
deleted file mode 100644
index bd78d94f68f6..000000000000
--- a/examples/v1/monitors/CreateMonitor_2012680290.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Create a metric monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "metric alert",
- query: "avg(current_1mo):avg:system.load.5{*} > 0.5",
- message: "some message Notify: @hipchat-channel",
- options: {
- thresholds: {
- critical: 0.5,
- },
- schedulingOptions: {
- evaluationWindow: {
- dayStarts: "04:00",
- monthStarts: 1,
- },
- },
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_2520912138.ts b/examples/v1/monitors/CreateMonitor_2520912138.ts
deleted file mode 100644
index ced383c29984..000000000000
--- a/examples/v1/monitors/CreateMonitor_2520912138.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a ci-tests monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "ci-tests alert",
- query: `ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 1,
- },
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_3790803616.ts b/examples/v1/monitors/CreateMonitor_3790803616.ts
deleted file mode 100644
index 5abb0d16005f..000000000000
--- a/examples/v1/monitors/CreateMonitor_3790803616.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a ci-pipelines monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "ci-pipelines alert",
- query: `ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 1,
- },
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_3824294658.ts b/examples/v1/monitors/CreateMonitor_3824294658.ts
deleted file mode 100644
index 70878b9d652a..000000000000
--- a/examples/v1/monitors/CreateMonitor_3824294658.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a ci-pipelines formula and functions monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "ci-pipelines alert",
- query: `formula("query1 / query2 * 100").last("15m") >= 0.8`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 0.8,
- },
- variables: [
- {
- dataSource: "ci_pipelines",
- name: "query1",
- search: {
- query: "@ci.status:error",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- {
- dataSource: "ci_pipelines",
- name: "query2",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_3883669300.ts b/examples/v1/monitors/CreateMonitor_3883669300.ts
deleted file mode 100644
index 13801e9a3cc3..000000000000
--- a/examples/v1/monitors/CreateMonitor_3883669300.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a RUM formula and functions monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "rum alert",
- query: `formula("query2 / query1 * 100").last("15m") >= 0.8`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 0.8,
- },
- variables: [
- {
- dataSource: "rum",
- name: "query2",
- search: {
- query: "",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- {
- dataSource: "rum",
- name: "query1",
- search: {
- query: "status:error",
- },
- indexes: ["*"],
- compute: {
- aggregation: "count",
- },
- groupBy: [],
- },
- ],
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/CreateMonitor_440013737.ts b/examples/v1/monitors/CreateMonitor_440013737.ts
deleted file mode 100644
index dc0712754e27..000000000000
--- a/examples/v1/monitors/CreateMonitor_440013737.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create an Error Tracking monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiCreateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "error-tracking alert",
- query: `error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1`,
- message: "some message",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- thresholds: {
- critical: 1,
- },
- },
- },
-};
-
-apiInstance
- .createMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/DeleteMonitor.ts b/examples/v1/monitors/DeleteMonitor.ts
deleted file mode 100644
index 4f05ac6c7f29..000000000000
--- a/examples/v1/monitors/DeleteMonitor.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiDeleteMonitorRequest = {
- monitorId: MONITOR_ID,
-};
-
-apiInstance
- .deleteMonitor(params)
- .then((data: v1.DeletedMonitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/GetMonitor.ts b/examples/v1/monitors/GetMonitor.ts
deleted file mode 100644
index 8d4e4fa4d29d..000000000000
--- a/examples/v1/monitors/GetMonitor.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a monitor's details returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiGetMonitorRequest = {
- monitorId: MONITOR_ID,
- withDowntimes: true,
-};
-
-apiInstance
- .getMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/GetMonitor_2200114573.ts b/examples/v1/monitors/GetMonitor_2200114573.ts
deleted file mode 100644
index a221e1268a7b..000000000000
--- a/examples/v1/monitors/GetMonitor_2200114573.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a monitor's details with downtime returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiGetMonitorRequest = {
- monitorId: MONITOR_ID,
- withDowntimes: true,
-};
-
-apiInstance
- .getMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/GetMonitor_3691711704.ts b/examples/v1/monitors/GetMonitor_3691711704.ts
deleted file mode 100644
index 7710756adbdc..000000000000
--- a/examples/v1/monitors/GetMonitor_3691711704.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a synthetics monitor's details
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "synthetics_api_test" in the system
-const SYNTHETICS_API_TEST_MONITOR_ID = parseInt(
- process.env.SYNTHETICS_API_TEST_MONITOR_ID as string
-);
-
-const params: v1.MonitorsApiGetMonitorRequest = {
- monitorId: SYNTHETICS_API_TEST_MONITOR_ID,
-};
-
-apiInstance
- .getMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ListMonitors.ts b/examples/v1/monitors/ListMonitors.ts
deleted file mode 100644
index 27178949cc59..000000000000
--- a/examples/v1/monitors/ListMonitors.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all monitors returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-apiInstance
- .listMonitors()
- .then((data: v1.Monitor[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ListMonitors_2154432960.ts b/examples/v1/monitors/ListMonitors_2154432960.ts
deleted file mode 100644
index e7fd9e93318b..000000000000
--- a/examples/v1/monitors/ListMonitors_2154432960.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all monitors with tags
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiListMonitorsRequest = {
- tags: "test:examplemonitor",
- pageSize: 1,
-};
-
-apiInstance
- .listMonitors(params)
- .then((data: v1.Monitor[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ListMonitors_463213563.ts b/examples/v1/monitors/ListMonitors_463213563.ts
deleted file mode 100644
index 6a8919a3c3fb..000000000000
--- a/examples/v1/monitors/ListMonitors_463213563.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all monitors returns "OK" response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiListMonitorsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listMonitorsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/monitors/SearchMonitorGroups.ts b/examples/v1/monitors/SearchMonitorGroups.ts
deleted file mode 100644
index 92e0980ca377..000000000000
--- a/examples/v1/monitors/SearchMonitorGroups.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Monitors group search returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-apiInstance
- .searchMonitorGroups()
- .then((data: v1.MonitorGroupSearchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/SearchMonitors.ts b/examples/v1/monitors/SearchMonitors.ts
deleted file mode 100644
index 17f03894e80d..000000000000
--- a/examples/v1/monitors/SearchMonitors.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Monitors search returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-apiInstance
- .searchMonitors()
- .then((data: v1.MonitorSearchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/UpdateMonitor.ts b/examples/v1/monitors/UpdateMonitor.ts
deleted file mode 100644
index 8020c45430fc..000000000000
--- a/examples/v1/monitors/UpdateMonitor.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Edit a monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiUpdateMonitorRequest = {
- body: {
- name: "My monitor-updated",
- priority: undefined,
- options: {
- evaluationDelay: undefined,
- newGroupDelay: 600,
- newHostDelay: undefined,
- renotifyInterval: undefined,
- thresholds: {
- critical: 2,
- warning: undefined,
- },
- timeoutH: undefined,
- },
- },
- monitorId: MONITOR_ID,
-};
-
-apiInstance
- .updateMonitor(params)
- .then((data: v1.Monitor) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ValidateExistingMonitor.ts b/examples/v1/monitors/ValidateExistingMonitor.ts
deleted file mode 100644
index 2539fb4ab0eb..000000000000
--- a/examples/v1/monitors/ValidateExistingMonitor.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Validate an existing monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-// there is a valid "monitor" in the system
-const MONITOR_ID = parseInt(process.env.MONITOR_ID as string);
-
-const params: v1.MonitorsApiValidateExistingMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "log alert",
- query: `logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- enableLogsSample: true,
- escalationMessage: "the situation has escalated",
- evaluationDelay: 700,
- includeTags: true,
- locked: false,
- newHostDelay: 600,
- noDataTimeframe: undefined,
- notifyAudit: false,
- notifyNoData: false,
- onMissingData: "show_and_notify_no_data",
- notificationPresetName: "hide_handles",
- renotifyInterval: 60,
- requireFullWindow: true,
- timeoutH: 24,
- thresholds: {
- critical: 2,
- warning: 1,
- },
- },
- },
- monitorId: MONITOR_ID,
-};
-
-apiInstance
- .validateExistingMonitor(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ValidateMonitor.ts b/examples/v1/monitors/ValidateMonitor.ts
deleted file mode 100644
index c01776d79b7b..000000000000
--- a/examples/v1/monitors/ValidateMonitor.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Validate a monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiValidateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "log alert",
- query: `logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- enableLogsSample: true,
- escalationMessage: "the situation has escalated",
- evaluationDelay: 700,
- includeTags: true,
- locked: false,
- newHostDelay: 600,
- noDataTimeframe: undefined,
- notifyAudit: false,
- notifyNoData: false,
- onMissingData: "show_and_notify_no_data",
- notificationPresetName: "hide_handles",
- renotifyInterval: 60,
- requireFullWindow: true,
- timeoutH: 24,
- thresholds: {
- critical: 2,
- warning: 1,
- },
- },
- },
-};
-
-apiInstance
- .validateMonitor(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/monitors/ValidateMonitor_4247196452.ts b/examples/v1/monitors/ValidateMonitor_4247196452.ts
deleted file mode 100644
index 068714c3e194..000000000000
--- a/examples/v1/monitors/ValidateMonitor_4247196452.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Validate a multi-alert monitor returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.MonitorsApi(configuration);
-
-const params: v1.MonitorsApiValidateMonitorRequest = {
- body: {
- name: "Example-Monitor",
- type: "log alert",
- query: `logs("service:foo AND type:error").index("main").rollup("count").by("source,status").last("5m") > 2`,
- message: "some message Notify: @hipchat-channel",
- tags: ["test:examplemonitor", "env:ci"],
- priority: 3,
- options: {
- enableLogsSample: true,
- escalationMessage: "the situation has escalated",
- evaluationDelay: 700,
- groupRetentionDuration: "2d",
- includeTags: true,
- locked: false,
- newHostDelay: 600,
- noDataTimeframe: undefined,
- notifyAudit: false,
- notifyBy: ["status"],
- notifyNoData: false,
- onMissingData: "show_and_notify_no_data",
- renotifyInterval: 60,
- requireFullWindow: true,
- timeoutH: 24,
- thresholds: {
- critical: 2,
- warning: 1,
- },
- },
- },
-};
-
-apiInstance
- .validateMonitor(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/notebooks/CreateNotebook.ts b/examples/v1/notebooks/CreateNotebook.ts
deleted file mode 100644
index 0e50bdc199fc..000000000000
--- a/examples/v1/notebooks/CreateNotebook.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Create a notebook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-const params: v1.NotebooksApiCreateNotebookRequest = {
- body: {
- data: {
- attributes: {
- cells: [
- {
- attributes: {
- definition: {
- text:
- `## Some test markdown
-
-` +
- "```" +
- `js
-var x, y;
-x = 5;
-y = 6;
-` +
- "```",
- type: "markdown",
- },
- },
- type: "notebook_cells",
- },
- {
- attributes: {
- definition: {
- requests: [
- {
- displayType: "line",
- q: "avg:system.load.1{*}",
- style: {
- lineType: "solid",
- lineWidth: "normal",
- palette: "dog_classic",
- },
- },
- ],
- showLegend: true,
- type: "timeseries",
- yaxis: {
- scale: "linear",
- },
- },
- graphSize: "m",
- splitBy: {
- keys: [],
- tags: [],
- },
- time: undefined,
- },
- type: "notebook_cells",
- },
- ],
- name: "Example-Notebook",
- status: "published",
- time: {
- liveSpan: "1h",
- },
- },
- type: "notebooks",
- },
- },
-};
-
-apiInstance
- .createNotebook(params)
- .then((data: v1.NotebookResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/notebooks/DeleteNotebook.ts b/examples/v1/notebooks/DeleteNotebook.ts
deleted file mode 100644
index 943273a9e26f..000000000000
--- a/examples/v1/notebooks/DeleteNotebook.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a notebook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-// there is a valid "notebook" in the system
-const NOTEBOOK_DATA_ID = parseInt(process.env.NOTEBOOK_DATA_ID as string);
-
-const params: v1.NotebooksApiDeleteNotebookRequest = {
- notebookId: NOTEBOOK_DATA_ID,
-};
-
-apiInstance
- .deleteNotebook(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/notebooks/GetNotebook.ts b/examples/v1/notebooks/GetNotebook.ts
deleted file mode 100644
index 7ce18cbcba28..000000000000
--- a/examples/v1/notebooks/GetNotebook.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a notebook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-// there is a valid "notebook" in the system
-const NOTEBOOK_DATA_ID = parseInt(process.env.NOTEBOOK_DATA_ID as string);
-
-const params: v1.NotebooksApiGetNotebookRequest = {
- notebookId: NOTEBOOK_DATA_ID,
-};
-
-apiInstance
- .getNotebook(params)
- .then((data: v1.NotebookResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/notebooks/ListNotebooks.ts b/examples/v1/notebooks/ListNotebooks.ts
deleted file mode 100644
index d6475240ee12..000000000000
--- a/examples/v1/notebooks/ListNotebooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all notebooks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-apiInstance
- .listNotebooks()
- .then((data: v1.NotebooksResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/notebooks/ListNotebooks_788665428.ts b/examples/v1/notebooks/ListNotebooks_788665428.ts
deleted file mode 100644
index 670c6ecaacad..000000000000
--- a/examples/v1/notebooks/ListNotebooks_788665428.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all notebooks returns "OK" response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-const params: v1.NotebooksApiListNotebooksRequest = {
- count: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listNotebooksWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/notebooks/UpdateNotebook.ts b/examples/v1/notebooks/UpdateNotebook.ts
deleted file mode 100644
index 2519d271a62e..000000000000
--- a/examples/v1/notebooks/UpdateNotebook.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Update a notebook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.NotebooksApi(configuration);
-
-// there is a valid "notebook" in the system
-const NOTEBOOK_DATA_ID = parseInt(process.env.NOTEBOOK_DATA_ID as string);
-
-const params: v1.NotebooksApiUpdateNotebookRequest = {
- body: {
- data: {
- attributes: {
- cells: [
- {
- attributes: {
- definition: {
- text:
- `## Some test markdown
-
-` +
- "```" +
- `js
-var x, y;
-x = 5;
-y = 6;
-` +
- "```",
- type: "markdown",
- },
- },
- type: "notebook_cells",
- },
- {
- attributes: {
- definition: {
- requests: [
- {
- displayType: "line",
- q: "avg:system.load.1{*}",
- style: {
- lineType: "solid",
- lineWidth: "normal",
- palette: "dog_classic",
- },
- },
- ],
- showLegend: true,
- type: "timeseries",
- yaxis: {
- scale: "linear",
- },
- },
- graphSize: "m",
- splitBy: {
- keys: [],
- tags: [],
- },
- time: undefined,
- },
- type: "notebook_cells",
- },
- ],
- name: "Example-Notebook-updated",
- status: "published",
- time: {
- liveSpan: "1h",
- },
- },
- type: "notebooks",
- },
- },
- notebookId: NOTEBOOK_DATA_ID,
-};
-
-apiInstance
- .updateNotebook(params)
- .then((data: v1.NotebookResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/CreateChildOrg.ts b/examples/v1/organizations/CreateChildOrg.ts
deleted file mode 100644
index 8dc776b7a613..000000000000
--- a/examples/v1/organizations/CreateChildOrg.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a child organization returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-const params: v1.OrganizationsApiCreateChildOrgRequest = {
- body: {
- billing: {
- type: "parent_billing",
- },
- name: "New child org",
- subscription: {
- type: "pro",
- },
- },
-};
-
-apiInstance
- .createChildOrg(params)
- .then((data: v1.OrganizationCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/DowngradeOrg.ts b/examples/v1/organizations/DowngradeOrg.ts
deleted file mode 100644
index 22fe867bd644..000000000000
--- a/examples/v1/organizations/DowngradeOrg.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Spin-off Child Organization returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-const params: v1.OrganizationsApiDowngradeOrgRequest = {
- publicId: "abc123",
-};
-
-apiInstance
- .downgradeOrg(params)
- .then((data: v1.OrgDowngradedResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/GetOrg.ts b/examples/v1/organizations/GetOrg.ts
deleted file mode 100644
index 90adf02a7eb7..000000000000
--- a/examples/v1/organizations/GetOrg.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get organization information returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-const params: v1.OrganizationsApiGetOrgRequest = {
- publicId: "abc123",
-};
-
-apiInstance
- .getOrg(params)
- .then((data: v1.OrganizationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/ListOrgs.ts b/examples/v1/organizations/ListOrgs.ts
deleted file mode 100644
index d8f7ebe765db..000000000000
--- a/examples/v1/organizations/ListOrgs.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List your managed organizations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-apiInstance
- .listOrgs()
- .then((data: v1.OrganizationListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/UpdateOrg.ts b/examples/v1/organizations/UpdateOrg.ts
deleted file mode 100644
index 23705a4966a6..000000000000
--- a/examples/v1/organizations/UpdateOrg.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Update your organization returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-const params: v1.OrganizationsApiUpdateOrgRequest = {
- body: {
- billing: {
- type: "parent_billing",
- },
- description: "some description",
- name: "New child org",
- publicId: "abcdef12345",
- settings: {
- privateWidgetShare: false,
- saml: {
- enabled: false,
- },
- samlAutocreateAccessRole: "ro",
- samlAutocreateUsersDomains: {
- domains: ["example.com"],
- enabled: false,
- },
- samlCanBeEnabled: false,
- samlIdpEndpoint: "https://my.saml.endpoint",
- samlIdpInitiatedLogin: {
- enabled: false,
- },
- samlIdpMetadataUploaded: false,
- samlLoginUrl: "https://my.saml.login.url",
- samlStrictMode: {
- enabled: false,
- },
- },
- subscription: {
- type: "pro",
- },
- trial: false,
- },
- publicId: "abc123",
-};
-
-apiInstance
- .updateOrg(params)
- .then((data: v1.OrganizationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/organizations/UploadIdPForOrg.ts b/examples/v1/organizations/UploadIdPForOrg.ts
deleted file mode 100644
index 2f55b2b7df4f..000000000000
--- a/examples/v1/organizations/UploadIdPForOrg.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Upload IdP metadata returns "OK" response
- */
-
-import * as fs from "fs";
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.OrganizationsApi(configuration);
-
-const params: v1.OrganizationsApiUploadIdPForOrgRequest = {
- publicId: "abc123",
- idpFile: {
- data: Buffer.from(fs.readFileSync("./idp_metadata.xml", "utf8")),
- name: "./idp_metadata.xml",
- },
-};
-
-apiInstance
- .uploadIdPForOrg(params)
- .then((data: v1.IdpResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.ts b/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.ts
deleted file mode 100644
index 1f3e0134118d..000000000000
--- a/examples/v1/pagerduty-integration/CreatePagerDutyIntegrationService.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Create a new service object returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.PagerDutyIntegrationApi(configuration);
-
-const params: v1.PagerDutyIntegrationApiCreatePagerDutyIntegrationServiceRequest =
- {
- body: {
- serviceKey: "",
- serviceName: "",
- },
- };
-
-apiInstance
- .createPagerDutyIntegrationService(params)
- .then((data: v1.PagerDutyServiceName) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.ts b/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.ts
deleted file mode 100644
index c9a29576be06..000000000000
--- a/examples/v1/pagerduty-integration/DeletePagerDutyIntegrationService.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete a single service object returns "No Content" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.PagerDutyIntegrationApi(configuration);
-
-const params: v1.PagerDutyIntegrationApiDeletePagerDutyIntegrationServiceRequest =
- {
- serviceName: "service_name",
- };
-
-apiInstance
- .deletePagerDutyIntegrationService(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.ts b/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.ts
deleted file mode 100644
index 3934f1ad3469..000000000000
--- a/examples/v1/pagerduty-integration/GetPagerDutyIntegrationService.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a single service object returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.PagerDutyIntegrationApi(configuration);
-
-const params: v1.PagerDutyIntegrationApiGetPagerDutyIntegrationServiceRequest =
- {
- serviceName: "service_name",
- };
-
-apiInstance
- .getPagerDutyIntegrationService(params)
- .then((data: v1.PagerDutyServiceName) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.ts b/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.ts
deleted file mode 100644
index f2f11d70b88c..000000000000
--- a/examples/v1/pagerduty-integration/UpdatePagerDutyIntegrationService.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Update a single service object returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.PagerDutyIntegrationApi(configuration);
-
-const params: v1.PagerDutyIntegrationApiUpdatePagerDutyIntegrationServiceRequest =
- {
- body: {
- serviceKey: "",
- },
- serviceName: "service_name",
- };
-
-apiInstance
- .updatePagerDutyIntegrationService(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.ts b/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.ts
deleted file mode 100644
index ae83d8ec965b..000000000000
--- a/examples/v1/security-monitoring/AddSecurityMonitoringSignalToIncident.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Add a security signal to an incident returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SecurityMonitoringApi(configuration);
-
-const params: v1.SecurityMonitoringApiAddSecurityMonitoringSignalToIncidentRequest =
- {
- body: {
- incidentId: 2609,
- },
- signalId: "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE",
- };
-
-apiInstance
- .addSecurityMonitoringSignalToIncident(params)
- .then((data: v1.SuccessfulSignalUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.ts b/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.ts
deleted file mode 100644
index 904eab58e7d1..000000000000
--- a/examples/v1/security-monitoring/EditSecurityMonitoringSignalAssignee.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Modify the triage assignee of a security signal returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SecurityMonitoringApi(configuration);
-
-const params: v1.SecurityMonitoringApiEditSecurityMonitoringSignalAssigneeRequest =
- {
- body: {
- assignee: "773b045d-ccf8-4808-bd3b-955ef6a8c940",
- },
- signalId: "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE",
- };
-
-apiInstance
- .editSecurityMonitoringSignalAssignee(params)
- .then((data: v1.SuccessfulSignalUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.ts b/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.ts
deleted file mode 100644
index 1adada6ced47..000000000000
--- a/examples/v1/security-monitoring/EditSecurityMonitoringSignalState.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Change the triage state of a security signal returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SecurityMonitoringApi(configuration);
-
-const params: v1.SecurityMonitoringApiEditSecurityMonitoringSignalStateRequest =
- {
- body: {
- archiveReason: "none",
- state: "open",
- },
- signalId: "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE",
- };
-
-apiInstance
- .editSecurityMonitoringSignalState(params)
- .then((data: v1.SuccessfulSignalUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-checks/SubmitServiceCheck.ts b/examples/v1/service-checks/SubmitServiceCheck.ts
deleted file mode 100644
index 96252f2af68a..000000000000
--- a/examples/v1/service-checks/SubmitServiceCheck.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Submit a Service Check returns "Payload accepted" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceChecksApi(configuration);
-
-const params: v1.ServiceChecksApiSubmitServiceCheckRequest = {
- body: [
- {
- check: "app.ok",
- hostName: "host",
- status: 0,
- tags: ["test:ExampleServiceCheck"],
- },
- ],
-};
-
-apiInstance
- .submitServiceCheck(params)
- .then((data: v1.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/CreateSLOCorrection.ts b/examples/v1/service-level-objective-corrections/CreateSLOCorrection.ts
deleted file mode 100644
index c8555bd52b75..000000000000
--- a/examples/v1/service-level-objective-corrections/CreateSLOCorrection.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Create an SLO correction returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiCreateSLOCorrectionRequest =
- {
- body: {
- data: {
- attributes: {
- category: "Scheduled Maintenance",
- description: "Example-Service-Level-Objective-Correction",
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- sloId: SLO_DATA_0_ID,
- start: Math.round(new Date().getTime() / 1000),
- timezone: "UTC",
- },
- type: "correction",
- },
- },
- };
-
-apiInstance
- .createSLOCorrection(params)
- .then((data: v1.SLOCorrectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.ts b/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.ts
deleted file mode 100644
index bb953166bc2e..000000000000
--- a/examples/v1/service-level-objective-corrections/CreateSLOCorrection_1326388368.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Create an SLO correction with rrule returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiCreateSLOCorrectionRequest =
- {
- body: {
- data: {
- attributes: {
- category: "Scheduled Maintenance",
- description: "Example-Service-Level-Objective-Correction",
- sloId: SLO_DATA_0_ID,
- start: Math.round(new Date().getTime() / 1000),
- duration: 3600,
- rrule: "FREQ=DAILY;INTERVAL=10;COUNT=5",
- timezone: "UTC",
- },
- type: "correction",
- },
- },
- };
-
-apiInstance
- .createSLOCorrection(params)
- .then((data: v1.SLOCorrectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.ts b/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.ts
deleted file mode 100644
index 6532deaa7dc4..000000000000
--- a/examples/v1/service-level-objective-corrections/DeleteSLOCorrection.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete an SLO correction returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiDeleteSLOCorrectionRequest =
- {
- sloCorrectionId: "slo_correction_id",
- };
-
-apiInstance
- .deleteSLOCorrection(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/GetSLOCorrection.ts b/examples/v1/service-level-objective-corrections/GetSLOCorrection.ts
deleted file mode 100644
index abc5764f6ae1..000000000000
--- a/examples/v1/service-level-objective-corrections/GetSLOCorrection.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get an SLO correction for an SLO returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-// there is a valid "correction" for "slo"
-const CORRECTION_DATA_ID = process.env.CORRECTION_DATA_ID as string;
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiGetSLOCorrectionRequest = {
- sloCorrectionId: CORRECTION_DATA_ID,
-};
-
-apiInstance
- .getSLOCorrection(params)
- .then((data: v1.SLOCorrectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/ListSLOCorrection.ts b/examples/v1/service-level-objective-corrections/ListSLOCorrection.ts
deleted file mode 100644
index 30de0153e794..000000000000
--- a/examples/v1/service-level-objective-corrections/ListSLOCorrection.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all SLO corrections returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiListSLOCorrectionRequest = {
- offset: 1,
- limit: 1,
-};
-
-apiInstance
- .listSLOCorrection(params)
- .then((data: v1.SLOCorrectionListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.ts b/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.ts
deleted file mode 100644
index fa2a682b8e97..000000000000
--- a/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all SLO corrections returns "OK" response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiListSLOCorrectionRequest = {
- limit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listSLOCorrectionWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.ts b/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.ts
deleted file mode 100644
index 6632555dce5c..000000000000
--- a/examples/v1/service-level-objective-corrections/UpdateSLOCorrection.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Update an SLO correction returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectiveCorrectionsApi(configuration);
-
-// there is a valid "correction" for "slo"
-const CORRECTION_DATA_ID = process.env.CORRECTION_DATA_ID as string;
-
-const params: v1.ServiceLevelObjectiveCorrectionsApiUpdateSLOCorrectionRequest =
- {
- body: {
- data: {
- attributes: {
- category: "Deployment",
- description: "Example-Service-Level-Objective-Correction",
- end: Math.round(
- new Date(new Date().getTime() + 1 * 3600 * 1000).getTime() / 1000
- ),
- start: Math.round(new Date().getTime() / 1000),
- timezone: "UTC",
- },
- type: "correction",
- },
- },
- sloCorrectionId: CORRECTION_DATA_ID,
- };
-
-apiInstance
- .updateSLOCorrection(params)
- .then((data: v1.SLOCorrectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/CheckCanDeleteSLO.ts b/examples/v1/service-level-objectives/CheckCanDeleteSLO.ts
deleted file mode 100644
index 6af2f0f041c1..000000000000
--- a/examples/v1/service-level-objectives/CheckCanDeleteSLO.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Check if SLOs can be safely deleted returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-const params: v1.ServiceLevelObjectivesApiCheckCanDeleteSLORequest = {
- ids: "ids",
-};
-
-apiInstance
- .checkCanDeleteSLO(params)
- .then((data: v1.CheckCanDeleteSLOResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/CreateSLO.ts b/examples/v1/service-level-objectives/CreateSLO.ts
deleted file mode 100644
index 0045cbe88b06..000000000000
--- a/examples/v1/service-level-objectives/CreateSLO.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Create an SLO object returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-const params: v1.ServiceLevelObjectivesApiCreateSLORequest = {
- body: {
- type: "metric",
- description: "string",
- groups: ["env:test", "role:mysql"],
- monitorIds: [],
- name: "Example-Service-Level-Objective",
- query: {
- denominator: "sum:httpservice.hits{!code:3xx}.as_count()",
- numerator: "sum:httpservice.hits{code:2xx}.as_count()",
- },
- tags: ["env:prod", "app:core"],
- thresholds: [
- {
- target: 97.0,
- targetDisplay: "97.0",
- timeframe: "7d",
- warning: 98,
- warningDisplay: "98.0",
- },
- ],
- timeframe: "7d",
- targetThreshold: 97.0,
- warningThreshold: 98,
- },
-};
-
-apiInstance
- .createSLO(params)
- .then((data: v1.SLOListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/CreateSLO_3765703239.ts b/examples/v1/service-level-objectives/CreateSLO_3765703239.ts
deleted file mode 100644
index 296c420abfe5..000000000000
--- a/examples/v1/service-level-objectives/CreateSLO_3765703239.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Create a time-slice SLO object returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-const params: v1.ServiceLevelObjectivesApiCreateSLORequest = {
- body: {
- type: "time_slice",
- description: "string",
- name: "Example-Service-Level-Objective",
- sliSpecification: {
- timeSlice: {
- query: {
- formulas: [
- {
- formula: "query1",
- },
- ],
- queries: [
- {
- dataSource: "metrics",
- name: "query1",
- query: "trace.servlet.request{env:prod}",
- },
- ],
- },
- comparator: ">",
- threshold: 5,
- },
- },
- tags: ["env:prod"],
- thresholds: [
- {
- target: 97.0,
- targetDisplay: "97.0",
- timeframe: "7d",
- warning: 98,
- warningDisplay: "98.0",
- },
- ],
- timeframe: "7d",
- targetThreshold: 97.0,
- warningThreshold: 98,
- },
-};
-
-apiInstance
- .createSLO(params)
- .then((data: v1.SLOListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/DeleteSLO.ts b/examples/v1/service-level-objectives/DeleteSLO.ts
deleted file mode 100644
index eef223e246ce..000000000000
--- a/examples/v1/service-level-objectives/DeleteSLO.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an SLO returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectivesApiDeleteSLORequest = {
- sloId: SLO_DATA_0_ID,
-};
-
-apiInstance
- .deleteSLO(params)
- .then((data: v1.SLODeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.ts b/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.ts
deleted file mode 100644
index 2fb0a263d0f7..000000000000
--- a/examples/v1/service-level-objectives/DeleteSLOTimeframeInBulk.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Bulk Delete SLO Timeframes returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-const params: v1.ServiceLevelObjectivesApiDeleteSLOTimeframeInBulkRequest = {
- body: {
- id1: ["7d", "30d"],
- id2: ["7d", "30d"],
- },
-};
-
-apiInstance
- .deleteSLOTimeframeInBulk(params)
- .then((data: v1.SLOBulkDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/GetSLO.ts b/examples/v1/service-level-objectives/GetSLO.ts
deleted file mode 100644
index efcd9639bddc..000000000000
--- a/examples/v1/service-level-objectives/GetSLO.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get an SLO's details returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectivesApiGetSLORequest = {
- sloId: SLO_DATA_0_ID,
-};
-
-apiInstance
- .getSLO(params)
- .then((data: v1.SLOResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/GetSLOCorrections.ts b/examples/v1/service-level-objectives/GetSLOCorrections.ts
deleted file mode 100644
index 8774d4a7e189..000000000000
--- a/examples/v1/service-level-objectives/GetSLOCorrections.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get Corrections For an SLO returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectivesApiGetSLOCorrectionsRequest = {
- sloId: SLO_DATA_0_ID,
-};
-
-apiInstance
- .getSLOCorrections(params)
- .then((data: v1.SLOCorrectionListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/GetSLOHistory.ts b/examples/v1/service-level-objectives/GetSLOHistory.ts
deleted file mode 100644
index b4f1b5ced163..000000000000
--- a/examples/v1/service-level-objectives/GetSLOHistory.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Get an SLO's history returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectivesApiGetSLOHistoryRequest = {
- sloId: SLO_DATA_0_ID,
- fromTs: Math.round(
- new Date(new Date().getTime() + -1 * 86400 * 1000).getTime() / 1000
- ),
- toTs: Math.round(new Date().getTime() / 1000),
-};
-
-apiInstance
- .getSLOHistory(params)
- .then((data: v1.SLOHistoryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/ListSLOs.ts b/examples/v1/service-level-objectives/ListSLOs.ts
deleted file mode 100644
index d53d15a70965..000000000000
--- a/examples/v1/service-level-objectives/ListSLOs.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all SLOs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-
-const params: v1.ServiceLevelObjectivesApiListSLOsRequest = {
- ids: SLO_DATA_0_ID,
-};
-
-apiInstance
- .listSLOs(params)
- .then((data: v1.SLOListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/ListSLOs_3036942817.ts b/examples/v1/service-level-objectives/ListSLOs_3036942817.ts
deleted file mode 100644
index 75ba3274fc71..000000000000
--- a/examples/v1/service-level-objectives/ListSLOs_3036942817.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all SLOs returns "OK" response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-const params: v1.ServiceLevelObjectivesApiListSLOsRequest = {
- limit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listSLOsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/service-level-objectives/SearchSLO.ts b/examples/v1/service-level-objectives/SearchSLO.ts
deleted file mode 100644
index c470546e8987..000000000000
--- a/examples/v1/service-level-objectives/SearchSLO.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Search for SLOs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_NAME = process.env.SLO_DATA_0_NAME as string;
-
-const params: v1.ServiceLevelObjectivesApiSearchSLORequest = {
- query: SLO_DATA_0_NAME,
- pageSize: 20,
- pageNumber: 0,
-};
-
-apiInstance
- .searchSLO(params)
- .then((data: v1.SearchSLOResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/service-level-objectives/UpdateSLO.ts b/examples/v1/service-level-objectives/UpdateSLO.ts
deleted file mode 100644
index 3e9c0fe497ac..000000000000
--- a/examples/v1/service-level-objectives/UpdateSLO.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Update an SLO returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "slo" in the system
-const SLO_DATA_0_ID = process.env.SLO_DATA_0_ID as string;
-const SLO_DATA_0_NAME = process.env.SLO_DATA_0_NAME as string;
-
-const params: v1.ServiceLevelObjectivesApiUpdateSLORequest = {
- body: {
- type: "metric",
- name: SLO_DATA_0_NAME,
- thresholds: [
- {
- target: 97.0,
- timeframe: "7d",
- warning: 98.0,
- },
- ],
- timeframe: "7d",
- targetThreshold: 97.0,
- warningThreshold: 98,
- query: {
- numerator: "sum:httpservice.hits{code:2xx}.as_count()",
- denominator: "sum:httpservice.hits{!code:3xx}.as_count()",
- },
- },
- sloId: SLO_DATA_0_ID,
-};
-
-apiInstance
- .updateSLO(params)
- .then((data: v1.SLOListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/slack-integration/CreateSlackIntegrationChannel.ts b/examples/v1/slack-integration/CreateSlackIntegrationChannel.ts
deleted file mode 100644
index 1837cb889326..000000000000
--- a/examples/v1/slack-integration/CreateSlackIntegrationChannel.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Create a Slack integration channel returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SlackIntegrationApi(configuration);
-
-const params: v1.SlackIntegrationApiCreateSlackIntegrationChannelRequest = {
- body: {
- display: {
- message: true,
- notified: true,
- snapshot: true,
- tags: true,
- },
- name: "#general",
- },
- accountName: "account_name",
-};
-
-apiInstance
- .createSlackIntegrationChannel(params)
- .then((data: v1.SlackIntegrationChannel) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/slack-integration/GetSlackIntegrationChannel.ts b/examples/v1/slack-integration/GetSlackIntegrationChannel.ts
deleted file mode 100644
index aaf475970b50..000000000000
--- a/examples/v1/slack-integration/GetSlackIntegrationChannel.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a Slack integration channel returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SlackIntegrationApi(configuration);
-
-const params: v1.SlackIntegrationApiGetSlackIntegrationChannelRequest = {
- accountName: "account_name",
- channelName: "channel_name",
-};
-
-apiInstance
- .getSlackIntegrationChannel(params)
- .then((data: v1.SlackIntegrationChannel) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/slack-integration/GetSlackIntegrationChannels.ts b/examples/v1/slack-integration/GetSlackIntegrationChannels.ts
deleted file mode 100644
index 5e86981e5274..000000000000
--- a/examples/v1/slack-integration/GetSlackIntegrationChannels.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all channels in a Slack integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SlackIntegrationApi(configuration);
-
-const params: v1.SlackIntegrationApiGetSlackIntegrationChannelsRequest = {
- accountName: "account_name",
-};
-
-apiInstance
- .getSlackIntegrationChannels(params)
- .then((data: v1.SlackIntegrationChannel[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/slack-integration/RemoveSlackIntegrationChannel.ts b/examples/v1/slack-integration/RemoveSlackIntegrationChannel.ts
deleted file mode 100644
index f9ff9d61bf0f..000000000000
--- a/examples/v1/slack-integration/RemoveSlackIntegrationChannel.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Remove a Slack integration channel returns "The channel was removed successfully." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SlackIntegrationApi(configuration);
-
-const params: v1.SlackIntegrationApiRemoveSlackIntegrationChannelRequest = {
- accountName: "account_name",
- channelName: "channel_name",
-};
-
-apiInstance
- .removeSlackIntegrationChannel(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.ts b/examples/v1/slack-integration/UpdateSlackIntegrationChannel.ts
deleted file mode 100644
index 209cc47b0f86..000000000000
--- a/examples/v1/slack-integration/UpdateSlackIntegrationChannel.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Update a Slack integration channel returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SlackIntegrationApi(configuration);
-
-const params: v1.SlackIntegrationApiUpdateSlackIntegrationChannelRequest = {
- body: {
- display: {
- message: true,
- notified: true,
- snapshot: true,
- tags: true,
- },
- name: "#general",
- },
- accountName: "account_name",
- channelName: "channel_name",
-};
-
-apiInstance
- .updateSlackIntegrationChannel(params)
- .then((data: v1.SlackIntegrationChannel) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/snapshots/GetGraphSnapshot.ts b/examples/v1/snapshots/GetGraphSnapshot.ts
deleted file mode 100644
index 0b7e9b2e7498..000000000000
--- a/examples/v1/snapshots/GetGraphSnapshot.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Take graph snapshots returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SnapshotsApi(configuration);
-
-const params: v1.SnapshotsApiGetGraphSnapshotRequest = {
- metricQuery: "avg:system.load.1{*}",
- start: Math.round(
- new Date(new Date().getTime() + -1 * 86400 * 1000).getTime() / 1000
- ),
- end: Math.round(new Date().getTime() / 1000),
- title: "System load",
- height: 400,
- width: 600,
-};
-
-apiInstance
- .getGraphSnapshot(params)
- .then((data: v1.GraphSnapshot) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateGlobalVariable.ts b/examples/v1/synthetics/CreateGlobalVariable.ts
deleted file mode 100644
index edc3bcb4c158..000000000000
--- a/examples/v1/synthetics/CreateGlobalVariable.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
- body: {
- attributes: {
- restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
- },
- description: "Example description",
- name: "MY_VARIABLE",
- parseTestOptions: {
- field: "content-type",
- localVariableName: "LOCAL_VARIABLE",
- parser: {
- type: "regex",
- value: ".*",
- },
- type: "http_body",
- },
- parseTestPublicId: "abc-def-123",
- tags: ["team:front", "test:workflow-1"],
- value: {
- secure: true,
- value: "value",
- },
- },
-};
-
-apiInstance
- .createGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateGlobalVariable_1068962881.ts b/examples/v1/synthetics/CreateGlobalVariable_1068962881.ts
deleted file mode 100644
index dd215307ed8c..000000000000
--- a/examples/v1/synthetics/CreateGlobalVariable_1068962881.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Create a global variable from test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_api_test_multi_step" in the system
-const SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
- body: {
- description: "",
- name: "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
- tags: [],
- value: {
- secure: false,
- value: "",
- },
- parseTestPublicId: SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
- parseTestOptions: {
- type: "local_variable",
- localVariableName: "EXTRACTED_VALUE",
- },
- },
-};
-
-apiInstance
- .createGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateGlobalVariable_3298562511.ts b/examples/v1/synthetics/CreateGlobalVariable_3298562511.ts
deleted file mode 100644
index 240f8eb1b598..000000000000
--- a/examples/v1/synthetics/CreateGlobalVariable_3298562511.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Create a FIDO global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
- body: {
- description: "",
- isFido: true,
- name: "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
- tags: [],
- },
-};
-
-apiInstance
- .createGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateGlobalVariable_3397718516.ts b/examples/v1/synthetics/CreateGlobalVariable_3397718516.ts
deleted file mode 100644
index 2f83cbe00990..000000000000
--- a/examples/v1/synthetics/CreateGlobalVariable_3397718516.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Create a TOTP global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
- body: {
- description: "",
- isTotp: true,
- name: "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
- tags: [],
- value: {
- secure: false,
- value: "",
- options: {
- totpParameters: {
- digits: 6,
- refreshInterval: 30,
- },
- },
- },
- },
-};
-
-apiInstance
- .createGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreatePrivateLocation.ts b/examples/v1/synthetics/CreatePrivateLocation.ts
deleted file mode 100644
index a94896aedb1a..000000000000
--- a/examples/v1/synthetics/CreatePrivateLocation.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a private location returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v1.SyntheticsApiCreatePrivateLocationRequest = {
- body: {
- description: "Test Example-Synthetic description",
- metadata: {
- restrictedRoles: [ROLE_DATA_ID],
- },
- name: "Example-Synthetic",
- tags: ["test:examplesynthetic"],
- },
-};
-
-apiInstance
- .createPrivateLocation(params)
- .then((data: v1.SyntheticsPrivateLocationCreationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest.ts b/examples/v1/synthetics/CreateSyntheticsAPITest.ts
deleted file mode 100644
index a13082eec18c..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Create an API test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "lessThan",
- target: 1000,
- type: "responseTime",
- },
- ],
- request: {
- method: "GET",
- url: "https://example.com",
- },
- },
- locations: ["aws:eu-west-3"],
- message: "Notification message",
- name: "Example test name",
- options: {
- ci: {
- executionRule: "blocking",
- },
- deviceIds: ["chrome.laptop_large"],
- httpVersion: "http1",
- monitorOptions: {
- notificationPresetName: "show_all",
- },
- restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
- retry: {},
- rumSettings: {
- applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- clientTokenId: 12345,
- isEnabled: true,
- },
- scheduling: {
- timeframes: [
- {
- day: 1,
- from: "07:00",
- to: "16:00",
- },
- {
- day: 3,
- from: "07:00",
- to: "16:00",
- },
- ],
- timezone: "America/New_York",
- },
- },
- status: "live",
- subtype: "http",
- tags: ["env:production"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.ts
deleted file mode 100644
index 2afa65bae4ea..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create an API SSL test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "isInMoreThan",
- target: 10,
- type: "certificate",
- },
- ],
- request: {
- host: "datadoghq.com",
- port: "{{ DATADOG_PORT }}",
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_ssl_test_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: true,
- checkCertificateRevocation: true,
- tickEvery: 60,
- },
- subtype: "ssl",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.ts
deleted file mode 100644
index 0d40b6f2210f..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.ts
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * Create an API test with a file payload returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- property: "{{ PROPERTY }}",
- target: "text/html",
- type: "header",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- timingsScope: "withoutDNS",
- },
- {
- operator: "validatesJSONPath",
- target: {
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesXPath",
- target: {
- xPath: "target-xpath",
- targetValue: "0",
- operator: "contains",
- },
- type: "body",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- request: {
- certificate: {
- cert: {
- content: "cert-content",
- filename: "cert-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- key: {
- content: "key-content",
- filename: "key-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- },
- headers: {
- unique: "examplesynthetic",
- },
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- proxy: {
- url: "https://datadoghq.com",
- headers: {},
- },
- bodyType: "application/octet-stream",
- files: [
- {
- name: "file name",
- originalFileName: "image.png",
- content: "file content",
- type: "file type",
- },
- ],
- basicAuth: {
- accessTokenUrl: "https://datadog-token.com",
- audience: "audience",
- clientId: "client-id",
- clientSecret: "client-secret",
- resource: "resource",
- scope: "yoyo",
- tokenApiAuthentication: "header",
- type: "oauth-client",
- },
- persistCookies: true,
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_http_test_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- httpVersion: "http2",
- },
- subtype: "http",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts
deleted file mode 100644
index 515a573430fa..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Create an API test with multi subtype returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- steps: [
- {
- allowFailure: true,
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- exitIfSucceed: true,
- extractedValues: [
- {
- field: "server",
- name: "EXTRACTED_VALUE",
- parser: {
- type: "raw",
- },
- type: "http_header",
- secure: true,
- },
- ],
- isCritical: true,
- name: "request is sent",
- request: {
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- httpVersion: "http2",
- },
- retry: {
- count: 5,
- interval: 1000,
- },
- subtype: "http",
- extractedValuesFromScript:
- "dd.variable.set('STATUS_CODE', dd.response.statusCode);",
- },
- {
- name: "Wait",
- subtype: "wait",
- value: 1,
- },
- {
- name: "GRPC CALL",
- subtype: "grpc",
- extractedValues: [],
- allowFailure: false,
- isCritical: true,
- retry: {
- count: 0,
- interval: 300,
- },
- assertions: [
- {
- operator: "lessThan",
- type: "responseTime",
- target: 1000,
- },
- ],
- request: {
- host: "grpcbin.test.k6.io",
- port: 9000,
- service: "grpcbin.GRPCBin",
- method: "Index",
- message: "{}",
- compressedJsonDescriptor:
- "eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==",
- metadata: {},
- callType: "unary",
- },
- },
- ],
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_test_multi_step_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 1000,
- },
- tickEvery: 60,
- },
- subtype: "multi",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.ts
deleted file mode 100644
index b9bdee00f34c..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Create an API GRPC test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- target: 1,
- type: "grpcHealthcheckStatus",
- },
- {
- operator: "is",
- target: "proto target",
- type: "grpcProto",
- },
- {
- operator: "is",
- target: "123",
- property: "property",
- type: "grpcMetadata",
- },
- ],
- request: {
- host: "localhost",
- port: 50051,
- service: "Hello",
- method: "GET",
- message: "",
- metadata: {},
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_grpc_test_payload.json",
- name: "Example-Synthetic",
- options: {
- minFailureDuration: 0,
- minLocationFailed: 1,
- monitorOptions: {
- renotifyInterval: 0,
- },
- monitorName: "Example-Synthetic",
- tickEvery: 60,
- },
- subtype: "grpc",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.ts
deleted file mode 100644
index 0488decdda80..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Create an API HTTP test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- property: "{{ PROPERTY }}",
- target: "text/html",
- type: "header",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- timingsScope: "withoutDNS",
- },
- {
- operator: "validatesJSONPath",
- target: {
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONPath",
- target: {
- elementsOperator: "atLeastOneElementMatches",
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONSchema",
- target: {
- metaSchema: "draft-07",
- jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
- },
- type: "body",
- },
- {
- operator: "validatesXPath",
- target: {
- xPath: "target-xpath",
- targetValue: "0",
- operator: "contains",
- },
- type: "body",
- },
- {
- operator: "md5",
- target: "a",
- type: "bodyHash",
- },
- {
- code: "const hello = 'world';",
- type: "javascript",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- variablesFromScript: `dd.variable.set("FOO", "foo")`,
- request: {
- certificate: {
- cert: {
- content: "cert-content",
- filename: "cert-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- key: {
- content: "key-content",
- filename: "key-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- },
- headers: {
- unique: "examplesynthetic",
- },
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- proxy: {
- url: "https://datadoghq.com",
- headers: {},
- },
- basicAuth: {
- accessTokenUrl: "https://datadog-token.com",
- audience: "audience",
- clientId: "client-id",
- clientSecret: "client-secret",
- resource: "resource",
- scope: "yoyo",
- tokenApiAuthentication: "header",
- type: "oauth-client",
- },
- persistCookies: true,
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_http_test_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- httpVersion: "http2",
- },
- subtype: "http",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1717840259.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1717840259.ts
deleted file mode 100644
index e227bd6f60d2..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1717840259.ts
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- steps: [
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- password: "password",
- username: "username",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- password: "password",
- username: "username",
- type: "web",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- accessKey: "accessKey",
- secretKey: "secretKey",
- type: "sigv4",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- type: "ntlm",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- password: "password",
- username: "username",
- type: "digest",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- accessTokenUrl: "accessTokenUrl",
- tokenApiAuthentication: "header",
- clientId: "clientId",
- clientSecret: "clientSecret",
- type: "oauth-client",
- },
- },
- subtype: "http",
- },
- {
- assertions: [
- {
- operator: "is",
- type: "statusCode",
- target: 200,
- },
- ],
- name: "request is sent",
- request: {
- url: "https://httpbin.org/status/200",
- method: "GET",
- basicAuth: {
- accessTokenUrl: "accessTokenUrl",
- password: "password",
- tokenApiAuthentication: "header",
- username: "username",
- type: "oauth-rop",
- },
- },
- subtype: "http",
- },
- ],
- },
- locations: ["aws:us-east-2"],
- message:
- "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
- name: "Example-Synthetic",
- options: {
- tickEvery: 60,
- },
- subtype: "multi",
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.ts
deleted file mode 100644
index 70a87b402ac0..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_1987645492.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Create an API HTTP test has bodyHash filled out
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- property: "{{ PROPERTY }}",
- target: "text/html",
- type: "header",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- timingsScope: "withoutDNS",
- },
- {
- operator: "validatesJSONPath",
- target: {
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONPath",
- target: {
- elementsOperator: "atLeastOneElementMatches",
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONSchema",
- target: {
- metaSchema: "draft-07",
- jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
- },
- type: "body",
- },
- {
- operator: "validatesXPath",
- target: {
- xPath: "target-xpath",
- targetValue: "0",
- operator: "contains",
- },
- type: "body",
- },
- {
- operator: "md5",
- target: "a",
- type: "bodyHash",
- },
- {
- code: "const hello = 'world';",
- type: "javascript",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- variablesFromScript: `dd.variable.set("FOO", "foo")`,
- request: {
- certificate: {
- cert: {
- content: "cert-content",
- filename: "cert-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- key: {
- content: "key-content",
- filename: "key-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- },
- headers: {
- unique: "examplesynthetic",
- },
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- proxy: {
- url: "https://datadoghq.com",
- headers: {},
- },
- basicAuth: {
- accessTokenUrl: "https://datadog-token.com",
- audience: "audience",
- clientId: "client-id",
- clientSecret: "client-secret",
- resource: "resource",
- scope: "yoyo",
- tokenApiAuthentication: "header",
- type: "oauth-client",
- },
- persistCookies: true,
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_http_test_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- httpVersion: "http2",
- },
- subtype: "http",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.ts
deleted file mode 100644
index 9f0bf922f7a9..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_2472747642.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- target: "message",
- type: "receivedMessage",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- },
- ],
- configVariables: [],
- request: {
- url: "ws://datadoghq.com",
- message: "message",
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_test_websocket_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- },
- subtype: "websocket",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.ts
deleted file mode 100644
index c777d5b9b689..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Create an API test with UDP subtype returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- target: "message",
- type: "receivedMessage",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- },
- ],
- configVariables: [],
- request: {
- host: "https://datadoghq.com",
- message: "message",
- port: 443,
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_test_udp_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- },
- subtype: "udp",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.ts b/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.ts
deleted file mode 100644
index 514d6daae4cb..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsAPITest_960766374.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- property: "{{ PROPERTY }}",
- target: "text/html",
- type: "header",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- },
- {
- operator: "validatesJSONPath",
- target: {
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONSchema",
- target: {
- metaSchema: "draft-07",
- jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
- },
- type: "body",
- },
- {
- operator: "validatesXPath",
- target: {
- xPath: "target-xpath",
- targetValue: "0",
- operator: "contains",
- },
- type: "body",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- request: {
- certificate: {
- cert: {
- content: "cert-content",
- filename: "cert-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- key: {
- content: "key-content",
- filename: "key-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- },
- headers: {
- unique: "examplesynthetic",
- },
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- proxy: {
- url: "https://datadoghq.com",
- headers: {},
- },
- basicAuth: {
- accessTokenUrl: "https://datadog-token.com",
- audience: "audience",
- clientId: "client-id",
- clientSecret: "client-secret",
- resource: "resource",
- scope: "yoyo",
- tokenApiAuthentication: "body",
- type: "oauth-rop",
- username: "oauth-usermame",
- password: "oauth-password",
- },
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_http_test_payload.json",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Example-Synthetic",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- },
- subtype: "http",
- tags: ["testing:api"],
- type: "api",
- },
-};
-
-apiInstance
- .createSyntheticsAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest.ts b/examples/v1/synthetics/CreateSyntheticsBrowserTest.ts
deleted file mode 100644
index 145fef70093c..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsBrowserTest.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Create a browser test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
- body: {
- config: {
- assertions: [],
- variables: [
- {
- type: "text",
- name: "TEST_VARIABLE",
- pattern: "secret",
- secure: true,
- example: "secret",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- secure: true,
- },
- ],
- request: {
- method: "GET",
- url: "https://datadoghq.com",
- },
- setCookie: "name:test",
- },
- locations: ["aws:us-east-2"],
- message: "Test message",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- deviceIds: ["chrome.laptop_large"],
- disableCors: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- noScreenshot: true,
- retry: {
- count: 2,
- interval: 10,
- },
- tickEvery: 300,
- enableProfiling: true,
- enableSecurityTesting: true,
- },
- tags: ["testing:browser"],
- type: "browser",
- steps: [
- {
- allowFailure: false,
- alwaysExecute: true,
- exitIfSucceed: true,
- isCritical: true,
- name: "Refresh page",
- params: {},
- type: "refresh",
- },
- ],
- },
-};
-
-apiInstance
- .createSyntheticsBrowserTest(params)
- .then((data: v1.SyntheticsBrowserTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.ts b/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.ts
deleted file mode 100644
index c942c1219379..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Create a browser test returns "OK - Returns saved rumSettings." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
- body: {
- config: {
- assertions: [],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- request: {
- method: "GET",
- url: "https://datadoghq.com",
- certificateDomains: ["https://datadoghq.com"],
- },
- setCookie: "name:test",
- },
- locations: ["aws:us-east-2"],
- message: "Test message",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- deviceIds: ["tablet"],
- disableCors: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- noScreenshot: true,
- retry: {
- count: 2,
- interval: 10,
- },
- rumSettings: {
- isEnabled: true,
- applicationId: "mockApplicationId",
- clientTokenId: 12345,
- },
- tickEvery: 300,
- ci: {
- executionRule: "skipped",
- },
- ignoreServerCertificateError: true,
- disableCsp: true,
- initialNavigationTimeout: 200,
- },
- tags: ["testing:browser"],
- type: "browser",
- steps: [
- {
- allowFailure: false,
- isCritical: true,
- name: "Refresh page",
- params: {},
- type: "refresh",
- },
- ],
- },
-};
-
-apiInstance
- .createSyntheticsBrowserTest(params)
- .then((data: v1.SyntheticsBrowserTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.ts b/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.ts
deleted file mode 100644
index 9bf339857717..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
- body: {
- config: {
- assertions: [],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- request: {
- method: "GET",
- url: "https://datadoghq.com",
- },
- setCookie: "name:test",
- },
- locations: ["aws:us-east-2"],
- message: "Test message",
- name: "Example-Synthetic",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- deviceIds: ["tablet"],
- disableCors: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- noScreenshot: true,
- retry: {
- count: 2,
- interval: 10,
- },
- tickEvery: 300,
- scheduling: {
- timeframes: [
- {
- day: 1,
- from: "07:00",
- to: "16:00",
- },
- {
- day: 3,
- from: "07:00",
- to: "16:00",
- },
- ],
- timezone: "America/New_York",
- },
- },
- tags: ["testing:browser"],
- type: "browser",
- steps: [
- {
- allowFailure: false,
- isCritical: true,
- name: "Refresh page",
- params: {},
- type: "refresh",
- },
- ],
- },
-};
-
-apiInstance
- .createSyntheticsBrowserTest(params)
- .then((data: v1.SyntheticsBrowserTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/CreateSyntheticsMobileTest.ts b/examples/v1/synthetics/CreateSyntheticsMobileTest.ts
deleted file mode 100644
index 6974a8011930..000000000000
--- a/examples/v1/synthetics/CreateSyntheticsMobileTest.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Create a mobile test returns "OK - Returns the created test details." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiCreateSyntheticsMobileTestRequest = {
- body: {
- name: "Example-Synthetic",
- status: "paused",
- type: "mobile",
- config: {
- variables: [],
- },
- message: "",
- options: {
- deviceIds: ["synthetics:mobile:device:iphone_15_ios_17"],
- mobileApplication: {
- applicationId: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
- referenceId: "6115922a-5f5d-455e-bc7e-7955a57f3815",
- referenceType: "version",
- },
- tickEvery: 3600,
- },
- steps: [],
- },
-};
-
-apiInstance
- .createSyntheticsMobileTest(params)
- .then((data: v1.SyntheticsMobileTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/DeleteGlobalVariable.ts b/examples/v1/synthetics/DeleteGlobalVariable.ts
deleted file mode 100644
index 129697e96f86..000000000000
--- a/examples/v1/synthetics/DeleteGlobalVariable.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiDeleteGlobalVariableRequest = {
- variableId: "variable_id",
-};
-
-apiInstance
- .deleteGlobalVariable(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/DeletePrivateLocation.ts b/examples/v1/synthetics/DeletePrivateLocation.ts
deleted file mode 100644
index 7a5a8c0866c8..000000000000
--- a/examples/v1/synthetics/DeletePrivateLocation.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a private location returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiDeletePrivateLocationRequest = {
- locationId: "location_id",
-};
-
-apiInstance
- .deletePrivateLocation(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/DeleteTests.ts b/examples/v1/synthetics/DeleteTests.ts
deleted file mode 100644
index 86c5f185a510..000000000000
--- a/examples/v1/synthetics/DeleteTests.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Delete tests returns "OK." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_api_test" in the system
-const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiDeleteTestsRequest = {
- body: {
- publicIds: [SYNTHETICS_API_TEST_PUBLIC_ID],
- },
-};
-
-apiInstance
- .deleteTests(params)
- .then((data: v1.SyntheticsDeleteTestsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/EditGlobalVariable.ts b/examples/v1/synthetics/EditGlobalVariable.ts
deleted file mode 100644
index 9cc1ed20cde0..000000000000
--- a/examples/v1/synthetics/EditGlobalVariable.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Edit a global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiEditGlobalVariableRequest = {
- body: {
- attributes: {
- restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
- },
- description: "Example description",
- name: "MY_VARIABLE",
- parseTestOptions: {
- field: "content-type",
- localVariableName: "LOCAL_VARIABLE",
- parser: {
- type: "regex",
- value: ".*",
- },
- type: "http_body",
- },
- parseTestPublicId: "abc-def-123",
- tags: ["team:front", "test:workflow-1"],
- value: {
- secure: true,
- value: "value",
- },
- },
- variableId: "variable_id",
-};
-
-apiInstance
- .editGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/FetchUptimes.ts b/examples/v1/synthetics/FetchUptimes.ts
deleted file mode 100644
index 0babadff65e3..000000000000
--- a/examples/v1/synthetics/FetchUptimes.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Fetch uptime for multiple tests returns "OK." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiFetchUptimesRequest = {
- body: {
- fromTs: 1726041488,
- publicIds: ["p8m-9gw-nte"],
- toTs: 1726055954,
- },
-};
-
-apiInstance
- .fetchUptimes(params)
- .then((data: v1.SyntheticsTestUptime[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetAPITest.ts b/examples/v1/synthetics/GetAPITest.ts
deleted file mode 100644
index 36fbfb575a14..000000000000
--- a/examples/v1/synthetics/GetAPITest.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an API test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetAPITestRequest = {
- publicId: "public_id",
-};
-
-apiInstance
- .getAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetAPITestLatestResults.ts b/examples/v1/synthetics/GetAPITestLatestResults.ts
deleted file mode 100644
index 13d9c8dda42d..000000000000
--- a/examples/v1/synthetics/GetAPITestLatestResults.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an API test's latest results summaries returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetAPITestLatestResultsRequest = {
- publicId: "hwb-332-3xe",
-};
-
-apiInstance
- .getAPITestLatestResults(params)
- .then((data: v1.SyntheticsGetAPITestLatestResultsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetAPITestResult.ts b/examples/v1/synthetics/GetAPITestResult.ts
deleted file mode 100644
index 635621e143a6..000000000000
--- a/examples/v1/synthetics/GetAPITestResult.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get an API test result returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetAPITestResultRequest = {
- publicId: "hwb-332-3xe",
- resultId: "3420446318379485707",
-};
-
-apiInstance
- .getAPITestResult(params)
- .then((data: v1.SyntheticsAPITestResultFull) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetAPITestResult_1321866518.ts b/examples/v1/synthetics/GetAPITestResult_1321866518.ts
deleted file mode 100644
index bd2b8b85b296..000000000000
--- a/examples/v1/synthetics/GetAPITestResult_1321866518.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Get an API test result returns result with failure object
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a "synthetics_api_test_with_wrong_dns" in the system
-const SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID as string;
-
-// the "synthetics_api_test_with_wrong_dns" is triggered
-const SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID = process
- .env.SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID as string;
-
-const params: v1.SyntheticsApiGetAPITestResultRequest = {
- publicId: SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID,
- resultId: SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID,
-};
-
-apiInstance
- .getAPITestResult(params)
- .then((data: v1.SyntheticsAPITestResultFull) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetBrowserTest.ts b/examples/v1/synthetics/GetBrowserTest.ts
deleted file mode 100644
index a9e568178fd7..000000000000
--- a/examples/v1/synthetics/GetBrowserTest.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a browser test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetBrowserTestRequest = {
- publicId: "public_id",
-};
-
-apiInstance
- .getBrowserTest(params)
- .then((data: v1.SyntheticsBrowserTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetBrowserTestLatestResults.ts b/examples/v1/synthetics/GetBrowserTestLatestResults.ts
deleted file mode 100644
index 95c8c8272f84..000000000000
--- a/examples/v1/synthetics/GetBrowserTestLatestResults.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a browser test's latest results summaries returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetBrowserTestLatestResultsRequest = {
- publicId: "2yy-sem-mjh",
-};
-
-apiInstance
- .getBrowserTestLatestResults(params)
- .then((data: v1.SyntheticsGetBrowserTestLatestResultsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetBrowserTestResult.ts b/examples/v1/synthetics/GetBrowserTestResult.ts
deleted file mode 100644
index 2f5e61e289b6..000000000000
--- a/examples/v1/synthetics/GetBrowserTestResult.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a browser test result returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetBrowserTestResultRequest = {
- publicId: "2yy-sem-mjh",
- resultId: "5671719892074090418",
-};
-
-apiInstance
- .getBrowserTestResult(params)
- .then((data: v1.SyntheticsBrowserTestResultFull) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetGlobalVariable.ts b/examples/v1/synthetics/GetGlobalVariable.ts
deleted file mode 100644
index 34481460d39e..000000000000
--- a/examples/v1/synthetics/GetGlobalVariable.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a global variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetGlobalVariableRequest = {
- variableId: "variable_id",
-};
-
-apiInstance
- .getGlobalVariable(params)
- .then((data: v1.SyntheticsGlobalVariable) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetMobileTest.ts b/examples/v1/synthetics/GetMobileTest.ts
deleted file mode 100644
index 1e7d5886003f..000000000000
--- a/examples/v1/synthetics/GetMobileTest.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a Mobile test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_mobile_test" in the system
-const SYNTHETICS_MOBILE_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_MOBILE_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiGetMobileTestRequest = {
- publicId: SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
-};
-
-apiInstance
- .getMobileTest(params)
- .then((data: v1.SyntheticsMobileTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetPrivateLocation.ts b/examples/v1/synthetics/GetPrivateLocation.ts
deleted file mode 100644
index e26e66aee596..000000000000
--- a/examples/v1/synthetics/GetPrivateLocation.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a private location returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetPrivateLocationRequest = {
- locationId: "location_id",
-};
-
-apiInstance
- .getPrivateLocation(params)
- .then((data: v1.SyntheticsPrivateLocation) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetSyntheticsCIBatch.ts b/examples/v1/synthetics/GetSyntheticsCIBatch.ts
deleted file mode 100644
index c4b25b3f10fe..000000000000
--- a/examples/v1/synthetics/GetSyntheticsCIBatch.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get details of batch returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetSyntheticsCIBatchRequest = {
- batchId: "batch_id",
-};
-
-apiInstance
- .getSyntheticsCIBatch(params)
- .then((data: v1.SyntheticsBatchDetails) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetSyntheticsDefaultLocations.ts b/examples/v1/synthetics/GetSyntheticsDefaultLocations.ts
deleted file mode 100644
index c0badbf66ef1..000000000000
--- a/examples/v1/synthetics/GetSyntheticsDefaultLocations.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the default locations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .getSyntheticsDefaultLocations()
- .then((data: string[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetSyntheticsDefaultLocations_746853380.ts b/examples/v1/synthetics/GetSyntheticsDefaultLocations_746853380.ts
deleted file mode 100644
index 59c97403ea67..000000000000
--- a/examples/v1/synthetics/GetSyntheticsDefaultLocations_746853380.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of default locations returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .getSyntheticsDefaultLocations()
- .then((data: string[]) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/GetTest.ts b/examples/v1/synthetics/GetTest.ts
deleted file mode 100644
index ab4a7e6542ed..000000000000
--- a/examples/v1/synthetics/GetTest.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a test configuration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiGetTestRequest = {
- publicId: "public_id",
-};
-
-apiInstance
- .getTest(params)
- .then((data: v1.SyntheticsTestDetails) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/ListGlobalVariables.ts b/examples/v1/synthetics/ListGlobalVariables.ts
deleted file mode 100644
index 0e794254e086..000000000000
--- a/examples/v1/synthetics/ListGlobalVariables.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all global variables returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .listGlobalVariables()
- .then((data: v1.SyntheticsListGlobalVariablesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/ListLocations.ts b/examples/v1/synthetics/ListLocations.ts
deleted file mode 100644
index b4108fda6cc3..000000000000
--- a/examples/v1/synthetics/ListLocations.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all locations (public and private) returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .listLocations()
- .then((data: v1.SyntheticsLocations) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/ListTests.ts b/examples/v1/synthetics/ListTests.ts
deleted file mode 100644
index aeb0fd80c938..000000000000
--- a/examples/v1/synthetics/ListTests.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .listTests()
- .then((data: v1.SyntheticsListTestsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/ListTests_1938827783.ts b/examples/v1/synthetics/ListTests_1938827783.ts
deleted file mode 100644
index f3362888a148..000000000000
--- a/examples/v1/synthetics/ListTests_1938827783.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response with pagination
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiListTestsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listTestsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v1/synthetics/ListTests_2779190961.ts b/examples/v1/synthetics/ListTests_2779190961.ts
deleted file mode 100644
index 5d2eba5ad045..000000000000
--- a/examples/v1/synthetics/ListTests_2779190961.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Client is resilient to enum and oneOf deserialization errors
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-apiInstance
- .listTests()
- .then((data: v1.SyntheticsListTestsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/PatchTest.ts b/examples/v1/synthetics/PatchTest.ts
deleted file mode 100644
index 86882007c3a4..000000000000
--- a/examples/v1/synthetics/PatchTest.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Patch a Synthetic test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_api_test" in the system
-const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiPatchTestRequest = {
- body: {
- data: [
- {
- op: "replace",
- path: "/name",
- value: "New test name",
- },
- {
- op: "remove",
- path: "/config/assertions/0",
- },
- ],
- },
- publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
-};
-
-apiInstance
- .patchTest(params)
- .then((data: v1.SyntheticsTestDetails) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/TriggerCITests.ts b/examples/v1/synthetics/TriggerCITests.ts
deleted file mode 100644
index 75b323229d1a..000000000000
--- a/examples/v1/synthetics/TriggerCITests.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Trigger tests from CI/CD pipelines returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiTriggerCITestsRequest = {
- body: {
- tests: [
- {
- basicAuth: {
- password: "PaSSw0RD!",
- type: "web",
- username: "my_username",
- },
- deviceIds: ["chrome.laptop_large"],
- locations: ["aws:eu-west-3"],
- metadata: {
- ci: {
- pipeline: {},
- provider: {},
- },
- git: {},
- },
- publicId: "aaa-aaa-aaa",
- retry: {},
- },
- ],
- },
-};
-
-apiInstance
- .triggerCITests(params)
- .then((data: v1.SyntheticsTriggerCITestsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/TriggerTests.ts b/examples/v1/synthetics/TriggerTests.ts
deleted file mode 100644
index faf53e0e4a8c..000000000000
--- a/examples/v1/synthetics/TriggerTests.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Trigger Synthetic tests returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_api_test" in the system
-const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiTriggerTestsRequest = {
- body: {
- tests: [
- {
- publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
- },
- ],
- },
-};
-
-apiInstance
- .triggerTests(params)
- .then((data: v1.SyntheticsTriggerCITestsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/UpdateAPITest.ts b/examples/v1/synthetics/UpdateAPITest.ts
deleted file mode 100644
index 081c4217db94..000000000000
--- a/examples/v1/synthetics/UpdateAPITest.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Edit an API test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_api_test" in the system
-const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_API_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiUpdateAPITestRequest = {
- body: {
- config: {
- assertions: [
- {
- operator: "is",
- property: "{{ PROPERTY }}",
- target: "text/html",
- type: "header",
- },
- {
- operator: "lessThan",
- target: 2000,
- type: "responseTime",
- },
- {
- operator: "validatesJSONPath",
- target: {
- jsonPath: "topKey",
- operator: "isNot",
- targetValue: "0",
- },
- type: "body",
- },
- {
- operator: "validatesJSONSchema",
- target: {
- metaSchema: "draft-07",
- jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
- },
- type: "body",
- },
- ],
- configVariables: [
- {
- example: "content-type",
- name: "PROPERTY",
- pattern: "content-type",
- type: "text",
- },
- ],
- request: {
- certificate: {
- cert: {
- filename: "cert-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- key: {
- filename: "key-filename",
- updatedAt: "2020-10-16T09:23:24.857Z",
- },
- },
- headers: {
- unique: "examplesynthetic",
- },
- method: "GET",
- timeout: 10,
- url: "https://datadoghq.com",
- },
- },
- locations: ["aws:us-east-2"],
- message: "BDD test payload: synthetics_api_test_payload.json",
- name: "Example-Synthetic-updated",
- options: {
- acceptSelfSigned: false,
- allowInsecure: true,
- followRedirects: true,
- minFailureDuration: 10,
- minLocationFailed: 1,
- monitorName: "Test-TestSyntheticsAPITestLifecycle-1623076664",
- monitorPriority: 5,
- retry: {
- count: 3,
- interval: 10,
- },
- tickEvery: 60,
- },
- status: "live",
- subtype: "http",
- tags: ["testing:api"],
- type: "api",
- },
- publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
-};
-
-apiInstance
- .updateAPITest(params)
- .then((data: v1.SyntheticsAPITest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/UpdateBrowserTest.ts b/examples/v1/synthetics/UpdateBrowserTest.ts
deleted file mode 100644
index 738c2349cc62..000000000000
--- a/examples/v1/synthetics/UpdateBrowserTest.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Edit a browser test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiUpdateBrowserTestRequest = {
- body: {
- config: {
- assertions: [],
- configVariables: [
- {
- name: "VARIABLE_NAME",
- secure: false,
- type: "text",
- },
- ],
- request: {
- basicAuth: {
- password: "PaSSw0RD!",
- type: "web",
- username: "my_username",
- },
- bodyType: "text/plain",
- callType: "unary",
- certificate: {
- cert: {},
- key: {},
- },
- certificateDomains: [],
- files: [{}],
- httpVersion: "http1",
- proxy: {
- url: "https://example.com",
- },
- service: "Greeter",
- url: "https://example.com",
- },
- variables: [
- {
- name: "VARIABLE_NAME",
- type: "text",
- },
- ],
- },
- locations: ["aws:eu-west-3"],
- message: "",
- name: "Example test name",
- options: {
- ci: {
- executionRule: "blocking",
- },
- deviceIds: ["chrome.laptop_large"],
- httpVersion: "http1",
- monitorOptions: {
- notificationPresetName: "show_all",
- },
- restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
- retry: {},
- rumSettings: {
- applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
- clientTokenId: 12345,
- isEnabled: true,
- },
- scheduling: {
- timeframes: [
- {
- day: 1,
- from: "07:00",
- to: "16:00",
- },
- {
- day: 3,
- from: "07:00",
- to: "16:00",
- },
- ],
- timezone: "America/New_York",
- },
- },
- status: "live",
- steps: [
- {
- type: "assertElementContent",
- },
- ],
- tags: ["env:prod"],
- type: "browser",
- },
- publicId: "public_id",
-};
-
-apiInstance
- .updateBrowserTest(params)
- .then((data: v1.SyntheticsBrowserTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/UpdateMobileTest.ts b/examples/v1/synthetics/UpdateMobileTest.ts
deleted file mode 100644
index c87b2ec0eda7..000000000000
--- a/examples/v1/synthetics/UpdateMobileTest.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Edit a Mobile test returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-// there is a valid "synthetics_mobile_test" in the system
-const SYNTHETICS_MOBILE_TEST_PUBLIC_ID = process.env
- .SYNTHETICS_MOBILE_TEST_PUBLIC_ID as string;
-
-const params: v1.SyntheticsApiUpdateMobileTestRequest = {
- body: {
- name: "Example-Synthetic-updated",
- status: "paused",
- type: "mobile",
- config: {
- variables: [],
- },
- message: "",
- options: {
- deviceIds: ["synthetics:mobile:device:iphone_15_ios_17"],
- mobileApplication: {
- applicationId: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
- referenceId: "6115922a-5f5d-455e-bc7e-7955a57f3815",
- referenceType: "version",
- },
- tickEvery: 3600,
- },
- steps: [],
- },
- publicId: SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
-};
-
-apiInstance
- .updateMobileTest(params)
- .then((data: v1.SyntheticsMobileTest) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/UpdatePrivateLocation.ts b/examples/v1/synthetics/UpdatePrivateLocation.ts
deleted file mode 100644
index db94ac7833f1..000000000000
--- a/examples/v1/synthetics/UpdatePrivateLocation.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Edit a private location returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiUpdatePrivateLocationRequest = {
- body: {
- description: "Description of private location",
- metadata: {
- restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
- },
- name: "New private location",
- tags: ["team:front"],
- },
- locationId: "location_id",
-};
-
-apiInstance
- .updatePrivateLocation(params)
- .then((data: v1.SyntheticsPrivateLocation) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/synthetics/UpdateTestPauseStatus.ts b/examples/v1/synthetics/UpdateTestPauseStatus.ts
deleted file mode 100644
index 0783ce1db4f7..000000000000
--- a/examples/v1/synthetics/UpdateTestPauseStatus.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.SyntheticsApi(configuration);
-
-const params: v1.SyntheticsApiUpdateTestPauseStatusRequest = {
- body: {
- newStatus: "live",
- },
- publicId: "public_id",
-};
-
-apiInstance
- .updateTestPauseStatus(params)
- .then((data: boolean) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/tags/CreateHostTags.ts b/examples/v1/tags/CreateHostTags.ts
deleted file mode 100644
index 0dd319e377c5..000000000000
--- a/examples/v1/tags/CreateHostTags.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Add tags to a host returns "Created" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.TagsApi(configuration);
-
-const params: v1.TagsApiCreateHostTagsRequest = {
- body: {
- host: "test.host",
- tags: ["environment:production"],
- },
- hostName: "host_name",
-};
-
-apiInstance
- .createHostTags(params)
- .then((data: v1.HostTags) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/tags/DeleteHostTags.ts b/examples/v1/tags/DeleteHostTags.ts
deleted file mode 100644
index 6217540a416d..000000000000
--- a/examples/v1/tags/DeleteHostTags.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Remove host tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.TagsApi(configuration);
-
-const params: v1.TagsApiDeleteHostTagsRequest = {
- hostName: "host_name",
-};
-
-apiInstance
- .deleteHostTags(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/tags/GetHostTags.ts b/examples/v1/tags/GetHostTags.ts
deleted file mode 100644
index e96c5c517606..000000000000
--- a/examples/v1/tags/GetHostTags.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get host tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.TagsApi(configuration);
-
-const params: v1.TagsApiGetHostTagsRequest = {
- hostName: "host_name",
-};
-
-apiInstance
- .getHostTags(params)
- .then((data: v1.HostTags) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/tags/ListHostTags.ts b/examples/v1/tags/ListHostTags.ts
deleted file mode 100644
index 683847aec607..000000000000
--- a/examples/v1/tags/ListHostTags.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get Tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.TagsApi(configuration);
-
-apiInstance
- .listHostTags()
- .then((data: v1.TagToHosts) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/tags/UpdateHostTags.ts b/examples/v1/tags/UpdateHostTags.ts
deleted file mode 100644
index f49b7d612a43..000000000000
--- a/examples/v1/tags/UpdateHostTags.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Update host tags returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.TagsApi(configuration);
-
-const params: v1.TagsApiUpdateHostTagsRequest = {
- body: {
- host: "test.host",
- tags: ["environment:production"],
- },
- hostName: "host_name",
-};
-
-apiInstance
- .updateHostTags(params)
- .then((data: v1.HostTags) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetDailyCustomReports.ts b/examples/v1/usage-metering/GetDailyCustomReports.ts
deleted file mode 100644
index f5275efe1f1c..000000000000
--- a/examples/v1/usage-metering/GetDailyCustomReports.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of available daily custom reports returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-apiInstance
- .getDailyCustomReports()
- .then((data: v1.UsageCustomReportsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetHourlyUsageAttribution.ts b/examples/v1/usage-metering/GetHourlyUsageAttribution.ts
deleted file mode 100644
index 189577f75284..000000000000
--- a/examples/v1/usage-metering/GetHourlyUsageAttribution.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage attribution returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetHourlyUsageAttributionRequest = {
- startHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
- usageType: "infra_host_usage",
-};
-
-apiInstance
- .getHourlyUsageAttribution(params)
- .then((data: v1.HourlyUsageAttributionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetIncidentManagement.ts b/examples/v1/usage-metering/GetIncidentManagement.ts
deleted file mode 100644
index 0efca1c74569..000000000000
--- a/examples/v1/usage-metering/GetIncidentManagement.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for incident management returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetIncidentManagementRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getIncidentManagement(params)
- .then((data: v1.UsageIncidentManagementResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetIngestedSpans.ts b/examples/v1/usage-metering/GetIngestedSpans.ts
deleted file mode 100644
index 306b92f23861..000000000000
--- a/examples/v1/usage-metering/GetIngestedSpans.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for ingested spans returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetIngestedSpansRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getIngestedSpans(params)
- .then((data: v1.UsageIngestedSpansResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetMonthlyCustomReports.ts b/examples/v1/usage-metering/GetMonthlyCustomReports.ts
deleted file mode 100644
index 3ce1e9eafcc2..000000000000
--- a/examples/v1/usage-metering/GetMonthlyCustomReports.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of available monthly custom reports returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-apiInstance
- .getMonthlyCustomReports()
- .then((data: v1.UsageCustomReportsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetMonthlyUsageAttribution.ts b/examples/v1/usage-metering/GetMonthlyUsageAttribution.ts
deleted file mode 100644
index d025bbf94a28..000000000000
--- a/examples/v1/usage-metering/GetMonthlyUsageAttribution.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get monthly usage attribution returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetMonthlyUsageAttributionRequest = {
- startMonth: new Date(new Date().getTime() + -3 * 86400 * 1000),
- fields: "infra_host_usage",
-};
-
-apiInstance
- .getMonthlyUsageAttribution(params)
- .then((data: v1.MonthlyUsageAttributionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.ts b/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.ts
deleted file mode 100644
index 24894f8c87f7..000000000000
--- a/examples/v1/usage-metering/GetMonthlyUsageAttribution_3849653599.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Paginate monthly usage attribution
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-// there is a valid "monthly_usage_attribution" response
-const MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID = process.env
- .MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID as string;
-
-const params: v1.UsageMeteringApiGetMonthlyUsageAttributionRequest = {
- startMonth: new Date(new Date().getTime() + -3 * 86400 * 1000),
- fields: "infra_host_usage",
- nextRecordId: MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID,
-};
-
-apiInstance
- .getMonthlyUsageAttribution(params)
- .then((data: v1.MonthlyUsageAttributionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.ts b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.ts
deleted file mode 100644
index e36b48740f96..000000000000
--- a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get specified daily custom reports returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetSpecifiedDailyCustomReportsRequest = {
- reportId: "2022-03-20",
-};
-
-apiInstance
- .getSpecifiedDailyCustomReports(params)
- .then((data: v1.UsageSpecifiedCustomReportsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.ts b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.ts
deleted file mode 100644
index a90ebd499ad5..000000000000
--- a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get specified monthly custom reports returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetSpecifiedMonthlyCustomReportsRequest = {
- reportId: "2021-05-01",
-};
-
-apiInstance
- .getSpecifiedMonthlyCustomReports(params)
- .then((data: v1.UsageSpecifiedCustomReportsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageAnalyzedLogs.ts b/examples/v1/usage-metering/GetUsageAnalyzedLogs.ts
deleted file mode 100644
index fe704eaf4006..000000000000
--- a/examples/v1/usage-metering/GetUsageAnalyzedLogs.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for analyzed logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageAnalyzedLogsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageAnalyzedLogs(params)
- .then((data: v1.UsageAnalyzedLogsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageAuditLogs.ts b/examples/v1/usage-metering/GetUsageAuditLogs.ts
deleted file mode 100644
index fb0d7a567950..000000000000
--- a/examples/v1/usage-metering/GetUsageAuditLogs.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for audit logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageAuditLogsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageAuditLogs(params)
- .then((data: v1.UsageAuditLogsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageBillableSummary.ts b/examples/v1/usage-metering/GetUsageBillableSummary.ts
deleted file mode 100644
index 592b4b0b7975..000000000000
--- a/examples/v1/usage-metering/GetUsageBillableSummary.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get billable usage across your account returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-apiInstance
- .getUsageBillableSummary()
- .then((data: v1.UsageBillableSummaryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageCIApp.ts b/examples/v1/usage-metering/GetUsageCIApp.ts
deleted file mode 100644
index 1c416d8f4adf..000000000000
--- a/examples/v1/usage-metering/GetUsageCIApp.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for CI visibility returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageCIAppRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageCIApp(params)
- .then((data: v1.UsageCIVisibilityResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageCWS.ts b/examples/v1/usage-metering/GetUsageCWS.ts
deleted file mode 100644
index 9cc3b64fb728..000000000000
--- a/examples/v1/usage-metering/GetUsageCWS.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for cloud workload security returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageCWSRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageCWS(params)
- .then((data: v1.UsageCWSResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.ts b/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.ts
deleted file mode 100644
index 8438e565889b..000000000000
--- a/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for CSM Pro returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageCloudSecurityPostureManagementRequest =
- {
- startHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
- };
-
-apiInstance
- .getUsageCloudSecurityPostureManagement(params)
- .then((data: v1.UsageCloudSecurityPostureManagementResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageDBM.ts b/examples/v1/usage-metering/GetUsageDBM.ts
deleted file mode 100644
index 5b47c0efd931..000000000000
--- a/examples/v1/usage-metering/GetUsageDBM.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for database monitoring returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageDBMRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageDBM(params)
- .then((data: v1.UsageDBMResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageDBM_3446806203.ts b/examples/v1/usage-metering/GetUsageDBM_3446806203.ts
deleted file mode 100644
index 06d60ea8dfa5..000000000000
--- a/examples/v1/usage-metering/GetUsageDBM_3446806203.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Database Monitoring returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageDBMRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageDBM(params)
- .then((data: v1.UsageDBMResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageFargate.ts b/examples/v1/usage-metering/GetUsageFargate.ts
deleted file mode 100644
index c714101f37b8..000000000000
--- a/examples/v1/usage-metering/GetUsageFargate.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Fargate returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageFargateRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageFargate(params)
- .then((data: v1.UsageFargateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageHosts.ts b/examples/v1/usage-metering/GetUsageHosts.ts
deleted file mode 100644
index 0dc9dbda199d..000000000000
--- a/examples/v1/usage-metering/GetUsageHosts.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for hosts and containers returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageHostsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageHosts(params)
- .then((data: v1.UsageHostsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageIndexedSpans.ts b/examples/v1/usage-metering/GetUsageIndexedSpans.ts
deleted file mode 100644
index 7c3fb10ec963..000000000000
--- a/examples/v1/usage-metering/GetUsageIndexedSpans.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for indexed spans returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageIndexedSpansRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageIndexedSpans(params)
- .then((data: v1.UsageIndexedSpansResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageInternetOfThings.ts b/examples/v1/usage-metering/GetUsageInternetOfThings.ts
deleted file mode 100644
index e996e1620e14..000000000000
--- a/examples/v1/usage-metering/GetUsageInternetOfThings.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for IoT returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageInternetOfThingsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageInternetOfThings(params)
- .then((data: v1.UsageIoTResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLambda.ts b/examples/v1/usage-metering/GetUsageLambda.ts
deleted file mode 100644
index 22679f9bb598..000000000000
--- a/examples/v1/usage-metering/GetUsageLambda.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Lambda returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLambdaRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageLambda(params)
- .then((data: v1.UsageLambdaResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLogs.ts b/examples/v1/usage-metering/GetUsageLogs.ts
deleted file mode 100644
index 776082806715..000000000000
--- a/examples/v1/usage-metering/GetUsageLogs.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLogsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageLogs(params)
- .then((data: v1.UsageLogsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLogsByIndex.ts b/examples/v1/usage-metering/GetUsageLogsByIndex.ts
deleted file mode 100644
index 1131da725629..000000000000
--- a/examples/v1/usage-metering/GetUsageLogsByIndex.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for logs by index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLogsByIndexRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageLogsByIndex(params)
- .then((data: v1.UsageLogsByIndexResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.ts b/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.ts
deleted file mode 100644
index 2f5e9364bab1..000000000000
--- a/examples/v1/usage-metering/GetUsageLogsByIndex_1025184776.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Logs by Index returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLogsByIndexRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageLogsByIndex(params)
- .then((data: v1.UsageLogsByIndexResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLogsByRetention.ts b/examples/v1/usage-metering/GetUsageLogsByRetention.ts
deleted file mode 100644
index 6b32f36330c4..000000000000
--- a/examples/v1/usage-metering/GetUsageLogsByRetention.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly logs usage by retention returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLogsByRetentionRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageLogsByRetention(params)
- .then((data: v1.UsageLogsByRetentionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageLogs_2562396405.ts b/examples/v1/usage-metering/GetUsageLogs_2562396405.ts
deleted file mode 100644
index 4fc7de045403..000000000000
--- a/examples/v1/usage-metering/GetUsageLogs_2562396405.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Logs returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageLogsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageLogs(params)
- .then((data: v1.UsageLogsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageNetworkFlows.ts b/examples/v1/usage-metering/GetUsageNetworkFlows.ts
deleted file mode 100644
index 82c68f91cd67..000000000000
--- a/examples/v1/usage-metering/GetUsageNetworkFlows.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * get hourly usage for network flows returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageNetworkFlowsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageNetworkFlows(params)
- .then((data: v1.UsageNetworkFlowsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.ts b/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.ts
deleted file mode 100644
index 4b5daf202d8a..000000000000
--- a/examples/v1/usage-metering/GetUsageNetworkFlows_1239422069.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Network Flows returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageNetworkFlowsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageNetworkFlows(params)
- .then((data: v1.UsageNetworkFlowsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageNetworkHosts.ts b/examples/v1/usage-metering/GetUsageNetworkHosts.ts
deleted file mode 100644
index 9ba893b06c60..000000000000
--- a/examples/v1/usage-metering/GetUsageNetworkHosts.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for network hosts returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageNetworkHostsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageNetworkHosts(params)
- .then((data: v1.UsageNetworkHostsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.ts b/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.ts
deleted file mode 100644
index b9a1d9cd706f..000000000000
--- a/examples/v1/usage-metering/GetUsageNetworkHosts_1249907835.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Network Hosts returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageNetworkHostsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageNetworkHosts(params)
- .then((data: v1.UsageNetworkHostsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageOnlineArchive.ts b/examples/v1/usage-metering/GetUsageOnlineArchive.ts
deleted file mode 100644
index 213688495cb1..000000000000
--- a/examples/v1/usage-metering/GetUsageOnlineArchive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for online archive returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageOnlineArchiveRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageOnlineArchive(params)
- .then((data: v1.UsageOnlineArchiveResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.ts b/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.ts
deleted file mode 100644
index 217a05d2eba1..000000000000
--- a/examples/v1/usage-metering/GetUsageOnlineArchive_1501172903.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Online Archive returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageOnlineArchiveRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageOnlineArchive(params)
- .then((data: v1.UsageOnlineArchiveResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageProfiling.ts b/examples/v1/usage-metering/GetUsageProfiling.ts
deleted file mode 100644
index eeb9c548f60b..000000000000
--- a/examples/v1/usage-metering/GetUsageProfiling.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for profiled hosts returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageProfilingRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageProfiling(params)
- .then((data: v1.UsageProfilingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageRumSessions.ts b/examples/v1/usage-metering/GetUsageRumSessions.ts
deleted file mode 100644
index 9d26809c4cd0..000000000000
--- a/examples/v1/usage-metering/GetUsageRumSessions.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for RUM sessions returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageRumSessionsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageRumSessions(params)
- .then((data: v1.UsageRumSessionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageRumSessions_3271366243.ts b/examples/v1/usage-metering/GetUsageRumSessions_3271366243.ts
deleted file mode 100644
index d9e3bc8fd9c1..000000000000
--- a/examples/v1/usage-metering/GetUsageRumSessions_3271366243.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get mobile hourly usage for RUM Sessions returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageRumSessionsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
- type: "mobile",
-};
-
-apiInstance
- .getUsageRumSessions(params)
- .then((data: v1.UsageRumSessionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageRumSessions_714937291.ts b/examples/v1/usage-metering/GetUsageRumSessions_714937291.ts
deleted file mode 100644
index 4d5473de91f1..000000000000
--- a/examples/v1/usage-metering/GetUsageRumSessions_714937291.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for RUM Sessions returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageRumSessionsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageRumSessions(params)
- .then((data: v1.UsageRumSessionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageRumUnits.ts b/examples/v1/usage-metering/GetUsageRumUnits.ts
deleted file mode 100644
index a5d7b6d26d1f..000000000000
--- a/examples/v1/usage-metering/GetUsageRumUnits.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for RUM units returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageRumUnitsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageRumUnits(params)
- .then((data: v1.UsageRumUnitsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageRumUnits_3959755399.ts b/examples/v1/usage-metering/GetUsageRumUnits_3959755399.ts
deleted file mode 100644
index 973a61c10af8..000000000000
--- a/examples/v1/usage-metering/GetUsageRumUnits_3959755399.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for RUM Units returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageRumUnitsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageRumUnits(params)
- .then((data: v1.UsageRumUnitsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSDS.ts b/examples/v1/usage-metering/GetUsageSDS.ts
deleted file mode 100644
index 4a60bf814b52..000000000000
--- a/examples/v1/usage-metering/GetUsageSDS.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for sensitive data scanner returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSDSRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageSDS(params)
- .then((data: v1.UsageSDSResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSDS_271128478.ts b/examples/v1/usage-metering/GetUsageSDS_271128478.ts
deleted file mode 100644
index fb51e13cd3f3..000000000000
--- a/examples/v1/usage-metering/GetUsageSDS_271128478.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Sensitive Data Scanner returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSDSRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageSDS(params)
- .then((data: v1.UsageSDSResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSNMP.ts b/examples/v1/usage-metering/GetUsageSNMP.ts
deleted file mode 100644
index a16b39fbbc8a..000000000000
--- a/examples/v1/usage-metering/GetUsageSNMP.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for SNMP devices returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSNMPRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageSNMP(params)
- .then((data: v1.UsageSNMPResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSummary.ts b/examples/v1/usage-metering/GetUsageSummary.ts
deleted file mode 100644
index fc60692a1fb9..000000000000
--- a/examples/v1/usage-metering/GetUsageSummary.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get usage across your account returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSummaryRequest = {
- startMonth: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageSummary(params)
- .then((data: v1.UsageSummaryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSynthetics.ts b/examples/v1/usage-metering/GetUsageSynthetics.ts
deleted file mode 100644
index c00296534c3f..000000000000
--- a/examples/v1/usage-metering/GetUsageSynthetics.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for synthetics checks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSyntheticsRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageSynthetics(params)
- .then((data: v1.UsageSyntheticsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSyntheticsAPI.ts b/examples/v1/usage-metering/GetUsageSyntheticsAPI.ts
deleted file mode 100644
index 144643c2dd7a..000000000000
--- a/examples/v1/usage-metering/GetUsageSyntheticsAPI.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for synthetics API checks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSyntheticsAPIRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageSyntheticsAPI(params)
- .then((data: v1.UsageSyntheticsAPIResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.ts b/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.ts
deleted file mode 100644
index 5c936969cb32..000000000000
--- a/examples/v1/usage-metering/GetUsageSyntheticsAPI_4048033529.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Synthetics API Checks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSyntheticsAPIRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageSyntheticsAPI(params)
- .then((data: v1.UsageSyntheticsAPIResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSyntheticsBrowser.ts b/examples/v1/usage-metering/GetUsageSyntheticsBrowser.ts
deleted file mode 100644
index baa476b6c361..000000000000
--- a/examples/v1/usage-metering/GetUsageSyntheticsBrowser.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get hourly usage for synthetics browser checks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSyntheticsBrowserRequest = {
- startHr: new Date(2021, 11, 11, 11, 11, 11, 111000),
-};
-
-apiInstance
- .getUsageSyntheticsBrowser(params)
- .then((data: v1.UsageSyntheticsBrowserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.ts b/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.ts
deleted file mode 100644
index fa4e1bd096e3..000000000000
--- a/examples/v1/usage-metering/GetUsageSyntheticsBrowser_1704663299.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Synthetics Browser Checks returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageSyntheticsBrowserRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageSyntheticsBrowser(params)
- .then((data: v1.UsageSyntheticsBrowserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageTimeseries.ts b/examples/v1/usage-metering/GetUsageTimeseries.ts
deleted file mode 100644
index d5ffab81e4c3..000000000000
--- a/examples/v1/usage-metering/GetUsageTimeseries.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for custom metrics returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageTimeseriesRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageTimeseries(params)
- .then((data: v1.UsageTimeseriesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/usage-metering/GetUsageTopAvgMetrics.ts b/examples/v1/usage-metering/GetUsageTopAvgMetrics.ts
deleted file mode 100644
index f294a57cdded..000000000000
--- a/examples/v1/usage-metering/GetUsageTopAvgMetrics.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all custom metrics by hourly average returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsageMeteringApi(configuration);
-
-const params: v1.UsageMeteringApiGetUsageTopAvgMetricsRequest = {
- day: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageTopAvgMetrics(params)
- .then((data: v1.UsageTopAvgMetricsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/CreateUser.ts b/examples/v1/users/CreateUser.ts
deleted file mode 100644
index 0626b788256f..000000000000
--- a/examples/v1/users/CreateUser.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Create a user returns "User created" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-const params: v1.UsersApiCreateUserRequest = {
- body: {
- accessRole: "ro",
- disabled: false,
- email: "test@datadoghq.com",
- handle: "test@datadoghq.com",
- name: "test user",
- },
-};
-
-apiInstance
- .createUser(params)
- .then((data: v1.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/CreateUser_266604071.ts b/examples/v1/users/CreateUser_266604071.ts
deleted file mode 100644
index 5582bd0094b3..000000000000
--- a/examples/v1/users/CreateUser_266604071.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Create a user returns null access role
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-const params: v1.UsersApiCreateUserRequest = {
- body: {
- accessRole: undefined,
- disabled: false,
- email: "test@datadoghq.com",
- handle: "test@datadoghq.com",
- name: "test user",
- },
-};
-
-apiInstance
- .createUser(params)
- .then((data: v1.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/DisableUser.ts b/examples/v1/users/DisableUser.ts
deleted file mode 100644
index f3052c71e714..000000000000
--- a/examples/v1/users/DisableUser.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Disable a user returns "User disabled" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-const params: v1.UsersApiDisableUserRequest = {
- userHandle: "test@datadoghq.com",
-};
-
-apiInstance
- .disableUser(params)
- .then((data: v1.UserDisableResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/GetUser.ts b/examples/v1/users/GetUser.ts
deleted file mode 100644
index 15e1b2c154f2..000000000000
--- a/examples/v1/users/GetUser.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get user details returns "OK for get user" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-const params: v1.UsersApiGetUserRequest = {
- userHandle: "test@datadoghq.com",
-};
-
-apiInstance
- .getUser(params)
- .then((data: v1.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/ListUsers.ts b/examples/v1/users/ListUsers.ts
deleted file mode 100644
index 4b00789babef..000000000000
--- a/examples/v1/users/ListUsers.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all users returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-apiInstance
- .listUsers()
- .then((data: v1.UserListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/users/UpdateUser.ts b/examples/v1/users/UpdateUser.ts
deleted file mode 100644
index 756ccdc8a01e..000000000000
--- a/examples/v1/users/UpdateUser.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Update a user returns "User updated" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.UsersApi(configuration);
-
-const params: v1.UsersApiUpdateUserRequest = {
- body: {
- accessRole: "ro",
- disabled: false,
- email: "test@datadoghq.com",
- handle: "test@datadoghq.com",
- name: "test user",
- },
- userHandle: "test@datadoghq.com",
-};
-
-apiInstance
- .updateUser(params)
- .then((data: v1.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/CreateWebhooksIntegration.ts b/examples/v1/webhooks-integration/CreateWebhooksIntegration.ts
deleted file mode 100644
index 043f05406dfa..000000000000
--- a/examples/v1/webhooks-integration/CreateWebhooksIntegration.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Create a webhooks integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-const params: v1.WebhooksIntegrationApiCreateWebhooksIntegrationRequest = {
- body: {
- name: "Example-Webhooks-Integration",
- url: "https://example.com/webhook",
- },
-};
-
-apiInstance
- .createWebhooksIntegration(params)
- .then((data: v1.WebhooksIntegration) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.ts b/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.ts
deleted file mode 100644
index 87e19e336a30..000000000000
--- a/examples/v1/webhooks-integration/CreateWebhooksIntegrationCustomVariable.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Create a custom variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-const params: v1.WebhooksIntegrationApiCreateWebhooksIntegrationCustomVariableRequest =
- {
- body: {
- isSecret: true,
- name: "EXAMPLEWEBHOOKSINTEGRATION",
- value: "CUSTOM_VARIABLE_VALUE",
- },
- };
-
-apiInstance
- .createWebhooksIntegrationCustomVariable(params)
- .then((data: v1.WebhooksIntegrationCustomVariableResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/DeleteWebhooksIntegration.ts b/examples/v1/webhooks-integration/DeleteWebhooksIntegration.ts
deleted file mode 100644
index e6a18c0efc15..000000000000
--- a/examples/v1/webhooks-integration/DeleteWebhooksIntegration.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a webhook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-// there is a valid "webhook" in the system
-const WEBHOOK_NAME = process.env.WEBHOOK_NAME as string;
-
-const params: v1.WebhooksIntegrationApiDeleteWebhooksIntegrationRequest = {
- webhookName: WEBHOOK_NAME,
-};
-
-apiInstance
- .deleteWebhooksIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.ts b/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.ts
deleted file mode 100644
index 6aa67fac1599..000000000000
--- a/examples/v1/webhooks-integration/DeleteWebhooksIntegrationCustomVariable.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Delete a custom variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-// there is a valid "webhook_custom_variable" in the system
-const WEBHOOK_CUSTOM_VARIABLE_NAME = process.env
- .WEBHOOK_CUSTOM_VARIABLE_NAME as string;
-
-const params: v1.WebhooksIntegrationApiDeleteWebhooksIntegrationCustomVariableRequest =
- {
- customVariableName: WEBHOOK_CUSTOM_VARIABLE_NAME,
- };
-
-apiInstance
- .deleteWebhooksIntegrationCustomVariable(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/GetWebhooksIntegration.ts b/examples/v1/webhooks-integration/GetWebhooksIntegration.ts
deleted file mode 100644
index fc44e4772fd3..000000000000
--- a/examples/v1/webhooks-integration/GetWebhooksIntegration.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a webhook integration returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-// there is a valid "webhook" in the system
-const WEBHOOK_NAME = process.env.WEBHOOK_NAME as string;
-
-const params: v1.WebhooksIntegrationApiGetWebhooksIntegrationRequest = {
- webhookName: WEBHOOK_NAME,
-};
-
-apiInstance
- .getWebhooksIntegration(params)
- .then((data: v1.WebhooksIntegration) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.ts b/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.ts
deleted file mode 100644
index 497b770939c9..000000000000
--- a/examples/v1/webhooks-integration/GetWebhooksIntegrationCustomVariable.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a custom variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-const params: v1.WebhooksIntegrationApiGetWebhooksIntegrationCustomVariableRequest =
- {
- customVariableName: "custom_variable_name",
- };
-
-apiInstance
- .getWebhooksIntegrationCustomVariable(params)
- .then((data: v1.WebhooksIntegrationCustomVariableResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/UpdateWebhooksIntegration.ts b/examples/v1/webhooks-integration/UpdateWebhooksIntegration.ts
deleted file mode 100644
index dbf69e50cfdb..000000000000
--- a/examples/v1/webhooks-integration/UpdateWebhooksIntegration.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Update a webhook returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-// there is a valid "webhook" in the system
-const WEBHOOK_NAME = process.env.WEBHOOK_NAME as string;
-
-const params: v1.WebhooksIntegrationApiUpdateWebhooksIntegrationRequest = {
- body: {
- url: "https://example.com/webhook-updated",
- },
- webhookName: WEBHOOK_NAME,
-};
-
-apiInstance
- .updateWebhooksIntegration(params)
- .then((data: v1.WebhooksIntegration) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.ts b/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.ts
deleted file mode 100644
index df3ad6c745fe..000000000000
--- a/examples/v1/webhooks-integration/UpdateWebhooksIntegrationCustomVariable.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Update a custom variable returns "OK" response
- */
-
-import { client, v1 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v1.WebhooksIntegrationApi(configuration);
-
-// there is a valid "webhook_custom_variable" in the system
-const WEBHOOK_CUSTOM_VARIABLE_NAME = process.env
- .WEBHOOK_CUSTOM_VARIABLE_NAME as string;
-
-const params: v1.WebhooksIntegrationApiUpdateWebhooksIntegrationCustomVariableRequest =
- {
- body: {
- value: "variable-updated",
- },
- customVariableName: WEBHOOK_CUSTOM_VARIABLE_NAME,
- };
-
-apiInstance
- .updateWebhooksIntegrationCustomVariable(params)
- .then((data: v1.WebhooksIntegrationCustomVariableResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/action-connection/CreateActionConnection.ts b/examples/v2/action-connection/CreateActionConnection.ts
deleted file mode 100644
index 8d6a74944f97..000000000000
--- a/examples/v2/action-connection/CreateActionConnection.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Create a new Action Connection returns "Successfully created Action Connection" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ActionConnectionApi(configuration);
-
-const params: v2.ActionConnectionApiCreateActionConnectionRequest = {
- body: {
- data: {
- type: "action_connection",
- attributes: {
- name: "Cassette Connection DELETE_ME",
- integration: {
- type: "AWS",
- credentials: {
- type: "AWSAssumeRole",
- role: "MyRoleUpdated",
- accountId: "123456789123",
- },
- },
- },
- },
- },
-};
-
-apiInstance
- .createActionConnection(params)
- .then((data: v2.CreateActionConnectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/action-connection/DeleteActionConnection.ts b/examples/v2/action-connection/DeleteActionConnection.ts
deleted file mode 100644
index 67a3517fa321..000000000000
--- a/examples/v2/action-connection/DeleteActionConnection.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an existing Action Connection returns "The resource was deleted successfully." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ActionConnectionApi(configuration);
-
-const params: v2.ActionConnectionApiDeleteActionConnectionRequest = {
- connectionId: "connection_id",
-};
-
-apiInstance
- .deleteActionConnection(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/action-connection/DeleteActionConnection_2142905164.ts b/examples/v2/action-connection/DeleteActionConnection_2142905164.ts
deleted file mode 100644
index f000b4fc5500..000000000000
--- a/examples/v2/action-connection/DeleteActionConnection_2142905164.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an existing Action Connection returns "Successfully deleted Action Connection" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ActionConnectionApi(configuration);
-
-// there is a valid "action_connection" in the system
-const ACTION_CONNECTION_DATA_ID = process.env
- .ACTION_CONNECTION_DATA_ID as string;
-
-const params: v2.ActionConnectionApiDeleteActionConnectionRequest = {
- connectionId: ACTION_CONNECTION_DATA_ID,
-};
-
-apiInstance
- .deleteActionConnection(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/action-connection/GetActionConnection.ts b/examples/v2/action-connection/GetActionConnection.ts
deleted file mode 100644
index 2643345d06e5..000000000000
--- a/examples/v2/action-connection/GetActionConnection.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an existing Action Connection returns "Successfully get Action Connection" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ActionConnectionApi(configuration);
-
-const params: v2.ActionConnectionApiGetActionConnectionRequest = {
- connectionId: "cb460d51-3c88-4e87-adac-d47131d0423d",
-};
-
-apiInstance
- .getActionConnection(params)
- .then((data: v2.GetActionConnectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/action-connection/UpdateActionConnection.ts b/examples/v2/action-connection/UpdateActionConnection.ts
deleted file mode 100644
index c034f6834183..000000000000
--- a/examples/v2/action-connection/UpdateActionConnection.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Update an existing Action Connection returns "Successfully updated Action Connection" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ActionConnectionApi(configuration);
-
-const params: v2.ActionConnectionApiUpdateActionConnectionRequest = {
- body: {
- data: {
- type: "action_connection",
- attributes: {
- name: "Cassette Connection",
- integration: {
- type: "AWS",
- credentials: {
- type: "AWSAssumeRole",
- role: "MyRoleUpdated",
- accountId: "123456789123",
- },
- },
- },
- },
- },
- connectionId: "cb460d51-3c88-4e87-adac-d47131d0423d",
-};
-
-apiInstance
- .updateActionConnection(params)
- .then((data: v2.UpdateActionConnectionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/CreateAwsOnDemandTask.ts b/examples/v2/agentless-scanning/CreateAwsOnDemandTask.ts
deleted file mode 100644
index e56f98afeb20..000000000000
--- a/examples/v2/agentless-scanning/CreateAwsOnDemandTask.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Post an AWS on demand task returns "AWS on demand task created successfully." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-const params: v2.AgentlessScanningApiCreateAwsOnDemandTaskRequest = {
- body: {
- data: {
- attributes: {
- arn: "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test",
- },
- type: "aws_resource",
- },
- },
-};
-
-apiInstance
- .createAwsOnDemandTask(params)
- .then((data: v2.AwsOnDemandResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/CreateAwsScanOptions.ts b/examples/v2/agentless-scanning/CreateAwsScanOptions.ts
deleted file mode 100644
index 7443874b6684..000000000000
--- a/examples/v2/agentless-scanning/CreateAwsScanOptions.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Post AWS Scan Options returns "Agentless scan options enabled successfully." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-const params: v2.AgentlessScanningApiCreateAwsScanOptionsRequest = {
- body: {
- data: {
- id: "000000000003",
- type: "aws_scan_options",
- attributes: {
- lambda: true,
- sensitiveData: false,
- vulnContainersOs: true,
- vulnHostOs: true,
- },
- },
- },
-};
-
-apiInstance
- .createAwsScanOptions(params)
- .then((data: v2.AwsScanOptionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/DeleteAwsScanOptions.ts b/examples/v2/agentless-scanning/DeleteAwsScanOptions.ts
deleted file mode 100644
index d600bbb2f0ab..000000000000
--- a/examples/v2/agentless-scanning/DeleteAwsScanOptions.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete AWS Scan Options returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-const params: v2.AgentlessScanningApiDeleteAwsScanOptionsRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .deleteAwsScanOptions(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/GetAwsOnDemandTask.ts b/examples/v2/agentless-scanning/GetAwsOnDemandTask.ts
deleted file mode 100644
index 5a7a496b4a8e..000000000000
--- a/examples/v2/agentless-scanning/GetAwsOnDemandTask.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get AWS On Demand task by id returns "OK." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-const params: v2.AgentlessScanningApiGetAwsOnDemandTaskRequest = {
- taskId: "63d6b4f5-e5d0-4d90-824a-9580f05f026a",
-};
-
-apiInstance
- .getAwsOnDemandTask(params)
- .then((data: v2.AwsOnDemandResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/ListAwsOnDemandTasks.ts b/examples/v2/agentless-scanning/ListAwsOnDemandTasks.ts
deleted file mode 100644
index adad7be415a7..000000000000
--- a/examples/v2/agentless-scanning/ListAwsOnDemandTasks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get AWS On Demand tasks returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-apiInstance
- .listAwsOnDemandTasks()
- .then((data: v2.AwsOnDemandListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/ListAwsScanOptions.ts b/examples/v2/agentless-scanning/ListAwsScanOptions.ts
deleted file mode 100644
index 9e95df602acd..000000000000
--- a/examples/v2/agentless-scanning/ListAwsScanOptions.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get AWS Scan Options returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-apiInstance
- .listAwsScanOptions()
- .then((data: v2.AwsScanOptionsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/agentless-scanning/UpdateAwsScanOptions.ts b/examples/v2/agentless-scanning/UpdateAwsScanOptions.ts
deleted file mode 100644
index 7d724672d349..000000000000
--- a/examples/v2/agentless-scanning/UpdateAwsScanOptions.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Patch AWS Scan Options returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AgentlessScanningApi(configuration);
-
-const params: v2.AgentlessScanningApiUpdateAwsScanOptionsRequest = {
- body: {
- data: {
- type: "aws_scan_options",
- id: "000000000002",
- attributes: {
- vulnHostOs: true,
- vulnContainersOs: true,
- lambda: false,
- },
- },
- },
- accountId: "000000000002",
-};
-
-apiInstance
- .updateAwsScanOptions(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/api-management/CreateOpenAPI.ts b/examples/v2/api-management/CreateOpenAPI.ts
deleted file mode 100644
index e106491934d3..000000000000
--- a/examples/v2/api-management/CreateOpenAPI.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Create a new API returns "API created successfully" response
- */
-
-import * as fs from "fs";
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createOpenAPI"] = true;
-const apiInstance = new v2.APIManagementApi(configuration);
-
-const params: v2.APIManagementApiCreateOpenAPIRequest = {
- openapiSpecFile: {
- data: Buffer.from(fs.readFileSync("openapi-spec.yaml", "utf8")),
- name: "openapi-spec.yaml",
- },
-};
-
-apiInstance
- .createOpenAPI(params)
- .then((data: v2.CreateOpenAPIResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/api-management/DeleteOpenAPI.ts b/examples/v2/api-management/DeleteOpenAPI.ts
deleted file mode 100644
index 4f6e3c5b00ec..000000000000
--- a/examples/v2/api-management/DeleteOpenAPI.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an API returns "API deleted successfully" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteOpenAPI"] = true;
-const apiInstance = new v2.APIManagementApi(configuration);
-
-// there is a valid "managed_api" in the system
-const MANAGED_API_DATA_ID = process.env.MANAGED_API_DATA_ID as string;
-
-const params: v2.APIManagementApiDeleteOpenAPIRequest = {
- id: MANAGED_API_DATA_ID,
-};
-
-apiInstance
- .deleteOpenAPI(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/api-management/GetOpenAPI.ts b/examples/v2/api-management/GetOpenAPI.ts
deleted file mode 100644
index 3645ea7d0ea0..000000000000
--- a/examples/v2/api-management/GetOpenAPI.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get an API returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getOpenAPI"] = true;
-const apiInstance = new v2.APIManagementApi(configuration);
-
-// there is a valid "managed_api" in the system
-const MANAGED_API_DATA_ID = process.env.MANAGED_API_DATA_ID as string;
-
-const params: v2.APIManagementApiGetOpenAPIRequest = {
- id: MANAGED_API_DATA_ID,
-};
-
-apiInstance
- .getOpenAPI(params)
- .then((data: client.HttpFile) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/api-management/ListAPIs.ts b/examples/v2/api-management/ListAPIs.ts
deleted file mode 100644
index 9a5e27b2b0ef..000000000000
--- a/examples/v2/api-management/ListAPIs.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List APIs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listAPIs"] = true;
-const apiInstance = new v2.APIManagementApi(configuration);
-
-apiInstance
- .listAPIs()
- .then((data: v2.ListAPIsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/api-management/UpdateOpenAPI.ts b/examples/v2/api-management/UpdateOpenAPI.ts
deleted file mode 100644
index 564049956e3a..000000000000
--- a/examples/v2/api-management/UpdateOpenAPI.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Update an API returns "API updated successfully" response
- */
-
-import * as fs from "fs";
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateOpenAPI"] = true;
-const apiInstance = new v2.APIManagementApi(configuration);
-
-// there is a valid "managed_api" in the system
-const MANAGED_API_DATA_ID = process.env.MANAGED_API_DATA_ID as string;
-
-const params: v2.APIManagementApiUpdateOpenAPIRequest = {
- id: MANAGED_API_DATA_ID,
- openapiSpecFile: {
- data: Buffer.from(fs.readFileSync("openapi-spec.yaml", "utf8")),
- name: "openapi-spec.yaml",
- },
-};
-
-apiInstance
- .updateOpenAPI(params)
- .then((data: v2.UpdateOpenAPIResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/CreateApmRetentionFilter.ts b/examples/v2/apm-retention-filters/CreateApmRetentionFilter.ts
deleted file mode 100644
index fc5255a42160..000000000000
--- a/examples/v2/apm-retention-filters/CreateApmRetentionFilter.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Create a retention filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-const params: v2.APMRetentionFiltersApiCreateApmRetentionFilterRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- filter: {
- query: "@http.status_code:200 service:my-service",
- },
- filterType: "spans-sampling-processor",
- name: "my retention filter",
- rate: 1.0,
- },
- type: "apm_retention_filter",
- },
- },
-};
-
-apiInstance
- .createApmRetentionFilter(params)
- .then((data: v2.RetentionFilterCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.ts b/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.ts
deleted file mode 100644
index 0b757bc5f272..000000000000
--- a/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a retention filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-// there is a valid "retention_filter" in the system
-const RETENTION_FILTER_DATA_ID = process.env.RETENTION_FILTER_DATA_ID as string;
-
-const params: v2.APMRetentionFiltersApiDeleteApmRetentionFilterRequest = {
- filterId: RETENTION_FILTER_DATA_ID,
-};
-
-apiInstance
- .deleteApmRetentionFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/GetApmRetentionFilter.ts b/examples/v2/apm-retention-filters/GetApmRetentionFilter.ts
deleted file mode 100644
index 68d1fde3b8f5..000000000000
--- a/examples/v2/apm-retention-filters/GetApmRetentionFilter.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a given APM retention filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-// there is a valid "retention_filter" in the system
-const RETENTION_FILTER_DATA_ID = process.env.RETENTION_FILTER_DATA_ID as string;
-
-const params: v2.APMRetentionFiltersApiGetApmRetentionFilterRequest = {
- filterId: RETENTION_FILTER_DATA_ID,
-};
-
-apiInstance
- .getApmRetentionFilter(params)
- .then((data: v2.RetentionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/ListApmRetentionFilters.ts b/examples/v2/apm-retention-filters/ListApmRetentionFilters.ts
deleted file mode 100644
index 717845d92745..000000000000
--- a/examples/v2/apm-retention-filters/ListApmRetentionFilters.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all APM retention filters returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-apiInstance
- .listApmRetentionFilters()
- .then((data: v2.RetentionFiltersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.ts b/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.ts
deleted file mode 100644
index 1e98c9e58e2e..000000000000
--- a/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Re-order retention filters returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-const params: v2.APMRetentionFiltersApiReorderApmRetentionFiltersRequest = {
- body: {
- data: [
- {
- id: "jdZrilSJQLqzb6Cu7aub9Q",
- type: "apm_retention_filter",
- },
- {
- id: "7RBOb7dLSYWI01yc3pIH8w",
- type: "apm_retention_filter",
- },
- ],
- },
-};
-
-apiInstance
- .reorderApmRetentionFilters(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.ts b/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.ts
deleted file mode 100644
index c1945d717f52..000000000000
--- a/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Update a retention filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.APMRetentionFiltersApi(configuration);
-
-// there is a valid "retention_filter" in the system
-const RETENTION_FILTER_DATA_ID = process.env.RETENTION_FILTER_DATA_ID as string;
-
-const params: v2.APMRetentionFiltersApiUpdateApmRetentionFilterRequest = {
- body: {
- data: {
- attributes: {
- name: "test",
- rate: 0.9,
- filter: {
- query: "@_top_level:1 test:service-demo",
- },
- enabled: true,
- filterType: "spans-sampling-processor",
- },
- id: "test-id",
- type: "apm_retention_filter",
- },
- },
- filterId: RETENTION_FILTER_DATA_ID,
-};
-
-apiInstance
- .updateApmRetentionFilter(params)
- .then((data: v2.RetentionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/CreateApp.ts b/examples/v2/app-builder/CreateApp.ts
deleted file mode 100644
index fbb399827450..000000000000
--- a/examples/v2/app-builder/CreateApp.ts
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * Create App returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-const params: v2.AppBuilderApiCreateAppRequest = {
- body: {
- data: {
- type: "appDefinitions",
- attributes: {
- rootInstanceName: "grid0",
- components: [
- {
- name: "grid0",
- type: "grid",
- properties: {
- children: [
- {
- type: "gridCell",
- name: "gridCell0",
- properties: {
- children: [
- {
- name: "text0",
- type: "text",
- properties: {
- isVisible: true,
- },
- events: [],
- },
- ],
- isVisible: "true",
- },
- events: [],
- },
- {
- type: "gridCell",
- name: "gridCell2",
- properties: {
- children: [
- {
- name: "table0",
- type: "table",
- properties: {
- isVisible: true,
- },
- events: [],
- },
- ],
- isVisible: "true",
- },
- events: [],
- },
- {
- type: "gridCell",
- name: "gridCell1",
- properties: {
- children: [
- {
- name: "text1",
- type: "text",
- properties: {
- isVisible: true,
- },
- events: [],
- },
- ],
- isVisible: "true",
- },
- events: [],
- },
- {
- type: "gridCell",
- name: "gridCell3",
- properties: {
- children: [
- {
- name: "button0",
- type: "button",
- properties: {
- isVisible: true,
- },
- events: [
- {
- name: "click",
- type: "setStateVariableValue",
- },
- ],
- },
- ],
- isVisible: "true",
- },
- events: [],
- },
- {
- type: "gridCell",
- name: "gridCell4",
- properties: {
- children: [
- {
- name: "button1",
- type: "button",
- properties: {
- isVisible: true,
- },
- events: [
- {
- name: "click",
- type: "setStateVariableValue",
- },
- ],
- },
- ],
- isVisible: "true",
- },
- events: [],
- },
- ],
- backgroundColor: "default",
- },
- events: [],
- },
- ],
- queries: [
- {
- id: "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
- type: "action",
- name: "fetchFacts",
- events: [],
- properties: {
- spec: {
- fqn: "com.datadoghq.http.request",
- connectionId: "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3",
- inputs: {
- verb: "GET",
- url: "https://catfact.ninja/facts",
- urlParams:
- "[{'key': 'limit', 'value': '${pageSize.value.toString()}'}, {'key': 'page', 'value': '${(table0.pageIndex + 1).toString()}'}]",
- },
- },
- },
- },
- {
- type: "stateVariable",
- name: "pageSize",
- properties: {
- defaultValue: "${20}",
- },
- id: "afd03c81-4075-4432-8618-ba09d52d2f2d",
- },
- {
- type: "dataTransform",
- name: "randomFact",
- properties: {
- outputs:
- "${(() => {const facts = fetchFacts.outputs.body.data\nreturn facts[Math.floor(Math.random()*facts.length)]\n})()}",
- },
- id: "0fb22859-47dc-4137-9e41-7b67d04c525c",
- },
- ],
- name: "Example Cat Facts Viewer",
- description:
- "This is a slightly complicated example app that fetches and displays cat facts",
- },
- },
- },
-};
-
-apiInstance
- .createApp(params)
- .then((data: v2.CreateAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/DeleteApp.ts b/examples/v2/app-builder/DeleteApp.ts
deleted file mode 100644
index 4a2d66c99343..000000000000
--- a/examples/v2/app-builder/DeleteApp.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete App returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiDeleteAppRequest = {
- appId: APP_DATA_ID,
-};
-
-apiInstance
- .deleteApp(params)
- .then((data: v2.DeleteAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/DeleteApps.ts b/examples/v2/app-builder/DeleteApps.ts
deleted file mode 100644
index 3cc9ad58d30b..000000000000
--- a/examples/v2/app-builder/DeleteApps.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Delete Multiple Apps returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiDeleteAppsRequest = {
- body: {
- data: [
- {
- id: APP_DATA_ID,
- type: "appDefinitions",
- },
- ],
- },
-};
-
-apiInstance
- .deleteApps(params)
- .then((data: v2.DeleteAppsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/GetApp.ts b/examples/v2/app-builder/GetApp.ts
deleted file mode 100644
index e95250b63947..000000000000
--- a/examples/v2/app-builder/GetApp.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get App returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiGetAppRequest = {
- appId: APP_DATA_ID,
-};
-
-apiInstance
- .getApp(params)
- .then((data: v2.GetAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/ListApps.ts b/examples/v2/app-builder/ListApps.ts
deleted file mode 100644
index 198a0f236e0f..000000000000
--- a/examples/v2/app-builder/ListApps.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Apps returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-apiInstance
- .listApps()
- .then((data: v2.ListAppsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/PublishApp.ts b/examples/v2/app-builder/PublishApp.ts
deleted file mode 100644
index 6b5a6c7505ae..000000000000
--- a/examples/v2/app-builder/PublishApp.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Publish App returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiPublishAppRequest = {
- appId: APP_DATA_ID,
-};
-
-apiInstance
- .publishApp(params)
- .then((data: v2.PublishAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/UnpublishApp.ts b/examples/v2/app-builder/UnpublishApp.ts
deleted file mode 100644
index 712fdf96a9e4..000000000000
--- a/examples/v2/app-builder/UnpublishApp.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Unpublish App returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiUnpublishAppRequest = {
- appId: APP_DATA_ID,
-};
-
-apiInstance
- .unpublishApp(params)
- .then((data: v2.UnpublishAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/app-builder/UpdateApp.ts b/examples/v2/app-builder/UpdateApp.ts
deleted file mode 100644
index 60779dc90bcf..000000000000
--- a/examples/v2/app-builder/UpdateApp.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update App returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AppBuilderApi(configuration);
-
-// there is a valid "app" in the system
-const APP_DATA_ID = process.env.APP_DATA_ID as string;
-
-const params: v2.AppBuilderApiUpdateAppRequest = {
- body: {
- data: {
- attributes: {
- name: "Updated Name",
- rootInstanceName: "grid0",
- },
- id: APP_DATA_ID,
- type: "appDefinitions",
- },
- },
- appId: APP_DATA_ID,
-};
-
-apiInstance
- .updateApp(params)
- .then((data: v2.UpdateAppResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/CreateApplicationSecurityWafCustomRule.ts b/examples/v2/application-security/CreateApplicationSecurityWafCustomRule.ts
deleted file mode 100644
index 2455d8fe8dfb..000000000000
--- a/examples/v2/application-security/CreateApplicationSecurityWafCustomRule.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Create a WAF custom rule returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-const params: v2.ApplicationSecurityApiCreateApplicationSecurityWafCustomRuleRequest =
- {
- body: {
- data: {
- attributes: {
- action: {
- action: "block_request",
- parameters: {
- location: "/blocking",
- statusCode: 403,
- },
- },
- blocking: false,
- conditions: [
- {
- operator: "match_regex",
- parameters: {
- data: "blocked_users",
- inputs: [
- {
- address: "server.db.statement",
- keyPath: [],
- },
- ],
- list: [],
- options: {
- caseSensitive: false,
- minLength: 0,
- },
- regex: "path.*",
- value: "custom_tag",
- },
- },
- ],
- enabled: false,
- name: "Block request from a bad useragent",
- pathGlob: "/api/search/*",
- scope: [
- {
- env: "prod",
- service: "billing-service",
- },
- ],
- tags: {
- category: "business_logic",
- type: "users.login.success",
- },
- },
- type: "custom_rule",
- },
- },
- };
-
-apiInstance
- .createApplicationSecurityWafCustomRule(params)
- .then((data: v2.ApplicationSecurityWafCustomRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/CreateApplicationSecurityWafExclusionFilter.ts b/examples/v2/application-security/CreateApplicationSecurityWafExclusionFilter.ts
deleted file mode 100644
index d967e275b719..000000000000
--- a/examples/v2/application-security/CreateApplicationSecurityWafExclusionFilter.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a WAF exclusion filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-const params: v2.ApplicationSecurityApiCreateApplicationSecurityWafExclusionFilterRequest =
- {
- body: {
- data: {
- attributes: {
- description: "Exclude false positives on a path",
- enabled: true,
- parameters: ["list.search.query"],
- pathGlob: "/accounts/*",
- rulesTarget: [
- {
- tags: {
- category: "attack_attempt",
- type: "lfi",
- },
- },
- ],
- scope: [
- {
- env: "www",
- service: "prod",
- },
- ],
- },
- type: "exclusion_filter",
- },
- },
- };
-
-apiInstance
- .createApplicationSecurityWafExclusionFilter(params)
- .then((data: v2.ApplicationSecurityWafExclusionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/DeleteApplicationSecurityWafCustomRule.ts b/examples/v2/application-security/DeleteApplicationSecurityWafCustomRule.ts
deleted file mode 100644
index 753cbc60fb46..000000000000
--- a/examples/v2/application-security/DeleteApplicationSecurityWafCustomRule.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete a WAF Custom Rule returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-const params: v2.ApplicationSecurityApiDeleteApplicationSecurityWafCustomRuleRequest =
- {
- customRuleId: "custom_rule_id",
- };
-
-apiInstance
- .deleteApplicationSecurityWafCustomRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/DeleteApplicationSecurityWafExclusionFilter.ts b/examples/v2/application-security/DeleteApplicationSecurityWafExclusionFilter.ts
deleted file mode 100644
index 261fc7e98d47..000000000000
--- a/examples/v2/application-security/DeleteApplicationSecurityWafExclusionFilter.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a WAF exclusion filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-// there is a valid "exclusion_filter" in the system
-const EXCLUSION_FILTER_DATA_ID = process.env.EXCLUSION_FILTER_DATA_ID as string;
-
-const params: v2.ApplicationSecurityApiDeleteApplicationSecurityWafExclusionFilterRequest =
- {
- exclusionFilterId: EXCLUSION_FILTER_DATA_ID,
- };
-
-apiInstance
- .deleteApplicationSecurityWafExclusionFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/GetApplicationSecurityWafCustomRule.ts b/examples/v2/application-security/GetApplicationSecurityWafCustomRule.ts
deleted file mode 100644
index 92b51fda673b..000000000000
--- a/examples/v2/application-security/GetApplicationSecurityWafCustomRule.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a WAF custom rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-const params: v2.ApplicationSecurityApiGetApplicationSecurityWafCustomRuleRequest =
- {
- customRuleId: "custom_rule_id",
- };
-
-apiInstance
- .getApplicationSecurityWafCustomRule(params)
- .then((data: v2.ApplicationSecurityWafCustomRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/GetApplicationSecurityWafExclusionFilter.ts b/examples/v2/application-security/GetApplicationSecurityWafExclusionFilter.ts
deleted file mode 100644
index 60a252876bcb..000000000000
--- a/examples/v2/application-security/GetApplicationSecurityWafExclusionFilter.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a WAF exclusion filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-// there is a valid "exclusion_filter" in the system
-const EXCLUSION_FILTER_DATA_ID = process.env.EXCLUSION_FILTER_DATA_ID as string;
-
-const params: v2.ApplicationSecurityApiGetApplicationSecurityWafExclusionFilterRequest =
- {
- exclusionFilterId: EXCLUSION_FILTER_DATA_ID,
- };
-
-apiInstance
- .getApplicationSecurityWafExclusionFilter(params)
- .then((data: v2.ApplicationSecurityWafExclusionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/ListApplicationSecurityWAFCustomRules.ts b/examples/v2/application-security/ListApplicationSecurityWAFCustomRules.ts
deleted file mode 100644
index dc40b42c238b..000000000000
--- a/examples/v2/application-security/ListApplicationSecurityWAFCustomRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all WAF custom rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-apiInstance
- .listApplicationSecurityWAFCustomRules()
- .then((data: v2.ApplicationSecurityWafCustomRuleListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/ListApplicationSecurityWafExclusionFilters.ts b/examples/v2/application-security/ListApplicationSecurityWafExclusionFilters.ts
deleted file mode 100644
index 4d106b2386ca..000000000000
--- a/examples/v2/application-security/ListApplicationSecurityWafExclusionFilters.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all WAF exclusion filters returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-apiInstance
- .listApplicationSecurityWafExclusionFilters()
- .then((data: v2.ApplicationSecurityWafExclusionFiltersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/UpdateApplicationSecurityWafCustomRule.ts b/examples/v2/application-security/UpdateApplicationSecurityWafCustomRule.ts
deleted file mode 100644
index 4ff26d58d00a..000000000000
--- a/examples/v2/application-security/UpdateApplicationSecurityWafCustomRule.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Update a WAF Custom Rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-// there is a valid "custom_rule" in the system
-const CUSTOM_RULE_DATA_ID = process.env.CUSTOM_RULE_DATA_ID as string;
-
-const params: v2.ApplicationSecurityApiUpdateApplicationSecurityWafCustomRuleRequest =
- {
- body: {
- data: {
- type: "custom_rule",
- attributes: {
- blocking: false,
- conditions: [
- {
- operator: "match_regex",
- parameters: {
- inputs: [
- {
- address: "server.request.query",
- keyPath: ["id"],
- },
- ],
- regex: "badactor",
- },
- },
- ],
- enabled: false,
- name: "test",
- pathGlob: "/test",
- scope: [
- {
- env: "test",
- service: "test",
- },
- ],
- tags: {
- category: "attack_attempt",
- type: "test",
- },
- },
- },
- },
- customRuleId: CUSTOM_RULE_DATA_ID,
- };
-
-apiInstance
- .updateApplicationSecurityWafCustomRule(params)
- .then((data: v2.ApplicationSecurityWafCustomRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/application-security/UpdateApplicationSecurityWafExclusionFilter.ts b/examples/v2/application-security/UpdateApplicationSecurityWafExclusionFilter.ts
deleted file mode 100644
index 8882375d7039..000000000000
--- a/examples/v2/application-security/UpdateApplicationSecurityWafExclusionFilter.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Update a WAF exclusion filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ApplicationSecurityApi(configuration);
-
-// there is a valid "exclusion_filter" in the system
-const EXCLUSION_FILTER_DATA_ID = process.env.EXCLUSION_FILTER_DATA_ID as string;
-
-const params: v2.ApplicationSecurityApiUpdateApplicationSecurityWafExclusionFilterRequest =
- {
- body: {
- data: {
- attributes: {
- description: "Exclude false positives on a path",
- enabled: false,
- ipList: ["198.51.100.72"],
- onMatch: "monitor",
- },
- type: "exclusion_filter",
- },
- },
- exclusionFilterId: EXCLUSION_FILTER_DATA_ID,
- };
-
-apiInstance
- .updateApplicationSecurityWafExclusionFilter(params)
- .then((data: v2.ApplicationSecurityWafExclusionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/audit/ListAuditLogs.ts b/examples/v2/audit/ListAuditLogs.ts
deleted file mode 100644
index e1230acdb3ed..000000000000
--- a/examples/v2/audit/ListAuditLogs.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of Audit Logs events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuditApi(configuration);
-
-apiInstance
- .listAuditLogs()
- .then((data: v2.AuditLogsEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/audit/ListAuditLogs_1275402458.ts b/examples/v2/audit/ListAuditLogs_1275402458.ts
deleted file mode 100644
index 5107d159c953..000000000000
--- a/examples/v2/audit/ListAuditLogs_1275402458.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of Audit Logs events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuditApi(configuration);
-
-const params: v2.AuditApiListAuditLogsRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listAuditLogsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/audit/SearchAuditLogs.ts b/examples/v2/audit/SearchAuditLogs.ts
deleted file mode 100644
index 891c92bd82d1..000000000000
--- a/examples/v2/audit/SearchAuditLogs.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Search Audit Logs events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuditApi(configuration);
-
-const params: v2.AuditApiSearchAuditLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@type:session AND @session.type:user",
- to: "now",
- },
- options: {
- timeOffset: 0,
- timezone: "GMT",
- },
- page: {
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .searchAuditLogs(params)
- .then((data: v2.AuditLogsEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/audit/SearchAuditLogs_3215529662.ts b/examples/v2/audit/SearchAuditLogs_3215529662.ts
deleted file mode 100644
index b0fb3ff22071..000000000000
--- a/examples/v2/audit/SearchAuditLogs_3215529662.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Search Audit Logs events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuditApi(configuration);
-
-const params: v2.AuditApiSearchAuditLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchAuditLogsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/authn-mappings/CreateAuthNMapping.ts b/examples/v2/authn-mappings/CreateAuthNMapping.ts
deleted file mode 100644
index 506808c6a2e9..000000000000
--- a/examples/v2/authn-mappings/CreateAuthNMapping.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Create an AuthN Mapping returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuthNMappingsApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.AuthNMappingsApiCreateAuthNMappingRequest = {
- body: {
- data: {
- attributes: {
- attributeKey: "exampleauthnmapping",
- attributeValue: "Example-AuthN-Mapping",
- },
- relationships: {
- role: {
- data: {
- id: ROLE_DATA_ID,
- type: "roles",
- },
- },
- },
- type: "authn_mappings",
- },
- },
-};
-
-apiInstance
- .createAuthNMapping(params)
- .then((data: v2.AuthNMappingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/authn-mappings/DeleteAuthNMapping.ts b/examples/v2/authn-mappings/DeleteAuthNMapping.ts
deleted file mode 100644
index 8f0fb167f6e4..000000000000
--- a/examples/v2/authn-mappings/DeleteAuthNMapping.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an AuthN Mapping returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuthNMappingsApi(configuration);
-
-// there is a valid "authn_mapping" in the system
-const AUTHN_MAPPING_DATA_ID = process.env.AUTHN_MAPPING_DATA_ID as string;
-
-const params: v2.AuthNMappingsApiDeleteAuthNMappingRequest = {
- authnMappingId: AUTHN_MAPPING_DATA_ID,
-};
-
-apiInstance
- .deleteAuthNMapping(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/authn-mappings/GetAuthNMapping.ts b/examples/v2/authn-mappings/GetAuthNMapping.ts
deleted file mode 100644
index 9d291e2454eb..000000000000
--- a/examples/v2/authn-mappings/GetAuthNMapping.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get an AuthN Mapping by UUID returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuthNMappingsApi(configuration);
-
-// there is a valid "authn_mapping" in the system
-const AUTHN_MAPPING_DATA_ID = process.env.AUTHN_MAPPING_DATA_ID as string;
-
-const params: v2.AuthNMappingsApiGetAuthNMappingRequest = {
- authnMappingId: AUTHN_MAPPING_DATA_ID,
-};
-
-apiInstance
- .getAuthNMapping(params)
- .then((data: v2.AuthNMappingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/authn-mappings/ListAuthNMappings.ts b/examples/v2/authn-mappings/ListAuthNMappings.ts
deleted file mode 100644
index c5a58891bb84..000000000000
--- a/examples/v2/authn-mappings/ListAuthNMappings.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all AuthN Mappings returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuthNMappingsApi(configuration);
-
-apiInstance
- .listAuthNMappings()
- .then((data: v2.AuthNMappingsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/authn-mappings/UpdateAuthNMapping.ts b/examples/v2/authn-mappings/UpdateAuthNMapping.ts
deleted file mode 100644
index 753b15d35621..000000000000
--- a/examples/v2/authn-mappings/UpdateAuthNMapping.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Edit an AuthN Mapping returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.AuthNMappingsApi(configuration);
-
-// there is a valid "authn_mapping" in the system
-const AUTHN_MAPPING_DATA_ID = process.env.AUTHN_MAPPING_DATA_ID as string;
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.AuthNMappingsApiUpdateAuthNMappingRequest = {
- body: {
- data: {
- attributes: {
- attributeKey: "member-of",
- attributeValue: "Development",
- },
- id: AUTHN_MAPPING_DATA_ID,
- relationships: {
- role: {
- data: {
- id: ROLE_DATA_ID,
- type: "roles",
- },
- },
- },
- type: "authn_mappings",
- },
- },
- authnMappingId: AUTHN_MAPPING_DATA_ID,
-};
-
-apiInstance
- .updateAuthNMapping(params)
- .then((data: v2.AuthNMappingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/CreateAWSAccount.ts b/examples/v2/aws-integration/CreateAWSAccount.ts
deleted file mode 100644
index 9c42b4906806..000000000000
--- a/examples/v2/aws-integration/CreateAWSAccount.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Create an AWS integration returns "AWS Account object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createAWSAccount"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-const params: v2.AWSIntegrationApiCreateAWSAccountRequest = {
- body: {
- data: {
- attributes: {
- accountTags: ["key:value"],
- authConfig: {
- accessKeyId: "AKIAIOSFODNN7EXAMPLE",
- secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
- },
- awsAccountId: "123456789012",
- awsPartition: "aws",
- logsConfig: {
- lambdaForwarder: {
- lambdas: [
- "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder",
- ],
- sources: ["s3"],
- },
- },
- metricsConfig: {
- automuteEnabled: true,
- collectCloudwatchAlarms: true,
- collectCustomMetrics: true,
- enabled: true,
- tagFilters: [
- {
- namespace: "AWS/EC2",
- tags: ["key:value"],
- },
- ],
- },
- resourcesConfig: {
- cloudSecurityPostureManagementCollection: false,
- extendedCollection: false,
- },
- tracesConfig: {},
- },
- type: "account",
- },
- },
-};
-
-apiInstance
- .createAWSAccount(params)
- .then((data: v2.AWSAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/CreateAWSAccount_1716720881.ts b/examples/v2/aws-integration/CreateAWSAccount_1716720881.ts
deleted file mode 100644
index 86992d33bda8..000000000000
--- a/examples/v2/aws-integration/CreateAWSAccount_1716720881.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create an AWS account returns "AWS Account object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createAWSAccount"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-const params: v2.AWSIntegrationApiCreateAWSAccountRequest = {
- body: {
- data: {
- attributes: {
- accountTags: ["key:value"],
- authConfig: {
- roleName: "DatadogIntegrationRole",
- },
- awsAccountId: "123456789012",
- awsPartition: "aws",
- logsConfig: {
- lambdaForwarder: {
- lambdas: [
- "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder",
- ],
- sources: ["s3"],
- },
- },
- metricsConfig: {
- automuteEnabled: true,
- collectCloudwatchAlarms: true,
- collectCustomMetrics: true,
- enabled: true,
- tagFilters: [
- {
- namespace: "AWS/EC2",
- tags: ["key:value"],
- },
- ],
- },
- resourcesConfig: {
- cloudSecurityPostureManagementCollection: false,
- extendedCollection: false,
- },
- tracesConfig: {},
- },
- type: "account",
- },
- },
-};
-
-apiInstance
- .createAWSAccount(params)
- .then((data: v2.AWSAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID.ts b/examples/v2/aws-integration/CreateNewAWSExternalID.ts
deleted file mode 100644
index ab45625f1bab..000000000000
--- a/examples/v2/aws-integration/CreateNewAWSExternalID.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generate a new external ID returns "AWS External ID object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createNewAWSExternalID"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-apiInstance
- .createNewAWSExternalID()
- .then((data: v2.AWSNewExternalIDResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.ts b/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.ts
deleted file mode 100644
index 25af4e41ec8b..000000000000
--- a/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generate new external ID returns "AWS External ID object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createNewAWSExternalID"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-apiInstance
- .createNewAWSExternalID()
- .then((data: v2.AWSNewExternalIDResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/DeleteAWSAccount.ts b/examples/v2/aws-integration/DeleteAWSAccount.ts
deleted file mode 100644
index 54a64b1948d7..000000000000
--- a/examples/v2/aws-integration/DeleteAWSAccount.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an AWS integration returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteAWSAccount"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-// there is a valid "aws_account_v2" in the system
-const AWS_ACCOUNT_V2_DATA_ID = process.env.AWS_ACCOUNT_V2_DATA_ID as string;
-
-const params: v2.AWSIntegrationApiDeleteAWSAccountRequest = {
- awsAccountConfigId: AWS_ACCOUNT_V2_DATA_ID,
-};
-
-apiInstance
- .deleteAWSAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/GetAWSAccount.ts b/examples/v2/aws-integration/GetAWSAccount.ts
deleted file mode 100644
index a1dfef1741f8..000000000000
--- a/examples/v2/aws-integration/GetAWSAccount.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get an AWS integration by config ID returns "AWS Account object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getAWSAccount"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-// there is a valid "aws_account_v2" in the system
-const AWS_ACCOUNT_V2_DATA_ID = process.env.AWS_ACCOUNT_V2_DATA_ID as string;
-
-const params: v2.AWSIntegrationApiGetAWSAccountRequest = {
- awsAccountConfigId: AWS_ACCOUNT_V2_DATA_ID,
-};
-
-apiInstance
- .getAWSAccount(params)
- .then((data: v2.AWSAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/ListAWSAccounts.ts b/examples/v2/aws-integration/ListAWSAccounts.ts
deleted file mode 100644
index 4fb28e210cde..000000000000
--- a/examples/v2/aws-integration/ListAWSAccounts.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List all AWS integrations returns "AWS Accounts List object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listAWSAccounts"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAWSAccounts()
- .then((data: v2.AWSAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/ListAWSNamespaces.ts b/examples/v2/aws-integration/ListAWSNamespaces.ts
deleted file mode 100644
index 2b6b6fa69389..000000000000
--- a/examples/v2/aws-integration/ListAWSNamespaces.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List available namespaces returns "AWS Namespaces List object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listAWSNamespaces"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAWSNamespaces()
- .then((data: v2.AWSNamespacesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/ListAWSNamespaces_3031307873.ts b/examples/v2/aws-integration/ListAWSNamespaces_3031307873.ts
deleted file mode 100644
index 69fc0958a435..000000000000
--- a/examples/v2/aws-integration/ListAWSNamespaces_3031307873.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List namespaces returns "AWS Namespaces List object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listAWSNamespaces"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-apiInstance
- .listAWSNamespaces()
- .then((data: v2.AWSNamespacesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-integration/UpdateAWSAccount.ts b/examples/v2/aws-integration/UpdateAWSAccount.ts
deleted file mode 100644
index 3993de710099..000000000000
--- a/examples/v2/aws-integration/UpdateAWSAccount.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Update an AWS integration returns "AWS Account object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateAWSAccount"] = true;
-const apiInstance = new v2.AWSIntegrationApi(configuration);
-
-// there is a valid "aws_account_v2" in the system
-const AWS_ACCOUNT_V2_DATA_ID = process.env.AWS_ACCOUNT_V2_DATA_ID as string;
-
-const params: v2.AWSIntegrationApiUpdateAWSAccountRequest = {
- body: {
- data: {
- attributes: {
- accountTags: ["key:value"],
- authConfig: {
- roleName: "DatadogIntegrationRole",
- },
- awsAccountId: "123456789012",
- awsPartition: "aws",
- logsConfig: {
- lambdaForwarder: {
- lambdas: [
- "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder",
- ],
- sources: ["s3"],
- },
- },
- metricsConfig: {
- automuteEnabled: true,
- collectCloudwatchAlarms: true,
- collectCustomMetrics: true,
- enabled: true,
- tagFilters: [
- {
- namespace: "AWS/EC2",
- tags: ["key:value"],
- },
- ],
- },
- resourcesConfig: {
- cloudSecurityPostureManagementCollection: false,
- extendedCollection: false,
- },
- tracesConfig: {},
- },
- type: "account",
- },
- },
- awsAccountConfigId: AWS_ACCOUNT_V2_DATA_ID,
-};
-
-apiInstance
- .updateAWSAccount(params)
- .then((data: v2.AWSAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/aws-logs-integration/ListAWSLogsServices.ts b/examples/v2/aws-logs-integration/ListAWSLogsServices.ts
deleted file mode 100644
index 5b9f863d723f..000000000000
--- a/examples/v2/aws-logs-integration/ListAWSLogsServices.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Get list of AWS log ready services returns "AWS Logs Services List object" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listAWSLogsServices"] = true;
-const apiInstance = new v2.AWSLogsIntegrationApi(configuration);
-
-apiInstance
- .listAWSLogsServices()
- .then((data: v2.AWSLogsServicesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/ArchiveCase.ts b/examples/v2/case-management/ArchiveCase.ts
deleted file mode 100644
index eec5a55c0d43..000000000000
--- a/examples/v2/case-management/ArchiveCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Archive case returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiArchiveCaseRequest = {
- body: {
- data: {
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .archiveCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/AssignCase.ts b/examples/v2/case-management/AssignCase.ts
deleted file mode 100644
index 40acf786b28f..000000000000
--- a/examples/v2/case-management/AssignCase.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Assign case returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.CaseManagementApiAssignCaseRequest = {
- body: {
- data: {
- attributes: {
- assigneeId: USER_DATA_ID,
- },
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .assignCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/CreateCase.ts b/examples/v2/case-management/CreateCase.ts
deleted file mode 100644
index fd8f695cae63..000000000000
--- a/examples/v2/case-management/CreateCase.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Create a case returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.CaseManagementApiCreateCaseRequest = {
- body: {
- data: {
- attributes: {
- priority: "NOT_DEFINED",
- title: "Security breach investigation in 0cfbc5cbc676ee71",
- type: "STANDARD",
- },
- relationships: {
- assignee: {
- data: {
- id: USER_DATA_ID,
- type: "user",
- },
- },
- project: {
- data: {
- id: "d4bbe1af-f36e-42f1-87c1-493ca35c320e",
- type: "project",
- },
- },
- },
- type: "case",
- },
- },
-};
-
-apiInstance
- .createCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/CreateProject.ts b/examples/v2/case-management/CreateProject.ts
deleted file mode 100644
index 251a6db71814..000000000000
--- a/examples/v2/case-management/CreateProject.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a project returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-const params: v2.CaseManagementApiCreateProjectRequest = {
- body: {
- data: {
- attributes: {
- key: "SEC",
- name: "Security Investigation",
- },
- type: "project",
- },
- },
-};
-
-apiInstance
- .createProject(params)
- .then((data: v2.ProjectResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/DeleteProject.ts b/examples/v2/case-management/DeleteProject.ts
deleted file mode 100644
index 1142a458fea6..000000000000
--- a/examples/v2/case-management/DeleteProject.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Remove a project returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-const params: v2.CaseManagementApiDeleteProjectRequest = {
- projectId: "project_id",
-};
-
-apiInstance
- .deleteProject(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/GetCase.ts b/examples/v2/case-management/GetCase.ts
deleted file mode 100644
index f3b526dca121..000000000000
--- a/examples/v2/case-management/GetCase.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get the details of a case returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiGetCaseRequest = {
- caseId: CASE_ID,
-};
-
-apiInstance
- .getCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/GetProject.ts b/examples/v2/case-management/GetProject.ts
deleted file mode 100644
index c1f8a0ecc085..000000000000
--- a/examples/v2/case-management/GetProject.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get the details of a project returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-const params: v2.CaseManagementApiGetProjectRequest = {
- projectId: "project_id",
-};
-
-apiInstance
- .getProject(params)
- .then((data: v2.ProjectResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/GetProjects.ts b/examples/v2/case-management/GetProjects.ts
deleted file mode 100644
index bb5e21c612a3..000000000000
--- a/examples/v2/case-management/GetProjects.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all projects returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-apiInstance
- .getProjects()
- .then((data: v2.ProjectsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/SearchCases.ts b/examples/v2/case-management/SearchCases.ts
deleted file mode 100644
index 3ce4c2ddd7c2..000000000000
--- a/examples/v2/case-management/SearchCases.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Search cases returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-apiInstance
- .searchCases()
- .then((data: v2.CasesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/SearchCases_3433960044.ts b/examples/v2/case-management/SearchCases_3433960044.ts
deleted file mode 100644
index d73cef958bb5..000000000000
--- a/examples/v2/case-management/SearchCases_3433960044.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Search cases returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-(async () => {
- try {
- for await (const item of apiInstance.searchCasesWithPagination()) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/case-management/UnarchiveCase.ts b/examples/v2/case-management/UnarchiveCase.ts
deleted file mode 100644
index 2d19f363ebe4..000000000000
--- a/examples/v2/case-management/UnarchiveCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Unarchive case returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiUnarchiveCaseRequest = {
- body: {
- data: {
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .unarchiveCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/UnassignCase.ts b/examples/v2/case-management/UnassignCase.ts
deleted file mode 100644
index 7a7cf5f8e39f..000000000000
--- a/examples/v2/case-management/UnassignCase.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Unassign case returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiUnassignCaseRequest = {
- body: {
- data: {
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .unassignCase(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/UpdatePriority.ts b/examples/v2/case-management/UpdatePriority.ts
deleted file mode 100644
index e7a3620ceffb..000000000000
--- a/examples/v2/case-management/UpdatePriority.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Update case priority returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiUpdatePriorityRequest = {
- body: {
- data: {
- attributes: {
- priority: "P3",
- },
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .updatePriority(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/case-management/UpdateStatus.ts b/examples/v2/case-management/UpdateStatus.ts
deleted file mode 100644
index 78c5e23f6fcf..000000000000
--- a/examples/v2/case-management/UpdateStatus.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Update case status returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CaseManagementApi(configuration);
-
-// there is a valid "case" in the system
-const CASE_ID = process.env.CASE_ID as string;
-
-const params: v2.CaseManagementApiUpdateStatusRequest = {
- body: {
- data: {
- attributes: {
- status: "IN_PROGRESS",
- },
- type: "case",
- },
- },
- caseId: CASE_ID,
-};
-
-apiInstance
- .updateStatus(params)
- .then((data: v2.CaseResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.ts b/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.ts
deleted file mode 100644
index 2f1bfa389318..000000000000
--- a/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Aggregate pipelines events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiAggregateCIAppPipelineEventsRequest = {
- body: {
- compute: [
- {
- aggregation: "pc90",
- metric: "@duration",
- type: "total",
- },
- ],
- filter: {
- from: "now-15m",
- query: "@ci.provider.name:(gitlab OR github)",
- to: "now",
- },
- groupBy: [
- {
- facet: "@ci.status",
- limit: 10,
- total: false,
- },
- ],
- options: {
- timezone: "GMT",
- },
- },
-};
-
-apiInstance
- .aggregateCIAppPipelineEvents(params)
- .then((data: v2.CIAppPipelinesAnalyticsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.ts b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.ts
deleted file mode 100644
index 89bbb223a711..000000000000
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Send pipeline event returns "Request accepted for processing" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiCreateCIAppPipelineEventRequest = {
- body: {
- data: {
- attributes: {
- resource: {
- level: "pipeline",
- uniqueId: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
- name: "Deploy to AWS",
- url: "https://my-ci-provider.example/pipelines/my-pipeline/run/1",
- start: new Date(new Date().getTime() + -120 * 1000),
- end: new Date(new Date().getTime() + -30 * 1000),
- status: "success",
- partialRetry: false,
- git: {
- repositoryUrl: "https://github.com/DataDog/datadog-agent",
- sha: "7f263865994b76066c4612fd1965215e7dcb4cd2",
- authorEmail: "john.doe@email.com",
- },
- },
- },
- type: "cipipeline_resource_request",
- },
- },
-};
-
-apiInstance
- .createCIAppPipelineEvent(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.ts b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.ts
deleted file mode 100644
index 39c384f232ed..000000000000
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Send pipeline job event returns "Request accepted for processing" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiCreateCIAppPipelineEventRequest = {
- body: {
- data: {
- attributes: {
- resource: {
- level: "job",
- id: "cf9456de-8b9e-4c27-aa79-27b1e78c1a33",
- name: "Build image",
- pipelineUniqueId: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
- pipelineName: "Deploy to AWS",
- start: new Date(new Date().getTime() + -120 * 1000),
- end: new Date(new Date().getTime() + -30 * 1000),
- status: "error",
- url: "https://my-ci-provider.example/jobs/my-jobs/run/1",
- },
- },
- type: "cipipeline_resource_request",
- },
- },
-};
-
-apiInstance
- .createCIAppPipelineEvent(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2341150096.ts b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2341150096.ts
deleted file mode 100644
index c650efb84abf..000000000000
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2341150096.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Send running pipeline event returns "Request accepted for processing" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiCreateCIAppPipelineEventRequest = {
- body: {
- data: {
- attributes: {
- resource: {
- level: "pipeline",
- uniqueId: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
- name: "Deploy to AWS",
- url: "https://my-ci-provider.example/pipelines/my-pipeline/run/1",
- start: new Date(new Date().getTime() + -120 * 1000),
- status: "running",
- partialRetry: false,
- git: {
- repositoryUrl: "https://github.com/DataDog/datadog-agent",
- sha: "7f263865994b76066c4612fd1965215e7dcb4cd2",
- authorEmail: "john.doe@email.com",
- },
- },
- },
- type: "cipipeline_resource_request",
- },
- },
-};
-
-apiInstance
- .createCIAppPipelineEvent(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_819339921.ts b/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_819339921.ts
deleted file mode 100644
index eb4c1a4244df..000000000000
--- a/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_819339921.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Send pipeline event with custom provider returns "Request accepted for processing" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiCreateCIAppPipelineEventRequest = {
- body: {
- data: {
- attributes: {
- providerName: "example-provider",
- resource: {
- level: "pipeline",
- uniqueId: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
- name: "Deploy to AWS",
- url: "https://my-ci-provider.example/pipelines/my-pipeline/run/1",
- start: new Date(new Date().getTime() + -120 * 1000),
- end: new Date(new Date().getTime() + -30 * 1000),
- status: "success",
- partialRetry: false,
- git: {
- repositoryUrl: "https://github.com/DataDog/datadog-agent",
- sha: "7f263865994b76066c4612fd1965215e7dcb4cd2",
- authorEmail: "john.doe@email.com",
- },
- },
- },
- type: "cipipeline_resource_request",
- },
- },
-};
-
-apiInstance
- .createCIAppPipelineEvent(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.ts b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.ts
deleted file mode 100644
index b5cf4a664d04..000000000000
--- a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a list of pipelines events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiListCIAppPipelineEventsRequest = {
- filterQuery: "@ci.provider.name:circleci",
- filterFrom: new Date(new Date().getTime() + -30 * 60 * 1000),
- filterTo: new Date(),
- pageLimit: 5,
-};
-
-apiInstance
- .listCIAppPipelineEvents(params)
- .then((data: v2.CIAppPipelineEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.ts b/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.ts
deleted file mode 100644
index 33837cc46e8b..000000000000
--- a/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a list of pipelines events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiListCIAppPipelineEventsRequest = {
- filterFrom: new Date(new Date().getTime() + -30 * 1000),
- filterTo: new Date(),
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listCIAppPipelineEventsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.ts b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.ts
deleted file mode 100644
index ca24ac5fc2dd..000000000000
--- a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Search pipelines events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiSearchCIAppPipelineEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@ci.provider.name:github AND @ci.status:error",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 5,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .searchCIAppPipelineEvents(params)
- .then((data: v2.CIAppPipelineEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.ts b/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.ts
deleted file mode 100644
index 48fb6380ddf0..000000000000
--- a/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Search pipelines events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityPipelinesApi(configuration);
-
-const params: v2.CIVisibilityPipelinesApiSearchCIAppPipelineEventsRequest = {
- body: {
- filter: {
- from: "now-30s",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchCIAppPipelineEventsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.ts b/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.ts
deleted file mode 100644
index c7f6a1e412c4..000000000000
--- a/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Aggregate tests events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityTestsApi(configuration);
-
-const params: v2.CIVisibilityTestsApiAggregateCIAppTestEventsRequest = {
- body: {
- compute: [
- {
- aggregation: "count",
- metric: "@test.is_flaky",
- type: "total",
- },
- ],
- filter: {
- from: "now-15m",
- query: "@language:(python OR go)",
- to: "now",
- },
- groupBy: [
- {
- facet: "@git.branch",
- limit: 10,
- sort: {
- order: "asc",
- },
- total: false,
- },
- ],
- options: {
- timezone: "GMT",
- },
- },
-};
-
-apiInstance
- .aggregateCIAppTestEvents(params)
- .then((data: v2.CIAppTestsAnalyticsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-tests/ListCIAppTestEvents.ts b/examples/v2/ci-visibility-tests/ListCIAppTestEvents.ts
deleted file mode 100644
index ae33ff0c5659..000000000000
--- a/examples/v2/ci-visibility-tests/ListCIAppTestEvents.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a list of tests events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityTestsApi(configuration);
-
-const params: v2.CIVisibilityTestsApiListCIAppTestEventsRequest = {
- filterQuery: "@test.service:web-ui-tests",
- filterFrom: new Date(new Date().getTime() + -30 * 1000),
- filterTo: new Date(),
- pageLimit: 5,
-};
-
-apiInstance
- .listCIAppTestEvents(params)
- .then((data: v2.CIAppTestEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.ts b/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.ts
deleted file mode 100644
index 6eddd90db64d..000000000000
--- a/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a list of tests events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityTestsApi(configuration);
-
-const params: v2.CIVisibilityTestsApiListCIAppTestEventsRequest = {
- filterFrom: new Date(new Date().getTime() + -30 * 1000),
- filterTo: new Date(),
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listCIAppTestEventsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.ts b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.ts
deleted file mode 100644
index 74bfa85882ad..000000000000
--- a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Search tests events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityTestsApi(configuration);
-
-const params: v2.CIVisibilityTestsApiSearchCIAppTestEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@test.service:web-ui-tests AND @test.status:skip",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .searchCIAppTestEvents(params)
- .then((data: v2.CIAppTestEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.ts b/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.ts
deleted file mode 100644
index 9d92459424de..000000000000
--- a/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Search tests events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CIVisibilityTestsApi(configuration);
-
-const params: v2.CIVisibilityTestsApiSearchCIAppTestEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@test.status:pass AND -@language:python",
- to: "now",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchCIAppTestEventsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.ts b/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.ts
deleted file mode 100644
index 5947e67fb811..000000000000
--- a/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create Cloud Cost Management AWS CUR config returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiCreateCostAWSCURConfigRequest = {
- body: {
- data: {
- attributes: {
- accountId: "123456789123",
- bucketName: "dd-cost-bucket",
- bucketRegion: "us-east-1",
- reportName: "dd-report-name",
- reportPrefix: "dd-report-prefix",
- },
- type: "aws_cur_config_post_request",
- },
- },
-};
-
-apiInstance
- .createCostAWSCURConfig(params)
- .then((data: v2.AwsCURConfigResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.ts b/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.ts
deleted file mode 100644
index ec8a763cf660..000000000000
--- a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Create Cloud Cost Management Azure configs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiCreateCostAzureUCConfigsRequest = {
- body: {
- data: {
- attributes: {
- accountId: "1234abcd-1234-abcd-1234-1234abcd1234",
- actualBillConfig: {
- exportName: "dd-actual-export",
- exportPath: "dd-export-path",
- storageAccount: "dd-storage-account",
- storageContainer: "dd-storage-container",
- },
- amortizedBillConfig: {
- exportName: "dd-actual-export",
- exportPath: "dd-export-path",
- storageAccount: "dd-storage-account",
- storageContainer: "dd-storage-container",
- },
- clientId: "1234abcd-1234-abcd-1234-1234abcd1234",
- isEnabled: true,
- scope: "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234",
- },
- type: "azure_uc_config_post_request",
- },
- },
-};
-
-apiInstance
- .createCostAzureUCConfigs(params)
- .then((data: v2.AzureUCConfigPairsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.ts b/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.ts
deleted file mode 100644
index 74583efe2559..000000000000
--- a/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Cloud Cost Management AWS CUR config returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiDeleteCostAWSCURConfigRequest = {
- cloudAccountId: "100",
-};
-
-apiInstance
- .deleteCostAWSCURConfig(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.ts b/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.ts
deleted file mode 100644
index a63d089fcd02..000000000000
--- a/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Cloud Cost Management Azure config returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiDeleteCostAzureUCConfigRequest = {
- cloudAccountId: "100",
-};
-
-apiInstance
- .deleteCostAzureUCConfig(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/DeleteCustomCostsFile.ts b/examples/v2/cloud-cost-management/DeleteCustomCostsFile.ts
deleted file mode 100644
index 9e192695398b..000000000000
--- a/examples/v2/cloud-cost-management/DeleteCustomCostsFile.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Custom Costs file returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiDeleteCustomCostsFileRequest = {
- fileId: "file_id",
-};
-
-apiInstance
- .deleteCustomCostsFile(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/DeleteCustomCostsFile_372970393.ts b/examples/v2/cloud-cost-management/DeleteCustomCostsFile_372970393.ts
deleted file mode 100644
index 91c2a9ace79f..000000000000
--- a/examples/v2/cloud-cost-management/DeleteCustomCostsFile_372970393.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Custom Costs File returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiDeleteCustomCostsFileRequest = {
- fileId: "9d055d22-a838-4e9f-bc34-a4f9ab66280c",
-};
-
-apiInstance
- .deleteCustomCostsFile(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/GetCustomCostsFile.ts b/examples/v2/cloud-cost-management/GetCustomCostsFile.ts
deleted file mode 100644
index e17db4bf3d32..000000000000
--- a/examples/v2/cloud-cost-management/GetCustomCostsFile.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get Custom Costs file returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiGetCustomCostsFileRequest = {
- fileId: "file_id",
-};
-
-apiInstance
- .getCustomCostsFile(params)
- .then((data: v2.CustomCostsFileGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/GetCustomCostsFile_1307381576.ts b/examples/v2/cloud-cost-management/GetCustomCostsFile_1307381576.ts
deleted file mode 100644
index d187205addb8..000000000000
--- a/examples/v2/cloud-cost-management/GetCustomCostsFile_1307381576.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get Custom Costs File returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiGetCustomCostsFileRequest = {
- fileId: "9d055d22-a838-4e9f-bc34-a4f9ab66280c",
-};
-
-apiInstance
- .getCustomCostsFile(params)
- .then((data: v2.CustomCostsFileGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.ts b/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.ts
deleted file mode 100644
index f3c493c29f0d..000000000000
--- a/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Cloud Cost Management AWS CUR configs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-apiInstance
- .listCostAWSCURConfigs()
- .then((data: v2.AwsCURConfigsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.ts b/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.ts
deleted file mode 100644
index a50f4966e041..000000000000
--- a/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Cloud Cost Management Azure configs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-apiInstance
- .listCostAzureUCConfigs()
- .then((data: v2.AzureUCConfigsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/ListCustomCostsFiles.ts b/examples/v2/cloud-cost-management/ListCustomCostsFiles.ts
deleted file mode 100644
index 04a9cab3b8f3..000000000000
--- a/examples/v2/cloud-cost-management/ListCustomCostsFiles.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Custom Costs files returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-apiInstance
- .listCustomCostsFiles()
- .then((data: v2.CustomCostsFileListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/ListCustomCostsFiles_1968771127.ts b/examples/v2/cloud-cost-management/ListCustomCostsFiles_1968771127.ts
deleted file mode 100644
index 64d7a2f12ded..000000000000
--- a/examples/v2/cloud-cost-management/ListCustomCostsFiles_1968771127.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Custom Costs Files returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-apiInstance
- .listCustomCostsFiles()
- .then((data: v2.CustomCostsFileListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.ts b/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.ts
deleted file mode 100644
index dafbf300022b..000000000000
--- a/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Update Cloud Cost Management AWS CUR config returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiUpdateCostAWSCURConfigRequest = {
- body: {
- data: {
- attributes: {
- isEnabled: true,
- },
- type: "aws_cur_config_patch_request",
- },
- },
- cloudAccountId: "100",
-};
-
-apiInstance
- .updateCostAWSCURConfig(params)
- .then((data: v2.AwsCURConfigsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.ts b/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.ts
deleted file mode 100644
index f33a9b7cf043..000000000000
--- a/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Update Cloud Cost Management Azure config returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiUpdateCostAzureUCConfigsRequest = {
- body: {
- data: {
- attributes: {
- isEnabled: true,
- },
- type: "azure_uc_config_patch_request",
- },
- },
- cloudAccountId: "100",
-};
-
-apiInstance
- .updateCostAzureUCConfigs(params)
- .then((data: v2.AzureUCConfigPairsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/UploadCustomCostsFile.ts b/examples/v2/cloud-cost-management/UploadCustomCostsFile.ts
deleted file mode 100644
index 8a095e743ef5..000000000000
--- a/examples/v2/cloud-cost-management/UploadCustomCostsFile.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Upload Custom Costs file returns "Accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiUploadCustomCostsFileRequest = {
- body: [
- {
- billedCost: 100.5,
- billingCurrency: "USD",
- chargeDescription: "Monthly usage charge for my service",
- chargePeriodEnd: "2023-02-28",
- chargePeriodStart: "2023-02-01",
- },
- ],
-};
-
-apiInstance
- .uploadCustomCostsFile(params)
- .then((data: v2.CustomCostsFileUploadResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloud-cost-management/UploadCustomCostsFile_4125168396.ts b/examples/v2/cloud-cost-management/UploadCustomCostsFile_4125168396.ts
deleted file mode 100644
index 889a765dcf43..000000000000
--- a/examples/v2/cloud-cost-management/UploadCustomCostsFile_4125168396.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Upload Custom Costs File returns "Accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudCostManagementApi(configuration);
-
-const params: v2.CloudCostManagementApiUploadCustomCostsFileRequest = {
- body: [
- {
- providerName: "my_provider",
- chargePeriodStart: "2023-05-06",
- chargePeriodEnd: "2023-06-06",
- chargeDescription: "my_description",
- billedCost: 250,
- billingCurrency: "USD",
- tags: {
- key: "value",
- },
- },
- ],
-};
-
-apiInstance
- .uploadCustomCostsFile(params)
- .then((data: v2.CustomCostsFileUploadResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloudflare-integration/CreateCloudflareAccount.ts b/examples/v2/cloudflare-integration/CreateCloudflareAccount.ts
deleted file mode 100644
index 0e392cb43183..000000000000
--- a/examples/v2/cloudflare-integration/CreateCloudflareAccount.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Add Cloudflare account returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudflareIntegrationApi(configuration);
-
-const params: v2.CloudflareIntegrationApiCreateCloudflareAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: "fakekey",
- email: "dev@datadoghq.com",
- name: "examplecloudflareintegration",
- },
- type: "cloudflare-accounts",
- },
- },
-};
-
-apiInstance
- .createCloudflareAccount(params)
- .then((data: v2.CloudflareAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloudflare-integration/DeleteCloudflareAccount.ts b/examples/v2/cloudflare-integration/DeleteCloudflareAccount.ts
deleted file mode 100644
index c347386d0bc2..000000000000
--- a/examples/v2/cloudflare-integration/DeleteCloudflareAccount.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Cloudflare account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudflareIntegrationApi(configuration);
-
-const params: v2.CloudflareIntegrationApiDeleteCloudflareAccountRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .deleteCloudflareAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloudflare-integration/GetCloudflareAccount.ts b/examples/v2/cloudflare-integration/GetCloudflareAccount.ts
deleted file mode 100644
index d2569f91a6cd..000000000000
--- a/examples/v2/cloudflare-integration/GetCloudflareAccount.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get Cloudflare account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudflareIntegrationApi(configuration);
-
-// there is a valid "cloudflare_account" in the system
-const CLOUDFLARE_ACCOUNT_DATA_ID = process.env
- .CLOUDFLARE_ACCOUNT_DATA_ID as string;
-
-const params: v2.CloudflareIntegrationApiGetCloudflareAccountRequest = {
- accountId: CLOUDFLARE_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .getCloudflareAccount(params)
- .then((data: v2.CloudflareAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloudflare-integration/ListCloudflareAccounts.ts b/examples/v2/cloudflare-integration/ListCloudflareAccounts.ts
deleted file mode 100644
index 03687ac75dae..000000000000
--- a/examples/v2/cloudflare-integration/ListCloudflareAccounts.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Cloudflare accounts returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudflareIntegrationApi(configuration);
-
-apiInstance
- .listCloudflareAccounts()
- .then((data: v2.CloudflareAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/cloudflare-integration/UpdateCloudflareAccount.ts b/examples/v2/cloudflare-integration/UpdateCloudflareAccount.ts
deleted file mode 100644
index 7f24e172ad48..000000000000
--- a/examples/v2/cloudflare-integration/UpdateCloudflareAccount.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update Cloudflare account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CloudflareIntegrationApi(configuration);
-
-// there is a valid "cloudflare_account" in the system
-const CLOUDFLARE_ACCOUNT_DATA_ID = process.env
- .CLOUDFLARE_ACCOUNT_DATA_ID as string;
-
-const params: v2.CloudflareIntegrationApiUpdateCloudflareAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: "fakekey",
- email: "dev@datadoghq.com",
- zones: ["zone-id-3"],
- },
- type: "cloudflare-accounts",
- },
- },
- accountId: CLOUDFLARE_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateCloudflareAccount(params)
- .then((data: v2.CloudflareAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/CreateConfluentAccount.ts b/examples/v2/confluent-cloud/CreateConfluentAccount.ts
deleted file mode 100644
index 7ff24845fa76..000000000000
--- a/examples/v2/confluent-cloud/CreateConfluentAccount.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Add Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-const params: v2.ConfluentCloudApiCreateConfluentAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: "TESTAPIKEY123",
- apiSecret: "test-api-secret-123",
- resources: [
- {
- enableCustomMetrics: false,
- id: "resource-id-123",
- resourceType: "kafka",
- tags: ["myTag", "myTag2:myValue"],
- },
- ],
- tags: ["myTag", "myTag2:myValue"],
- },
- type: "confluent-cloud-accounts",
- },
- },
-};
-
-apiInstance
- .createConfluentAccount(params)
- .then((data: v2.ConfluentAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/CreateConfluentResource.ts b/examples/v2/confluent-cloud/CreateConfluentResource.ts
deleted file mode 100644
index 1abbd06b1bcf..000000000000
--- a/examples/v2/confluent-cloud/CreateConfluentResource.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Add resource to Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-// there is a valid "confluent_account" in the system
-const CONFLUENT_ACCOUNT_DATA_ID = process.env
- .CONFLUENT_ACCOUNT_DATA_ID as string;
-
-const params: v2.ConfluentCloudApiCreateConfluentResourceRequest = {
- body: {
- data: {
- attributes: {
- resourceType: "kafka",
- tags: ["myTag", "myTag2:myValue"],
- enableCustomMetrics: false,
- },
- id: "exampleconfluentcloud",
- type: "confluent-cloud-resources",
- },
- },
- accountId: CONFLUENT_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .createConfluentResource(params)
- .then((data: v2.ConfluentResourceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/DeleteConfluentAccount.ts b/examples/v2/confluent-cloud/DeleteConfluentAccount.ts
deleted file mode 100644
index 859168fe5dc5..000000000000
--- a/examples/v2/confluent-cloud/DeleteConfluentAccount.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-// there is a valid "confluent_account" in the system
-const CONFLUENT_ACCOUNT_DATA_ID = process.env
- .CONFLUENT_ACCOUNT_DATA_ID as string;
-
-const params: v2.ConfluentCloudApiDeleteConfluentAccountRequest = {
- accountId: CONFLUENT_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .deleteConfluentAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/DeleteConfluentResource.ts b/examples/v2/confluent-cloud/DeleteConfluentResource.ts
deleted file mode 100644
index 3c92b98c2441..000000000000
--- a/examples/v2/confluent-cloud/DeleteConfluentResource.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete resource from Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-const params: v2.ConfluentCloudApiDeleteConfluentResourceRequest = {
- accountId: "account_id",
- resourceId: "resource_id",
-};
-
-apiInstance
- .deleteConfluentResource(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/GetConfluentAccount.ts b/examples/v2/confluent-cloud/GetConfluentAccount.ts
deleted file mode 100644
index c059eb847059..000000000000
--- a/examples/v2/confluent-cloud/GetConfluentAccount.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-// there is a valid "confluent_account" in the system
-const CONFLUENT_ACCOUNT_DATA_ID = process.env
- .CONFLUENT_ACCOUNT_DATA_ID as string;
-
-const params: v2.ConfluentCloudApiGetConfluentAccountRequest = {
- accountId: CONFLUENT_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .getConfluentAccount(params)
- .then((data: v2.ConfluentAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/GetConfluentResource.ts b/examples/v2/confluent-cloud/GetConfluentResource.ts
deleted file mode 100644
index dabe63d59c72..000000000000
--- a/examples/v2/confluent-cloud/GetConfluentResource.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get resource from Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-const params: v2.ConfluentCloudApiGetConfluentResourceRequest = {
- accountId: "account_id",
- resourceId: "resource_id",
-};
-
-apiInstance
- .getConfluentResource(params)
- .then((data: v2.ConfluentResourceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/ListConfluentAccount.ts b/examples/v2/confluent-cloud/ListConfluentAccount.ts
deleted file mode 100644
index 044a252db317..000000000000
--- a/examples/v2/confluent-cloud/ListConfluentAccount.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Confluent accounts returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-apiInstance
- .listConfluentAccount()
- .then((data: v2.ConfluentAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/ListConfluentResource.ts b/examples/v2/confluent-cloud/ListConfluentResource.ts
deleted file mode 100644
index 12c1b5a6d3f0..000000000000
--- a/examples/v2/confluent-cloud/ListConfluentResource.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List Confluent Account resources returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-const params: v2.ConfluentCloudApiListConfluentResourceRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .listConfluentResource(params)
- .then((data: v2.ConfluentResourcesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/UpdateConfluentAccount.ts b/examples/v2/confluent-cloud/UpdateConfluentAccount.ts
deleted file mode 100644
index e6b24aab1039..000000000000
--- a/examples/v2/confluent-cloud/UpdateConfluentAccount.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Update Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-// there is a valid "confluent_account" in the system
-const CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY = process.env
- .CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY as string;
-const CONFLUENT_ACCOUNT_DATA_ID = process.env
- .CONFLUENT_ACCOUNT_DATA_ID as string;
-
-const params: v2.ConfluentCloudApiUpdateConfluentAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY,
- apiSecret: "update-secret",
- tags: ["updated_tag:val"],
- },
- type: "confluent-cloud-accounts",
- },
- },
- accountId: CONFLUENT_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateConfluentAccount(params)
- .then((data: v2.ConfluentAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/confluent-cloud/UpdateConfluentResource.ts b/examples/v2/confluent-cloud/UpdateConfluentResource.ts
deleted file mode 100644
index 7e43c2080ff6..000000000000
--- a/examples/v2/confluent-cloud/UpdateConfluentResource.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update resource in Confluent account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ConfluentCloudApi(configuration);
-
-const params: v2.ConfluentCloudApiUpdateConfluentResourceRequest = {
- body: {
- data: {
- attributes: {
- enableCustomMetrics: false,
- resourceType: "kafka",
- tags: ["myTag", "myTag2:myValue"],
- },
- id: "resource-id-123",
- type: "confluent-cloud-resources",
- },
- },
- accountId: "account_id",
- resourceId: "resource_id",
-};
-
-apiInstance
- .updateConfluentResource(params)
- .then((data: v2.ConfluentResourceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/container-images/ListContainerImages.ts b/examples/v2/container-images/ListContainerImages.ts
deleted file mode 100644
index 2d332d184f8f..000000000000
--- a/examples/v2/container-images/ListContainerImages.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all Container Images returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainerImagesApi(configuration);
-
-apiInstance
- .listContainerImages()
- .then((data: v2.ContainerImagesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/container-images/ListContainerImages_3088586393.ts b/examples/v2/container-images/ListContainerImages_3088586393.ts
deleted file mode 100644
index 5353521ca7fe..000000000000
--- a/examples/v2/container-images/ListContainerImages_3088586393.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all Container Images returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainerImagesApi(configuration);
-
-const params: v2.ContainerImagesApiListContainerImagesRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listContainerImagesWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/container-images/ListContainerImages_3974828736.ts b/examples/v2/container-images/ListContainerImages_3974828736.ts
deleted file mode 100644
index d352cb08d539..000000000000
--- a/examples/v2/container-images/ListContainerImages_3974828736.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all Container Image groups returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainerImagesApi(configuration);
-
-const params: v2.ContainerImagesApiListContainerImagesRequest = {
- groupBy: "short_image",
-};
-
-apiInstance
- .listContainerImages(params)
- .then((data: v2.ContainerImagesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/containers/ListContainers.ts b/examples/v2/containers/ListContainers.ts
deleted file mode 100644
index 53910ac0ee11..000000000000
--- a/examples/v2/containers/ListContainers.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get All Containers returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainersApi(configuration);
-
-apiInstance
- .listContainers()
- .then((data: v2.ContainersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/containers/ListContainers_2175733917.ts b/examples/v2/containers/ListContainers_2175733917.ts
deleted file mode 100644
index 0a32a6774ef8..000000000000
--- a/examples/v2/containers/ListContainers_2175733917.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get All Container groups returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainersApi(configuration);
-
-const params: v2.ContainersApiListContainersRequest = {
- groupBy: "short_image",
-};
-
-apiInstance
- .listContainers(params)
- .then((data: v2.ContainersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/containers/ListContainers_931009654.ts b/examples/v2/containers/ListContainers_931009654.ts
deleted file mode 100644
index 93ff3e212887..000000000000
--- a/examples/v2/containers/ListContainers_931009654.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get All Containers returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ContainersApi(configuration);
-
-const params: v2.ContainersApiListContainersRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listContainersWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/csm-agents/ListAllCSMAgents.ts b/examples/v2/csm-agents/ListAllCSMAgents.ts
deleted file mode 100644
index b9d99ac59f15..000000000000
--- a/examples/v2/csm-agents/ListAllCSMAgents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all CSM Agents returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMAgentsApi(configuration);
-
-apiInstance
- .listAllCSMAgents()
- .then((data: v2.CsmAgentsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-agents/ListAllCSMServerlessAgents.ts b/examples/v2/csm-agents/ListAllCSMServerlessAgents.ts
deleted file mode 100644
index 55e3bae718e5..000000000000
--- a/examples/v2/csm-agents/ListAllCSMServerlessAgents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all CSM Serverless Agents returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMAgentsApi(configuration);
-
-apiInstance
- .listAllCSMServerlessAgents()
- .then((data: v2.CsmAgentsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts
deleted file mode 100644
index 02ac213ca287..000000000000
--- a/examples/v2/csm-coverage-analysis/GetCSMCloudAccountsCoverageAnalysis.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the CSM Cloud Accounts Coverage Analysis returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMCoverageAnalysisApi(configuration);
-
-apiInstance
- .getCSMCloudAccountsCoverageAnalysis()
- .then((data: v2.CsmCloudAccountsCoverageAnalysisResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts
deleted file mode 100644
index dc7b0cfd334f..000000000000
--- a/examples/v2/csm-coverage-analysis/GetCSMHostsAndContainersCoverageAnalysis.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the CSM Hosts and Containers Coverage Analysis returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMCoverageAnalysisApi(configuration);
-
-apiInstance
- .getCSMHostsAndContainersCoverageAnalysis()
- .then((data: v2.CsmHostsAndContainersCoverageAnalysisResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts b/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts
deleted file mode 100644
index 32b70bd2d334..000000000000
--- a/examples/v2/csm-coverage-analysis/GetCSMServerlessCoverageAnalysis.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the CSM Serverless Coverage Analysis returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMCoverageAnalysisApi(configuration);
-
-apiInstance
- .getCSMServerlessCoverageAnalysis()
- .then((data: v2.CsmServerlessCoverageAnalysisResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/CreateCSMThreatsAgentRule.ts b/examples/v2/csm-threats/CreateCSMThreatsAgentRule.ts
deleted file mode 100644
index f52497673ff3..000000000000
--- a/examples/v2/csm-threats/CreateCSMThreatsAgentRule.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create a CSM Threats Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-const params: v2.CSMThreatsApiCreateCSMThreatsAgentRuleRequest = {
- body: {
- data: {
- attributes: {
- description: "My Agent rule",
- enabled: true,
- expression: `exec.file.name == "sh"`,
- filters: [`os == "linux"`],
- name: "examplecsmthreat",
- },
- type: "agent_rule",
- },
- },
-};
-
-apiInstance
- .createCSMThreatsAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.ts b/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.ts
deleted file mode 100644
index 11371da96b9c..000000000000
--- a/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a Cloud Workload Security Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-const params: v2.CSMThreatsApiCreateCloudWorkloadSecurityAgentRuleRequest = {
- body: {
- data: {
- attributes: {
- description: "Test Agent rule",
- enabled: true,
- expression: `exec.file.name == "sh"`,
- name: "examplecsmthreat",
- },
- type: "agent_rule",
- },
- },
-};
-
-apiInstance
- .createCloudWorkloadSecurityAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.ts b/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.ts
deleted file mode 100644
index dc6e5019ed78..000000000000
--- a/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a CSM Threats Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule_rc" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiDeleteCSMThreatsAgentRuleRequest = {
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .deleteCSMThreatsAgentRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/DeleteCloudWorkloadSecurityAgentRule.ts b/examples/v2/csm-threats/DeleteCloudWorkloadSecurityAgentRule.ts
deleted file mode 100644
index 0fcdb291b511..000000000000
--- a/examples/v2/csm-threats/DeleteCloudWorkloadSecurityAgentRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a Cloud Workload Security Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiDeleteCloudWorkloadSecurityAgentRuleRequest = {
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .deleteCloudWorkloadSecurityAgentRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/DownloadCSMThreatsPolicy.ts b/examples/v2/csm-threats/DownloadCSMThreatsPolicy.ts
deleted file mode 100644
index 1f4cf506a18f..000000000000
--- a/examples/v2/csm-threats/DownloadCSMThreatsPolicy.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the latest CSM Threats policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-apiInstance
- .downloadCSMThreatsPolicy()
- .then((data: client.HttpFile) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/DownloadCloudWorkloadPolicyFile.ts b/examples/v2/csm-threats/DownloadCloudWorkloadPolicyFile.ts
deleted file mode 100644
index b0c588a31008..000000000000
--- a/examples/v2/csm-threats/DownloadCloudWorkloadPolicyFile.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the latest Cloud Workload Security policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-apiInstance
- .downloadCloudWorkloadPolicyFile()
- .then((data: client.HttpFile) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/GetCSMThreatsAgentRule.ts b/examples/v2/csm-threats/GetCSMThreatsAgentRule.ts
deleted file mode 100644
index d8a58f3a4fbf..000000000000
--- a/examples/v2/csm-threats/GetCSMThreatsAgentRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a CSM Threats Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule_rc" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiGetCSMThreatsAgentRuleRequest = {
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .getCSMThreatsAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/GetCloudWorkloadSecurityAgentRule.ts b/examples/v2/csm-threats/GetCloudWorkloadSecurityAgentRule.ts
deleted file mode 100644
index e960ff657875..000000000000
--- a/examples/v2/csm-threats/GetCloudWorkloadSecurityAgentRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a Cloud Workload Security Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiGetCloudWorkloadSecurityAgentRuleRequest = {
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .getCloudWorkloadSecurityAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/ListCSMThreatsAgentRules.ts b/examples/v2/csm-threats/ListCSMThreatsAgentRules.ts
deleted file mode 100644
index 6438d4152632..000000000000
--- a/examples/v2/csm-threats/ListCSMThreatsAgentRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all CSM Threats Agent rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-apiInstance
- .listCSMThreatsAgentRules()
- .then((data: v2.CloudWorkloadSecurityAgentRulesListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/ListCloudWorkloadSecurityAgentRules.ts b/examples/v2/csm-threats/ListCloudWorkloadSecurityAgentRules.ts
deleted file mode 100644
index 668296fd49ce..000000000000
--- a/examples/v2/csm-threats/ListCloudWorkloadSecurityAgentRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all Cloud Workload Security Agent rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-apiInstance
- .listCloudWorkloadSecurityAgentRules()
- .then((data: v2.CloudWorkloadSecurityAgentRulesListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.ts b/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.ts
deleted file mode 100644
index e52451983114..000000000000
--- a/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update a CSM Threats Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule_rc" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiUpdateCSMThreatsAgentRuleRequest = {
- body: {
- data: {
- attributes: {
- description: "Test Agent rule",
- enabled: true,
- expression: `exec.file.name == "sh"`,
- },
- type: "agent_rule",
- id: AGENT_RULE_DATA_ID,
- },
- },
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .updateCSMThreatsAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.ts b/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.ts
deleted file mode 100644
index b3e0618d8045..000000000000
--- a/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update a Cloud Workload Security Agent rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.CSMThreatsApi(configuration);
-
-// there is a valid "agent_rule" in the system
-const AGENT_RULE_DATA_ID = process.env.AGENT_RULE_DATA_ID as string;
-
-const params: v2.CSMThreatsApiUpdateCloudWorkloadSecurityAgentRuleRequest = {
- body: {
- data: {
- attributes: {
- description: "Test Agent rule",
- enabled: true,
- expression: `exec.file.name == "sh"`,
- },
- type: "agent_rule",
- id: AGENT_RULE_DATA_ID,
- },
- },
- agentRuleId: AGENT_RULE_DATA_ID,
-};
-
-apiInstance
- .updateCloudWorkloadSecurityAgentRule(params)
- .then((data: v2.CloudWorkloadSecurityAgentRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems.ts b/examples/v2/dashboard-lists/CreateDashboardListItems.ts
deleted file mode 100644
index 3c94ea973cd7..000000000000
--- a/examples/v2/dashboard-lists/CreateDashboardListItems.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Add Items to a Dashboard List returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-const params: v2.DashboardListsApiCreateDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: "q5j-nti-fv6",
- type: "host_timeboard",
- },
- ],
- },
- dashboardListId: 9223372036854775807,
-};
-
-apiInstance
- .createDashboardListItems(params)
- .then((data: v2.DashboardListAddItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.ts b/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.ts
deleted file mode 100644
index 6963f9c508ac..000000000000
--- a/examples/v2/dashboard-lists/CreateDashboardListItems_3995409989.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Add custom timeboard dashboard to an existing dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v2.DashboardListsApiCreateDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: DASHBOARD_ID,
- type: "custom_timeboard",
- },
- ],
- },
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .createDashboardListItems(params)
- .then((data: v2.DashboardListAddItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.ts b/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.ts
deleted file mode 100644
index 8a8d114550f6..000000000000
--- a/examples/v2/dashboard-lists/CreateDashboardListItems_825696022.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Add custom screenboard dashboard to an existing dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-// there is a valid "screenboard_dashboard" in the system
-const SCREENBOARD_DASHBOARD_ID = process.env.SCREENBOARD_DASHBOARD_ID as string;
-
-const params: v2.DashboardListsApiCreateDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: SCREENBOARD_DASHBOARD_ID,
- type: "custom_screenboard",
- },
- ],
- },
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .createDashboardListItems(params)
- .then((data: v2.DashboardListAddItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems.ts b/examples/v2/dashboard-lists/DeleteDashboardListItems.ts
deleted file mode 100644
index 5316f00f9949..000000000000
--- a/examples/v2/dashboard-lists/DeleteDashboardListItems.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Delete items from a dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-const params: v2.DashboardListsApiDeleteDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: "q5j-nti-fv6",
- type: "host_timeboard",
- },
- ],
- },
- dashboardListId: 9223372036854775807,
-};
-
-apiInstance
- .deleteDashboardListItems(params)
- .then((data: v2.DashboardListDeleteItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.ts b/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.ts
deleted file mode 100644
index 66190e15c3bb..000000000000
--- a/examples/v2/dashboard-lists/DeleteDashboardListItems_2656706656.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Delete custom timeboard dashboard from an existing dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-// there is a valid "dashboard" in the system
-const DASHBOARD_ID = process.env.DASHBOARD_ID as string;
-
-const params: v2.DashboardListsApiDeleteDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: DASHBOARD_ID,
- type: "custom_timeboard",
- },
- ],
- },
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .deleteDashboardListItems(params)
- .then((data: v2.DashboardListDeleteItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.ts b/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.ts
deleted file mode 100644
index f7b59ace7193..000000000000
--- a/examples/v2/dashboard-lists/DeleteDashboardListItems_3851624753.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Delete custom screenboard dashboard from an existing dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-// there is a valid "screenboard_dashboard" in the system
-const SCREENBOARD_DASHBOARD_ID = process.env.SCREENBOARD_DASHBOARD_ID as string;
-
-const params: v2.DashboardListsApiDeleteDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: SCREENBOARD_DASHBOARD_ID,
- type: "custom_screenboard",
- },
- ],
- },
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .deleteDashboardListItems(params)
- .then((data: v2.DashboardListDeleteItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/GetDashboardListItems.ts b/examples/v2/dashboard-lists/GetDashboardListItems.ts
deleted file mode 100644
index 5ce1fd56fa84..000000000000
--- a/examples/v2/dashboard-lists/GetDashboardListItems.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get items of a Dashboard List returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-const params: v2.DashboardListsApiGetDashboardListItemsRequest = {
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .getDashboardListItems(params)
- .then((data: v2.DashboardListItems) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dashboard-lists/UpdateDashboardListItems.ts b/examples/v2/dashboard-lists/UpdateDashboardListItems.ts
deleted file mode 100644
index 64d694768b45..000000000000
--- a/examples/v2/dashboard-lists/UpdateDashboardListItems.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update items of a dashboard list returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DashboardListsApi(configuration);
-
-// there is a valid "dashboard_list" in the system
-const DASHBOARD_LIST_ID = parseInt(process.env.DASHBOARD_LIST_ID as string);
-
-// there is a valid "screenboard_dashboard" in the system
-const SCREENBOARD_DASHBOARD_ID = process.env.SCREENBOARD_DASHBOARD_ID as string;
-
-const params: v2.DashboardListsApiUpdateDashboardListItemsRequest = {
- body: {
- dashboards: [
- {
- id: SCREENBOARD_DASHBOARD_ID,
- type: "custom_screenboard",
- },
- ],
- },
- dashboardListId: DASHBOARD_LIST_ID,
-};
-
-apiInstance
- .updateDashboardListItems(params)
- .then((data: v2.DashboardListUpdateItemsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/data-deletion/CancelDataDeletionRequest.ts b/examples/v2/data-deletion/CancelDataDeletionRequest.ts
deleted file mode 100644
index 2da703302334..000000000000
--- a/examples/v2/data-deletion/CancelDataDeletionRequest.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Cancels a data deletion request returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.cancelDataDeletionRequest"] = true;
-const apiInstance = new v2.DataDeletionApi(configuration);
-
-// there is a valid "deletion_request" in the system
-const DELETION_REQUEST_DATA_ID = process.env.DELETION_REQUEST_DATA_ID as string;
-
-const params: v2.DataDeletionApiCancelDataDeletionRequestRequest = {
- id: DELETION_REQUEST_DATA_ID,
-};
-
-apiInstance
- .cancelDataDeletionRequest(params)
- .then((data: v2.CancelDataDeletionResponseBody) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/data-deletion/CreateDataDeletionRequest.ts b/examples/v2/data-deletion/CreateDataDeletionRequest.ts
deleted file mode 100644
index 925ffd2db189..000000000000
--- a/examples/v2/data-deletion/CreateDataDeletionRequest.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Creates a data deletion request returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createDataDeletionRequest"] = true;
-const apiInstance = new v2.DataDeletionApi(configuration);
-
-const params: v2.DataDeletionApiCreateDataDeletionRequestRequest = {
- body: {
- data: {
- attributes: {
- from: 1672527600000,
- indexes: ["test-index", "test-index-2"],
- query: {
- host: "abc",
- service: "xyz",
- },
- to: 1704063600000,
- },
- type: "create_deletion_req",
- },
- },
- product: "logs",
-};
-
-apiInstance
- .createDataDeletionRequest(params)
- .then((data: v2.CreateDataDeletionResponseBody) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/data-deletion/GetDataDeletionRequests.ts b/examples/v2/data-deletion/GetDataDeletionRequests.ts
deleted file mode 100644
index 53ca95e3421b..000000000000
--- a/examples/v2/data-deletion/GetDataDeletionRequests.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Gets a list of data deletion requests returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getDataDeletionRequests"] = true;
-const apiInstance = new v2.DataDeletionApi(configuration);
-
-apiInstance
- .getDataDeletionRequests()
- .then((data: v2.GetDataDeletionsResponseBody) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/domain-allowlist/GetDomainAllowlist.ts b/examples/v2/domain-allowlist/GetDomainAllowlist.ts
deleted file mode 100644
index 94cea69b5965..000000000000
--- a/examples/v2/domain-allowlist/GetDomainAllowlist.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get Domain Allowlist returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DomainAllowlistApi(configuration);
-
-apiInstance
- .getDomainAllowlist()
- .then((data: v2.DomainAllowlistResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/domain-allowlist/PatchDomainAllowlist.ts b/examples/v2/domain-allowlist/PatchDomainAllowlist.ts
deleted file mode 100644
index d35791ffabd1..000000000000
--- a/examples/v2/domain-allowlist/PatchDomainAllowlist.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Sets Domain Allowlist returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DomainAllowlistApi(configuration);
-
-const params: v2.DomainAllowlistApiPatchDomainAllowlistRequest = {
- body: {
- data: {
- attributes: {
- domains: ["@static-test-domain.test"],
- enabled: false,
- },
- type: "domain_allowlist",
- },
- },
-};
-
-apiInstance
- .patchDomainAllowlist(params)
- .then((data: v2.DomainAllowlistResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dora-metrics/CreateDORADeployment.ts b/examples/v2/dora-metrics/CreateDORADeployment.ts
deleted file mode 100644
index 114737642696..000000000000
--- a/examples/v2/dora-metrics/CreateDORADeployment.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Send a deployment event for DORA Metrics returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createDORADeployment"] = true;
-const apiInstance = new v2.DORAMetricsApi(configuration);
-
-const params: v2.DORAMetricsApiCreateDORADeploymentRequest = {
- body: {
- data: {
- attributes: {
- finishedAt: 1693491984000000000,
- git: {
- commitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
- repositoryUrl: "https://github.com/organization/example-repository",
- },
- service: "shopist",
- startedAt: 1693491974000000000,
- version: "v1.12.07",
- },
- },
- },
-};
-
-apiInstance
- .createDORADeployment(params)
- .then((data: v2.DORADeploymentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/dora-metrics/CreateDORAIncident.ts b/examples/v2/dora-metrics/CreateDORAIncident.ts
deleted file mode 100644
index 213e39fa9d02..000000000000
--- a/examples/v2/dora-metrics/CreateDORAIncident.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Send an incident event for DORA Metrics returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createDORAIncident"] = true;
-const apiInstance = new v2.DORAMetricsApi(configuration);
-
-const params: v2.DORAMetricsApiCreateDORAIncidentRequest = {
- body: {
- data: {
- attributes: {
- finishedAt: 1707842944600000000,
- git: {
- commitSha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
- repositoryUrl: "https://github.com/organization/example-repository",
- },
- name: "Webserver is down failing all requests",
- services: ["shopist"],
- severity: "High",
- startedAt: 1707842944500000000,
- team: "backend",
- version: "v1.12.07",
- },
- },
- },
-};
-
-apiInstance
- .createDORAIncident(params)
- .then((data: v2.DORAIncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/CancelDowntime.ts b/examples/v2/downtimes/CancelDowntime.ts
deleted file mode 100644
index 3983f9a93fb2..000000000000
--- a/examples/v2/downtimes/CancelDowntime.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Cancel a downtime returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-// there is a valid "downtime_v2" in the system
-const DOWNTIME_V2_DATA_ID = process.env.DOWNTIME_V2_DATA_ID as string;
-
-const params: v2.DowntimesApiCancelDowntimeRequest = {
- downtimeId: DOWNTIME_V2_DATA_ID,
-};
-
-apiInstance
- .cancelDowntime(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/CreateDowntime.ts b/examples/v2/downtimes/CreateDowntime.ts
deleted file mode 100644
index 6eeeb3143b3e..000000000000
--- a/examples/v2/downtimes/CreateDowntime.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Schedule a downtime returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-const params: v2.DowntimesApiCreateDowntimeRequest = {
- body: {
- data: {
- attributes: {
- message: "dark forest",
- monitorIdentifier: {
- monitorTags: ["cat:hat"],
- },
- scope: "test:exampledowntime",
- schedule: {
- start: undefined,
- },
- },
- type: "downtime",
- },
- },
-};
-
-apiInstance
- .createDowntime(params)
- .then((data: v2.DowntimeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/GetDowntime.ts b/examples/v2/downtimes/GetDowntime.ts
deleted file mode 100644
index 07a996bec127..000000000000
--- a/examples/v2/downtimes/GetDowntime.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a downtime returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-// there is a valid "downtime_v2" in the system
-const DOWNTIME_V2_DATA_ID = process.env.DOWNTIME_V2_DATA_ID as string;
-
-const params: v2.DowntimesApiGetDowntimeRequest = {
- downtimeId: DOWNTIME_V2_DATA_ID,
-};
-
-apiInstance
- .getDowntime(params)
- .then((data: v2.DowntimeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/ListDowntimes.ts b/examples/v2/downtimes/ListDowntimes.ts
deleted file mode 100644
index 5502111f266e..000000000000
--- a/examples/v2/downtimes/ListDowntimes.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all downtimes returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-apiInstance
- .listDowntimes()
- .then((data: v2.ListDowntimesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/ListDowntimes_805770330.ts b/examples/v2/downtimes/ListDowntimes_805770330.ts
deleted file mode 100644
index cabd5147d146..000000000000
--- a/examples/v2/downtimes/ListDowntimes_805770330.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all downtimes returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-const params: v2.DowntimesApiListDowntimesRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listDowntimesWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/downtimes/ListMonitorDowntimes.ts b/examples/v2/downtimes/ListMonitorDowntimes.ts
deleted file mode 100644
index c6a30d3084d6..000000000000
--- a/examples/v2/downtimes/ListMonitorDowntimes.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get active downtimes for a monitor returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-const params: v2.DowntimesApiListMonitorDowntimesRequest = {
- monitorId: 35534610,
-};
-
-apiInstance
- .listMonitorDowntimes(params)
- .then((data: v2.MonitorDowntimeMatchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/downtimes/ListMonitorDowntimes_3316718253.ts b/examples/v2/downtimes/ListMonitorDowntimes_3316718253.ts
deleted file mode 100644
index b7c1cf1bfba3..000000000000
--- a/examples/v2/downtimes/ListMonitorDowntimes_3316718253.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get active downtimes for a monitor returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-const params: v2.DowntimesApiListMonitorDowntimesRequest = {
- monitorId: 9223372036854775807,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listMonitorDowntimesWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/downtimes/UpdateDowntime.ts b/examples/v2/downtimes/UpdateDowntime.ts
deleted file mode 100644
index 82733cd861ee..000000000000
--- a/examples/v2/downtimes/UpdateDowntime.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update a downtime returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.DowntimesApi(configuration);
-
-// there is a valid "downtime_v2" in the system
-const DOWNTIME_V2_DATA_ID = process.env.DOWNTIME_V2_DATA_ID as string;
-
-const params: v2.DowntimesApiUpdateDowntimeRequest = {
- body: {
- data: {
- attributes: {
- message: "light speed",
- },
- id: DOWNTIME_V2_DATA_ID,
- type: "downtime",
- },
- },
- downtimeId: DOWNTIME_V2_DATA_ID,
-};
-
-apiInstance
- .updateDowntime(params)
- .then((data: v2.DowntimeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/events/CreateEvent.ts b/examples/v2/events/CreateEvent.ts
deleted file mode 100644
index b08a4499b3f0..000000000000
--- a/examples/v2/events/CreateEvent.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Post an event returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-const params: v2.EventsApiCreateEventRequest = {
- body: {
- data: {
- attributes: {
- attributes: {
- author: {
- name: "datadog@datadog.com",
- type: "user",
- },
- changeMetadata: {
- dd: "{'team': 'datadog_team', 'user_email': 'datadog@datadog.com', 'user_id': 'datadog_user_id', 'user_name': 'datadog_username'}",
- resource_link: "datadog.com/feature/fallback_payments_test",
- },
- changedResource: {
- name: "fallback_payments_test",
- type: "feature_flag",
- },
- impactedResources: [
- {
- name: "payments_api",
- type: "service",
- },
- ],
- newValue: {
- enabled: "True",
- percentage: "50%",
- rule: "{'datacenter': 'devcycle.us1.prod'}",
- },
- prevValue: {
- enabled: "True",
- percentage: "10%",
- rule: "{'datacenter': 'devcycle.us1.prod'}",
- },
- },
- category: "change",
- message: "payment_processed feature flag has been enabled",
- tags: ["env:test"],
- title: "payment_processed feature flag updated",
- },
- type: "event",
- },
- },
-};
-
-apiInstance
- .createEvent(params)
- .then((data: v2.EventCreateResponsePayload) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/events/ListEvents.ts b/examples/v2/events/ListEvents.ts
deleted file mode 100644
index b8437f59a6a7..000000000000
--- a/examples/v2/events/ListEvents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-apiInstance
- .listEvents()
- .then((data: v2.EventsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/events/ListEvents_1527584014.ts b/examples/v2/events/ListEvents_1527584014.ts
deleted file mode 100644
index b1a4dbfb5288..000000000000
--- a/examples/v2/events/ListEvents_1527584014.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a list of events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-const params: v2.EventsApiListEventsRequest = {
- filterFrom: "now-15m",
- filterTo: "now",
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listEventsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/events/ListEvents_2663715109.ts b/examples/v2/events/ListEvents_2663715109.ts
deleted file mode 100644
index b565a14d71ee..000000000000
--- a/examples/v2/events/ListEvents_2663715109.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a quick list of events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-const params: v2.EventsApiListEventsRequest = {
- filterQuery: "datadog-agent",
- filterFrom: "2020-09-17T11:48:36+01:00",
- filterTo: "2020-09-17T12:48:36+01:00",
- pageLimit: 5,
-};
-
-apiInstance
- .listEvents(params)
- .then((data: v2.EventsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/events/SearchEvents.ts b/examples/v2/events/SearchEvents.ts
deleted file mode 100644
index 7e40250bb7c0..000000000000
--- a/examples/v2/events/SearchEvents.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Search events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-const params: v2.EventsApiSearchEventsRequest = {
- body: {
- filter: {
- query: "datadog-agent",
- from: "2020-09-17T11:48:36+01:00",
- to: "2020-09-17T12:48:36+01:00",
- },
- sort: "timestamp",
- page: {
- limit: 5,
- },
- },
-};
-
-apiInstance
- .searchEvents(params)
- .then((data: v2.EventsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/events/SearchEvents_3856995058.ts b/examples/v2/events/SearchEvents_3856995058.ts
deleted file mode 100644
index ee33f6d068c9..000000000000
--- a/examples/v2/events/SearchEvents_3856995058.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Search events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.EventsApi(configuration);
-
-const params: v2.EventsApiSearchEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchEventsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/fastly-integration/CreateFastlyAccount.ts b/examples/v2/fastly-integration/CreateFastlyAccount.ts
deleted file mode 100644
index e80dac420162..000000000000
--- a/examples/v2/fastly-integration/CreateFastlyAccount.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Add Fastly account returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiCreateFastlyAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: "ExampleFastlyIntegration",
- name: "Example-Fastly-Integration",
- services: [],
- },
- type: "fastly-accounts",
- },
- },
-};
-
-apiInstance
- .createFastlyAccount(params)
- .then((data: v2.FastlyAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/CreateFastlyService.ts b/examples/v2/fastly-integration/CreateFastlyService.ts
deleted file mode 100644
index 76039ba6cb5d..000000000000
--- a/examples/v2/fastly-integration/CreateFastlyService.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Add Fastly service returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiCreateFastlyServiceRequest = {
- body: {
- data: {
- attributes: {
- tags: ["myTag", "myTag2:myValue"],
- },
- id: "abc123",
- type: "fastly-services",
- },
- },
- accountId: "account_id",
-};
-
-apiInstance
- .createFastlyService(params)
- .then((data: v2.FastlyServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/DeleteFastlyAccount.ts b/examples/v2/fastly-integration/DeleteFastlyAccount.ts
deleted file mode 100644
index dc301545825c..000000000000
--- a/examples/v2/fastly-integration/DeleteFastlyAccount.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Fastly account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiDeleteFastlyAccountRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .deleteFastlyAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/DeleteFastlyService.ts b/examples/v2/fastly-integration/DeleteFastlyService.ts
deleted file mode 100644
index 4188bc34fb59..000000000000
--- a/examples/v2/fastly-integration/DeleteFastlyService.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete Fastly service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiDeleteFastlyServiceRequest = {
- accountId: "account_id",
- serviceId: "service_id",
-};
-
-apiInstance
- .deleteFastlyService(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/GetFastlyAccount.ts b/examples/v2/fastly-integration/GetFastlyAccount.ts
deleted file mode 100644
index 6457a8d204ce..000000000000
--- a/examples/v2/fastly-integration/GetFastlyAccount.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get Fastly account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-// there is a valid "fastly_account" in the system
-const FASTLY_ACCOUNT_DATA_ID = process.env.FASTLY_ACCOUNT_DATA_ID as string;
-
-const params: v2.FastlyIntegrationApiGetFastlyAccountRequest = {
- accountId: FASTLY_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .getFastlyAccount(params)
- .then((data: v2.FastlyAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/GetFastlyService.ts b/examples/v2/fastly-integration/GetFastlyService.ts
deleted file mode 100644
index 65360b2accfc..000000000000
--- a/examples/v2/fastly-integration/GetFastlyService.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get Fastly service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiGetFastlyServiceRequest = {
- accountId: "account_id",
- serviceId: "service_id",
-};
-
-apiInstance
- .getFastlyService(params)
- .then((data: v2.FastlyServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/ListFastlyAccounts.ts b/examples/v2/fastly-integration/ListFastlyAccounts.ts
deleted file mode 100644
index bc4018a37835..000000000000
--- a/examples/v2/fastly-integration/ListFastlyAccounts.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Fastly accounts returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-apiInstance
- .listFastlyAccounts()
- .then((data: v2.FastlyAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/ListFastlyServices.ts b/examples/v2/fastly-integration/ListFastlyServices.ts
deleted file mode 100644
index 37850ffb52db..000000000000
--- a/examples/v2/fastly-integration/ListFastlyServices.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List Fastly services returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiListFastlyServicesRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .listFastlyServices(params)
- .then((data: v2.FastlyServicesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/UpdateFastlyAccount.ts b/examples/v2/fastly-integration/UpdateFastlyAccount.ts
deleted file mode 100644
index 266eae6934cf..000000000000
--- a/examples/v2/fastly-integration/UpdateFastlyAccount.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Update Fastly account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-// there is a valid "fastly_account" in the system
-const FASTLY_ACCOUNT_DATA_ID = process.env.FASTLY_ACCOUNT_DATA_ID as string;
-
-const params: v2.FastlyIntegrationApiUpdateFastlyAccountRequest = {
- body: {
- data: {
- attributes: {
- apiKey: "update-secret",
- },
- type: "fastly-accounts",
- },
- },
- accountId: FASTLY_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateFastlyAccount(params)
- .then((data: v2.FastlyAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/fastly-integration/UpdateFastlyService.ts b/examples/v2/fastly-integration/UpdateFastlyService.ts
deleted file mode 100644
index 656efd74096d..000000000000
--- a/examples/v2/fastly-integration/UpdateFastlyService.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Update Fastly service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.FastlyIntegrationApi(configuration);
-
-const params: v2.FastlyIntegrationApiUpdateFastlyServiceRequest = {
- body: {
- data: {
- attributes: {
- tags: ["myTag", "myTag2:myValue"],
- },
- id: "abc123",
- type: "fastly-services",
- },
- },
- accountId: "account_id",
- serviceId: "service_id",
-};
-
-apiInstance
- .updateFastlyService(params)
- .then((data: v2.FastlyServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount.ts
deleted file mode 100644
index 494ef9d902ec..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Create a new entry for your service account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.ts
deleted file mode 100644
index 93c5be3a62a1..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a new entry for your service account with account_tags returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- accountTags: ["lorem", "ipsum"],
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.ts
deleted file mode 100644
index 179daf9f9e89..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a new entry for your service account with resource collection enabled returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- resourceCollectionEnabled: true,
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.ts
deleted file mode 100644
index e09b1fd9a691..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- cloudRunRevisionFilters: ["meh:bleh"],
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.ts
deleted file mode 100644
index 0b7570638edf..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create a new entry for your service account with security command center enabled returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- isSecurityCommandCenterEnabled: true,
- isResourceChangeCollectionEnabled: true,
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.ts b/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.ts
deleted file mode 100644
index edbe0a1aaebc..000000000000
--- a/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create a new entry for your service account with cspm enabled returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- isCspmEnabled: true,
- resourceCollectionEnabled: true,
- clientEmail:
- "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
- hostFilters: [],
- },
- type: "gcp_service_account",
- },
- },
-};
-
-apiInstance
- .createGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/DeleteGCPSTSAccount.ts b/examples/v2/gcp-integration/DeleteGCPSTSAccount.ts
deleted file mode 100644
index d2345c91887b..000000000000
--- a/examples/v2/gcp-integration/DeleteGCPSTSAccount.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an STS enabled GCP Account returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiDeleteGCPSTSAccountRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .deleteGCPSTSAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/GetGCPSTSDelegate.ts b/examples/v2/gcp-integration/GetGCPSTSDelegate.ts
deleted file mode 100644
index 6cb7ea311840..000000000000
--- a/examples/v2/gcp-integration/GetGCPSTSDelegate.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List delegate account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-apiInstance
- .getGCPSTSDelegate()
- .then((data: v2.GCPSTSDelegateAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/ListGCPSTSAccounts.ts b/examples/v2/gcp-integration/ListGCPSTSAccounts.ts
deleted file mode 100644
index bf68ecb0065a..000000000000
--- a/examples/v2/gcp-integration/ListGCPSTSAccounts.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all GCP STS-enabled service accounts returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-apiInstance
- .listGCPSTSAccounts()
- .then((data: v2.GCPSTSServiceAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/MakeGCPSTSDelegate.ts b/examples/v2/gcp-integration/MakeGCPSTSDelegate.ts
deleted file mode 100644
index 3675bf7d8bf0..000000000000
--- a/examples/v2/gcp-integration/MakeGCPSTSDelegate.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Create a Datadog GCP principal returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-apiInstance
- .makeGCPSTSDelegate()
- .then((data: v2.GCPSTSDelegateAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/MakeGCPSTSDelegate_962598975.ts b/examples/v2/gcp-integration/MakeGCPSTSDelegate_962598975.ts
deleted file mode 100644
index f45f6f8d61e9..000000000000
--- a/examples/v2/gcp-integration/MakeGCPSTSDelegate_962598975.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Create a Datadog GCP principal with empty body returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-const params: v2.GCPIntegrationApiMakeGCPSTSDelegateRequest = {
- body: {},
-};
-
-apiInstance
- .makeGCPSTSDelegate(params)
- .then((data: v2.GCPSTSDelegateAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/UpdateGCPSTSAccount.ts b/examples/v2/gcp-integration/UpdateGCPSTSAccount.ts
deleted file mode 100644
index bc02ea229251..000000000000
--- a/examples/v2/gcp-integration/UpdateGCPSTSAccount.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update STS Service Account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-// there is a valid "gcp_sts_account" in the system
-const GCP_STS_ACCOUNT_DATA_ID = process.env.GCP_STS_ACCOUNT_DATA_ID as string;
-
-const params: v2.GCPIntegrationApiUpdateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- clientEmail: "Test-252bf553ef04b351@example.com",
- hostFilters: ["foo:bar"],
- },
- id: GCP_STS_ACCOUNT_DATA_ID,
- type: "gcp_service_account",
- },
- },
- accountId: GCP_STS_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.ts b/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.ts
deleted file mode 100644
index c0100ad21921..000000000000
--- a/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update STS Service Account returns "OK" response with cloud run revision filters
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-// there is a valid "gcp_sts_account" in the system
-const GCP_STS_ACCOUNT_DATA_ID = process.env.GCP_STS_ACCOUNT_DATA_ID as string;
-
-const params: v2.GCPIntegrationApiUpdateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- clientEmail: "Test-252bf553ef04b351@example.com",
- cloudRunRevisionFilters: ["merp:derp"],
- },
- id: GCP_STS_ACCOUNT_DATA_ID,
- type: "gcp_service_account",
- },
- },
- accountId: GCP_STS_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.ts b/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.ts
deleted file mode 100644
index 96688e520c44..000000000000
--- a/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update STS Service Account returns "OK" response with enable resource collection turned on
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.GCPIntegrationApi(configuration);
-
-// there is a valid "gcp_sts_account" in the system
-const GCP_STS_ACCOUNT_DATA_ID = process.env.GCP_STS_ACCOUNT_DATA_ID as string;
-
-const params: v2.GCPIntegrationApiUpdateGCPSTSAccountRequest = {
- body: {
- data: {
- attributes: {
- clientEmail: "Test-252bf553ef04b351@example.com",
- resourceCollectionEnabled: true,
- },
- id: GCP_STS_ACCOUNT_DATA_ID,
- type: "gcp_service_account",
- },
- },
- accountId: GCP_STS_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateGCPSTSAccount(params)
- .then((data: v2.GCPSTSServiceAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-services/CreateIncidentService.ts b/examples/v2/incident-services/CreateIncidentService.ts
deleted file mode 100644
index d06299453b3a..000000000000
--- a/examples/v2/incident-services/CreateIncidentService.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a new incident service returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncidentService"] = true;
-const apiInstance = new v2.IncidentServicesApi(configuration);
-
-const params: v2.IncidentServicesApiCreateIncidentServiceRequest = {
- body: {
- data: {
- type: "services",
- attributes: {
- name: "Example-Incident-Service",
- },
- },
- },
-};
-
-apiInstance
- .createIncidentService(params)
- .then((data: v2.IncidentServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-services/DeleteIncidentService.ts b/examples/v2/incident-services/DeleteIncidentService.ts
deleted file mode 100644
index 9ffea2a24898..000000000000
--- a/examples/v2/incident-services/DeleteIncidentService.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an existing incident service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncidentService"] = true;
-const apiInstance = new v2.IncidentServicesApi(configuration);
-
-// there is a valid "service" in the system
-const SERVICE_DATA_ID = process.env.SERVICE_DATA_ID as string;
-
-const params: v2.IncidentServicesApiDeleteIncidentServiceRequest = {
- serviceId: SERVICE_DATA_ID,
-};
-
-apiInstance
- .deleteIncidentService(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-services/GetIncidentService.ts b/examples/v2/incident-services/GetIncidentService.ts
deleted file mode 100644
index f4d8fc4cbe36..000000000000
--- a/examples/v2/incident-services/GetIncidentService.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get details of an incident service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncidentService"] = true;
-const apiInstance = new v2.IncidentServicesApi(configuration);
-
-// there is a valid "service" in the system
-const SERVICE_DATA_ID = process.env.SERVICE_DATA_ID as string;
-
-const params: v2.IncidentServicesApiGetIncidentServiceRequest = {
- serviceId: SERVICE_DATA_ID,
-};
-
-apiInstance
- .getIncidentService(params)
- .then((data: v2.IncidentServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-services/ListIncidentServices.ts b/examples/v2/incident-services/ListIncidentServices.ts
deleted file mode 100644
index 65a0ef91b29a..000000000000
--- a/examples/v2/incident-services/ListIncidentServices.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a list of all incident services returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentServices"] = true;
-const apiInstance = new v2.IncidentServicesApi(configuration);
-
-// there is a valid "service" in the system
-const SERVICE_DATA_ATTRIBUTES_NAME = process.env
- .SERVICE_DATA_ATTRIBUTES_NAME as string;
-
-const params: v2.IncidentServicesApiListIncidentServicesRequest = {
- filter: SERVICE_DATA_ATTRIBUTES_NAME,
-};
-
-apiInstance
- .listIncidentServices(params)
- .then((data: v2.IncidentServicesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-services/UpdateIncidentService.ts b/examples/v2/incident-services/UpdateIncidentService.ts
deleted file mode 100644
index 5d86d221695a..000000000000
--- a/examples/v2/incident-services/UpdateIncidentService.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update an existing incident service returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentService"] = true;
-const apiInstance = new v2.IncidentServicesApi(configuration);
-
-// there is a valid "service" in the system
-const SERVICE_DATA_ID = process.env.SERVICE_DATA_ID as string;
-
-const params: v2.IncidentServicesApiUpdateIncidentServiceRequest = {
- body: {
- data: {
- type: "services",
- attributes: {
- name: "service name-updated",
- },
- },
- },
- serviceId: SERVICE_DATA_ID,
-};
-
-apiInstance
- .updateIncidentService(params)
- .then((data: v2.IncidentServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-teams/CreateIncidentTeam.ts b/examples/v2/incident-teams/CreateIncidentTeam.ts
deleted file mode 100644
index 53c68f0ce5e0..000000000000
--- a/examples/v2/incident-teams/CreateIncidentTeam.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a new incident team returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncidentTeam"] = true;
-const apiInstance = new v2.IncidentTeamsApi(configuration);
-
-const params: v2.IncidentTeamsApiCreateIncidentTeamRequest = {
- body: {
- data: {
- type: "teams",
- attributes: {
- name: "Example-Incident-Team",
- },
- },
- },
-};
-
-apiInstance
- .createIncidentTeam(params)
- .then((data: v2.IncidentTeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-teams/DeleteIncidentTeam.ts b/examples/v2/incident-teams/DeleteIncidentTeam.ts
deleted file mode 100644
index 3977906bcad6..000000000000
--- a/examples/v2/incident-teams/DeleteIncidentTeam.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an existing incident team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncidentTeam"] = true;
-const apiInstance = new v2.IncidentTeamsApi(configuration);
-
-// there is a valid "team" in the system
-const TEAM_DATA_ID = process.env.TEAM_DATA_ID as string;
-
-const params: v2.IncidentTeamsApiDeleteIncidentTeamRequest = {
- teamId: TEAM_DATA_ID,
-};
-
-apiInstance
- .deleteIncidentTeam(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-teams/GetIncidentTeam.ts b/examples/v2/incident-teams/GetIncidentTeam.ts
deleted file mode 100644
index b1d9fa7cea2d..000000000000
--- a/examples/v2/incident-teams/GetIncidentTeam.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get details of an incident team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncidentTeam"] = true;
-const apiInstance = new v2.IncidentTeamsApi(configuration);
-
-// there is a valid "team" in the system
-const TEAM_DATA_ID = process.env.TEAM_DATA_ID as string;
-
-const params: v2.IncidentTeamsApiGetIncidentTeamRequest = {
- teamId: TEAM_DATA_ID,
-};
-
-apiInstance
- .getIncidentTeam(params)
- .then((data: v2.IncidentTeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-teams/ListIncidentTeams.ts b/examples/v2/incident-teams/ListIncidentTeams.ts
deleted file mode 100644
index caaab7f94f5b..000000000000
--- a/examples/v2/incident-teams/ListIncidentTeams.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a list of all incident teams returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentTeams"] = true;
-const apiInstance = new v2.IncidentTeamsApi(configuration);
-
-// there is a valid "team" in the system
-const TEAM_DATA_ATTRIBUTES_NAME = process.env
- .TEAM_DATA_ATTRIBUTES_NAME as string;
-
-const params: v2.IncidentTeamsApiListIncidentTeamsRequest = {
- filter: TEAM_DATA_ATTRIBUTES_NAME,
-};
-
-apiInstance
- .listIncidentTeams(params)
- .then((data: v2.IncidentTeamsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incident-teams/UpdateIncidentTeam.ts b/examples/v2/incident-teams/UpdateIncidentTeam.ts
deleted file mode 100644
index e136ae9271c8..000000000000
--- a/examples/v2/incident-teams/UpdateIncidentTeam.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update an existing incident team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentTeam"] = true;
-const apiInstance = new v2.IncidentTeamsApi(configuration);
-
-// there is a valid "team" in the system
-const TEAM_DATA_ID = process.env.TEAM_DATA_ID as string;
-
-const params: v2.IncidentTeamsApiUpdateIncidentTeamRequest = {
- body: {
- data: {
- type: "teams",
- attributes: {
- name: "team name-updated",
- },
- },
- },
- teamId: TEAM_DATA_ID,
-};
-
-apiInstance
- .updateIncidentTeam(params)
- .then((data: v2.IncidentTeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/CreateIncident.ts b/examples/v2/incidents/CreateIncident.ts
deleted file mode 100644
index 471305497fa7..000000000000
--- a/examples/v2/incidents/CreateIncident.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Create an incident returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.IncidentsApiCreateIncidentRequest = {
- body: {
- data: {
- type: "incidents",
- attributes: {
- title: "Example-Incident",
- customerImpacted: false,
- fields: {
- state: {
- type: "dropdown",
- value: "resolved",
- },
- },
- },
- relationships: {
- commanderUser: {
- data: {
- type: "users",
- id: USER_DATA_ID,
- },
- },
- },
- },
- },
-};
-
-apiInstance
- .createIncident(params)
- .then((data: v2.IncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/CreateIncidentIntegration.ts b/examples/v2/incidents/CreateIncidentIntegration.ts
deleted file mode 100644
index e0976eeb27cf..000000000000
--- a/examples/v2/incidents/CreateIncidentIntegration.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Create an incident integration metadata returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncidentIntegration"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiCreateIncidentIntegrationRequest = {
- body: {
- data: {
- attributes: {
- incidentId: INCIDENT_DATA_ID,
- integrationType: 1,
- metadata: {
- channels: [
- {
- channelId: "C0123456789",
- channelName: "#new-channel",
- teamId: "T01234567",
- redirectUrl:
- "https://slack.com/app_redirect?channel=C0123456789&team=T01234567",
- },
- ],
- },
- },
- type: "incident_integrations",
- },
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .createIncidentIntegration(params)
- .then((data: v2.IncidentIntegrationMetadataResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/CreateIncidentTodo.ts b/examples/v2/incidents/CreateIncidentTodo.ts
deleted file mode 100644
index 9d13335f9293..000000000000
--- a/examples/v2/incidents/CreateIncidentTodo.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Create an incident todo returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncidentTodo"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiCreateIncidentTodoRequest = {
- body: {
- data: {
- attributes: {
- assignees: ["@test.user@test.com"],
- content: "Restore lost data.",
- },
- type: "incident_todos",
- },
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .createIncidentTodo(params)
- .then((data: v2.IncidentTodoResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/CreateIncidentType.ts b/examples/v2/incidents/CreateIncidentType.ts
deleted file mode 100644
index 3253f36bd7e0..000000000000
--- a/examples/v2/incidents/CreateIncidentType.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create an incident type returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createIncidentType"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiCreateIncidentTypeRequest = {
- body: {
- data: {
- attributes: {
- description:
- "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
- isDefault: false,
- name: "Security Incident",
- },
- type: "incident_types",
- },
- },
-};
-
-apiInstance
- .createIncidentType(params)
- .then((data: v2.IncidentTypeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/DeleteIncident.ts b/examples/v2/incidents/DeleteIncident.ts
deleted file mode 100644
index 082339f842c0..000000000000
--- a/examples/v2/incidents/DeleteIncident.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an existing incident returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiDeleteIncidentRequest = {
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .deleteIncident(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/DeleteIncidentIntegration.ts b/examples/v2/incidents/DeleteIncidentIntegration.ts
deleted file mode 100644
index ead2225efed5..000000000000
--- a/examples/v2/incidents/DeleteIncidentIntegration.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Delete an incident integration metadata returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncidentIntegration"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_integration_metadata"
-const INCIDENT_INTEGRATION_METADATA_DATA_ID = process.env
- .INCIDENT_INTEGRATION_METADATA_DATA_ID as string;
-
-const params: v2.IncidentsApiDeleteIncidentIntegrationRequest = {
- incidentId: INCIDENT_DATA_ID,
- integrationMetadataId: INCIDENT_INTEGRATION_METADATA_DATA_ID,
-};
-
-apiInstance
- .deleteIncidentIntegration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/DeleteIncidentTodo.ts b/examples/v2/incidents/DeleteIncidentTodo.ts
deleted file mode 100644
index 4f0fe1246fcf..000000000000
--- a/examples/v2/incidents/DeleteIncidentTodo.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Delete an incident todo returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncidentTodo"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_todo"
-const INCIDENT_TODO_DATA_ID = process.env.INCIDENT_TODO_DATA_ID as string;
-
-const params: v2.IncidentsApiDeleteIncidentTodoRequest = {
- incidentId: INCIDENT_DATA_ID,
- todoId: INCIDENT_TODO_DATA_ID,
-};
-
-apiInstance
- .deleteIncidentTodo(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/DeleteIncidentType.ts b/examples/v2/incidents/DeleteIncidentType.ts
deleted file mode 100644
index 6a622815b346..000000000000
--- a/examples/v2/incidents/DeleteIncidentType.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete an incident type returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteIncidentType"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident_type" in the system
-const INCIDENT_TYPE_DATA_ID = process.env.INCIDENT_TYPE_DATA_ID as string;
-
-const params: v2.IncidentsApiDeleteIncidentTypeRequest = {
- incidentTypeId: INCIDENT_TYPE_DATA_ID,
-};
-
-apiInstance
- .deleteIncidentType(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/GetIncident.ts b/examples/v2/incidents/GetIncident.ts
deleted file mode 100644
index cba0c9cc4117..000000000000
--- a/examples/v2/incidents/GetIncident.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get the details of an incident returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiGetIncidentRequest = {
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .getIncident(params)
- .then((data: v2.IncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/GetIncidentIntegration.ts b/examples/v2/incidents/GetIncidentIntegration.ts
deleted file mode 100644
index ab3391e2475e..000000000000
--- a/examples/v2/incidents/GetIncidentIntegration.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Get incident integration metadata details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncidentIntegration"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_integration_metadata"
-const INCIDENT_INTEGRATION_METADATA_DATA_ID = process.env
- .INCIDENT_INTEGRATION_METADATA_DATA_ID as string;
-
-const params: v2.IncidentsApiGetIncidentIntegrationRequest = {
- incidentId: INCIDENT_DATA_ID,
- integrationMetadataId: INCIDENT_INTEGRATION_METADATA_DATA_ID,
-};
-
-apiInstance
- .getIncidentIntegration(params)
- .then((data: v2.IncidentIntegrationMetadataResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/GetIncidentTodo.ts b/examples/v2/incidents/GetIncidentTodo.ts
deleted file mode 100644
index 7be2ede05b13..000000000000
--- a/examples/v2/incidents/GetIncidentTodo.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Get incident todo details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncidentTodo"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_todo"
-const INCIDENT_TODO_DATA_ID = process.env.INCIDENT_TODO_DATA_ID as string;
-
-const params: v2.IncidentsApiGetIncidentTodoRequest = {
- incidentId: INCIDENT_DATA_ID,
- todoId: INCIDENT_TODO_DATA_ID,
-};
-
-apiInstance
- .getIncidentTodo(params)
- .then((data: v2.IncidentTodoResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/GetIncidentType.ts b/examples/v2/incidents/GetIncidentType.ts
deleted file mode 100644
index fa706603f160..000000000000
--- a/examples/v2/incidents/GetIncidentType.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get incident type details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getIncidentType"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiGetIncidentTypeRequest = {
- incidentTypeId: "incident_type_id",
-};
-
-apiInstance
- .getIncidentType(params)
- .then((data: v2.IncidentTypeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidentAttachments.ts b/examples/v2/incidents/ListIncidentAttachments.ts
deleted file mode 100644
index 677570486855..000000000000
--- a/examples/v2/incidents/ListIncidentAttachments.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of attachments returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentAttachments"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiListIncidentAttachmentsRequest = {
- incidentId: "incident_id",
-};
-
-apiInstance
- .listIncidentAttachments(params)
- .then((data: v2.IncidentAttachmentsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidentAttachments_2457735435.ts b/examples/v2/incidents/ListIncidentAttachments_2457735435.ts
deleted file mode 100644
index 8e728502881c..000000000000
--- a/examples/v2/incidents/ListIncidentAttachments_2457735435.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get incident attachments returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentAttachments"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiListIncidentAttachmentsRequest = {
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .listIncidentAttachments(params)
- .then((data: v2.IncidentAttachmentsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidentIntegrations.ts b/examples/v2/incidents/ListIncidentIntegrations.ts
deleted file mode 100644
index a1ddb41cdbc0..000000000000
--- a/examples/v2/incidents/ListIncidentIntegrations.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a list of an incident's integration metadata returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentIntegrations"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiListIncidentIntegrationsRequest = {
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .listIncidentIntegrations(params)
- .then((data: v2.IncidentIntegrationMetadataListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidentTodos.ts b/examples/v2/incidents/ListIncidentTodos.ts
deleted file mode 100644
index 487ea5448087..000000000000
--- a/examples/v2/incidents/ListIncidentTodos.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a list of an incident's todos returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentTodos"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiListIncidentTodosRequest = {
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .listIncidentTodos(params)
- .then((data: v2.IncidentTodoListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidentTypes.ts b/examples/v2/incidents/ListIncidentTypes.ts
deleted file mode 100644
index ec45e243ccdd..000000000000
--- a/examples/v2/incidents/ListIncidentTypes.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Get a list of incident types returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidentTypes"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-apiInstance
- .listIncidentTypes()
- .then((data: v2.IncidentTypeListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidents.ts b/examples/v2/incidents/ListIncidents.ts
deleted file mode 100644
index 08186bbcf970..000000000000
--- a/examples/v2/incidents/ListIncidents.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Get a list of incidents returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidents"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-apiInstance
- .listIncidents()
- .then((data: v2.IncidentsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/ListIncidents_2665616954.ts b/examples/v2/incidents/ListIncidents_2665616954.ts
deleted file mode 100644
index ded2d6cf6f4b..000000000000
--- a/examples/v2/incidents/ListIncidents_2665616954.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get a list of incidents returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listIncidents"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiListIncidentsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listIncidentsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/incidents/SearchIncidents.ts b/examples/v2/incidents/SearchIncidents.ts
deleted file mode 100644
index 6762c94bf9f8..000000000000
--- a/examples/v2/incidents/SearchIncidents.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Search for incidents returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.searchIncidents"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiSearchIncidentsRequest = {
- query: "state:(active OR stable OR resolved)",
-};
-
-apiInstance
- .searchIncidents(params)
- .then((data: v2.IncidentSearchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/SearchIncidents_1931679109.ts b/examples/v2/incidents/SearchIncidents_1931679109.ts
deleted file mode 100644
index 9f9b531fd296..000000000000
--- a/examples/v2/incidents/SearchIncidents_1931679109.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Search for incidents returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.searchIncidents"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiSearchIncidentsRequest = {
- query: "state:(active OR stable OR resolved)",
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchIncidentsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/incidents/UpdateIncident.ts b/examples/v2/incidents/UpdateIncident.ts
deleted file mode 100644
index fb9fc05ab4a5..000000000000
--- a/examples/v2/incidents/UpdateIncident.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Update an existing incident returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentRequest = {
- body: {
- data: {
- id: INCIDENT_DATA_ID,
- type: "incidents",
- attributes: {
- fields: {
- state: {
- type: "dropdown",
- value: "resolved",
- },
- },
- title: "A test incident title-updated",
- },
- },
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .updateIncident(params)
- .then((data: v2.IncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncidentAttachments.ts b/examples/v2/incidents/UpdateIncidentAttachments.ts
deleted file mode 100644
index 00dc1964e9db..000000000000
--- a/examples/v2/incidents/UpdateIncidentAttachments.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Create, update, and delete incident attachments returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentAttachments"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-const params: v2.IncidentsApiUpdateIncidentAttachmentsRequest = {
- body: {
- data: [
- {
- attributes: {
- attachment: {
- documentUrl: "https://app.datadoghq.com/notebook/123",
- title: "Postmortem IR-123",
- },
- attachmentType: "postmortem",
- },
- id: "00000000-abcd-0002-0000-000000000000",
- type: "incident_attachments",
- },
- {
- attributes: {
- attachment: {
- documentUrl: "https://www.example.com/webstore-failure-runbook",
- title: "Runbook for webstore service failures",
- },
- attachmentType: "link",
- },
- type: "incident_attachments",
- },
- {
- id: "00000000-abcd-0003-0000-000000000000",
- type: "incident_attachments",
- },
- ],
- },
- incidentId: "incident_id",
-};
-
-apiInstance
- .updateIncidentAttachments(params)
- .then((data: v2.IncidentAttachmentUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncidentAttachments_3881702075.ts b/examples/v2/incidents/UpdateIncidentAttachments_3881702075.ts
deleted file mode 100644
index 30f093c5c79d..000000000000
--- a/examples/v2/incidents/UpdateIncidentAttachments_3881702075.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Create an incident attachment returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentAttachments"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentAttachmentsRequest = {
- body: {
- data: [
- {
- type: "incident_attachments",
- attributes: {
- attachmentType: "link",
- attachment: {
- documentUrl: "https://www.example.com/doc",
- title: "Example-Incident",
- },
- },
- },
- ],
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .updateIncidentAttachments(params)
- .then((data: v2.IncidentAttachmentUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncidentIntegration.ts b/examples/v2/incidents/UpdateIncidentIntegration.ts
deleted file mode 100644
index 7fe6a54ad5d5..000000000000
--- a/examples/v2/incidents/UpdateIncidentIntegration.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Update an existing incident integration metadata returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentIntegration"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_integration_metadata"
-const INCIDENT_INTEGRATION_METADATA_DATA_ID = process.env
- .INCIDENT_INTEGRATION_METADATA_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentIntegrationRequest = {
- body: {
- data: {
- attributes: {
- incidentId: INCIDENT_DATA_ID,
- integrationType: 1,
- metadata: {
- channels: [
- {
- channelId: "C0123456789",
- channelName: "#updated-channel-name",
- teamId: "T01234567",
- redirectUrl:
- "https://slack.com/app_redirect?channel=C0123456789&team=T01234567",
- },
- ],
- },
- },
- type: "incident_integrations",
- },
- },
- incidentId: INCIDENT_DATA_ID,
- integrationMetadataId: INCIDENT_INTEGRATION_METADATA_DATA_ID,
-};
-
-apiInstance
- .updateIncidentIntegration(params)
- .then((data: v2.IncidentIntegrationMetadataResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncidentTodo.ts b/examples/v2/incidents/UpdateIncidentTodo.ts
deleted file mode 100644
index 53fc9f501856..000000000000
--- a/examples/v2/incidents/UpdateIncidentTodo.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Update an incident todo returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentTodo"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// the "incident" has an "incident_todo"
-const INCIDENT_TODO_DATA_ID = process.env.INCIDENT_TODO_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentTodoRequest = {
- body: {
- data: {
- attributes: {
- assignees: ["@test.user@test.com"],
- content: "Restore lost data.",
- completed: "2023-03-06T22:00:00.000000+00:00",
- dueDate: "2023-07-10T05:00:00.000000+00:00",
- },
- type: "incident_todos",
- },
- },
- incidentId: INCIDENT_DATA_ID,
- todoId: INCIDENT_TODO_DATA_ID,
-};
-
-apiInstance
- .updateIncidentTodo(params)
- .then((data: v2.IncidentTodoResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncidentType.ts b/examples/v2/incidents/UpdateIncidentType.ts
deleted file mode 100644
index 27d7b358fd1a..000000000000
--- a/examples/v2/incidents/UpdateIncidentType.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update an incident type returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncidentType"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident_type" in the system
-const INCIDENT_TYPE_DATA_ID = process.env.INCIDENT_TYPE_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentTypeRequest = {
- body: {
- data: {
- id: INCIDENT_TYPE_DATA_ID,
- attributes: {
- name: "Security Incident-updated",
- },
- type: "incident_types",
- },
- },
- incidentTypeId: INCIDENT_TYPE_DATA_ID,
-};
-
-apiInstance
- .updateIncidentType(params)
- .then((data: v2.IncidentTypeResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncident_1009194038.ts b/examples/v2/incidents/UpdateIncident_1009194038.ts
deleted file mode 100644
index c5bfa9ece89b..000000000000
--- a/examples/v2/incidents/UpdateIncident_1009194038.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Remove commander from an incident returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentRequest = {
- body: {
- data: {
- id: INCIDENT_DATA_ID,
- type: "incidents",
- relationships: {
- commanderUser: {
- data: null,
- },
- },
- },
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .updateIncident(params)
- .then((data: v2.IncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/incidents/UpdateIncident_3369341440.ts b/examples/v2/incidents/UpdateIncident_3369341440.ts
deleted file mode 100644
index 4048d8b350f8..000000000000
--- a/examples/v2/incidents/UpdateIncident_3369341440.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Add commander to an incident returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateIncident"] = true;
-const apiInstance = new v2.IncidentsApi(configuration);
-
-// there is a valid "incident" in the system
-const INCIDENT_DATA_ID = process.env.INCIDENT_DATA_ID as string;
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.IncidentsApiUpdateIncidentRequest = {
- body: {
- data: {
- id: INCIDENT_DATA_ID,
- type: "incidents",
- relationships: {
- commanderUser: {
- data: {
- id: USER_DATA_ID,
- type: "users",
- },
- },
- },
- },
- },
- incidentId: INCIDENT_DATA_ID,
-};
-
-apiInstance
- .updateIncident(params)
- .then((data: v2.IncidentResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ip-allowlist/GetIPAllowlist.ts b/examples/v2/ip-allowlist/GetIPAllowlist.ts
deleted file mode 100644
index 601e073c644d..000000000000
--- a/examples/v2/ip-allowlist/GetIPAllowlist.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get IP Allowlist returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.IPAllowlistApi(configuration);
-
-apiInstance
- .getIPAllowlist()
- .then((data: v2.IPAllowlistResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/ip-allowlist/UpdateIPAllowlist.ts b/examples/v2/ip-allowlist/UpdateIPAllowlist.ts
deleted file mode 100644
index 664418463eff..000000000000
--- a/examples/v2/ip-allowlist/UpdateIPAllowlist.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Update IP Allowlist returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.IPAllowlistApi(configuration);
-
-const params: v2.IPAllowlistApiUpdateIPAllowlistRequest = {
- body: {
- data: {
- attributes: {
- entries: [
- {
- data: {
- attributes: {
- note: "Example-IP-Allowlist",
- cidrBlock: "127.0.0.1",
- },
- type: "ip_allowlist_entry",
- },
- },
- ],
- enabled: false,
- },
- type: "ip_allowlist",
- },
- },
-};
-
-apiInstance
- .updateIPAllowlist(params)
- .then((data: v2.IPAllowlistResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/CreateAPIKey.ts b/examples/v2/key-management/CreateAPIKey.ts
deleted file mode 100644
index ca238e7a192e..000000000000
--- a/examples/v2/key-management/CreateAPIKey.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Create an API key returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-const params: v2.KeyManagementApiCreateAPIKeyRequest = {
- body: {
- data: {
- type: "api_keys",
- attributes: {
- name: "Example-Key-Management",
- },
- },
- },
-};
-
-apiInstance
- .createAPIKey(params)
- .then((data: v2.APIKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/CreateCurrentUserApplicationKey.ts b/examples/v2/key-management/CreateCurrentUserApplicationKey.ts
deleted file mode 100644
index 3e4845ddff9a..000000000000
--- a/examples/v2/key-management/CreateCurrentUserApplicationKey.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Create an application key for current user returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-const params: v2.KeyManagementApiCreateCurrentUserApplicationKeyRequest = {
- body: {
- data: {
- type: "application_keys",
- attributes: {
- name: "Example-Key-Management",
- },
- },
- },
-};
-
-apiInstance
- .createCurrentUserApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.ts b/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.ts
deleted file mode 100644
index 7f7f7f0f9d30..000000000000
--- a/examples/v2/key-management/CreateCurrentUserApplicationKey_3383369233.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create an Application key with scopes for current user returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-const params: v2.KeyManagementApiCreateCurrentUserApplicationKeyRequest = {
- body: {
- data: {
- type: "application_keys",
- attributes: {
- name: "Example-Key-Management",
- scopes: [
- "dashboards_read",
- "dashboards_write",
- "dashboards_public_share",
- ],
- },
- },
- },
-};
-
-apiInstance
- .createCurrentUserApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/DeleteAPIKey.ts b/examples/v2/key-management/DeleteAPIKey.ts
deleted file mode 100644
index 0dd74b4ae51f..000000000000
--- a/examples/v2/key-management/DeleteAPIKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an API key returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "api_key" in the system
-const API_KEY_DATA_ID = process.env.API_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiDeleteAPIKeyRequest = {
- apiKeyId: API_KEY_DATA_ID,
-};
-
-apiInstance
- .deleteAPIKey(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/DeleteApplicationKey.ts b/examples/v2/key-management/DeleteApplicationKey.ts
deleted file mode 100644
index e5e8690d7b59..000000000000
--- a/examples/v2/key-management/DeleteApplicationKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an application key returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "application_key" in the system
-const APPLICATION_KEY_DATA_ID = process.env.APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiDeleteApplicationKeyRequest = {
- appKeyId: APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .deleteApplicationKey(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/DeleteCurrentUserApplicationKey.ts b/examples/v2/key-management/DeleteCurrentUserApplicationKey.ts
deleted file mode 100644
index 4bb550e9ba16..000000000000
--- a/examples/v2/key-management/DeleteCurrentUserApplicationKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an application key owned by current user returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "application_key" in the system
-const APPLICATION_KEY_DATA_ID = process.env.APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiDeleteCurrentUserApplicationKeyRequest = {
- appKeyId: APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .deleteCurrentUserApplicationKey(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/GetAPIKey.ts b/examples/v2/key-management/GetAPIKey.ts
deleted file mode 100644
index 49d1d93bdae3..000000000000
--- a/examples/v2/key-management/GetAPIKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get API key returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "api_key" in the system
-const API_KEY_DATA_ID = process.env.API_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiGetAPIKeyRequest = {
- apiKeyId: API_KEY_DATA_ID,
-};
-
-apiInstance
- .getAPIKey(params)
- .then((data: v2.APIKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/GetApplicationKey.ts b/examples/v2/key-management/GetApplicationKey.ts
deleted file mode 100644
index 6c7d6d4dee22..000000000000
--- a/examples/v2/key-management/GetApplicationKey.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get an application key returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "application_key" in the system
-const APPLICATION_KEY_DATA_ID = process.env.APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiGetApplicationKeyRequest = {
- appKeyId: APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .getApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/GetCurrentUserApplicationKey.ts b/examples/v2/key-management/GetCurrentUserApplicationKey.ts
deleted file mode 100644
index 802f48aac73b..000000000000
--- a/examples/v2/key-management/GetCurrentUserApplicationKey.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get one application key owned by current user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-const params: v2.KeyManagementApiGetCurrentUserApplicationKeyRequest = {
- appKeyId: "app_key_id",
-};
-
-apiInstance
- .getCurrentUserApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/ListAPIKeys.ts b/examples/v2/key-management/ListAPIKeys.ts
deleted file mode 100644
index 7cd44b755be1..000000000000
--- a/examples/v2/key-management/ListAPIKeys.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get all API keys returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "api_key" in the system
-const API_KEY_DATA_ATTRIBUTES_NAME = process.env
- .API_KEY_DATA_ATTRIBUTES_NAME as string;
-
-const params: v2.KeyManagementApiListAPIKeysRequest = {
- filter: API_KEY_DATA_ATTRIBUTES_NAME,
-};
-
-apiInstance
- .listAPIKeys(params)
- .then((data: v2.APIKeysResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/ListApplicationKeys.ts b/examples/v2/key-management/ListApplicationKeys.ts
deleted file mode 100644
index 7986f447b038..000000000000
--- a/examples/v2/key-management/ListApplicationKeys.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all application keys returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-apiInstance
- .listApplicationKeys()
- .then((data: v2.ListApplicationKeysResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/ListCurrentUserApplicationKeys.ts b/examples/v2/key-management/ListCurrentUserApplicationKeys.ts
deleted file mode 100644
index dd5da8bda319..000000000000
--- a/examples/v2/key-management/ListCurrentUserApplicationKeys.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all application keys owned by current user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-apiInstance
- .listCurrentUserApplicationKeys()
- .then((data: v2.ListApplicationKeysResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/UpdateAPIKey.ts b/examples/v2/key-management/UpdateAPIKey.ts
deleted file mode 100644
index c9426e9814d8..000000000000
--- a/examples/v2/key-management/UpdateAPIKey.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Edit an API key returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "api_key" in the system
-const API_KEY_DATA_ID = process.env.API_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiUpdateAPIKeyRequest = {
- body: {
- data: {
- type: "api_keys",
- id: API_KEY_DATA_ID,
- attributes: {
- name: "Example-Key-Management",
- },
- },
- },
- apiKeyId: API_KEY_DATA_ID,
-};
-
-apiInstance
- .updateAPIKey(params)
- .then((data: v2.APIKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/UpdateApplicationKey.ts b/examples/v2/key-management/UpdateApplicationKey.ts
deleted file mode 100644
index 34a2e96cea29..000000000000
--- a/examples/v2/key-management/UpdateApplicationKey.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Edit an application key returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "application_key" in the system
-const APPLICATION_KEY_DATA_ID = process.env.APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiUpdateApplicationKeyRequest = {
- body: {
- data: {
- id: APPLICATION_KEY_DATA_ID,
- type: "application_keys",
- attributes: {
- name: "Application Key for managing dashboards-updated",
- },
- },
- },
- appKeyId: APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .updateApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/key-management/UpdateCurrentUserApplicationKey.ts b/examples/v2/key-management/UpdateCurrentUserApplicationKey.ts
deleted file mode 100644
index 696227416d9c..000000000000
--- a/examples/v2/key-management/UpdateCurrentUserApplicationKey.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Edit an application key owned by current user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.KeyManagementApi(configuration);
-
-// there is a valid "application_key" in the system
-const APPLICATION_KEY_DATA_ID = process.env.APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.KeyManagementApiUpdateCurrentUserApplicationKeyRequest = {
- body: {
- data: {
- id: APPLICATION_KEY_DATA_ID,
- type: "application_keys",
- attributes: {
- name: "Application Key for managing dashboards-updated",
- },
- },
- },
- appKeyId: APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .updateCurrentUserApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/AddReadRoleToArchive.ts b/examples/v2/logs-archives/AddReadRoleToArchive.ts
deleted file mode 100644
index 5dcfc4aa3dce..000000000000
--- a/examples/v2/logs-archives/AddReadRoleToArchive.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Grant role to an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiAddReadRoleToArchiveRequest = {
- body: {
- data: {
- id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
- type: "roles",
- },
- },
- archiveId: "archive_id",
-};
-
-apiInstance
- .addReadRoleToArchive(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/CreateLogsArchive.ts b/examples/v2/logs-archives/CreateLogsArchive.ts
deleted file mode 100644
index aabcc0da01c6..000000000000
--- a/examples/v2/logs-archives/CreateLogsArchive.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Create an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiCreateLogsArchiveRequest = {
- body: {
- data: {
- attributes: {
- destination: {
- container: "container-name",
- integration: {
- clientId: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
- tenantId: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
- },
- storageAccount: "account-name",
- type: "azure",
- },
- includeTags: false,
- name: "Nginx Archive",
- query: "source:nginx",
- rehydrationMaxScanSizeInGb: 100,
- rehydrationTags: ["team:intake", "team:app"],
- },
- type: "archives",
- },
- },
-};
-
-apiInstance
- .createLogsArchive(params)
- .then((data: v2.LogsArchive) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/DeleteLogsArchive.ts b/examples/v2/logs-archives/DeleteLogsArchive.ts
deleted file mode 100644
index bf3ad5355a5e..000000000000
--- a/examples/v2/logs-archives/DeleteLogsArchive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiDeleteLogsArchiveRequest = {
- archiveId: "archive_id",
-};
-
-apiInstance
- .deleteLogsArchive(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/GetLogsArchive.ts b/examples/v2/logs-archives/GetLogsArchive.ts
deleted file mode 100644
index 992bd540861e..000000000000
--- a/examples/v2/logs-archives/GetLogsArchive.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiGetLogsArchiveRequest = {
- archiveId: "archive_id",
-};
-
-apiInstance
- .getLogsArchive(params)
- .then((data: v2.LogsArchive) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/GetLogsArchiveOrder.ts b/examples/v2/logs-archives/GetLogsArchiveOrder.ts
deleted file mode 100644
index 41b11891b046..000000000000
--- a/examples/v2/logs-archives/GetLogsArchiveOrder.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get archive order returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-apiInstance
- .getLogsArchiveOrder()
- .then((data: v2.LogsArchiveOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/ListArchiveReadRoles.ts b/examples/v2/logs-archives/ListArchiveReadRoles.ts
deleted file mode 100644
index a6ebbaaec151..000000000000
--- a/examples/v2/logs-archives/ListArchiveReadRoles.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List read roles for an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiListArchiveReadRolesRequest = {
- archiveId: "archive_id",
-};
-
-apiInstance
- .listArchiveReadRoles(params)
- .then((data: v2.RolesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/ListLogsArchives.ts b/examples/v2/logs-archives/ListLogsArchives.ts
deleted file mode 100644
index 009084a6783e..000000000000
--- a/examples/v2/logs-archives/ListLogsArchives.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all archives returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-apiInstance
- .listLogsArchives()
- .then((data: v2.LogsArchives) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/RemoveRoleFromArchive.ts b/examples/v2/logs-archives/RemoveRoleFromArchive.ts
deleted file mode 100644
index 59bb8d8b236f..000000000000
--- a/examples/v2/logs-archives/RemoveRoleFromArchive.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Revoke role from an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiRemoveRoleFromArchiveRequest = {
- body: {
- data: {
- id: "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
- type: "roles",
- },
- },
- archiveId: "archive_id",
-};
-
-apiInstance
- .removeRoleFromArchive(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/UpdateLogsArchive.ts b/examples/v2/logs-archives/UpdateLogsArchive.ts
deleted file mode 100644
index 55b9f0440d41..000000000000
--- a/examples/v2/logs-archives/UpdateLogsArchive.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Update an archive returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiUpdateLogsArchiveRequest = {
- body: {
- data: {
- attributes: {
- destination: {
- container: "container-name",
- integration: {
- clientId: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
- tenantId: "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa",
- },
- storageAccount: "account-name",
- type: "azure",
- },
- includeTags: false,
- name: "Nginx Archive",
- query: "source:nginx",
- rehydrationMaxScanSizeInGb: 100,
- rehydrationTags: ["team:intake", "team:app"],
- },
- type: "archives",
- },
- },
- archiveId: "archive_id",
-};
-
-apiInstance
- .updateLogsArchive(params)
- .then((data: v2.LogsArchive) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-archives/UpdateLogsArchiveOrder.ts b/examples/v2/logs-archives/UpdateLogsArchiveOrder.ts
deleted file mode 100644
index 5fbceb2132b1..000000000000
--- a/examples/v2/logs-archives/UpdateLogsArchiveOrder.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Update archive order returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsArchivesApi(configuration);
-
-const params: v2.LogsArchivesApiUpdateLogsArchiveOrderRequest = {
- body: {
- data: {
- attributes: {
- archiveIds: [
- "a2zcMylnM4OCHpYusxIi1g",
- "a2zcMylnM4OCHpYusxIi2g",
- "a2zcMylnM4OCHpYusxIi3g",
- ],
- },
- type: "archive_order",
- },
- },
-};
-
-apiInstance
- .updateLogsArchiveOrder(params)
- .then((data: v2.LogsArchiveOrder) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.ts b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.ts
deleted file mode 100644
index f5f446a8ade6..000000000000
--- a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-const params: v2.LogsCustomDestinationsApiCreateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- forwardTags: true,
- forwardTagsRestrictionList: ["datacenter", "host"],
- forwardTagsRestrictionListType: "ALLOW_LIST",
- forwarderDestination: {
- auth: {
- password: "datadog-custom-destination-password",
- type: "basic",
- username: "datadog-custom-destination-username",
- },
- endpoint: "https://example.com",
- type: "http",
- },
- name: "Nginx logs",
- query: "source:nginx",
- },
- type: "custom_destination",
- },
- },
-};
-
-apiInstance
- .createLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.ts b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.ts
deleted file mode 100644
index 75b6bd09b97d..000000000000
--- a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a Custom Header HTTP custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-const params: v2.LogsCustomDestinationsApiCreateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- enabled: false,
- forwardTags: false,
- forwardTagsRestrictionList: ["datacenter", "host"],
- forwardTagsRestrictionListType: "ALLOW_LIST",
- forwarderDestination: {
- auth: {
- headerValue: "my-secret",
- type: "custom_header",
- headerName: "MY-AUTHENTICATION-HEADER",
- },
- endpoint: "https://example.com",
- type: "http",
- },
- name: "Nginx logs",
- query: "source:nginx",
- },
- type: "custom_destination",
- },
- },
-};
-
-apiInstance
- .createLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.ts b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.ts
deleted file mode 100644
index c40358f5e303..000000000000
--- a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Create a Splunk custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-const params: v2.LogsCustomDestinationsApiCreateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- enabled: false,
- forwardTags: false,
- forwardTagsRestrictionList: ["datacenter", "host"],
- forwardTagsRestrictionListType: "ALLOW_LIST",
- forwarderDestination: {
- accessToken: "my-access-token",
- endpoint: "https://example.com",
- type: "splunk_hec",
- },
- name: "Nginx logs",
- query: "source:nginx",
- },
- type: "custom_destination",
- },
- },
-};
-
-apiInstance
- .createLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.ts b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.ts
deleted file mode 100644
index 5137af5df1d5..000000000000
--- a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Create an Elasticsearch custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-const params: v2.LogsCustomDestinationsApiCreateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- enabled: false,
- forwardTags: false,
- forwardTagsRestrictionList: ["datacenter", "host"],
- forwardTagsRestrictionListType: "ALLOW_LIST",
- forwarderDestination: {
- auth: {
- username: "my-username",
- password: "my-password",
- },
- indexName: "nginx-logs",
- indexRotation: "yyyy-MM-dd",
- endpoint: "https://example.com",
- type: "elasticsearch",
- },
- name: "Nginx logs",
- query: "source:nginx",
- },
- type: "custom_destination",
- },
- },
-};
-
-apiInstance
- .createLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.ts b/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.ts
deleted file mode 100644
index e0aa8dcd2344..000000000000
--- a/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a Basic HTTP custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-const params: v2.LogsCustomDestinationsApiCreateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- enabled: false,
- forwardTags: false,
- forwardTagsRestrictionList: ["datacenter", "host"],
- forwardTagsRestrictionListType: "ALLOW_LIST",
- forwarderDestination: {
- auth: {
- password: "datadog-custom-destination-password",
- type: "basic",
- username: "datadog-custom-destination-username",
- },
- endpoint: "https://example.com",
- type: "http",
- },
- name: "Nginx logs",
- query: "source:nginx",
- },
- type: "custom_destination",
- },
- },
-};
-
-apiInstance
- .createLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.ts b/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.ts
deleted file mode 100644
index f88a54ed21ef..000000000000
--- a/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-// there is a valid "custom_destination" in the system
-const CUSTOM_DESTINATION_DATA_ID = process.env
- .CUSTOM_DESTINATION_DATA_ID as string;
-
-const params: v2.LogsCustomDestinationsApiDeleteLogsCustomDestinationRequest = {
- customDestinationId: CUSTOM_DESTINATION_DATA_ID,
-};
-
-apiInstance
- .deleteLogsCustomDestination(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/GetLogsCustomDestination.ts b/examples/v2/logs-custom-destinations/GetLogsCustomDestination.ts
deleted file mode 100644
index e2ed6c354f60..000000000000
--- a/examples/v2/logs-custom-destinations/GetLogsCustomDestination.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-// there is a valid "custom_destination" in the system
-const CUSTOM_DESTINATION_DATA_ID = process.env
- .CUSTOM_DESTINATION_DATA_ID as string;
-
-const params: v2.LogsCustomDestinationsApiGetLogsCustomDestinationRequest = {
- customDestinationId: CUSTOM_DESTINATION_DATA_ID,
-};
-
-apiInstance
- .getLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.ts b/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.ts
deleted file mode 100644
index 45dd92bd677e..000000000000
--- a/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all custom destinations returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-apiInstance
- .listLogsCustomDestinations()
- .then((data: v2.CustomDestinationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.ts b/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.ts
deleted file mode 100644
index f613a5196259..000000000000
--- a/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Update a custom destination returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsCustomDestinationsApi(configuration);
-
-// there is a valid "custom_destination" in the system
-const CUSTOM_DESTINATION_DATA_ID = process.env
- .CUSTOM_DESTINATION_DATA_ID as string;
-
-const params: v2.LogsCustomDestinationsApiUpdateLogsCustomDestinationRequest = {
- body: {
- data: {
- attributes: {
- name: "Nginx logs (Updated)",
- query: "source:nginx",
- enabled: false,
- forwardTags: false,
- forwardTagsRestrictionListType: "BLOCK_LIST",
- },
- type: "custom_destination",
- id: CUSTOM_DESTINATION_DATA_ID,
- },
- },
- customDestinationId: CUSTOM_DESTINATION_DATA_ID,
-};
-
-apiInstance
- .updateLogsCustomDestination(params)
- .then((data: v2.CustomDestinationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/CreateLogsMetric.ts b/examples/v2/logs-metrics/CreateLogsMetric.ts
deleted file mode 100644
index 005207c3d485..000000000000
--- a/examples/v2/logs-metrics/CreateLogsMetric.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a log-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-const params: v2.LogsMetricsApiCreateLogsMetricRequest = {
- body: {
- data: {
- id: "ExampleLogsMetric",
- type: "logs_metrics",
- attributes: {
- compute: {
- aggregationType: "distribution",
- includePercentiles: true,
- path: "@duration",
- },
- },
- },
- },
-};
-
-apiInstance
- .createLogsMetric(params)
- .then((data: v2.LogsMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/DeleteLogsMetric.ts b/examples/v2/logs-metrics/DeleteLogsMetric.ts
deleted file mode 100644
index 062a1820fd59..000000000000
--- a/examples/v2/logs-metrics/DeleteLogsMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a log-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-// there is a valid "logs_metric" in the system
-const LOGS_METRIC_DATA_ID = process.env.LOGS_METRIC_DATA_ID as string;
-
-const params: v2.LogsMetricsApiDeleteLogsMetricRequest = {
- metricId: LOGS_METRIC_DATA_ID,
-};
-
-apiInstance
- .deleteLogsMetric(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/GetLogsMetric.ts b/examples/v2/logs-metrics/GetLogsMetric.ts
deleted file mode 100644
index 20ece725a370..000000000000
--- a/examples/v2/logs-metrics/GetLogsMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a log-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-// there is a valid "logs_metric" in the system
-const LOGS_METRIC_DATA_ID = process.env.LOGS_METRIC_DATA_ID as string;
-
-const params: v2.LogsMetricsApiGetLogsMetricRequest = {
- metricId: LOGS_METRIC_DATA_ID,
-};
-
-apiInstance
- .getLogsMetric(params)
- .then((data: v2.LogsMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/ListLogsMetrics.ts b/examples/v2/logs-metrics/ListLogsMetrics.ts
deleted file mode 100644
index 3b7ee47a24b2..000000000000
--- a/examples/v2/logs-metrics/ListLogsMetrics.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all log-based metrics returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-apiInstance
- .listLogsMetrics()
- .then((data: v2.LogsMetricsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/UpdateLogsMetric.ts b/examples/v2/logs-metrics/UpdateLogsMetric.ts
deleted file mode 100644
index fa2e56306b37..000000000000
--- a/examples/v2/logs-metrics/UpdateLogsMetric.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update a log-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-// there is a valid "logs_metric" in the system
-const LOGS_METRIC_DATA_ID = process.env.LOGS_METRIC_DATA_ID as string;
-
-const params: v2.LogsMetricsApiUpdateLogsMetricRequest = {
- body: {
- data: {
- type: "logs_metrics",
- attributes: {
- filter: {
- query: "service:web* AND @http.status_code:[200 TO 299]-updated",
- },
- },
- },
- },
- metricId: LOGS_METRIC_DATA_ID,
-};
-
-apiInstance
- .updateLogsMetric(params)
- .then((data: v2.LogsMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.ts b/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.ts
deleted file mode 100644
index 376567a527e6..000000000000
--- a/examples/v2/logs-metrics/UpdateLogsMetric_1901534424.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update a log-based metric with include_percentiles field returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsMetricsApi(configuration);
-
-// there is a valid "logs_metric_percentile" in the system
-const LOGS_METRIC_PERCENTILE_DATA_ID = process.env
- .LOGS_METRIC_PERCENTILE_DATA_ID as string;
-
-const params: v2.LogsMetricsApiUpdateLogsMetricRequest = {
- body: {
- data: {
- type: "logs_metrics",
- attributes: {
- compute: {
- includePercentiles: false,
- },
- },
- },
- },
- metricId: LOGS_METRIC_PERCENTILE_DATA_ID,
-};
-
-apiInstance
- .updateLogsMetric(params)
- .then((data: v2.LogsMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/AggregateLogs.ts b/examples/v2/logs/AggregateLogs.ts
deleted file mode 100644
index 2b7ec5e5d5e0..000000000000
--- a/examples/v2/logs/AggregateLogs.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Aggregate events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiAggregateLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- indexes: ["main"],
- query: "*",
- to: "now",
- },
- },
-};
-
-apiInstance
- .aggregateLogs(params)
- .then((data: v2.LogsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/AggregateLogs_2527007002.ts b/examples/v2/logs/AggregateLogs_2527007002.ts
deleted file mode 100644
index 71d9d6236228..000000000000
--- a/examples/v2/logs/AggregateLogs_2527007002.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Aggregate compute events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiAggregateLogsRequest = {
- body: {
- compute: [
- {
- aggregation: "count",
- interval: "5m",
- type: "timeseries",
- },
- ],
- filter: {
- from: "now-15m",
- indexes: ["main"],
- query: "*",
- to: "now",
- },
- },
-};
-
-apiInstance
- .aggregateLogs(params)
- .then((data: v2.LogsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/AggregateLogs_2955613758.ts b/examples/v2/logs/AggregateLogs_2955613758.ts
deleted file mode 100644
index 7cba53ddafe1..000000000000
--- a/examples/v2/logs/AggregateLogs_2955613758.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Aggregate compute events with group by returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiAggregateLogsRequest = {
- body: {
- compute: [
- {
- aggregation: "count",
- interval: "5m",
- type: "timeseries",
- },
- ],
- filter: {
- from: "now-15m",
- indexes: ["main"],
- query: "*",
- to: "now",
- },
- groupBy: [
- {
- facet: "host",
- missing: "miss",
- sort: {
- type: "measure",
- order: "asc",
- aggregation: "pc90",
- metric: "@duration",
- },
- },
- ],
- },
-};
-
-apiInstance
- .aggregateLogs(params)
- .then((data: v2.LogsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/ListLogs.ts b/examples/v2/logs/ListLogs.ts
deleted file mode 100644
index 760e1ed53f97..000000000000
--- a/examples/v2/logs/ListLogs.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Search logs (POST) returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- indexes: ["main", "web"],
- query: "service:web* AND @http.status_code:[200 TO 299]",
- storageTier: "indexes",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- cursor:
- "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .listLogs(params)
- .then((data: v2.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/ListLogsGet.ts b/examples/v2/logs/ListLogsGet.ts
deleted file mode 100644
index 3a0a8aa709b4..000000000000
--- a/examples/v2/logs/ListLogsGet.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Search logs (GET) returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-apiInstance
- .listLogsGet()
- .then((data: v2.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/ListLogsGet_175182691.ts b/examples/v2/logs/ListLogsGet_175182691.ts
deleted file mode 100644
index 7b2dd839938e..000000000000
--- a/examples/v2/logs/ListLogsGet_175182691.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Search logs (GET) returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-(async () => {
- try {
- for await (const item of apiInstance.listLogsGetWithPagination()) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/logs/ListLogsGet_2034110533.ts b/examples/v2/logs/ListLogsGet_2034110533.ts
deleted file mode 100644
index a0d37da5b70f..000000000000
--- a/examples/v2/logs/ListLogsGet_2034110533.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a quick list of logs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsGetRequest = {
- filterQuery: "datadog-agent",
- filterIndexes: ["main"],
- filterFrom: new Date(2020, 9, 17, 11, 48, 36, 0),
- filterTo: new Date(2020, 9, 17, 12, 48, 36, 0),
- pageLimit: 5,
-};
-
-apiInstance
- .listLogsGet(params)
- .then((data: v2.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/ListLogsGet_738202670.ts b/examples/v2/logs/ListLogsGet_738202670.ts
deleted file mode 100644
index 8cb53b04052d..000000000000
--- a/examples/v2/logs/ListLogsGet_738202670.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of logs returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsGetRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listLogsGetWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/logs/ListLogs_3138392594.ts b/examples/v2/logs/ListLogs_3138392594.ts
deleted file mode 100644
index 6b74f6ec615e..000000000000
--- a/examples/v2/logs/ListLogs_3138392594.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Search logs returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- indexes: ["main"],
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listLogsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/logs/ListLogs_3400928236.ts b/examples/v2/logs/ListLogs_3400928236.ts
deleted file mode 100644
index 1116514a2090..000000000000
--- a/examples/v2/logs/ListLogs_3400928236.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Search logs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsRequest = {
- body: {
- filter: {
- query: "datadog-agent",
- indexes: ["main"],
- from: "2020-09-17T11:48:36+01:00",
- to: "2020-09-17T12:48:36+01:00",
- },
- sort: "timestamp",
- page: {
- limit: 5,
- },
- },
-};
-
-apiInstance
- .listLogs(params)
- .then((data: v2.LogsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/ListLogs_534975433.ts b/examples/v2/logs/ListLogs_534975433.ts
deleted file mode 100644
index 36cb33239cc4..000000000000
--- a/examples/v2/logs/ListLogs_534975433.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Search logs (POST) returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiListLogsRequest = {
- body: {
- filter: {
- from: "now-15m",
- indexes: ["main", "web"],
- query: "service:web* AND @http.status_code:[200 TO 299]",
- storageTier: "indexes",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- cursor:
- "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listLogsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/logs/SubmitLog.ts b/examples/v2/logs/SubmitLog.ts
deleted file mode 100644
index 61bf6eca781f..000000000000
--- a/examples/v2/logs/SubmitLog.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Send logs returns "Request accepted for processing (always 202 empty JSON)." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiSubmitLogRequest = {
- body: [
- {
- ddsource: "nginx",
- ddtags: "env:staging,version:5.1",
- hostname: "i-012345678",
- message: "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
- service: "payment",
- additionalProperties: {
- status: "info",
- },
- },
- ],
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/SubmitLog_3496222707.ts b/examples/v2/logs/SubmitLog_3496222707.ts
deleted file mode 100644
index f419d3583e4f..000000000000
--- a/examples/v2/logs/SubmitLog_3496222707.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Send gzip logs returns "Request accepted for processing (always 202 empty JSON)." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiSubmitLogRequest = {
- body: [
- {
- ddsource: "nginx",
- ddtags: "env:staging,version:5.1",
- hostname: "i-012345678",
- message: "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
- service: "payment",
- },
- ],
- contentEncoding: "gzip",
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/logs/SubmitLog_904601870.ts b/examples/v2/logs/SubmitLog_904601870.ts
deleted file mode 100644
index c98978acf3aa..000000000000
--- a/examples/v2/logs/SubmitLog_904601870.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Send deflate logs returns "Request accepted for processing (always 202 empty JSON)." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.LogsApi(configuration);
-
-const params: v2.LogsApiSubmitLogRequest = {
- body: [
- {
- ddsource: "nginx",
- ddtags: "env:staging,version:5.1",
- hostname: "i-012345678",
- message: "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
- service: "payment",
- },
- ],
- contentEncoding: "deflate",
-};
-
-apiInstance
- .submitLog(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.ts b/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.ts
deleted file mode 100644
index fe2af18be2a1..000000000000
--- a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Configure tags for multiple metrics returns "Accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ATTRIBUTES_EMAIL = process.env
- .USER_DATA_ATTRIBUTES_EMAIL as string;
-
-const params: v2.MetricsApiCreateBulkTagsMetricsConfigurationRequest = {
- body: {
- data: {
- attributes: {
- emails: [USER_DATA_ATTRIBUTES_EMAIL],
- tags: ["test", "examplemetric"],
- },
- id: "system.load.1",
- type: "metric_bulk_configure_tags",
- },
- },
-};
-
-apiInstance
- .createBulkTagsMetricsConfiguration(params)
- .then((data: v2.MetricBulkTagConfigResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/CreateTagConfiguration.ts b/examples/v2/metrics/CreateTagConfiguration.ts
deleted file mode 100644
index db70794fd3d2..000000000000
--- a/examples/v2/metrics/CreateTagConfiguration.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a tag configuration returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiCreateTagConfigurationRequest = {
- body: {
- data: {
- type: "manage_tags",
- id: "ExampleMetric",
- attributes: {
- tags: ["app", "datacenter"],
- metricType: "gauge",
- },
- },
- },
- metricName: "ExampleMetric",
-};
-
-apiInstance
- .createTagConfiguration(params)
- .then((data: v2.MetricTagConfigurationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.ts b/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.ts
deleted file mode 100644
index e75804626e9d..000000000000
--- a/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Delete tags for multiple metrics returns "Accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiDeleteBulkTagsMetricsConfigurationRequest = {
- body: {
- data: {
- attributes: {
- emails: ["sue@example.com", "bob@example.com"],
- },
- id: "kafka.lag",
- type: "metric_bulk_configure_tags",
- },
- },
-};
-
-apiInstance
- .deleteBulkTagsMetricsConfiguration(params)
- .then((data: v2.MetricBulkTagConfigResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/DeleteTagConfiguration.ts b/examples/v2/metrics/DeleteTagConfiguration.ts
deleted file mode 100644
index 116daeeb5185..000000000000
--- a/examples/v2/metrics/DeleteTagConfiguration.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a tag configuration returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiDeleteTagConfigurationRequest = {
- metricName: "ExampleMetric",
-};
-
-apiInstance
- .deleteTagConfiguration(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/EstimateMetricsOutputSeries.ts b/examples/v2/metrics/EstimateMetricsOutputSeries.ts
deleted file mode 100644
index cd3feb2ed142..000000000000
--- a/examples/v2/metrics/EstimateMetricsOutputSeries.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Tag Configuration Cardinality Estimator returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiEstimateMetricsOutputSeriesRequest = {
- metricName: "system.cpu.idle",
- filterGroups: "app,host",
- filterNumAggregations: 4,
-};
-
-apiInstance
- .estimateMetricsOutputSeries(params)
- .then((data: v2.MetricEstimateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListActiveMetricConfigurations.ts b/examples/v2/metrics/ListActiveMetricConfigurations.ts
deleted file mode 100644
index e28ef8e6de61..000000000000
--- a/examples/v2/metrics/ListActiveMetricConfigurations.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List active tags and aggregations returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListActiveMetricConfigurationsRequest = {
- metricName: "static_test_metric_donotdelete",
-};
-
-apiInstance
- .listActiveMetricConfigurations(params)
- .then((data: v2.MetricSuggestedTagsAndAggregationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListMetricAssets.ts b/examples/v2/metrics/ListMetricAssets.ts
deleted file mode 100644
index a35de4bb772a..000000000000
--- a/examples/v2/metrics/ListMetricAssets.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Related Assets to a Metric returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListMetricAssetsRequest = {
- metricName: "system.cpu.user",
-};
-
-apiInstance
- .listMetricAssets(params)
- .then((data: v2.MetricAssetsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListTagConfigurationByName.ts b/examples/v2/metrics/ListTagConfigurationByName.ts
deleted file mode 100644
index 50f848926c6c..000000000000
--- a/examples/v2/metrics/ListTagConfigurationByName.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List tag configuration by name returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-// there is a valid "metric_tag_configuration" in the system
-const METRIC_TAG_CONFIGURATION_DATA_ID = process.env
- .METRIC_TAG_CONFIGURATION_DATA_ID as string;
-
-const params: v2.MetricsApiListTagConfigurationByNameRequest = {
- metricName: METRIC_TAG_CONFIGURATION_DATA_ID,
-};
-
-apiInstance
- .listTagConfigurationByName(params)
- .then((data: v2.MetricTagConfigurationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListTagConfigurations.ts b/examples/v2/metrics/ListTagConfigurations.ts
deleted file mode 100644
index 3af2dbb1843a..000000000000
--- a/examples/v2/metrics/ListTagConfigurations.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of metrics returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-apiInstance
- .listTagConfigurations()
- .then((data: v2.MetricsAndMetricTagConfigurationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListTagConfigurations_265033704.ts b/examples/v2/metrics/ListTagConfigurations_265033704.ts
deleted file mode 100644
index e92685d67f68..000000000000
--- a/examples/v2/metrics/ListTagConfigurations_265033704.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a list of metrics with a tag filter returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListTagConfigurationsRequest = {
- filterTags: "ExampleMetric",
-};
-
-apiInstance
- .listTagConfigurations(params)
- .then((data: v2.MetricsAndMetricTagConfigurationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListTagConfigurations_2739018321.ts b/examples/v2/metrics/ListTagConfigurations_2739018321.ts
deleted file mode 100644
index 5cc78d1a6249..000000000000
--- a/examples/v2/metrics/ListTagConfigurations_2739018321.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a list of metrics with configured filter returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListTagConfigurationsRequest = {
- filterConfigured: true,
-};
-
-apiInstance
- .listTagConfigurations(params)
- .then((data: v2.MetricsAndMetricTagConfigurationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListTagConfigurations_3969783727.ts b/examples/v2/metrics/ListTagConfigurations_3969783727.ts
deleted file mode 100644
index 1578681abcd5..000000000000
--- a/examples/v2/metrics/ListTagConfigurations_3969783727.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a list of metrics returns "Success" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListTagConfigurationsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listTagConfigurationsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/metrics/ListTagsByMetricName.ts b/examples/v2/metrics/ListTagsByMetricName.ts
deleted file mode 100644
index 831529fb5273..000000000000
--- a/examples/v2/metrics/ListTagsByMetricName.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List tags by metric name returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-// there is a valid "metric_tag_configuration" in the system
-const METRIC_TAG_CONFIGURATION_DATA_ID = process.env
- .METRIC_TAG_CONFIGURATION_DATA_ID as string;
-
-const params: v2.MetricsApiListTagsByMetricNameRequest = {
- metricName: METRIC_TAG_CONFIGURATION_DATA_ID,
-};
-
-apiInstance
- .listTagsByMetricName(params)
- .then((data: v2.MetricAllTagsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/ListVolumesByMetricName.ts b/examples/v2/metrics/ListVolumesByMetricName.ts
deleted file mode 100644
index 3cc00491725a..000000000000
--- a/examples/v2/metrics/ListVolumesByMetricName.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List distinct metric volumes by metric name returns "Success" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiListVolumesByMetricNameRequest = {
- metricName: "static_test_metric_donotdelete",
-};
-
-apiInstance
- .listVolumesByMetricName(params)
- .then((data: v2.MetricVolumesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/QueryScalarData.ts b/examples/v2/metrics/QueryScalarData.ts
deleted file mode 100644
index 7895b507bcb5..000000000000
--- a/examples/v2/metrics/QueryScalarData.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Query scalar data across multiple products returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiQueryScalarDataRequest = {
- body: {
- data: {
- attributes: {
- formulas: [
- {
- formula: "a+b",
- limit: {
- count: 10,
- order: "desc",
- },
- },
- ],
- from: 1568899800000,
- queries: [
- {
- aggregator: "avg",
- dataSource: "metrics",
- query: "avg:system.cpu.user{*} by {env}",
- },
- ],
- to: 1568923200000,
- },
- type: "scalar_request",
- },
- },
-};
-
-apiInstance
- .queryScalarData(params)
- .then((data: v2.ScalarFormulaQueryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/QueryScalarData_3112571352.ts b/examples/v2/metrics/QueryScalarData_3112571352.ts
deleted file mode 100644
index 4732b9630a3a..000000000000
--- a/examples/v2/metrics/QueryScalarData_3112571352.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Scalar cross product query returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiQueryScalarDataRequest = {
- body: {
- data: {
- attributes: {
- formulas: [
- {
- formula: "a",
- limit: {
- count: 10,
- order: "desc",
- },
- },
- ],
- from: 1636625471000,
- queries: [
- {
- aggregator: "avg",
- dataSource: "metrics",
- query: "avg:system.cpu.user{*}",
- name: "a",
- },
- ],
- to: 1636629071000,
- },
- type: "scalar_request",
- },
- },
-};
-
-apiInstance
- .queryScalarData(params)
- .then((data: v2.ScalarFormulaQueryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/QueryTimeseriesData.ts b/examples/v2/metrics/QueryTimeseriesData.ts
deleted file mode 100644
index ab8d47152862..000000000000
--- a/examples/v2/metrics/QueryTimeseriesData.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Query timeseries data across multiple products returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiQueryTimeseriesDataRequest = {
- body: {
- data: {
- attributes: {
- formulas: [
- {
- formula: "a+b",
- limit: {
- count: 10,
- order: "desc",
- },
- },
- ],
- from: 1568899800000,
- interval: 5000,
- queries: [
- {
- dataSource: "metrics",
- query: "avg:system.cpu.user{*} by {env}",
- },
- ],
- to: 1568923200000,
- },
- type: "timeseries_request",
- },
- },
-};
-
-apiInstance
- .queryTimeseriesData(params)
- .then((data: v2.TimeseriesFormulaQueryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/QueryTimeseriesData_301142940.ts b/examples/v2/metrics/QueryTimeseriesData_301142940.ts
deleted file mode 100644
index 7e23c0bb5eb1..000000000000
--- a/examples/v2/metrics/QueryTimeseriesData_301142940.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Timeseries cross product query returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiQueryTimeseriesDataRequest = {
- body: {
- data: {
- attributes: {
- formulas: [
- {
- formula: "a",
- limit: {
- count: 10,
- order: "desc",
- },
- },
- ],
- from: 1636625471000,
- interval: 5000,
- queries: [
- {
- dataSource: "metrics",
- query: "avg:datadog.estimated_usage.metrics.custom{*}",
- name: "a",
- },
- ],
- to: 1636629071000,
- },
- type: "timeseries_request",
- },
- },
-};
-
-apiInstance
- .queryTimeseriesData(params)
- .then((data: v2.TimeseriesFormulaQueryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/SubmitMetrics.ts b/examples/v2/metrics/SubmitMetrics.ts
deleted file mode 100644
index f56312174559..000000000000
--- a/examples/v2/metrics/SubmitMetrics.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Submit metrics returns "Payload accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiSubmitMetricsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1",
- type: 0,
- points: [
- {
- timestamp: Math.round(new Date().getTime() / 1000),
- value: 0.7,
- },
- ],
- resources: [
- {
- name: "dummyhost",
- type: "host",
- },
- ],
- },
- ],
- },
-};
-
-apiInstance
- .submitMetrics(params)
- .then((data: v2.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/SubmitMetrics_1762007427.ts b/examples/v2/metrics/SubmitMetrics_1762007427.ts
deleted file mode 100644
index 2f91e217f0dd..000000000000
--- a/examples/v2/metrics/SubmitMetrics_1762007427.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Submit metrics with compression returns "Payload accepted" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-const params: v2.MetricsApiSubmitMetricsRequest = {
- body: {
- series: [
- {
- metric: "system.load.1",
- type: 0,
- points: [
- {
- timestamp: Math.round(new Date().getTime() / 1000),
- value: 0.7,
- },
- ],
- },
- ],
- },
- contentEncoding: "zstd1",
-};
-
-apiInstance
- .submitMetrics(params)
- .then((data: v2.IntakePayloadAccepted) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/metrics/UpdateTagConfiguration.ts b/examples/v2/metrics/UpdateTagConfiguration.ts
deleted file mode 100644
index fcbb20c88afb..000000000000
--- a/examples/v2/metrics/UpdateTagConfiguration.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update a tag configuration returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MetricsApi(configuration);
-
-// there is a valid "metric_tag_configuration" in the system
-const METRIC_TAG_CONFIGURATION_DATA_ID = process.env
- .METRIC_TAG_CONFIGURATION_DATA_ID as string;
-
-const params: v2.MetricsApiUpdateTagConfigurationRequest = {
- body: {
- data: {
- type: "manage_tags",
- id: METRIC_TAG_CONFIGURATION_DATA_ID,
- attributes: {
- tags: ["app"],
- },
- },
- },
- metricName: METRIC_TAG_CONFIGURATION_DATA_ID,
-};
-
-apiInstance
- .updateTagConfiguration(params)
- .then((data: v2.MetricTagConfigurationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.ts b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.ts
deleted file mode 100644
index a6ee973e1e84..000000000000
--- a/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create tenant-based handle returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiCreateTenantBasedHandleRequest = {
- body: {
- data: {
- attributes: {
- channelId: "fake-channel-id",
- name: "fake-handle-name",
- teamId: "00000000-0000-0000-0000-000000000000",
- tenantId: "00000000-0000-0000-0000-000000000001",
- },
- type: "tenant-based-handle",
- },
- },
-};
-
-apiInstance
- .createTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.ts b/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.ts
deleted file mode 100644
index aea329d6c699..000000000000
--- a/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create api handle returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiCreateTenantBasedHandleRequest = {
- body: {
- data: {
- attributes: {
- channelId:
- "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
- name: "Example-Microsoft-Teams-Integration",
- teamId: "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
- tenantId: "4d3bac44-0230-4732-9e70-cc00736f0a97",
- },
- type: "tenant-based-handle",
- },
- },
-};
-
-apiInstance
- .createTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle.ts b/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle.ts
deleted file mode 100644
index dc2612d72c63..000000000000
--- a/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Create Workflows webhook handle returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiCreateWorkflowsWebhookHandleRequest =
- {
- body: {
- data: {
- attributes: {
- name: "fake-handle-name",
- url: "https://fake.url.com",
- },
- type: "workflows-webhook-handle",
- },
- },
- };
-
-apiInstance
- .createWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.ts b/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.ts
deleted file mode 100644
index 1c737d1cbe40..000000000000
--- a/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Create workflow webhook handle returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiCreateWorkflowsWebhookHandleRequest =
- {
- body: {
- data: {
- attributes: {
- name: "Example-Microsoft-Teams-Integration",
- url: "https://fake.url.com",
- },
- type: "workflows-webhook-handle",
- },
- },
- };
-
-apiInstance
- .createWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.ts b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.ts
deleted file mode 100644
index 47c1617e334d..000000000000
--- a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete tenant-based handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiDeleteTenantBasedHandleRequest = {
- handleId: "handle_id",
-};
-
-apiInstance
- .deleteTenantBasedHandle(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.ts b/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.ts
deleted file mode 100644
index e3432db31e58..000000000000
--- a/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete api handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "tenant_based_handle" in the system
-const TENANT_BASED_HANDLE_DATA_ID = process.env
- .TENANT_BASED_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiDeleteTenantBasedHandleRequest = {
- handleId: TENANT_BASED_HANDLE_DATA_ID,
-};
-
-apiInstance
- .deleteTenantBasedHandle(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle.ts b/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle.ts
deleted file mode 100644
index 13324924866d..000000000000
--- a/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete Workflows webhook handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiDeleteWorkflowsWebhookHandleRequest =
- {
- handleId: "handle_id",
- };
-
-apiInstance
- .deleteWorkflowsWebhookHandle(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle_107549514.ts b/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle_107549514.ts
deleted file mode 100644
index 3503061ec9ff..000000000000
--- a/examples/v2/microsoft-teams-integration/DeleteWorkflowsWebhookHandle_107549514.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Delete workflow webhook handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "workflows_webhook_handle" in the system
-const WORKFLOWS_WEBHOOK_HANDLE_DATA_ID = process.env
- .WORKFLOWS_WEBHOOK_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiDeleteWorkflowsWebhookHandleRequest =
- {
- handleId: WORKFLOWS_WEBHOOK_HANDLE_DATA_ID,
- };
-
-apiInstance
- .deleteWorkflowsWebhookHandle(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/GetChannelByName.ts b/examples/v2/microsoft-teams-integration/GetChannelByName.ts
deleted file mode 100644
index 2905e7e562f0..000000000000
--- a/examples/v2/microsoft-teams-integration/GetChannelByName.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get channel information by name returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiGetChannelByNameRequest = {
- tenantName: "tenant_name",
- teamName: "team_name",
- channelName: "channel_name",
-};
-
-apiInstance
- .getChannelByName(params)
- .then((data: v2.MicrosoftTeamsGetChannelByNameResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.ts b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.ts
deleted file mode 100644
index e2d59affb32c..000000000000
--- a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get tenant-based handle information returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiGetTenantBasedHandleRequest = {
- handleId: "handle_id",
-};
-
-apiInstance
- .getTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.ts b/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.ts
deleted file mode 100644
index b9ffc94ab349..000000000000
--- a/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get api handle information returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "tenant_based_handle" in the system
-const TENANT_BASED_HANDLE_DATA_ID = process.env
- .TENANT_BASED_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiGetTenantBasedHandleRequest = {
- handleId: TENANT_BASED_HANDLE_DATA_ID,
-};
-
-apiInstance
- .getTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle.ts b/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle.ts
deleted file mode 100644
index a1d012a828da..000000000000
--- a/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get Workflows webhook handle information returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiGetWorkflowsWebhookHandleRequest =
- {
- handleId: "handle_id",
- };
-
-apiInstance
- .getWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle_3421443805.ts b/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle_3421443805.ts
deleted file mode 100644
index 32a2b1dc26c5..000000000000
--- a/examples/v2/microsoft-teams-integration/GetWorkflowsWebhookHandle_3421443805.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get workflow webhook handle information returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "workflows_webhook_handle" in the system
-const WORKFLOWS_WEBHOOK_HANDLE_DATA_ID = process.env
- .WORKFLOWS_WEBHOOK_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiGetWorkflowsWebhookHandleRequest =
- {
- handleId: WORKFLOWS_WEBHOOK_HANDLE_DATA_ID,
- };
-
-apiInstance
- .getWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.ts b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.ts
deleted file mode 100644
index 103befb17cd5..000000000000
--- a/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all tenant-based handles returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-apiInstance
- .listTenantBasedHandles()
- .then((data: v2.MicrosoftTeamsTenantBasedHandlesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.ts b/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.ts
deleted file mode 100644
index 21dabb883e8c..000000000000
--- a/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all api handles returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-apiInstance
- .listTenantBasedHandles()
- .then((data: v2.MicrosoftTeamsTenantBasedHandlesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles.ts b/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles.ts
deleted file mode 100644
index 14e5fc6ecdbe..000000000000
--- a/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all Workflows webhook handles returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-apiInstance
- .listWorkflowsWebhookHandles()
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandlesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles_620762083.ts b/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles_620762083.ts
deleted file mode 100644
index 21b36f001767..000000000000
--- a/examples/v2/microsoft-teams-integration/ListWorkflowsWebhookHandles_620762083.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all workflow webhook handles returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-apiInstance
- .listWorkflowsWebhookHandles()
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandlesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.ts b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.ts
deleted file mode 100644
index fecd976df803..000000000000
--- a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Update tenant-based handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiUpdateTenantBasedHandleRequest = {
- body: {
- data: {
- attributes: {
- channelId: "fake-channel-id",
- name: "fake-handle-name",
- teamId: "00000000-0000-0000-0000-000000000000",
- tenantId: "00000000-0000-0000-0000-000000000001",
- },
- type: "tenant-based-handle",
- },
- },
- handleId: "handle_id",
-};
-
-apiInstance
- .updateTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.ts b/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.ts
deleted file mode 100644
index cf99b2b9706a..000000000000
--- a/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update api handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "tenant_based_handle" in the system
-const TENANT_BASED_HANDLE_DATA_ID = process.env
- .TENANT_BASED_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiUpdateTenantBasedHandleRequest = {
- body: {
- data: {
- attributes: {
- name: "fake-handle-name--updated",
- },
- type: "tenant-based-handle",
- },
- },
- handleId: TENANT_BASED_HANDLE_DATA_ID,
-};
-
-apiInstance
- .updateTenantBasedHandle(params)
- .then((data: v2.MicrosoftTeamsTenantBasedHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle.ts b/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle.ts
deleted file mode 100644
index f7fababb4f8e..000000000000
--- a/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Update Workflows webhook handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-const params: v2.MicrosoftTeamsIntegrationApiUpdateWorkflowsWebhookHandleRequest =
- {
- body: {
- data: {
- attributes: {
- name: "fake-handle-name",
- url: "https://fake.url.com",
- },
- type: "workflows-webhook-handle",
- },
- },
- handleId: "handle_id",
- };
-
-apiInstance
- .updateWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle_163189594.ts b/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle_163189594.ts
deleted file mode 100644
index 0e57eaa2d0a2..000000000000
--- a/examples/v2/microsoft-teams-integration/UpdateWorkflowsWebhookHandle_163189594.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update workflow webhook handle returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration);
-
-// there is a valid "workflows_webhook_handle" in the system
-const WORKFLOWS_WEBHOOK_HANDLE_DATA_ID = process.env
- .WORKFLOWS_WEBHOOK_HANDLE_DATA_ID as string;
-
-const params: v2.MicrosoftTeamsIntegrationApiUpdateWorkflowsWebhookHandleRequest =
- {
- body: {
- data: {
- attributes: {
- name: "fake-handle-name--updated",
- },
- type: "workflows-webhook-handle",
- },
- },
- handleId: WORKFLOWS_WEBHOOK_HANDLE_DATA_ID,
- };
-
-apiInstance
- .updateWorkflowsWebhookHandle(params)
- .then((data: v2.MicrosoftTeamsWorkflowsWebhookHandleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/monitors/CreateMonitorConfigPolicy.ts b/examples/v2/monitors/CreateMonitorConfigPolicy.ts
deleted file mode 100644
index 585471409f5f..000000000000
--- a/examples/v2/monitors/CreateMonitorConfigPolicy.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a monitor configuration policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MonitorsApi(configuration);
-
-const params: v2.MonitorsApiCreateMonitorConfigPolicyRequest = {
- body: {
- data: {
- attributes: {
- policyType: "tag",
- policy: {
- tagKey: "examplemonitor",
- tagKeyRequired: false,
- validTagValues: ["prod", "staging"],
- },
- },
- type: "monitor-config-policy",
- },
- },
-};
-
-apiInstance
- .createMonitorConfigPolicy(params)
- .then((data: v2.MonitorConfigPolicyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/monitors/DeleteMonitorConfigPolicy.ts b/examples/v2/monitors/DeleteMonitorConfigPolicy.ts
deleted file mode 100644
index afa110aee0eb..000000000000
--- a/examples/v2/monitors/DeleteMonitorConfigPolicy.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a monitor configuration policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MonitorsApi(configuration);
-
-// there is a valid "monitor_configuration_policy" in the system
-const MONITOR_CONFIGURATION_POLICY_DATA_ID = process.env
- .MONITOR_CONFIGURATION_POLICY_DATA_ID as string;
-
-const params: v2.MonitorsApiDeleteMonitorConfigPolicyRequest = {
- policyId: MONITOR_CONFIGURATION_POLICY_DATA_ID,
-};
-
-apiInstance
- .deleteMonitorConfigPolicy(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/monitors/GetMonitorConfigPolicy.ts b/examples/v2/monitors/GetMonitorConfigPolicy.ts
deleted file mode 100644
index b83866d1225b..000000000000
--- a/examples/v2/monitors/GetMonitorConfigPolicy.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a monitor configuration policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MonitorsApi(configuration);
-
-// there is a valid "monitor_configuration_policy" in the system
-const MONITOR_CONFIGURATION_POLICY_DATA_ID = process.env
- .MONITOR_CONFIGURATION_POLICY_DATA_ID as string;
-
-const params: v2.MonitorsApiGetMonitorConfigPolicyRequest = {
- policyId: MONITOR_CONFIGURATION_POLICY_DATA_ID,
-};
-
-apiInstance
- .getMonitorConfigPolicy(params)
- .then((data: v2.MonitorConfigPolicyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/monitors/ListMonitorConfigPolicies.ts b/examples/v2/monitors/ListMonitorConfigPolicies.ts
deleted file mode 100644
index 16bc52bd4464..000000000000
--- a/examples/v2/monitors/ListMonitorConfigPolicies.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all monitor configuration policies returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MonitorsApi(configuration);
-
-apiInstance
- .listMonitorConfigPolicies()
- .then((data: v2.MonitorConfigPolicyListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/monitors/UpdateMonitorConfigPolicy.ts b/examples/v2/monitors/UpdateMonitorConfigPolicy.ts
deleted file mode 100644
index b52b95e34bcf..000000000000
--- a/examples/v2/monitors/UpdateMonitorConfigPolicy.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Edit a monitor configuration policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.MonitorsApi(configuration);
-
-// there is a valid "monitor_configuration_policy" in the system
-const MONITOR_CONFIGURATION_POLICY_DATA_ID = process.env
- .MONITOR_CONFIGURATION_POLICY_DATA_ID as string;
-
-const params: v2.MonitorsApiUpdateMonitorConfigPolicyRequest = {
- body: {
- data: {
- attributes: {
- policy: {
- tagKey: "examplemonitor",
- tagKeyRequired: false,
- validTagValues: ["prod", "staging"],
- },
- policyType: "tag",
- },
- id: MONITOR_CONFIGURATION_POLICY_DATA_ID,
- type: "monitor-config-policy",
- },
- },
- policyId: MONITOR_CONFIGURATION_POLICY_DATA_ID,
-};
-
-apiInstance
- .updateMonitorConfigPolicy(params)
- .then((data: v2.MonitorConfigPolicyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/network-device-monitoring/GetDevice.ts b/examples/v2/network-device-monitoring/GetDevice.ts
deleted file mode 100644
index abe9ed451f70..000000000000
--- a/examples/v2/network-device-monitoring/GetDevice.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get the device details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
-
-const params: v2.NetworkDeviceMonitoringApiGetDeviceRequest = {
- deviceId: "default_device",
-};
-
-apiInstance
- .getDevice(params)
- .then((data: v2.GetDeviceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/network-device-monitoring/GetInterfaces.ts b/examples/v2/network-device-monitoring/GetInterfaces.ts
deleted file mode 100644
index 5a16791861a8..000000000000
--- a/examples/v2/network-device-monitoring/GetInterfaces.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get the list of interfaces of the device returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
-
-const params: v2.NetworkDeviceMonitoringApiGetInterfacesRequest = {
- deviceId: "default:1.2.3.4",
-};
-
-apiInstance
- .getInterfaces(params)
- .then((data: v2.GetInterfacesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/network-device-monitoring/ListDeviceUserTags.ts b/examples/v2/network-device-monitoring/ListDeviceUserTags.ts
deleted file mode 100644
index 5d4f01ca8065..000000000000
--- a/examples/v2/network-device-monitoring/ListDeviceUserTags.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get the list of tags for a device returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
-
-const params: v2.NetworkDeviceMonitoringApiListDeviceUserTagsRequest = {
- deviceId: "default_device",
-};
-
-apiInstance
- .listDeviceUserTags(params)
- .then((data: v2.ListTagsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/network-device-monitoring/ListDevices.ts b/examples/v2/network-device-monitoring/ListDevices.ts
deleted file mode 100644
index 8dba3755f4f8..000000000000
--- a/examples/v2/network-device-monitoring/ListDevices.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get the list of devices returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
-
-const params: v2.NetworkDeviceMonitoringApiListDevicesRequest = {
- pageNumber: 0,
- pageSize: 1,
- filterTag: "device_namespace:default",
-};
-
-apiInstance
- .listDevices(params)
- .then((data: v2.ListDevicesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/network-device-monitoring/UpdateDeviceUserTags.ts b/examples/v2/network-device-monitoring/UpdateDeviceUserTags.ts
deleted file mode 100644
index 8b92aa2c42e5..000000000000
--- a/examples/v2/network-device-monitoring/UpdateDeviceUserTags.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Update the tags for a device returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
-
-const params: v2.NetworkDeviceMonitoringApiUpdateDeviceUserTagsRequest = {
- body: {
- data: {
- attributes: {
- tags: ["tag:test", "tag:testbis"],
- },
- id: "default_device",
- type: "tags",
- },
- },
- deviceId: "default_device",
-};
-
-apiInstance
- .updateDeviceUserTags(params)
- .then((data: v2.ListTagsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/okta-integration/CreateOktaAccount.ts b/examples/v2/okta-integration/CreateOktaAccount.ts
deleted file mode 100644
index 34e9564d2c3c..000000000000
--- a/examples/v2/okta-integration/CreateOktaAccount.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Add Okta account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OktaIntegrationApi(configuration);
-
-const params: v2.OktaIntegrationApiCreateOktaAccountRequest = {
- body: {
- data: {
- attributes: {
- authMethod: "oauth",
- domain: "https://example.okta.com/",
- name: "exampleoktaintegration",
- clientId: "client_id",
- clientSecret: "client_secret",
- },
- id: "f749daaf-682e-4208-a38d-c9b43162c609",
- type: "okta-accounts",
- },
- },
-};
-
-apiInstance
- .createOktaAccount(params)
- .then((data: v2.OktaAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/okta-integration/DeleteOktaAccount.ts b/examples/v2/okta-integration/DeleteOktaAccount.ts
deleted file mode 100644
index 6598e0049fb3..000000000000
--- a/examples/v2/okta-integration/DeleteOktaAccount.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete Okta account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OktaIntegrationApi(configuration);
-
-const params: v2.OktaIntegrationApiDeleteOktaAccountRequest = {
- accountId: "account_id",
-};
-
-apiInstance
- .deleteOktaAccount(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/okta-integration/GetOktaAccount.ts b/examples/v2/okta-integration/GetOktaAccount.ts
deleted file mode 100644
index b1327cb64472..000000000000
--- a/examples/v2/okta-integration/GetOktaAccount.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get Okta account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OktaIntegrationApi(configuration);
-
-// there is a valid "okta_account" in the system
-const OKTA_ACCOUNT_DATA_ID = process.env.OKTA_ACCOUNT_DATA_ID as string;
-
-const params: v2.OktaIntegrationApiGetOktaAccountRequest = {
- accountId: OKTA_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .getOktaAccount(params)
- .then((data: v2.OktaAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/okta-integration/ListOktaAccounts.ts b/examples/v2/okta-integration/ListOktaAccounts.ts
deleted file mode 100644
index 6c1360374aaa..000000000000
--- a/examples/v2/okta-integration/ListOktaAccounts.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Okta accounts returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OktaIntegrationApi(configuration);
-
-apiInstance
- .listOktaAccounts()
- .then((data: v2.OktaAccountsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/okta-integration/UpdateOktaAccount.ts b/examples/v2/okta-integration/UpdateOktaAccount.ts
deleted file mode 100644
index 27fde49c9d20..000000000000
--- a/examples/v2/okta-integration/UpdateOktaAccount.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update Okta account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OktaIntegrationApi(configuration);
-
-// there is a valid "okta_account" in the system
-const OKTA_ACCOUNT_DATA_ID = process.env.OKTA_ACCOUNT_DATA_ID as string;
-
-const params: v2.OktaIntegrationApiUpdateOktaAccountRequest = {
- body: {
- data: {
- attributes: {
- authMethod: "oauth",
- domain: "https://example.okta.com/",
- clientId: "client_id",
- clientSecret: "client_secret",
- },
- type: "okta-accounts",
- },
- },
- accountId: OKTA_ACCOUNT_DATA_ID,
-};
-
-apiInstance
- .updateOktaAccount(params)
- .then((data: v2.OktaAccountResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/opsgenie-integration/CreateOpsgenieService.ts b/examples/v2/opsgenie-integration/CreateOpsgenieService.ts
deleted file mode 100644
index 276bd601ebcb..000000000000
--- a/examples/v2/opsgenie-integration/CreateOpsgenieService.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Create a new service object returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OpsgenieIntegrationApi(configuration);
-
-const params: v2.OpsgenieIntegrationApiCreateOpsgenieServiceRequest = {
- body: {
- data: {
- attributes: {
- name: "Example-Opsgenie-Integration",
- opsgenieApiKey: "00000000-0000-0000-0000-000000000000",
- region: "us",
- },
- type: "opsgenie-service",
- },
- },
-};
-
-apiInstance
- .createOpsgenieService(params)
- .then((data: v2.OpsgenieServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/opsgenie-integration/DeleteOpsgenieService.ts b/examples/v2/opsgenie-integration/DeleteOpsgenieService.ts
deleted file mode 100644
index 766e5522e82e..000000000000
--- a/examples/v2/opsgenie-integration/DeleteOpsgenieService.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a single service object returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OpsgenieIntegrationApi(configuration);
-
-// there is a valid "opsgenie_service" in the system
-const OPSGENIE_SERVICE_DATA_ID = process.env.OPSGENIE_SERVICE_DATA_ID as string;
-
-const params: v2.OpsgenieIntegrationApiDeleteOpsgenieServiceRequest = {
- integrationServiceId: OPSGENIE_SERVICE_DATA_ID,
-};
-
-apiInstance
- .deleteOpsgenieService(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/opsgenie-integration/GetOpsgenieService.ts b/examples/v2/opsgenie-integration/GetOpsgenieService.ts
deleted file mode 100644
index edfeacc4c970..000000000000
--- a/examples/v2/opsgenie-integration/GetOpsgenieService.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a single service object returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OpsgenieIntegrationApi(configuration);
-
-// there is a valid "opsgenie_service" in the system
-const OPSGENIE_SERVICE_DATA_ID = process.env.OPSGENIE_SERVICE_DATA_ID as string;
-
-const params: v2.OpsgenieIntegrationApiGetOpsgenieServiceRequest = {
- integrationServiceId: OPSGENIE_SERVICE_DATA_ID,
-};
-
-apiInstance
- .getOpsgenieService(params)
- .then((data: v2.OpsgenieServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/opsgenie-integration/ListOpsgenieServices.ts b/examples/v2/opsgenie-integration/ListOpsgenieServices.ts
deleted file mode 100644
index 8b0df42e99bb..000000000000
--- a/examples/v2/opsgenie-integration/ListOpsgenieServices.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all service objects returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OpsgenieIntegrationApi(configuration);
-
-apiInstance
- .listOpsgenieServices()
- .then((data: v2.OpsgenieServicesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/opsgenie-integration/UpdateOpsgenieService.ts b/examples/v2/opsgenie-integration/UpdateOpsgenieService.ts
deleted file mode 100644
index 9e622323f6d1..000000000000
--- a/examples/v2/opsgenie-integration/UpdateOpsgenieService.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update a single service object returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OpsgenieIntegrationApi(configuration);
-
-// there is a valid "opsgenie_service" in the system
-const OPSGENIE_SERVICE_DATA_ID = process.env.OPSGENIE_SERVICE_DATA_ID as string;
-
-const params: v2.OpsgenieIntegrationApiUpdateOpsgenieServiceRequest = {
- body: {
- data: {
- attributes: {
- name: "fake-opsgenie-service-name--updated",
- opsgenieApiKey: "00000000-0000-0000-0000-000000000000",
- region: "eu",
- },
- id: OPSGENIE_SERVICE_DATA_ID,
- type: "opsgenie-service",
- },
- },
- integrationServiceId: OPSGENIE_SERVICE_DATA_ID,
-};
-
-apiInstance
- .updateOpsgenieService(params)
- .then((data: v2.OpsgenieServiceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/organizations/GetOrgConfig.ts b/examples/v2/organizations/GetOrgConfig.ts
deleted file mode 100644
index 89f508790506..000000000000
--- a/examples/v2/organizations/GetOrgConfig.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a specific Org Config value returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OrganizationsApi(configuration);
-
-const params: v2.OrganizationsApiGetOrgConfigRequest = {
- orgConfigName: "custom_roles",
-};
-
-apiInstance
- .getOrgConfig(params)
- .then((data: v2.OrgConfigGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/organizations/ListOrgConfigs.ts b/examples/v2/organizations/ListOrgConfigs.ts
deleted file mode 100644
index 4cd9dd65b504..000000000000
--- a/examples/v2/organizations/ListOrgConfigs.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Org Configs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OrganizationsApi(configuration);
-
-apiInstance
- .listOrgConfigs()
- .then((data: v2.OrgConfigListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/organizations/UpdateOrgConfig.ts b/examples/v2/organizations/UpdateOrgConfig.ts
deleted file mode 100644
index 3bb81f6d412a..000000000000
--- a/examples/v2/organizations/UpdateOrgConfig.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Update a specific Org Config returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OrganizationsApi(configuration);
-
-const params: v2.OrganizationsApiUpdateOrgConfigRequest = {
- body: {
- data: {
- attributes: {
- value: "UTC",
- },
- type: "org_configs",
- },
- },
- orgConfigName: "monitor_timezone",
-};
-
-apiInstance
- .updateOrgConfig(params)
- .then((data: v2.OrgConfigGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/organizations/UploadIdPMetadata.ts b/examples/v2/organizations/UploadIdPMetadata.ts
deleted file mode 100644
index 2beaa54c3165..000000000000
--- a/examples/v2/organizations/UploadIdPMetadata.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Upload IdP metadata returns "OK" response
- */
-
-import * as fs from "fs";
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.OrganizationsApi(configuration);
-
-const params: v2.OrganizationsApiUploadIdPMetadataRequest = {
- idpFile: {
- data: Buffer.from(
- fs.readFileSync(
- "fixtures/organizations/saml_configurations/valid_idp_metadata.xml",
- "utf8"
- )
- ),
- name: "fixtures/organizations/saml_configurations/valid_idp_metadata.xml",
- },
-};
-
-apiInstance
- .uploadIdPMetadata(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/powerpack/CreatePowerpack.ts b/examples/v2/powerpack/CreatePowerpack.ts
deleted file mode 100644
index 8bad53bb2896..000000000000
--- a/examples/v2/powerpack/CreatePowerpack.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a new powerpack returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-const params: v2.PowerpackApiCreatePowerpackRequest = {
- body: {
- data: {
- attributes: {
- description: "Sample powerpack",
- groupWidget: {
- definition: {
- layoutType: "ordered",
- showTitle: true,
- title: "Sample Powerpack",
- type: "group",
- widgets: [
- {
- definition: {
- content: "test",
- type: "note",
- },
- },
- ],
- },
- layout: {
- height: 3,
- width: 12,
- x: 0,
- y: 0,
- },
- liveSpan: "1h",
- },
- name: "Example-Powerpack",
- tags: ["tag:sample"],
- templateVariables: [
- {
- defaults: ["*"],
- name: "sample",
- },
- ],
- },
- type: "powerpack",
- },
- },
-};
-
-apiInstance
- .createPowerpack(params)
- .then((data: v2.PowerpackResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/powerpack/DeletePowerpack.ts b/examples/v2/powerpack/DeletePowerpack.ts
deleted file mode 100644
index 6acdc2129fdb..000000000000
--- a/examples/v2/powerpack/DeletePowerpack.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a powerpack returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-// there is a valid "powerpack" in the system
-const POWERPACK_DATA_ID = process.env.POWERPACK_DATA_ID as string;
-
-const params: v2.PowerpackApiDeletePowerpackRequest = {
- powerpackId: POWERPACK_DATA_ID,
-};
-
-apiInstance
- .deletePowerpack(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/powerpack/GetPowerpack.ts b/examples/v2/powerpack/GetPowerpack.ts
deleted file mode 100644
index 9e58c1d6a9e9..000000000000
--- a/examples/v2/powerpack/GetPowerpack.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a Powerpack returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-// there is a valid "powerpack" in the system
-const POWERPACK_DATA_ID = process.env.POWERPACK_DATA_ID as string;
-
-const params: v2.PowerpackApiGetPowerpackRequest = {
- powerpackId: POWERPACK_DATA_ID,
-};
-
-apiInstance
- .getPowerpack(params)
- .then((data: v2.PowerpackResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/powerpack/ListPowerpacks.ts b/examples/v2/powerpack/ListPowerpacks.ts
deleted file mode 100644
index 1be1b86a0bb3..000000000000
--- a/examples/v2/powerpack/ListPowerpacks.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all powerpacks returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-const params: v2.PowerpackApiListPowerpacksRequest = {
- pageLimit: 1000,
-};
-
-apiInstance
- .listPowerpacks(params)
- .then((data: v2.ListPowerpacksResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/powerpack/ListPowerpacks_1173755071.ts b/examples/v2/powerpack/ListPowerpacks_1173755071.ts
deleted file mode 100644
index c43ba91873cc..000000000000
--- a/examples/v2/powerpack/ListPowerpacks_1173755071.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all powerpacks returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-const params: v2.PowerpackApiListPowerpacksRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listPowerpacksWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/powerpack/UpdatePowerpack.ts b/examples/v2/powerpack/UpdatePowerpack.ts
deleted file mode 100644
index 98a17d51b919..000000000000
--- a/examples/v2/powerpack/UpdatePowerpack.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Update a powerpack returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.PowerpackApi(configuration);
-
-// there is a valid "powerpack" in the system
-const POWERPACK_DATA_ID = process.env.POWERPACK_DATA_ID as string;
-
-const params: v2.PowerpackApiUpdatePowerpackRequest = {
- body: {
- data: {
- attributes: {
- description: "Sample powerpack",
- groupWidget: {
- definition: {
- layoutType: "ordered",
- showTitle: true,
- title: "Sample Powerpack",
- type: "group",
- widgets: [
- {
- definition: {
- content: "test",
- type: "note",
- },
- },
- ],
- },
- layout: {
- height: 3,
- width: 12,
- x: 0,
- y: 0,
- },
- liveSpan: "1h",
- },
- name: "Example-Powerpack",
- tags: ["tag:sample"],
- templateVariables: [
- {
- defaults: ["*"],
- name: "sample",
- },
- ],
- },
- type: "powerpack",
- },
- },
- powerpackId: POWERPACK_DATA_ID,
-};
-
-apiInstance
- .updatePowerpack(params)
- .then((data: v2.PowerpackResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/processes/ListProcesses.ts b/examples/v2/processes/ListProcesses.ts
deleted file mode 100644
index 562d9569c789..000000000000
--- a/examples/v2/processes/ListProcesses.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get all processes returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ProcessesApi(configuration);
-
-const params: v2.ProcessesApiListProcessesRequest = {
- search: "process-agent",
- tags: "testing:true",
- pageLimit: 2,
-};
-
-apiInstance
- .listProcesses(params)
- .then((data: v2.ProcessSummariesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/processes/ListProcesses_797840471.ts b/examples/v2/processes/ListProcesses_797840471.ts
deleted file mode 100644
index d75c9669803a..000000000000
--- a/examples/v2/processes/ListProcesses_797840471.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all processes returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ProcessesApi(configuration);
-
-const params: v2.ProcessesApiListProcessesRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listProcessesWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/restriction-policies/DeleteRestrictionPolicy.ts b/examples/v2/restriction-policies/DeleteRestrictionPolicy.ts
deleted file mode 100644
index c5adeb772548..000000000000
--- a/examples/v2/restriction-policies/DeleteRestrictionPolicy.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a restriction policy returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RestrictionPoliciesApi(configuration);
-
-const params: v2.RestrictionPoliciesApiDeleteRestrictionPolicyRequest = {
- resourceId: "dashboard:test-delete",
-};
-
-apiInstance
- .deleteRestrictionPolicy(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/restriction-policies/GetRestrictionPolicy.ts b/examples/v2/restriction-policies/GetRestrictionPolicy.ts
deleted file mode 100644
index f63f9b02c489..000000000000
--- a/examples/v2/restriction-policies/GetRestrictionPolicy.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a restriction policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RestrictionPoliciesApi(configuration);
-
-const params: v2.RestrictionPoliciesApiGetRestrictionPolicyRequest = {
- resourceId: "dashboard:test-get",
-};
-
-apiInstance
- .getRestrictionPolicy(params)
- .then((data: v2.RestrictionPolicyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/restriction-policies/UpdateRestrictionPolicy.ts b/examples/v2/restriction-policies/UpdateRestrictionPolicy.ts
deleted file mode 100644
index 8d1d0201283e..000000000000
--- a/examples/v2/restriction-policies/UpdateRestrictionPolicy.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Update a restriction policy returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RestrictionPoliciesApi(configuration);
-
-// there is a valid "user" in the system
-
-const params: v2.RestrictionPoliciesApiUpdateRestrictionPolicyRequest = {
- body: {
- data: {
- id: "dashboard:test-update",
- type: "restriction_policy",
- attributes: {
- bindings: [
- {
- relation: "editor",
- principals: ["org:00000000-0000-beef-0000-000000000000"],
- },
- ],
- },
- },
- },
- resourceId: "dashboard:test-update",
-};
-
-apiInstance
- .updateRestrictionPolicy(params)
- .then((data: v2.RestrictionPolicyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/AddPermissionToRole.ts b/examples/v2/roles/AddPermissionToRole.ts
deleted file mode 100644
index 832bf848da89..000000000000
--- a/examples/v2/roles/AddPermissionToRole.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Grant permission to a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-// there is a valid "permission" in the system
-const PERMISSION_ID = process.env.PERMISSION_ID as string;
-
-const params: v2.RolesApiAddPermissionToRoleRequest = {
- body: {
- data: {
- id: PERMISSION_ID,
- type: "permissions",
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .addPermissionToRole(params)
- .then((data: v2.PermissionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/AddUserToRole.ts b/examples/v2/roles/AddUserToRole.ts
deleted file mode 100644
index de44954b6c8c..000000000000
--- a/examples/v2/roles/AddUserToRole.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Add a user to a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.RolesApiAddUserToRoleRequest = {
- body: {
- data: {
- id: USER_DATA_ID,
- type: "users",
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .addUserToRole(params)
- .then((data: v2.UsersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/CloneRole.ts b/examples/v2/roles/CloneRole.ts
deleted file mode 100644
index f6e376229d02..000000000000
--- a/examples/v2/roles/CloneRole.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Create a new role by cloning an existing role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.RolesApiCloneRoleRequest = {
- body: {
- data: {
- attributes: {
- name: "Example-Role clone",
- },
- type: "roles",
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .cloneRole(params)
- .then((data: v2.RoleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/CreateRole.ts b/examples/v2/roles/CreateRole.ts
deleted file mode 100644
index 4ac989a50b2c..000000000000
--- a/examples/v2/roles/CreateRole.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Create role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-const params: v2.RolesApiCreateRoleRequest = {
- body: {
- data: {
- attributes: {
- name: "developers",
- },
- relationships: {
- permissions: {
- data: [
- {
- type: "permissions",
- },
- ],
- },
- },
- type: "roles",
- },
- },
-};
-
-apiInstance
- .createRole(params)
- .then((data: v2.RoleCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/CreateRole_3862893229.ts b/examples/v2/roles/CreateRole_3862893229.ts
deleted file mode 100644
index 6fd21f49db12..000000000000
--- a/examples/v2/roles/CreateRole_3862893229.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Create role with a permission returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "permission" in the system
-const PERMISSION_ID = process.env.PERMISSION_ID as string;
-
-const params: v2.RolesApiCreateRoleRequest = {
- body: {
- data: {
- type: "roles",
- attributes: {
- name: "Example-Role",
- },
- relationships: {
- permissions: {
- data: [
- {
- id: PERMISSION_ID,
- type: "permissions",
- },
- ],
- },
- },
- },
- },
-};
-
-apiInstance
- .createRole(params)
- .then((data: v2.RoleCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/DeleteRole.ts b/examples/v2/roles/DeleteRole.ts
deleted file mode 100644
index 4f9923d91344..000000000000
--- a/examples/v2/roles/DeleteRole.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.RolesApiDeleteRoleRequest = {
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .deleteRole(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/GetRole.ts b/examples/v2/roles/GetRole.ts
deleted file mode 100644
index 30ee7b4ef1cb..000000000000
--- a/examples/v2/roles/GetRole.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.RolesApiGetRoleRequest = {
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .getRole(params)
- .then((data: v2.RoleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/ListPermissions.ts b/examples/v2/roles/ListPermissions.ts
deleted file mode 100644
index ac887646d92b..000000000000
--- a/examples/v2/roles/ListPermissions.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List permissions returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-apiInstance
- .listPermissions()
- .then((data: v2.PermissionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/ListRolePermissions.ts b/examples/v2/roles/ListRolePermissions.ts
deleted file mode 100644
index 9a1848631db3..000000000000
--- a/examples/v2/roles/ListRolePermissions.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * List permissions for a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.RolesApiListRolePermissionsRequest = {
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .listRolePermissions(params)
- .then((data: v2.PermissionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/ListRoleUsers.ts b/examples/v2/roles/ListRoleUsers.ts
deleted file mode 100644
index 955a8302b438..000000000000
--- a/examples/v2/roles/ListRoleUsers.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all users of a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.RolesApiListRoleUsersRequest = {
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .listRoleUsers(params)
- .then((data: v2.UsersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/ListRoles.ts b/examples/v2/roles/ListRoles.ts
deleted file mode 100644
index c2ec02cb6dfe..000000000000
--- a/examples/v2/roles/ListRoles.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List roles returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ATTRIBUTES_NAME = process.env
- .ROLE_DATA_ATTRIBUTES_NAME as string;
-
-const params: v2.RolesApiListRolesRequest = {
- filter: ROLE_DATA_ATTRIBUTES_NAME,
-};
-
-apiInstance
- .listRoles(params)
- .then((data: v2.RolesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/RemovePermissionFromRole.ts b/examples/v2/roles/RemovePermissionFromRole.ts
deleted file mode 100644
index baf0d191bffc..000000000000
--- a/examples/v2/roles/RemovePermissionFromRole.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Revoke permission returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-// there is a valid "permission" in the system
-const PERMISSION_ID = process.env.PERMISSION_ID as string;
-
-const params: v2.RolesApiRemovePermissionFromRoleRequest = {
- body: {
- data: {
- id: PERMISSION_ID,
- type: "permissions",
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .removePermissionFromRole(params)
- .then((data: v2.PermissionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/RemoveUserFromRole.ts b/examples/v2/roles/RemoveUserFromRole.ts
deleted file mode 100644
index 7db2c705af29..000000000000
--- a/examples/v2/roles/RemoveUserFromRole.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Remove a user from a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.RolesApiRemoveUserFromRoleRequest = {
- body: {
- data: {
- id: USER_DATA_ID,
- type: "users",
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .removeUserFromRole(params)
- .then((data: v2.UsersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/roles/UpdateRole.ts b/examples/v2/roles/UpdateRole.ts
deleted file mode 100644
index 0875e9fdca32..000000000000
--- a/examples/v2/roles/UpdateRole.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Update a role returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RolesApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-// there is a valid "permission" in the system
-const PERMISSION_ID = process.env.PERMISSION_ID as string;
-
-const params: v2.RolesApiUpdateRoleRequest = {
- body: {
- data: {
- id: ROLE_DATA_ID,
- type: "roles",
- attributes: {
- name: "developers-updated",
- },
- relationships: {
- permissions: {
- data: [
- {
- id: PERMISSION_ID,
- type: "permissions",
- },
- ],
- },
- },
- },
- },
- roleId: ROLE_DATA_ID,
-};
-
-apiInstance
- .updateRole(params)
- .then((data: v2.RoleUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-metrics/CreateRumMetric.ts b/examples/v2/rum-metrics/CreateRumMetric.ts
deleted file mode 100644
index c85e020ca0db..000000000000
--- a/examples/v2/rum-metrics/CreateRumMetric.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Create a rum-based metric returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumMetricsApi(configuration);
-
-const params: v2.RumMetricsApiCreateRumMetricRequest = {
- body: {
- data: {
- attributes: {
- compute: {
- aggregationType: "distribution",
- includePercentiles: true,
- path: "@duration",
- },
- eventType: "session",
- filter: {
- query: "@service:web-ui",
- },
- groupBy: [
- {
- path: "@browser.name",
- tagName: "browser_name",
- },
- ],
- uniqueness: {
- when: "match",
- },
- },
- id: "rum.sessions.webui.count",
- type: "rum_metrics",
- },
- },
-};
-
-apiInstance
- .createRumMetric(params)
- .then((data: v2.RumMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-metrics/DeleteRumMetric.ts b/examples/v2/rum-metrics/DeleteRumMetric.ts
deleted file mode 100644
index a192cbf7feb1..000000000000
--- a/examples/v2/rum-metrics/DeleteRumMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a rum-based metric returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumMetricsApi(configuration);
-
-// there is a valid "rum_metric" in the system
-const RUM_METRIC_DATA_ID = process.env.RUM_METRIC_DATA_ID as string;
-
-const params: v2.RumMetricsApiDeleteRumMetricRequest = {
- metricId: RUM_METRIC_DATA_ID,
-};
-
-apiInstance
- .deleteRumMetric(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-metrics/GetRumMetric.ts b/examples/v2/rum-metrics/GetRumMetric.ts
deleted file mode 100644
index 265e53e5a3ab..000000000000
--- a/examples/v2/rum-metrics/GetRumMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a rum-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumMetricsApi(configuration);
-
-// there is a valid "rum_metric" in the system
-const RUM_METRIC_DATA_ID = process.env.RUM_METRIC_DATA_ID as string;
-
-const params: v2.RumMetricsApiGetRumMetricRequest = {
- metricId: RUM_METRIC_DATA_ID,
-};
-
-apiInstance
- .getRumMetric(params)
- .then((data: v2.RumMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-metrics/ListRumMetrics.ts b/examples/v2/rum-metrics/ListRumMetrics.ts
deleted file mode 100644
index ec6656fb8355..000000000000
--- a/examples/v2/rum-metrics/ListRumMetrics.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all rum-based metrics returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumMetricsApi(configuration);
-
-apiInstance
- .listRumMetrics()
- .then((data: v2.RumMetricsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-metrics/UpdateRumMetric.ts b/examples/v2/rum-metrics/UpdateRumMetric.ts
deleted file mode 100644
index 8ac1b608e960..000000000000
--- a/examples/v2/rum-metrics/UpdateRumMetric.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Update a rum-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumMetricsApi(configuration);
-
-// there is a valid "rum_metric" in the system
-const RUM_METRIC_DATA_ID = process.env.RUM_METRIC_DATA_ID as string;
-
-const params: v2.RumMetricsApiUpdateRumMetricRequest = {
- body: {
- data: {
- id: RUM_METRIC_DATA_ID,
- type: "rum_metrics",
- attributes: {
- compute: {
- includePercentiles: false,
- },
- filter: {
- query: "@service:rum-config",
- },
- groupBy: [
- {
- path: "@browser.version",
- tagName: "browser_version",
- },
- ],
- },
- },
- },
- metricId: RUM_METRIC_DATA_ID,
-};
-
-apiInstance
- .updateRumMetric(params)
- .then((data: v2.RumMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/CreateRetentionFilter.ts b/examples/v2/rum-retention-filters/CreateRetentionFilter.ts
deleted file mode 100644
index 39f28c8528fe..000000000000
--- a/examples/v2/rum-retention-filters/CreateRetentionFilter.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a RUM retention filter returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiCreateRetentionFilterRequest = {
- body: {
- data: {
- type: "retention_filters",
- attributes: {
- name: "Test creating retention filter",
- eventType: "session",
- query: "custom_query",
- sampleRate: 50,
- enabled: true,
- },
- },
- },
- appId: "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690",
-};
-
-apiInstance
- .createRetentionFilter(params)
- .then((data: v2.RumRetentionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/DeleteRetentionFilter.ts b/examples/v2/rum-retention-filters/DeleteRetentionFilter.ts
deleted file mode 100644
index ff0cc90e5a7b..000000000000
--- a/examples/v2/rum-retention-filters/DeleteRetentionFilter.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete a RUM retention filter returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiDeleteRetentionFilterRequest = {
- appId: "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690",
- rfId: "fe34ee09-14cf-4976-9362-08044c0dea80",
-};
-
-apiInstance
- .deleteRetentionFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/GetRetentionFilter.ts b/examples/v2/rum-retention-filters/GetRetentionFilter.ts
deleted file mode 100644
index 065b96c3d42c..000000000000
--- a/examples/v2/rum-retention-filters/GetRetentionFilter.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a RUM retention filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiGetRetentionFilterRequest = {
- appId: "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690",
- rfId: "4b95d361-f65d-4515-9824-c9aaeba5ac2a",
-};
-
-apiInstance
- .getRetentionFilter(params)
- .then((data: v2.RumRetentionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/ListRetentionFilters.ts b/examples/v2/rum-retention-filters/ListRetentionFilters.ts
deleted file mode 100644
index 896f3419bb57..000000000000
--- a/examples/v2/rum-retention-filters/ListRetentionFilters.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all RUM retention filters returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiListRetentionFiltersRequest = {
- appId: "1d4b9c34-7ac4-423a-91cf-9902d926e9b3",
-};
-
-apiInstance
- .listRetentionFilters(params)
- .then((data: v2.RumRetentionFiltersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/OrderRetentionFilters.ts b/examples/v2/rum-retention-filters/OrderRetentionFilters.ts
deleted file mode 100644
index 1c07a7cc9575..000000000000
--- a/examples/v2/rum-retention-filters/OrderRetentionFilters.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Order RUM retention filters returns "Ordered" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiOrderRetentionFiltersRequest = {
- body: {
- data: [
- {
- type: "retention_filters",
- id: "325631eb-94c9-49c0-93f9-ab7e4fd24529",
- },
- {
- type: "retention_filters",
- id: "42d89430-5b80-426e-a44b-ba3b417ece25",
- },
- {
- type: "retention_filters",
- id: "bff0bc34-99e9-4c16-adce-f47e71948c23",
- },
- ],
- },
- appId: "1d4b9c34-7ac4-423a-91cf-9902d926e9b3",
-};
-
-apiInstance
- .orderRetentionFilters(params)
- .then((data: v2.RumRetentionFiltersOrderResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum-retention-filters/UpdateRetentionFilter.ts b/examples/v2/rum-retention-filters/UpdateRetentionFilter.ts
deleted file mode 100644
index 63f5403c7922..000000000000
--- a/examples/v2/rum-retention-filters/UpdateRetentionFilter.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Update a RUM retention filter returns "Updated" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RumRetentionFiltersApi(configuration);
-
-const params: v2.RumRetentionFiltersApiUpdateRetentionFilterRequest = {
- body: {
- data: {
- id: "4b95d361-f65d-4515-9824-c9aaeba5ac2a",
- type: "retention_filters",
- attributes: {
- name: "Test updating retention filter",
- eventType: "view",
- query: "view_query",
- sampleRate: 100,
- enabled: true,
- },
- },
- },
- appId: "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690",
- rfId: "4b95d361-f65d-4515-9824-c9aaeba5ac2a",
-};
-
-apiInstance
- .updateRetentionFilter(params)
- .then((data: v2.RumRetentionFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/AggregateRUMEvents.ts b/examples/v2/rum/AggregateRUMEvents.ts
deleted file mode 100644
index 5b3bb93c3404..000000000000
--- a/examples/v2/rum/AggregateRUMEvents.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Aggregate RUM events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-const params: v2.RUMApiAggregateRUMEventsRequest = {
- body: {
- compute: [
- {
- aggregation: "pc90",
- metric: "@view.time_spent",
- type: "total",
- },
- ],
- filter: {
- from: "now-15m",
- query: "@type:view AND @session.type:user",
- to: "now",
- },
- groupBy: [
- {
- facet: "@view.time_spent",
- limit: 10,
- total: false,
- },
- ],
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 25,
- },
- },
-};
-
-apiInstance
- .aggregateRUMEvents(params)
- .then((data: v2.RUMAnalyticsAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/CreateRUMApplication.ts b/examples/v2/rum/CreateRUMApplication.ts
deleted file mode 100644
index 46be6c47c836..000000000000
--- a/examples/v2/rum/CreateRUMApplication.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a new RUM application returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-const params: v2.RUMApiCreateRUMApplicationRequest = {
- body: {
- data: {
- attributes: {
- name: "test-rum-5c67ebb32077e1d9",
- type: "ios",
- },
- type: "rum_application_create",
- },
- },
-};
-
-apiInstance
- .createRUMApplication(params)
- .then((data: v2.RUMApplicationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/DeleteRUMApplication.ts b/examples/v2/rum/DeleteRUMApplication.ts
deleted file mode 100644
index cd6faccd070c..000000000000
--- a/examples/v2/rum/DeleteRUMApplication.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a RUM application returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-// there is a valid "rum_application" in the system
-const RUM_APPLICATION_DATA_ID = process.env.RUM_APPLICATION_DATA_ID as string;
-
-const params: v2.RUMApiDeleteRUMApplicationRequest = {
- id: RUM_APPLICATION_DATA_ID,
-};
-
-apiInstance
- .deleteRUMApplication(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/GetRUMApplication.ts b/examples/v2/rum/GetRUMApplication.ts
deleted file mode 100644
index c5b54942dbe1..000000000000
--- a/examples/v2/rum/GetRUMApplication.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a RUM application returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-// there is a valid "rum_application" in the system
-const RUM_APPLICATION_DATA_ID = process.env.RUM_APPLICATION_DATA_ID as string;
-
-const params: v2.RUMApiGetRUMApplicationRequest = {
- id: RUM_APPLICATION_DATA_ID,
-};
-
-apiInstance
- .getRUMApplication(params)
- .then((data: v2.RUMApplicationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/GetRUMApplications.ts b/examples/v2/rum/GetRUMApplications.ts
deleted file mode 100644
index c10920b27b00..000000000000
--- a/examples/v2/rum/GetRUMApplications.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List all the RUM applications returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-apiInstance
- .getRUMApplications()
- .then((data: v2.RUMApplicationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/ListRUMEvents.ts b/examples/v2/rum/ListRUMEvents.ts
deleted file mode 100644
index 58de35d83a8c..000000000000
--- a/examples/v2/rum/ListRUMEvents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of RUM events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-apiInstance
- .listRUMEvents()
- .then((data: v2.RUMEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/ListRUMEvents_2680821282.ts b/examples/v2/rum/ListRUMEvents_2680821282.ts
deleted file mode 100644
index c674cc22a743..000000000000
--- a/examples/v2/rum/ListRUMEvents_2680821282.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of RUM events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-const params: v2.RUMApiListRUMEventsRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listRUMEventsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/rum/SearchRUMEvents.ts b/examples/v2/rum/SearchRUMEvents.ts
deleted file mode 100644
index 33ae75733e1c..000000000000
--- a/examples/v2/rum/SearchRUMEvents.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Search RUM events returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-const params: v2.RUMApiSearchRUMEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@type:session AND @session.type:user",
- to: "now",
- },
- options: {
- timeOffset: 0,
- timezone: "GMT",
- },
- page: {
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .searchRUMEvents(params)
- .then((data: v2.RUMEventsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/rum/SearchRUMEvents_574690310.ts b/examples/v2/rum/SearchRUMEvents_574690310.ts
deleted file mode 100644
index 671f0940c5e6..000000000000
--- a/examples/v2/rum/SearchRUMEvents_574690310.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Search RUM events returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-const params: v2.RUMApiSearchRUMEventsRequest = {
- body: {
- filter: {
- from: "now-15m",
- query: "@type:session AND @session.type:user",
- to: "now",
- },
- options: {
- timeOffset: 0,
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchRUMEventsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/rum/UpdateRUMApplication.ts b/examples/v2/rum/UpdateRUMApplication.ts
deleted file mode 100644
index 869b1b053e50..000000000000
--- a/examples/v2/rum/UpdateRUMApplication.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update a RUM application returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.RUMApi(configuration);
-
-// there is a valid "rum_application" in the system
-const RUM_APPLICATION_DATA_ID = process.env.RUM_APPLICATION_DATA_ID as string;
-
-const params: v2.RUMApiUpdateRUMApplicationRequest = {
- body: {
- data: {
- attributes: {
- name: "updated_name_for_my_existing_rum_application",
- type: "browser",
- },
- id: RUM_APPLICATION_DATA_ID,
- type: "rum_application_update",
- },
- },
- id: RUM_APPLICATION_DATA_ID,
-};
-
-apiInstance
- .updateRUMApplication(params)
- .then((data: v2.RUMApplicationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CancelHistoricalJob.ts b/examples/v2/security-monitoring/CancelHistoricalJob.ts
deleted file mode 100644
index 6bff4c4b9632..000000000000
--- a/examples/v2/security-monitoring/CancelHistoricalJob.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Cancel a historical job returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.cancelHistoricalJob"] = true;
-configuration.unstableOperations["v2.runHistoricalJob"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "historical_job" in the system
-const HISTORICAL_JOB_DATA_ID = process.env.HISTORICAL_JOB_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiCancelHistoricalJobRequest = {
- jobId: HISTORICAL_JOB_DATA_ID,
-};
-
-apiInstance
- .cancelHistoricalJob(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.ts b/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.ts
deleted file mode 100644
index 981ff3c9b298..000000000000
--- a/examples/v2/security-monitoring/ConvertExistingSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Convert an existing rule from JSON to Terraform returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiConvertExistingSecurityMonitoringRuleRequest =
- {
- ruleId: SECURITY_RULE_ID,
- };
-
-apiInstance
- .convertExistingSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleConvertResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ConvertJobResultToSignal.ts b/examples/v2/security-monitoring/ConvertJobResultToSignal.ts
deleted file mode 100644
index c83441afd493..000000000000
--- a/examples/v2/security-monitoring/ConvertJobResultToSignal.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Convert a job result to a signal returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.convertJobResultToSignal"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiConvertJobResultToSignalRequest = {
- body: {
- data: {
- attributes: {
- jobResultIds: [""],
- notifications: [""],
- signalMessage: "A large number of failed login attempts.",
- signalSeverity: "critical",
- },
- type: "historicalDetectionsJobResultSignalConversion",
- },
- },
-};
-
-apiInstance
- .convertJobResultToSignal(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.ts b/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.ts
deleted file mode 100644
index 9fce7dc96e56..000000000000
--- a/examples/v2/security-monitoring/ConvertSecurityMonitoringRuleFromJSONToTerraform.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Convert a rule from JSON to Terraform returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiConvertSecurityMonitoringRuleFromJSONToTerraformRequest =
- {
- body: {
- name: "Example-Security-Monitoring",
- queries: [
- {
- query: "@test:true",
- aggregation: "count",
- groupByFields: [],
- distinctFields: [],
- metric: "",
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- condition: "a > 0",
- notifications: [],
- },
- ],
- options: {
- evaluationWindow: 900,
- keepAlive: 3600,
- maxSignalDuration: 86400,
- },
- message: "Test rule",
- tags: [],
- isEnabled: true,
- type: "log_detection",
- },
- };
-
-apiInstance
- .convertSecurityMonitoringRuleFromJSONToTerraform(params)
- .then((data: v2.SecurityMonitoringRuleConvertResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityFilter.ts b/examples/v2/security-monitoring/CreateSecurityFilter.ts
deleted file mode 100644
index dac1a2e95f90..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityFilter.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Create a security filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityFilterRequest = {
- body: {
- data: {
- attributes: {
- exclusionFilters: [
- {
- name: "Exclude staging",
- query: "source:staging",
- },
- ],
- filteredDataType: "logs",
- isEnabled: true,
- name: "Example-Security-Monitoring",
- query: "service:ExampleSecurityMonitoring",
- },
- type: "security_filters",
- },
- },
-};
-
-apiInstance
- .createSecurityFilter(params)
- .then((data: v2.SecurityFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule.ts
deleted file mode 100644
index dcc83ea36446..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a detection rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring",
- queries: [
- {
- query: "@test:true",
- aggregation: "count",
- groupByFields: [],
- distinctFields: [],
- metric: "",
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- condition: "a > 0",
- notifications: [],
- },
- ],
- options: {
- evaluationWindow: 900,
- keepAlive: 3600,
- maxSignalDuration: 86400,
- },
- message: "Test rule",
- tags: [],
- isEnabled: true,
- type: "log_detection",
- referenceTables: [
- {
- tableName: "synthetics_test_reference_table_dont_delete",
- columnName: "value",
- logFieldPath: "testtag",
- checkPresence: true,
- ruleQueryName: "a",
- },
- ],
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.ts
deleted file mode 100644
index 0dd5c36e50e6..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Create a cloud_configuration rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- type: "cloud_configuration",
- name: "Example-Security-Monitoring_cloud",
- isEnabled: false,
- cases: [
- {
- status: "info",
- notifications: ["channel"],
- },
- ],
- options: {
- complianceRuleOptions: {
- resourceType: "gcp_compute_disk",
- complexRule: false,
- regoRule: {
- policy: `package datadog
-
-import data.datadog.output as dd_output
-
-import future.keywords.contains
-import future.keywords.if
-import future.keywords.in
-
-milliseconds_in_a_day := ((1000 * 60) * 60) * 24
-
-eval(iam_service_account_key) = "skip" if {
- iam_service_account_key.disabled
-} else = "pass" if {
- (iam_service_account_key.resource_seen_at / milliseconds_in_a_day) - (iam_service_account_key.valid_after_time / milliseconds_in_a_day) <= 90
-} else = "fail"
-
-# This part remains unchanged for all rules
-results contains result if {
- some resource in input.resources[input.main_resource_type]
- result := dd_output.format(resource, eval(resource))
-}
-`,
- resourceTypes: ["gcp_compute_disk"],
- },
- },
- },
- message: "ddd",
- tags: ["my:tag"],
- complianceSignalOptions: {
- userActivationStatus: true,
- userGroupByFields: ["@account_id"],
- },
- filters: [
- {
- action: "require",
- query: "resource_id:helo*",
- },
- {
- action: "suppress",
- query: "control:helo*",
- },
- ],
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.ts
deleted file mode 100644
index b24646772edf..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Create a detection rule with type 'application_security 'returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- type: "application_security",
- name: "Example-Security-Monitoring_appsec_rule",
- queries: [
- {
- query: "@appsec.security_activity:business_logic.users.login.failure",
- aggregation: "count",
- groupByFields: ["service", "@http.client_ip"],
- distinctFields: [],
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- notifications: [],
- condition: "a > 100000",
- actions: [
- {
- type: "block_ip",
- options: {
- duration: 900,
- },
- },
- ],
- },
- ],
- options: {
- keepAlive: 3600,
- maxSignalDuration: 86400,
- evaluationWindow: 900,
- detectionMethod: "threshold",
- },
- isEnabled: true,
- message: "Test rule",
- tags: [],
- groupSignalsBy: ["service"],
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.ts
deleted file mode 100644
index 6e778d2cd8ee..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Create a detection rule with detection method 'third_party' returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring",
- type: "log_detection",
- isEnabled: true,
- thirdPartyCases: [
- {
- query: "status:error",
- name: "high",
- status: "high",
- },
- {
- query: "status:info",
- name: "low",
- status: "low",
- },
- ],
- queries: [],
- cases: [],
- message: "This is a third party rule",
- options: {
- detectionMethod: "third_party",
- keepAlive: 0,
- maxSignalDuration: 600,
- thirdPartyRuleOptions: {
- defaultStatus: "info",
- rootQueries: [
- {
- query: "source:guardduty @details.alertType:*EC2*",
- groupByFields: ["instance-id"],
- },
- {
- query: "source:guardduty",
- groupByFields: [],
- },
- ],
- },
- },
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.ts
deleted file mode 100644
index 0f24106fc278..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Create a detection rule with type 'impossible_travel' returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- queries: [
- {
- aggregation: "geo_data",
- groupByFields: ["@usr.id"],
- distinctFields: [],
- metric: "@network.client.geoip",
- query: "*",
- },
- ],
- cases: [
- {
- name: "",
- status: "info",
- notifications: [],
- },
- ],
- hasExtendedTitle: true,
- message: "test",
- isEnabled: true,
- options: {
- maxSignalDuration: 86400,
- evaluationWindow: 900,
- keepAlive: 3600,
- detectionMethod: "impossible_travel",
- impossibleTravelOptions: {
- baselineUserLocations: false,
- },
- },
- name: "Example-Security-Monitoring",
- type: "log_detection",
- tags: [],
- filters: [],
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.ts
deleted file mode 100644
index 007dfd7b4ab7..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Create a detection rule with type 'workload_security' returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring",
- queries: [
- {
- query: "@test:true",
- aggregation: "count",
- groupByFields: [],
- distinctFields: [],
- metric: "",
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- condition: "a > 0",
- notifications: [],
- },
- ],
- options: {
- evaluationWindow: 900,
- keepAlive: 3600,
- maxSignalDuration: 86400,
- },
- message: "Test rule",
- tags: [],
- isEnabled: true,
- type: "workload_security",
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.ts
deleted file mode 100644
index 844d04de7cc4..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Create a detection rule with type 'signal_correlation' returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-// there is a valid "security_rule_bis" in the system
-const SECURITY_RULE_BIS_ID = process.env.SECURITY_RULE_BIS_ID as string;
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring_signal_rule",
- queries: [
- {
- ruleId: SECURITY_RULE_ID,
- aggregation: "event_count",
- correlatedByFields: ["host"],
- correlatedQueryIndex: 1,
- },
- {
- ruleId: SECURITY_RULE_BIS_ID,
- aggregation: "event_count",
- correlatedByFields: ["host"],
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- condition: "a > 0 && b > 0",
- notifications: [],
- },
- ],
- options: {
- evaluationWindow: 900,
- keepAlive: 3600,
- maxSignalDuration: 86400,
- },
- message: "Test signal correlation rule",
- tags: [],
- isEnabled: true,
- type: "signal_correlation",
- },
-};
-
-apiInstance
- .createSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.ts
deleted file mode 100644
index 0b819b3f231c..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Create a suppression rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest =
- {
- body: {
- data: {
- attributes: {
- description:
- "This rule suppresses low-severity signals in staging environments.",
- enabled: true,
- startDate: 1637493071000,
- expirationDate: 1638443471000,
- name: "Example-Security-Monitoring",
- ruleQuery: "type:log_detection source:cloudtrail",
- suppressionQuery: "env:staging status:low",
- },
- type: "suppressions",
- },
- },
- };
-
-apiInstance
- .createSecurityMonitoringSuppression(params)
- .then((data: v2.SecurityMonitoringSuppressionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.ts b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.ts
deleted file mode 100644
index bd915509d8b0..000000000000
--- a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Create a suppression rule with an exclusion query returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest =
- {
- body: {
- data: {
- attributes: {
- description:
- "This rule suppresses low-severity signals in staging environments.",
- enabled: true,
- startDate: 1637493071000,
- expirationDate: 1638443471000,
- name: "Example-Security-Monitoring",
- ruleQuery: "type:log_detection source:cloudtrail",
- dataExclusionQuery: "account_id:12345",
- },
- type: "suppressions",
- },
- },
- };
-
-apiInstance
- .createSecurityMonitoringSuppression(params)
- .then((data: v2.SecurityMonitoringSuppressionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateSignalNotificationRule.ts b/examples/v2/security-monitoring/CreateSignalNotificationRule.ts
deleted file mode 100644
index 4b6961baf615..000000000000
--- a/examples/v2/security-monitoring/CreateSignalNotificationRule.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Create a new signal-based notification rule returns "Successfully created the notification rule." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateSignalNotificationRuleRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: "Rule 1",
- selectors: {
- query: "(source:production_service OR env:prod)",
- ruleTypes: ["misconfiguration", "attack_path"],
- severities: ["critical"],
- triggerSource: "security_findings",
- },
- targets: ["@john.doe@email.com"],
- timeAggregation: 86400,
- },
- type: "notification_rules",
- },
- },
-};
-
-apiInstance
- .createSignalNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.ts b/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.ts
deleted file mode 100644
index 1a2eb480e89c..000000000000
--- a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Create a new vulnerability-based notification rule returns "Successfully created the notification rule." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiCreateVulnerabilityNotificationRuleRequest =
- {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: "Rule 1",
- selectors: {
- query: "(source:production_service OR env:prod)",
- ruleTypes: ["misconfiguration", "attack_path"],
- severities: ["critical"],
- triggerSource: "security_findings",
- },
- targets: ["@john.doe@email.com"],
- timeAggregation: 86400,
- },
- type: "notification_rules",
- },
- },
- };
-
-apiInstance
- .createVulnerabilityNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteHistoricalJob.ts b/examples/v2/security-monitoring/DeleteHistoricalJob.ts
deleted file mode 100644
index f2cfd17873f5..000000000000
--- a/examples/v2/security-monitoring/DeleteHistoricalJob.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Delete an existing job returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteHistoricalJob"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiDeleteHistoricalJobRequest = {
- jobId: "job_id",
-};
-
-apiInstance
- .deleteHistoricalJob(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteSecurityFilter.ts b/examples/v2/security-monitoring/DeleteSecurityFilter.ts
deleted file mode 100644
index ed3c6b04da68..000000000000
--- a/examples/v2/security-monitoring/DeleteSecurityFilter.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a security filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiDeleteSecurityFilterRequest = {
- securityFilterId: "security_filter_id",
-};
-
-apiInstance
- .deleteSecurityFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.ts b/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.ts
deleted file mode 100644
index 6bde015c2afe..000000000000
--- a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a security filter returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_filter" in the system
-const SECURITY_FILTER_DATA_ID = process.env.SECURITY_FILTER_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiDeleteSecurityFilterRequest = {
- securityFilterId: SECURITY_FILTER_DATA_ID,
-};
-
-apiInstance
- .deleteSecurityFilter(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.ts b/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.ts
deleted file mode 100644
index 8eb328b49f81..000000000000
--- a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an existing rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiDeleteSecurityMonitoringRuleRequest = {
- ruleId: SECURITY_RULE_ID,
-};
-
-apiInstance
- .deleteSecurityMonitoringRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.ts b/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.ts
deleted file mode 100644
index 7b69910374aa..000000000000
--- a/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a suppression rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "suppression" in the system
-const SUPPRESSION_DATA_ID = process.env.SUPPRESSION_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiDeleteSecurityMonitoringSuppressionRequest =
- {
- suppressionId: SUPPRESSION_DATA_ID,
- };
-
-apiInstance
- .deleteSecurityMonitoringSuppression(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteSignalNotificationRule.ts b/examples/v2/security-monitoring/DeleteSignalNotificationRule.ts
deleted file mode 100644
index 35ccc76e5609..000000000000
--- a/examples/v2/security-monitoring/DeleteSignalNotificationRule.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Delete a signal-based notification rule returns "Rule successfully deleted." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_signal_notification_rule" in the system
-const VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiDeleteSignalNotificationRuleRequest = {
- id: VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID,
-};
-
-apiInstance
- .deleteSignalNotificationRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.ts b/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.ts
deleted file mode 100644
index 51ca156f34ef..000000000000
--- a/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Delete a vulnerability-based notification rule returns "Rule successfully deleted." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_vulnerability_notification_rule" in the system
-const VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiDeleteVulnerabilityNotificationRuleRequest =
- {
- id: VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID,
- };
-
-apiInstance
- .deleteVulnerabilityNotificationRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.ts b/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.ts
deleted file mode 100644
index f7fccf032e80..000000000000
--- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalAssignee.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Modify the triage assignee of a security signal returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiEditSecurityMonitoringSignalAssigneeRequest =
- {
- body: {
- data: {
- attributes: {
- assignee: {
- uuid: "",
- },
- },
- },
- },
- signalId: "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE",
- };
-
-apiInstance
- .editSecurityMonitoringSignalAssignee(params)
- .then((data: v2.SecurityMonitoringSignalTriageUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.ts b/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.ts
deleted file mode 100644
index e78ea4383855..000000000000
--- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalIncidents.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Change the related incidents of a security signal returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiEditSecurityMonitoringSignalIncidentsRequest =
- {
- body: {
- data: {
- attributes: {
- incidentIds: [2066],
- },
- },
- },
- signalId: "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE",
- };
-
-apiInstance
- .editSecurityMonitoringSignalIncidents(params)
- .then((data: v2.SecurityMonitoringSignalTriageUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.ts b/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.ts
deleted file mode 100644
index bb5415ef241b..000000000000
--- a/examples/v2/security-monitoring/EditSecurityMonitoringSignalState.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Change the triage state of a security signal returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiEditSecurityMonitoringSignalStateRequest =
- {
- body: {
- data: {
- attributes: {
- archiveReason: "none",
- state: "open",
- },
- },
- },
- signalId: "AQAAAYG1bl5K4HuUewAAAABBWUcxYmw1S0FBQmt2RmhRN0V4ZUVnQUE",
- };
-
-apiInstance
- .editSecurityMonitoringSignalState(params)
- .then((data: v2.SecurityMonitoringSignalTriageUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetFinding.ts b/examples/v2/security-monitoring/GetFinding.ts
deleted file mode 100644
index 5d07e341635b..000000000000
--- a/examples/v2/security-monitoring/GetFinding.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get a finding returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getFinding"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiGetFindingRequest = {
- findingId:
- "AgAAAYd59gjghzF52gAAAAAAAAAYAAAAAEFZZDU5Z2pnQUFCRTRvV1lFeEo4SlFBQQAAACQAAAAAMDE4NzdhMDEtMDRiYS00NTZlLWFmMzMtNTIxNmNkNjVlNDMz",
-};
-
-apiInstance
- .getFinding(params)
- .then((data: v2.GetFindingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetHistoricalJob.ts b/examples/v2/security-monitoring/GetHistoricalJob.ts
deleted file mode 100644
index a4f838106502..000000000000
--- a/examples/v2/security-monitoring/GetHistoricalJob.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get a job's details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getHistoricalJob"] = true;
-configuration.unstableOperations["v2.runHistoricalJob"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "historical_job" in the system
-const HISTORICAL_JOB_DATA_ID = process.env.HISTORICAL_JOB_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiGetHistoricalJobRequest = {
- jobId: HISTORICAL_JOB_DATA_ID,
-};
-
-apiInstance
- .getHistoricalJob(params)
- .then((data: v2.HistoricalJobResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetRuleVersionHistory.ts b/examples/v2/security-monitoring/GetRuleVersionHistory.ts
deleted file mode 100644
index 6e21ecab0fdb..000000000000
--- a/examples/v2/security-monitoring/GetRuleVersionHistory.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a rule's version history returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getRuleVersionHistory"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiGetRuleVersionHistoryRequest = {
- ruleId: "rule_id",
-};
-
-apiInstance
- .getRuleVersionHistory(params)
- .then((data: v2.GetRuleVersionHistoryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetRuleVersionHistory_2467565841.ts b/examples/v2/security-monitoring/GetRuleVersionHistory_2467565841.ts
deleted file mode 100644
index 00042175714b..000000000000
--- a/examples/v2/security-monitoring/GetRuleVersionHistory_2467565841.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get rule version history returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getRuleVersionHistory"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiGetRuleVersionHistoryRequest = {
- ruleId: SECURITY_RULE_ID,
-};
-
-apiInstance
- .getRuleVersionHistory(params)
- .then((data: v2.GetRuleVersionHistoryResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSBOM.ts b/examples/v2/security-monitoring/GetSBOM.ts
deleted file mode 100644
index 93cd9c00b007..000000000000
--- a/examples/v2/security-monitoring/GetSBOM.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get SBOM returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getSBOM"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiGetSBOMRequest = {
- assetType: "Repository",
- filterAssetName: "github.com/datadog/datadog-agent",
-};
-
-apiInstance
- .getSBOM(params)
- .then((data: v2.GetSBOMResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSecurityFilter.ts b/examples/v2/security-monitoring/GetSecurityFilter.ts
deleted file mode 100644
index ad42b3d5aecd..000000000000
--- a/examples/v2/security-monitoring/GetSecurityFilter.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a security filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_filter" in the system
-const SECURITY_FILTER_DATA_ID = process.env.SECURITY_FILTER_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiGetSecurityFilterRequest = {
- securityFilterId: SECURITY_FILTER_DATA_ID,
-};
-
-apiInstance
- .getSecurityFilter(params)
- .then((data: v2.SecurityFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringRule.ts b/examples/v2/security-monitoring/GetSecurityMonitoringRule.ts
deleted file mode 100644
index f56273bd1fd8..000000000000
--- a/examples/v2/security-monitoring/GetSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a rule's details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiGetSecurityMonitoringRuleRequest = {
- ruleId: SECURITY_RULE_ID,
-};
-
-apiInstance
- .getSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.ts b/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.ts
deleted file mode 100644
index 6d6d38459ca5..000000000000
--- a/examples/v2/security-monitoring/GetSecurityMonitoringRule_3370522281.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a cloud configuration rule's details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "cloud_configuration_rule" in the system
-const CLOUD_CONFIGURATION_RULE_ID = process.env
- .CLOUD_CONFIGURATION_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiGetSecurityMonitoringRuleRequest = {
- ruleId: CLOUD_CONFIGURATION_RULE_ID,
-};
-
-apiInstance
- .getSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringSignal.ts b/examples/v2/security-monitoring/GetSecurityMonitoringSignal.ts
deleted file mode 100644
index f096f85ab6b1..000000000000
--- a/examples/v2/security-monitoring/GetSecurityMonitoringSignal.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a signal's details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiGetSecurityMonitoringSignalRequest = {
- signalId: "AQAAAYNqUBVU4-rffwAAAABBWU5xVUJWVUFBQjJBd3ptMDdQUnF3QUE",
-};
-
-apiInstance
- .getSecurityMonitoringSignal(params)
- .then((data: v2.SecurityMonitoringSignalResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.ts b/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.ts
deleted file mode 100644
index 2696043866a0..000000000000
--- a/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get a suppression rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "suppression" in the system
-const SUPPRESSION_DATA_ID = process.env.SUPPRESSION_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiGetSecurityMonitoringSuppressionRequest =
- {
- suppressionId: SUPPRESSION_DATA_ID,
- };
-
-apiInstance
- .getSecurityMonitoringSuppression(params)
- .then((data: v2.SecurityMonitoringSuppressionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSignalNotificationRule.ts b/examples/v2/security-monitoring/GetSignalNotificationRule.ts
deleted file mode 100644
index c94870ccaa62..000000000000
--- a/examples/v2/security-monitoring/GetSignalNotificationRule.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get details of a signal-based notification rule returns "Notification rule details." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_signal_notification_rule" in the system
-const VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiGetSignalNotificationRuleRequest = {
- id: VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID,
-};
-
-apiInstance
- .getSignalNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetSignalNotificationRules.ts b/examples/v2/security-monitoring/GetSignalNotificationRules.ts
deleted file mode 100644
index d270be23fbaf..000000000000
--- a/examples/v2/security-monitoring/GetSignalNotificationRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of signal-based notification rules returns "The list of notification rules." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .getSignalNotificationRules()
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.ts b/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.ts
deleted file mode 100644
index af7aebe0b3f5..000000000000
--- a/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Get details of a vulnerability notification rule returns "Notification rule details." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_vulnerability_notification_rule" in the system
-const VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiGetVulnerabilityNotificationRuleRequest =
- {
- id: VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID,
- };
-
-apiInstance
- .getVulnerabilityNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.ts b/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.ts
deleted file mode 100644
index 27634ca4bdc7..000000000000
--- a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the list of vulnerability notification rules returns "The list of notification rules." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .getVulnerabilityNotificationRules()
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListFindings.ts b/examples/v2/security-monitoring/ListFindings.ts
deleted file mode 100644
index 299dc172d21e..000000000000
--- a/examples/v2/security-monitoring/ListFindings.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List findings returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listFindings"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .listFindings()
- .then((data: v2.ListFindingsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListFindings_1668290866.ts b/examples/v2/security-monitoring/ListFindings_1668290866.ts
deleted file mode 100644
index fbf9444f1afc..000000000000
--- a/examples/v2/security-monitoring/ListFindings_1668290866.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * List findings with detection_type query param returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listFindings"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiListFindingsRequest = {
- filterVulnerabilityType: ["misconfiguration", "attack_path"],
-};
-
-apiInstance
- .listFindings(params)
- .then((data: v2.ListFindingsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListFindings_3865842421.ts b/examples/v2/security-monitoring/ListFindings_3865842421.ts
deleted file mode 100644
index 14249b19284e..000000000000
--- a/examples/v2/security-monitoring/ListFindings_3865842421.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * List findings returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listFindings"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-(async () => {
- try {
- for await (const item of apiInstance.listFindingsWithPagination()) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/security-monitoring/ListHistoricalJobs.ts b/examples/v2/security-monitoring/ListHistoricalJobs.ts
deleted file mode 100644
index ec286a2ba6df..000000000000
--- a/examples/v2/security-monitoring/ListHistoricalJobs.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List historical jobs returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listHistoricalJobs"] = true;
-configuration.unstableOperations["v2.runHistoricalJob"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "historical_job" in the system
-
-const params: v2.SecurityMonitoringApiListHistoricalJobsRequest = {
- filterQuery: "id:string",
-};
-
-apiInstance
- .listHistoricalJobs(params)
- .then((data: v2.ListHistoricalJobsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListSecurityFilters.ts b/examples/v2/security-monitoring/ListSecurityFilters.ts
deleted file mode 100644
index 8b2f9830c45a..000000000000
--- a/examples/v2/security-monitoring/ListSecurityFilters.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all security filters returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .listSecurityFilters()
- .then((data: v2.SecurityFiltersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringRules.ts b/examples/v2/security-monitoring/ListSecurityMonitoringRules.ts
deleted file mode 100644
index f6ef9bee9a07..000000000000
--- a/examples/v2/security-monitoring/ListSecurityMonitoringRules.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .listSecurityMonitoringRules()
- .then((data: v2.SecurityMonitoringListRulesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSignals.ts b/examples/v2/security-monitoring/ListSecurityMonitoringSignals.ts
deleted file mode 100644
index 93534571411d..000000000000
--- a/examples/v2/security-monitoring/ListSecurityMonitoringSignals.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a quick list of security signals returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .listSecurityMonitoringSignals()
- .then((data: v2.SecurityMonitoringSignalsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.ts b/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.ts
deleted file mode 100644
index 18f28c41f5cf..000000000000
--- a/examples/v2/security-monitoring/ListSecurityMonitoringSignals_3960412991.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a quick list of security signals returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiListSecurityMonitoringSignalsRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listSecurityMonitoringSignalsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.ts b/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.ts
deleted file mode 100644
index f00fc87aeb9c..000000000000
--- a/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all suppression rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-apiInstance
- .listSecurityMonitoringSuppressions()
- .then((data: v2.SecurityMonitoringSuppressionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListVulnerabilities.ts b/examples/v2/security-monitoring/ListVulnerabilities.ts
deleted file mode 100644
index 5f1b9ebef8a2..000000000000
--- a/examples/v2/security-monitoring/ListVulnerabilities.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * List vulnerabilities returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listVulnerabilities"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiListVulnerabilitiesRequest = {
- filterCvssBaseSeverity: "High",
- filterTool: "Infra",
- filterAssetType: "Service",
-};
-
-apiInstance
- .listVulnerabilities(params)
- .then((data: v2.ListVulnerabilitiesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ListVulnerableAssets.ts b/examples/v2/security-monitoring/ListVulnerableAssets.ts
deleted file mode 100644
index c6c18a7e6ebd..000000000000
--- a/examples/v2/security-monitoring/ListVulnerableAssets.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * List vulnerable assets returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listVulnerableAssets"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiListVulnerableAssetsRequest = {
- filterType: "Host",
- filterRepositoryUrl: "github.com/datadog/dd-go",
- filterRisksInProduction: true,
-};
-
-apiInstance
- .listVulnerableAssets(params)
- .then((data: v2.ListVulnerableAssetsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/MuteFindings.ts b/examples/v2/security-monitoring/MuteFindings.ts
deleted file mode 100644
index d8f1eb277e22..000000000000
--- a/examples/v2/security-monitoring/MuteFindings.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Mute or unmute a batch of findings returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.muteFindings"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiMuteFindingsRequest = {
- body: {
- data: {
- attributes: {
- mute: {
- expirationDate: 1778721573794,
- muted: true,
- reason: "ACCEPTED_RISK",
- },
- },
- id: "dbe5f567-192b-4404-b908-29b70e1c9f76",
- meta: {
- findings: [
- {
- findingId: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
- },
- ],
- },
- type: "finding",
- },
- },
-};
-
-apiInstance
- .muteFindings(params)
- .then((data: v2.BulkMuteFindingsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/PatchSignalNotificationRule.ts b/examples/v2/security-monitoring/PatchSignalNotificationRule.ts
deleted file mode 100644
index 395529eca9a5..000000000000
--- a/examples/v2/security-monitoring/PatchSignalNotificationRule.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Patch a signal-based notification rule returns "Notification rule successfully patched." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_signal_notification_rule" in the system
-const VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiPatchSignalNotificationRuleRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: "Rule 1",
- selectors: {
- query: "(source:production_service OR env:prod)",
- ruleTypes: ["misconfiguration", "attack_path"],
- severities: ["critical"],
- triggerSource: "security_findings",
- },
- targets: ["@john.doe@email.com"],
- timeAggregation: 86400,
- version: 1,
- },
- id: VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID,
- type: "notification_rules",
- },
- },
- id: VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID,
-};
-
-apiInstance
- .patchSignalNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.ts b/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.ts
deleted file mode 100644
index 2f6745174ea2..000000000000
--- a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Patch a vulnerability-based notification rule returns "Notification rule successfully patched." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "valid_vulnerability_notification_rule" in the system
-const VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID = process.env
- .VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiPatchVulnerabilityNotificationRuleRequest =
- {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: "Rule 1",
- selectors: {
- query: "(source:production_service OR env:prod)",
- ruleTypes: ["misconfiguration", "attack_path"],
- severities: ["critical"],
- triggerSource: "security_findings",
- },
- targets: ["@john.doe@email.com"],
- timeAggregation: 86400,
- version: 1,
- },
- id: VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID,
- type: "notification_rules",
- },
- },
- id: VALID_VULNERABILITY_NOTIFICATION_RULE_DATA_ID,
- };
-
-apiInstance
- .patchVulnerabilityNotificationRule(params)
- .then((data: v2.NotificationRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/RunHistoricalJob.ts b/examples/v2/security-monitoring/RunHistoricalJob.ts
deleted file mode 100644
index 93d2ec9bdc9a..000000000000
--- a/examples/v2/security-monitoring/RunHistoricalJob.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Run a historical job returns "Status created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.runHistoricalJob"] = true;
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiRunHistoricalJobRequest = {
- body: {
- data: {
- type: "historicalDetectionsJobCreate",
- attributes: {
- jobDefinition: {
- type: "log_detection",
- name: "Excessive number of failed attempts.",
- queries: [
- {
- query: "source:non_existing_src_weekend",
- aggregation: "count",
- groupByFields: [],
- distinctFields: [],
- },
- ],
- cases: [
- {
- name: "Condition 1",
- status: "info",
- notifications: [],
- condition: "a > 1",
- },
- ],
- options: {
- keepAlive: 3600,
- maxSignalDuration: 86400,
- evaluationWindow: 900,
- },
- message: "A large number of failed login attempts.",
- tags: [],
- from: 1730387522611,
- to: 1730387532611,
- index: "main",
- },
- },
- },
- },
-};
-
-apiInstance
- .runHistoricalJob(params)
- .then((data: v2.JobCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.ts b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.ts
deleted file mode 100644
index 145163db478e..000000000000
--- a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Get a list of security signals returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiSearchSecurityMonitoringSignalsRequest = {
- body: {
- filter: {
- from: new Date(2019, 1, 2, 9, 42, 36, 320000),
- query: "security:attack status:high",
- to: new Date(2019, 1, 3, 9, 42, 36, 320000),
- },
- page: {
- cursor:
- "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
- limit: 25,
- },
- sort: "timestamp",
- },
-};
-
-apiInstance
- .searchSecurityMonitoringSignals(params)
- .then((data: v2.SecurityMonitoringSignalsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.ts b/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.ts
deleted file mode 100644
index 36e1aec0d379..000000000000
--- a/examples/v2/security-monitoring/SearchSecurityMonitoringSignals_1309350146.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Get a list of security signals returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiSearchSecurityMonitoringSignalsRequest = {
- body: {
- filter: {
- from: new Date(new Date().getTime() + -15 * 60 * 1000),
- query: "security:attack status:high",
- to: new Date(),
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.searchSecurityMonitoringSignalsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/security-monitoring/TestExistingSecurityMonitoringRule.ts b/examples/v2/security-monitoring/TestExistingSecurityMonitoringRule.ts
deleted file mode 100644
index 7608d6a58976..000000000000
--- a/examples/v2/security-monitoring/TestExistingSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Test an existing rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiTestExistingSecurityMonitoringRuleRequest =
- {
- body: {
- ruleQueryPayloads: [
- {
- expectedResult: true,
- index: 0,
- payload: {
- ddsource: "nginx",
- ddtags: "env:staging,version:5.1",
- hostname: "i-012345678",
- message:
- "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
- service: "payment",
- },
- },
- ],
- },
- ruleId: "rule_id",
- };
-
-apiInstance
- .testExistingSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleTestResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/TestSecurityMonitoringRule.ts b/examples/v2/security-monitoring/TestSecurityMonitoringRule.ts
deleted file mode 100644
index ca1297d5eb61..000000000000
--- a/examples/v2/security-monitoring/TestSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Test a rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiTestSecurityMonitoringRuleRequest = {
- body: {
- rule: {
- cases: [
- {
- name: "",
- status: "info",
- notifications: [],
- condition: "a > 0",
- },
- ],
- hasExtendedTitle: true,
- isEnabled: true,
- message: "My security monitoring rule message.",
- name: "My security monitoring rule.",
- options: {
- decreaseCriticalityBasedOnEnv: false,
- detectionMethod: "threshold",
- evaluationWindow: 0,
- keepAlive: 0,
- maxSignalDuration: 0,
- },
- queries: [
- {
- query: "source:source_here",
- groupByFields: ["@userIdentity.assumed_role"],
- distinctFields: [],
- aggregation: "count",
- name: "",
- },
- ],
- tags: ["env:prod", "team:security"],
- type: "log_detection",
- },
- ruleQueryPayloads: [
- {
- expectedResult: true,
- index: 0,
- payload: {
- ddsource: "source_here",
- ddtags: "env:staging,version:5.1",
- hostname: "i-012345678",
- message:
- "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
- service: "payment",
- },
- },
- ],
- },
-};
-
-apiInstance
- .testSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleTestResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/UpdateSecurityFilter.ts b/examples/v2/security-monitoring/UpdateSecurityFilter.ts
deleted file mode 100644
index 274850b135d1..000000000000
--- a/examples/v2/security-monitoring/UpdateSecurityFilter.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Update a security filter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_filter" in the system
-const SECURITY_FILTER_DATA_ID = process.env.SECURITY_FILTER_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiUpdateSecurityFilterRequest = {
- body: {
- data: {
- attributes: {
- exclusionFilters: [],
- filteredDataType: "logs",
- isEnabled: true,
- name: "Example-Security-Monitoring",
- query: "service:ExampleSecurityMonitoring",
- version: 1,
- },
- type: "security_filters",
- },
- },
- securityFilterId: SECURITY_FILTER_DATA_ID,
-};
-
-apiInstance
- .updateSecurityFilter(params)
- .then((data: v2.SecurityFilterResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.ts b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.ts
deleted file mode 100644
index 6629e5966c3d..000000000000
--- a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Update an existing rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "security_rule" in the system
-const SECURITY_RULE_ID = process.env.SECURITY_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiUpdateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring-Updated",
- queries: [
- {
- query: "@test:true",
- aggregation: "count",
- groupByFields: [],
- distinctFields: [],
- metrics: [],
- },
- ],
- filters: [],
- cases: [
- {
- name: "",
- status: "info",
- condition: "a > 0",
- notifications: [],
- },
- ],
- options: {
- evaluationWindow: 900,
- keepAlive: 3600,
- maxSignalDuration: 86400,
- },
- message: "Test rule",
- tags: [],
- isEnabled: true,
- },
- ruleId: SECURITY_RULE_ID,
-};
-
-apiInstance
- .updateSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.ts b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.ts
deleted file mode 100644
index 389de9c63411..000000000000
--- a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Update a cloud configuration rule's details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "cloud_configuration_rule" in the system
-const CLOUD_CONFIGURATION_RULE_ID = process.env
- .CLOUD_CONFIGURATION_RULE_ID as string;
-
-const params: v2.SecurityMonitoringApiUpdateSecurityMonitoringRuleRequest = {
- body: {
- name: "Example-Security-Monitoring_cloud_updated",
- isEnabled: false,
- cases: [
- {
- status: "info",
- notifications: [],
- },
- ],
- options: {
- complianceRuleOptions: {
- resourceType: "gcp_compute_disk",
- regoRule: {
- policy: `package datadog
-
-import data.datadog.output as dd_output
-
-import future.keywords.contains
-import future.keywords.if
-import future.keywords.in
-
-milliseconds_in_a_day := ((1000 * 60) * 60) * 24
-
-eval(iam_service_account_key) = "skip" if {
- iam_service_account_key.disabled
-} else = "pass" if {
- (iam_service_account_key.resource_seen_at / milliseconds_in_a_day) - (iam_service_account_key.valid_after_time / milliseconds_in_a_day) <= 90
-} else = "fail"
-
-# This part remains unchanged for all rules
-results contains result if {
- some resource in input.resources[input.main_resource_type]
- result := dd_output.format(resource, eval(resource))
-}
-`,
- resourceTypes: ["gcp_compute_disk"],
- },
- },
- },
- message: "ddd",
- tags: [],
- complianceSignalOptions: {
- userActivationStatus: false,
- userGroupByFields: [],
- },
- },
- ruleId: CLOUD_CONFIGURATION_RULE_ID,
-};
-
-apiInstance
- .updateSecurityMonitoringRule(params)
- .then((data: v2.SecurityMonitoringRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.ts b/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.ts
deleted file mode 100644
index 825ee7b9cc2b..000000000000
--- a/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update a suppression rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-// there is a valid "suppression" in the system
-const SUPPRESSION_DATA_ID = process.env.SUPPRESSION_DATA_ID as string;
-
-const params: v2.SecurityMonitoringApiUpdateSecurityMonitoringSuppressionRequest =
- {
- body: {
- data: {
- attributes: {
- suppressionQuery: "env:staging status:low",
- },
- type: "suppressions",
- },
- },
- suppressionId: SUPPRESSION_DATA_ID,
- };
-
-apiInstance
- .updateSecurityMonitoringSuppression(params)
- .then((data: v2.SecurityMonitoringSuppressionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.ts b/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.ts
deleted file mode 100644
index e3d4c14d3424..000000000000
--- a/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Validate a detection rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SecurityMonitoringApi(configuration);
-
-const params: v2.SecurityMonitoringApiValidateSecurityMonitoringRuleRequest = {
- body: {
- cases: [
- {
- name: "",
- status: "info",
- notifications: [],
- condition: "a > 0",
- },
- ],
- hasExtendedTitle: true,
- isEnabled: true,
- message: "My security monitoring rule",
- name: "My security monitoring rule",
- options: {
- evaluationWindow: 1800,
- keepAlive: 1800,
- maxSignalDuration: 1800,
- detectionMethod: "threshold",
- },
- queries: [
- {
- query: "source:source_here",
- groupByFields: ["@userIdentity.assumed_role"],
- distinctFields: [],
- aggregation: "count",
- name: "",
- },
- ],
- tags: ["env:prod", "team:security"],
- type: "log_detection",
- },
-};
-
-apiInstance
- .validateSecurityMonitoringRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/CreateScanningGroup.ts b/examples/v2/sensitive-data-scanner/CreateScanningGroup.ts
deleted file mode 100644
index f90661e462d4..000000000000
--- a/examples/v2/sensitive-data-scanner/CreateScanningGroup.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Create Scanning Group returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// a valid "configuration" in the system
-const CONFIGURATION_DATA_ID = process.env.CONFIGURATION_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiCreateScanningGroupRequest = {
- body: {
- meta: {},
- data: {
- type: "sensitive_data_scanner_group",
- attributes: {
- name: "Example-Sensitive-Data-Scanner",
- isEnabled: false,
- productList: ["logs"],
- filter: {
- query: "*",
- },
- },
- relationships: {
- configuration: {
- data: {
- type: "sensitive_data_scanner_configuration",
- id: CONFIGURATION_DATA_ID,
- },
- },
- rules: {
- data: [],
- },
- },
- },
- },
-};
-
-apiInstance
- .createScanningGroup(params)
- .then((data: v2.SensitiveDataScannerCreateGroupResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/CreateScanningRule.ts b/examples/v2/sensitive-data-scanner/CreateScanningRule.ts
deleted file mode 100644
index 1294bf6f925a..000000000000
--- a/examples/v2/sensitive-data-scanner/CreateScanningRule.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Create Scanning Rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// there is a valid "scanning_group" in the system
-const GROUP_DATA_ID = process.env.GROUP_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiCreateScanningRuleRequest = {
- body: {
- meta: {},
- data: {
- type: "sensitive_data_scanner_rule",
- attributes: {
- name: "Example-Sensitive-Data-Scanner",
- pattern: "pattern",
- namespaces: ["admin"],
- excludedNamespaces: ["admin.name"],
- textReplacement: {
- type: "none",
- },
- tags: ["sensitive_data:true"],
- isEnabled: true,
- priority: 1,
- includedKeywordConfiguration: {
- keywords: ["credit card"],
- characterCount: 35,
- },
- },
- relationships: {
- group: {
- data: {
- type: "sensitive_data_scanner_group",
- id: GROUP_DATA_ID,
- },
- },
- },
- },
- },
-};
-
-apiInstance
- .createScanningRule(params)
- .then((data: v2.SensitiveDataScannerCreateRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/DeleteScanningGroup.ts b/examples/v2/sensitive-data-scanner/DeleteScanningGroup.ts
deleted file mode 100644
index cc28cedeb979..000000000000
--- a/examples/v2/sensitive-data-scanner/DeleteScanningGroup.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Delete Scanning Group returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// there is a valid "scanning_group" in the system
-const GROUP_DATA_ID = process.env.GROUP_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiDeleteScanningGroupRequest = {
- body: {
- meta: {},
- },
- groupId: GROUP_DATA_ID,
-};
-
-apiInstance
- .deleteScanningGroup(params)
- .then((data: v2.SensitiveDataScannerGroupDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/DeleteScanningRule.ts b/examples/v2/sensitive-data-scanner/DeleteScanningRule.ts
deleted file mode 100644
index 002a12b049e7..000000000000
--- a/examples/v2/sensitive-data-scanner/DeleteScanningRule.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Delete Scanning Rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// the "scanning_group" has a "scanning_rule"
-const RULE_DATA_ID = process.env.RULE_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiDeleteScanningRuleRequest = {
- body: {
- meta: {},
- },
- ruleId: RULE_DATA_ID,
-};
-
-apiInstance
- .deleteScanningRule(params)
- .then((data: v2.SensitiveDataScannerRuleDeleteResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/ListScanningGroups.ts b/examples/v2/sensitive-data-scanner/ListScanningGroups.ts
deleted file mode 100644
index caeb6f57a648..000000000000
--- a/examples/v2/sensitive-data-scanner/ListScanningGroups.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List Scanning Groups returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-apiInstance
- .listScanningGroups()
- .then((data: v2.SensitiveDataScannerGetConfigResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/ListStandardPatterns.ts b/examples/v2/sensitive-data-scanner/ListStandardPatterns.ts
deleted file mode 100644
index 19c46f613d79..000000000000
--- a/examples/v2/sensitive-data-scanner/ListStandardPatterns.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * List standard patterns returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-apiInstance
- .listStandardPatterns()
- .then((data: v2.SensitiveDataScannerStandardPatternsResponseData) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/ReorderScanningGroups.ts b/examples/v2/sensitive-data-scanner/ReorderScanningGroups.ts
deleted file mode 100644
index 8a080c25e44a..000000000000
--- a/examples/v2/sensitive-data-scanner/ReorderScanningGroups.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Reorder Groups returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// there is a valid "scanning_group" in the system
-const GROUP_DATA_ID = process.env.GROUP_DATA_ID as string;
-
-// a valid "configuration" in the system
-const CONFIGURATION_DATA_ID = process.env.CONFIGURATION_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiReorderScanningGroupsRequest = {
- body: {
- data: {
- relationships: {
- groups: {
- data: [
- {
- type: "sensitive_data_scanner_group",
- id: GROUP_DATA_ID,
- },
- ],
- },
- },
- type: "sensitive_data_scanner_configuration",
- id: CONFIGURATION_DATA_ID,
- },
- meta: {},
- },
-};
-
-apiInstance
- .reorderScanningGroups(params)
- .then((data: v2.SensitiveDataScannerReorderGroupsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/UpdateScanningGroup.ts b/examples/v2/sensitive-data-scanner/UpdateScanningGroup.ts
deleted file mode 100644
index 6a204c9f969c..000000000000
--- a/examples/v2/sensitive-data-scanner/UpdateScanningGroup.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Update Scanning Group returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// there is a valid "scanning_group" in the system
-const GROUP_DATA_ID = process.env.GROUP_DATA_ID as string;
-
-// a valid "configuration" in the system
-const CONFIGURATION_DATA_ID = process.env.CONFIGURATION_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiUpdateScanningGroupRequest = {
- body: {
- meta: {},
- data: {
- id: GROUP_DATA_ID,
- type: "sensitive_data_scanner_group",
- attributes: {
- name: "Example-Sensitive-Data-Scanner",
- isEnabled: false,
- productList: ["logs"],
- filter: {
- query: "*",
- },
- },
- relationships: {
- configuration: {
- data: {
- type: "sensitive_data_scanner_configuration",
- id: CONFIGURATION_DATA_ID,
- },
- },
- rules: {
- data: [],
- },
- },
- },
- },
- groupId: GROUP_DATA_ID,
-};
-
-apiInstance
- .updateScanningGroup(params)
- .then((data: v2.SensitiveDataScannerGroupUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/sensitive-data-scanner/UpdateScanningRule.ts b/examples/v2/sensitive-data-scanner/UpdateScanningRule.ts
deleted file mode 100644
index e2fb723dca8a..000000000000
--- a/examples/v2/sensitive-data-scanner/UpdateScanningRule.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Update Scanning Rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SensitiveDataScannerApi(configuration);
-
-// the "scanning_group" has a "scanning_rule"
-const RULE_DATA_ID = process.env.RULE_DATA_ID as string;
-
-const params: v2.SensitiveDataScannerApiUpdateScanningRuleRequest = {
- body: {
- meta: {},
- data: {
- id: RULE_DATA_ID,
- type: "sensitive_data_scanner_rule",
- attributes: {
- name: "Example-Sensitive-Data-Scanner",
- pattern: "pattern",
- textReplacement: {
- type: "none",
- },
- tags: ["sensitive_data:true"],
- isEnabled: true,
- priority: 5,
- includedKeywordConfiguration: {
- keywords: ["credit card", "cc"],
- characterCount: 35,
- },
- },
- },
- },
- ruleId: RULE_DATA_ID,
-};
-
-apiInstance
- .updateScanningRule(params)
- .then((data: v2.SensitiveDataScannerRuleUpdateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/CreateServiceAccount.ts b/examples/v2/service-accounts/CreateServiceAccount.ts
deleted file mode 100644
index d3b1b43550eb..000000000000
--- a/examples/v2/service-accounts/CreateServiceAccount.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Create a service account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "role" in the system
-const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiCreateServiceAccountRequest = {
- body: {
- data: {
- type: "users",
- attributes: {
- name: "Test API Client",
- email: "Example-Service-Account@datadoghq.com",
- serviceAccount: true,
- },
- relationships: {
- roles: {
- data: [
- {
- id: ROLE_DATA_ID,
- type: "roles",
- },
- ],
- },
- },
- },
- },
-};
-
-apiInstance
- .createServiceAccount(params)
- .then((data: v2.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/CreateServiceAccountApplicationKey.ts b/examples/v2/service-accounts/CreateServiceAccountApplicationKey.ts
deleted file mode 100644
index 11ad0089d81e..000000000000
--- a/examples/v2/service-accounts/CreateServiceAccountApplicationKey.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create an application key for this service account returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiCreateServiceAccountApplicationKeyRequest = {
- body: {
- data: {
- attributes: {
- name: "Example-Service-Account",
- },
- type: "application_keys",
- },
- },
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
-};
-
-apiInstance
- .createServiceAccountApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.ts b/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.ts
deleted file mode 100644
index 77c3c138ad2b..000000000000
--- a/examples/v2/service-accounts/CreateServiceAccountApplicationKey_3480494373.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Create an application key with scopes for this service account returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiCreateServiceAccountApplicationKeyRequest = {
- body: {
- data: {
- attributes: {
- name: "Example-Service-Account",
- scopes: [
- "dashboards_read",
- "dashboards_write",
- "dashboards_public_share",
- ],
- },
- type: "application_keys",
- },
- },
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
-};
-
-apiInstance
- .createServiceAccountApplicationKey(params)
- .then((data: v2.ApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.ts b/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.ts
deleted file mode 100644
index 38e8075bcf7c..000000000000
--- a/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Delete an application key for this service account returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-// there is a valid "service_account_application_key" for "service_account_user"
-const SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = process.env
- .SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiDeleteServiceAccountApplicationKeyRequest = {
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
- appKeyId: SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .deleteServiceAccountApplicationKey(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/GetServiceAccountApplicationKey.ts b/examples/v2/service-accounts/GetServiceAccountApplicationKey.ts
deleted file mode 100644
index f1a0efb82f38..000000000000
--- a/examples/v2/service-accounts/GetServiceAccountApplicationKey.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Get one application key for this service account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-// there is a valid "service_account_application_key" for "service_account_user"
-const SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = process.env
- .SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiGetServiceAccountApplicationKeyRequest = {
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
- appKeyId: SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .getServiceAccountApplicationKey(params)
- .then((data: v2.PartialApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/ListServiceAccountApplicationKeys.ts b/examples/v2/service-accounts/ListServiceAccountApplicationKeys.ts
deleted file mode 100644
index 8fc6e5f0c3ad..000000000000
--- a/examples/v2/service-accounts/ListServiceAccountApplicationKeys.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List application keys for this service account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiListServiceAccountApplicationKeysRequest = {
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
-};
-
-apiInstance
- .listServiceAccountApplicationKeys(params)
- .then((data: v2.ListApplicationKeysResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.ts b/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.ts
deleted file mode 100644
index 92cdd6842aa0..000000000000
--- a/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Edit an application key for this service account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceAccountsApi(configuration);
-
-// there is a valid "service_account_user" in the system
-const SERVICE_ACCOUNT_USER_DATA_ID = process.env
- .SERVICE_ACCOUNT_USER_DATA_ID as string;
-
-// there is a valid "service_account_application_key" for "service_account_user"
-const SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID = process.env
- .SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID as string;
-
-const params: v2.ServiceAccountsApiUpdateServiceAccountApplicationKeyRequest = {
- body: {
- data: {
- id: SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID,
- type: "application_keys",
- attributes: {
- name: "Application Key for managing dashboards-updated",
- },
- },
- },
- serviceAccountId: SERVICE_ACCOUNT_USER_DATA_ID,
- appKeyId: SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID,
-};
-
-apiInstance
- .updateServiceAccountApplicationKey(params)
- .then((data: v2.PartialApplicationKeyResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.ts b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.ts
deleted file mode 100644
index ab0fe8f5ff91..000000000000
--- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Create or update service definition returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
- body: {
- application: "my-app",
- ciPipelineFingerprints: ["j88xdEy0J5lc", "eZ7LMljCk8vo"],
- contacts: [
- {
- contact: "https://teams.microsoft.com/myteam",
- name: "My team channel",
- type: "slack",
- },
- ],
- ddService: "my-service",
- description: "My service description",
- extensions: {
- "myorg/extension": "extensionValue",
- },
- integrations: {
- opsgenie: {
- region: "US",
- serviceUrl:
- "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000",
- },
- pagerduty: {
- serviceUrl: "https://my-org.pagerduty.com/service-directory/PMyService",
- },
- },
- languages: ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"],
- lifecycle: "sandbox",
- links: [
- {
- name: "Runbook",
- provider: "Github",
- type: "runbook",
- url: "https://my-runbook",
- },
- ],
- schemaVersion: "v2.2",
- tags: ["my:tag", "service:tag"],
- team: "my-team",
- tier: "High",
- type: "web",
- },
-};
-
-apiInstance
- .createOrUpdateServiceDefinitions(params)
- .then((data: v2.ServiceDefinitionCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_1808735248.ts b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_1808735248.ts
deleted file mode 100644
index b9060662628f..000000000000
--- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_1808735248.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Create or update service definition using schema v2 returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
- body: {
- contacts: [
- {
- contact: "contact@datadoghq.com",
- name: "Team Email",
- type: "email",
- },
- ],
- ddService: "service-exampleservicedefinition",
- ddTeam: "my-team",
- docs: [
- {
- name: "Architecture",
- provider: "google drive",
- url: "https://gdrive/mydoc",
- },
- ],
- extensions: {
- myorgextension: "extensionvalue",
- },
- integrations: {
- opsgenie: {
- region: "US",
- serviceUrl:
- "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000",
- },
- pagerduty: "https://my-org.pagerduty.com/service-directory/PMyService",
- },
- links: [
- {
- name: "Runbook",
- type: "runbook",
- url: "https://my-runbook",
- },
- ],
- repos: [
- {
- name: "Source Code",
- provider: "GitHub",
- url: "https://github.com/DataDog/schema",
- },
- ],
- schemaVersion: "v2",
- tags: ["my:tag", "service:tag"],
- team: "my-team",
- },
-};
-
-apiInstance
- .createOrUpdateServiceDefinitions(params)
- .then((data: v2.ServiceDefinitionCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2619874414.ts b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2619874414.ts
deleted file mode 100644
index 0a1f3e7de976..000000000000
--- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2619874414.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Create or update service definition using schema v2-1 returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
- body: {
- contacts: [
- {
- contact: "contact@datadoghq.com",
- name: "Team Email",
- type: "email",
- },
- ],
- ddService: "service-exampleservicedefinition",
- extensions: {
- myorgextension: "extensionvalue",
- },
- integrations: {
- opsgenie: {
- region: "US",
- serviceUrl:
- "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000",
- },
- pagerduty: {
- serviceUrl: "https://my-org.pagerduty.com/service-directory/PMyService",
- },
- },
- links: [
- {
- name: "Runbook",
- type: "runbook",
- url: "https://my-runbook",
- },
- {
- name: "Source Code",
- type: "repo",
- provider: "GitHub",
- url: "https://github.com/DataDog/schema",
- },
- {
- name: "Architecture",
- type: "doc",
- provider: "Gigoogle drivetHub",
- url: "https://my-runbook",
- },
- ],
- schemaVersion: "v2.1",
- tags: ["my:tag", "service:tag"],
- team: "my-team",
- },
-};
-
-apiInstance
- .createOrUpdateServiceDefinitions(params)
- .then((data: v2.ServiceDefinitionCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.ts b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.ts
deleted file mode 100644
index b282caeb1337..000000000000
--- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Create or update service definition using schema v2-2 returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
- body: {
- contacts: [
- {
- contact: "contact@datadoghq.com",
- name: "Team Email",
- type: "email",
- },
- ],
- ddService: "service-exampleservicedefinition",
- extensions: {
- myorgextension: "extensionvalue",
- },
- integrations: {
- opsgenie: {
- region: "US",
- serviceUrl:
- "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000",
- },
- pagerduty: {
- serviceUrl: "https://my-org.pagerduty.com/service-directory/PMyService",
- },
- },
- links: [
- {
- name: "Runbook",
- type: "runbook",
- url: "https://my-runbook",
- },
- {
- name: "Source Code",
- type: "repo",
- provider: "GitHub",
- url: "https://github.com/DataDog/schema",
- },
- {
- name: "Architecture",
- type: "doc",
- provider: "Gigoogle drivetHub",
- url: "https://my-runbook",
- },
- ],
- schemaVersion: "v2.2",
- tags: ["my:tag", "service:tag"],
- team: "my-team",
- },
-};
-
-apiInstance
- .createOrUpdateServiceDefinitions(params)
- .then((data: v2.ServiceDefinitionCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/DeleteServiceDefinition.ts b/examples/v2/service-definition/DeleteServiceDefinition.ts
deleted file mode 100644
index 6f45a8cfd764..000000000000
--- a/examples/v2/service-definition/DeleteServiceDefinition.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a single service definition returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiDeleteServiceDefinitionRequest = {
- serviceName: "service-definition-test",
-};
-
-apiInstance
- .deleteServiceDefinition(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/GetServiceDefinition.ts b/examples/v2/service-definition/GetServiceDefinition.ts
deleted file mode 100644
index 5d369df76589..000000000000
--- a/examples/v2/service-definition/GetServiceDefinition.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a single service definition returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiGetServiceDefinitionRequest = {
- serviceName: "service-definition-test",
- schemaVersion: "v2.1",
-};
-
-apiInstance
- .getServiceDefinition(params)
- .then((data: v2.ServiceDefinitionGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/ListServiceDefinitions.ts b/examples/v2/service-definition/ListServiceDefinitions.ts
deleted file mode 100644
index 017a2d2a611e..000000000000
--- a/examples/v2/service-definition/ListServiceDefinitions.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all service definitions returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiListServiceDefinitionsRequest = {
- schemaVersion: "v2.1",
-};
-
-apiInstance
- .listServiceDefinitions(params)
- .then((data: v2.ServiceDefinitionsListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-definition/ListServiceDefinitions_336468013.ts b/examples/v2/service-definition/ListServiceDefinitions_336468013.ts
deleted file mode 100644
index a8294fb6779b..000000000000
--- a/examples/v2/service-definition/ListServiceDefinitions_336468013.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get all service definitions returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.ServiceDefinitionApi(configuration);
-
-const params: v2.ServiceDefinitionApiListServiceDefinitionsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listServiceDefinitionsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/service-level-objectives/CreateSLOReportJob.ts b/examples/v2/service-level-objectives/CreateSLOReportJob.ts
deleted file mode 100644
index 6606e740b423..000000000000
--- a/examples/v2/service-level-objectives/CreateSLOReportJob.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Create a new SLO report returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createSLOReportJob"] = true;
-const apiInstance = new v2.ServiceLevelObjectivesApi(configuration);
-
-const params: v2.ServiceLevelObjectivesApiCreateSLOReportJobRequest = {
- body: {
- data: {
- attributes: {
- fromTs: Math.round(
- new Date(new Date().getTime() + -40 * 86400 * 1000).getTime() / 1000
- ),
- toTs: Math.round(new Date().getTime() / 1000),
- query: `slo_type:metric "SLO Reporting Test"`,
- interval: "monthly",
- timezone: "America/New_York",
- },
- },
- },
-};
-
-apiInstance
- .createSLOReportJob(params)
- .then((data: v2.SLOReportPostResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-level-objectives/GetSLOReport.ts b/examples/v2/service-level-objectives/GetSLOReport.ts
deleted file mode 100644
index 4c179f22130d..000000000000
--- a/examples/v2/service-level-objectives/GetSLOReport.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get SLO report returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getSLOReport"] = true;
-const apiInstance = new v2.ServiceLevelObjectivesApi(configuration);
-
-const params: v2.ServiceLevelObjectivesApiGetSLOReportRequest = {
- reportId: "9fb2dc2a-ead0-11ee-a174-9fe3a9d7627f",
-};
-
-apiInstance
- .getSLOReport(params)
- .then((data: string) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-level-objectives/GetSLOReportJobStatus.ts b/examples/v2/service-level-objectives/GetSLOReportJobStatus.ts
deleted file mode 100644
index b94ab5988fc7..000000000000
--- a/examples/v2/service-level-objectives/GetSLOReportJobStatus.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get SLO report status returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.getSLOReportJobStatus"] = true;
-const apiInstance = new v2.ServiceLevelObjectivesApi(configuration);
-
-// there is a valid "report" in the system
-const REPORT_DATA_ID = process.env.REPORT_DATA_ID as string;
-
-const params: v2.ServiceLevelObjectivesApiGetSLOReportJobStatusRequest = {
- reportId: REPORT_DATA_ID,
-};
-
-apiInstance
- .getSLOReportJobStatus(params)
- .then((data: v2.SLOReportStatusGetResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts b/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts
deleted file mode 100644
index 716fcea679e6..000000000000
--- a/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Create outcomes batch returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createScorecardOutcomesBatch"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-// there is a valid "create_scorecard_rule" in the system
-const CREATE_SCORECARD_RULE_DATA_ID = process.env
- .CREATE_SCORECARD_RULE_DATA_ID as string;
-
-const params: v2.ServiceScorecardsApiCreateScorecardOutcomesBatchRequest = {
- body: {
- data: {
- attributes: {
- results: [
- {
- remarks: `See: Services`,
- ruleId: CREATE_SCORECARD_RULE_DATA_ID,
- serviceName: "my-service",
- state: "pass",
- },
- ],
- },
- type: "batched-outcome",
- },
- },
-};
-
-apiInstance
- .createScorecardOutcomesBatch(params)
- .then((data: v2.OutcomesBatchResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/CreateScorecardRule.ts b/examples/v2/service-scorecards/CreateScorecardRule.ts
deleted file mode 100644
index 84569295c9c5..000000000000
--- a/examples/v2/service-scorecards/CreateScorecardRule.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Create a new rule returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-const params: v2.ServiceScorecardsApiCreateScorecardRuleRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: "Example-Service-Scorecard",
- scorecardName: "Observability Best Practices",
- },
- type: "rule",
- },
- },
-};
-
-apiInstance
- .createScorecardRule(params)
- .then((data: v2.CreateRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/DeleteScorecardRule.ts b/examples/v2/service-scorecards/DeleteScorecardRule.ts
deleted file mode 100644
index f142d65663f8..000000000000
--- a/examples/v2/service-scorecards/DeleteScorecardRule.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Delete a rule returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-// there is a valid "create_scorecard_rule" in the system
-const CREATE_SCORECARD_RULE_DATA_ID = process.env
- .CREATE_SCORECARD_RULE_DATA_ID as string;
-
-const params: v2.ServiceScorecardsApiDeleteScorecardRuleRequest = {
- ruleId: CREATE_SCORECARD_RULE_DATA_ID,
-};
-
-apiInstance
- .deleteScorecardRule(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/ListScorecardOutcomes.ts b/examples/v2/service-scorecards/ListScorecardOutcomes.ts
deleted file mode 100644
index 73c6c26160b2..000000000000
--- a/examples/v2/service-scorecards/ListScorecardOutcomes.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List all rule outcomes returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardOutcomes"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-apiInstance
- .listScorecardOutcomes()
- .then((data: v2.OutcomesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts b/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts
deleted file mode 100644
index a7bca0c77d11..000000000000
--- a/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * List all rule outcomes returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardOutcomes"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-const params: v2.ServiceScorecardsApiListScorecardOutcomesRequest = {
- pageSize: 2,
- fieldsOutcome: "state",
- filterOutcomeServiceName: "my-service",
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listScorecardOutcomesWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/service-scorecards/ListScorecardRules.ts b/examples/v2/service-scorecards/ListScorecardRules.ts
deleted file mode 100644
index 242cc89ff42d..000000000000
--- a/examples/v2/service-scorecards/ListScorecardRules.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * List all rules returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardRules"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-apiInstance
- .listScorecardRules()
- .then((data: v2.ListRulesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/ListScorecardRules_4057666343.ts b/examples/v2/service-scorecards/ListScorecardRules_4057666343.ts
deleted file mode 100644
index 5bdbf06edfee..000000000000
--- a/examples/v2/service-scorecards/ListScorecardRules_4057666343.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * List all rules returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardRules"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-const params: v2.ServiceScorecardsApiListScorecardRulesRequest = {
- pageSize: 2,
- filterRuleCustom: true,
- fieldsRule: "name",
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listScorecardRulesWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/service-scorecards/UpdateScorecardRule.ts b/examples/v2/service-scorecards/UpdateScorecardRule.ts
deleted file mode 100644
index 484c7282316a..000000000000
--- a/examples/v2/service-scorecards/UpdateScorecardRule.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Update an existing rule returns "Rule updated successfully" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
-
-// there is a valid "create_scorecard_rule" in the system
-const CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_NAME = process.env
- .CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_NAME as string;
-const CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_SCORECARD_NAME = process.env
- .CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_SCORECARD_NAME as string;
-const CREATE_SCORECARD_RULE_DATA_ID = process.env
- .CREATE_SCORECARD_RULE_DATA_ID as string;
-
-const params: v2.ServiceScorecardsApiUpdateScorecardRuleRequest = {
- body: {
- data: {
- attributes: {
- enabled: true,
- name: CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_NAME,
- scorecardName: CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_SCORECARD_NAME,
- description: "Updated description via test",
- },
- },
- },
- ruleId: CREATE_SCORECARD_RULE_DATA_ID,
-};
-
-apiInstance
- .updateScorecardRule(params)
- .then((data: v2.UpdateRuleResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/software-catalog/DeleteCatalogEntity.ts b/examples/v2/software-catalog/DeleteCatalogEntity.ts
deleted file mode 100644
index 03a387733261..000000000000
--- a/examples/v2/software-catalog/DeleteCatalogEntity.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Delete a single entity returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SoftwareCatalogApi(configuration);
-
-const params: v2.SoftwareCatalogApiDeleteCatalogEntityRequest = {
- entityId: "service:myservice",
-};
-
-apiInstance
- .deleteCatalogEntity(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/software-catalog/ListCatalogEntity.ts b/examples/v2/software-catalog/ListCatalogEntity.ts
deleted file mode 100644
index e820d2a38963..000000000000
--- a/examples/v2/software-catalog/ListCatalogEntity.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of entities returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SoftwareCatalogApi(configuration);
-
-apiInstance
- .listCatalogEntity()
- .then((data: v2.ListEntityCatalogResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/software-catalog/ListCatalogEntity_2305103326.ts b/examples/v2/software-catalog/ListCatalogEntity_2305103326.ts
deleted file mode 100644
index 5984c9b96c2e..000000000000
--- a/examples/v2/software-catalog/ListCatalogEntity_2305103326.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Get a list of entities returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SoftwareCatalogApi(configuration);
-
-(async () => {
- try {
- for await (const item of apiInstance.listCatalogEntityWithPagination()) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/software-catalog/UpsertCatalogEntity.ts b/examples/v2/software-catalog/UpsertCatalogEntity.ts
deleted file mode 100644
index 05a2b1d7a37b..000000000000
--- a/examples/v2/software-catalog/UpsertCatalogEntity.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Create or update entities returns "ACCEPTED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SoftwareCatalogApi(configuration);
-
-const params: v2.SoftwareCatalogApiUpsertCatalogEntityRequest = {
- body: {
- apiVersion: "v3",
- datadog: {
- codeLocations: [
- {
- paths: [],
- },
- ],
- events: [{}],
- logs: [{}],
- performanceData: {
- tags: [],
- },
- pipelines: {
- fingerprints: [],
- },
- },
- integrations: {
- opsgenie: {
- serviceUrl: "https://www.opsgenie.com/service/shopping-cart",
- },
- pagerduty: {
- serviceUrl:
- "https://www.pagerduty.com/service-directory/Pshopping-cart",
- },
- },
- kind: "service",
- metadata: {
- additionalOwners: [
- {
- name: "",
- },
- ],
- contacts: [
- {
- contact: "https://slack/",
- type: "slack",
- },
- ],
- id: "4b163705-23c0-4573-b2fb-f6cea2163fcb",
- inheritFrom: "application:default/myapp",
- links: [
- {
- name: "mylink",
- type: "link",
- url: "https://mylink",
- },
- ],
- name: "myService",
- namespace: "default",
- tags: ["this:tag", "that:tag"],
- },
- spec: {
- dependsOn: [],
- languages: [],
- },
- },
-};
-
-apiInstance
- .upsertCatalogEntity(params)
- .then((data: v2.UpsertCatalogEntityResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/software-catalog/UpsertCatalogEntity_586948155.ts b/examples/v2/software-catalog/UpsertCatalogEntity_586948155.ts
deleted file mode 100644
index 4cd717d9fd2d..000000000000
--- a/examples/v2/software-catalog/UpsertCatalogEntity_586948155.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Create or update software catalog entity using schema v3 returns "ACCEPTED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SoftwareCatalogApi(configuration);
-
-const params: v2.SoftwareCatalogApiUpsertCatalogEntityRequest = {
- body: {
- apiVersion: "v3",
- datadog: {
- codeLocations: [
- {
- paths: [],
- },
- ],
- events: [{}],
- logs: [{}],
- performanceData: {
- tags: [],
- },
- pipelines: {
- fingerprints: [],
- },
- },
- integrations: {
- opsgenie: {
- serviceUrl: "https://www.opsgenie.com/service/shopping-cart",
- },
- pagerduty: {
- serviceUrl:
- "https://www.pagerduty.com/service-directory/Pshopping-cart",
- },
- },
- kind: "service",
- metadata: {
- additionalOwners: [],
- contacts: [
- {
- contact: "https://slack/",
- type: "slack",
- },
- ],
- id: "4b163705-23c0-4573-b2fb-f6cea2163fcb",
- inheritFrom: "application:default/myapp",
- links: [
- {
- name: "mylink",
- type: "link",
- url: "https://mylink",
- },
- ],
- name: "service-examplesoftwarecatalog",
- tags: ["this:tag", "that:tag"],
- },
- spec: {
- dependsOn: [],
- languages: [],
- },
- },
-};
-
-apiInstance
- .upsertCatalogEntity(params)
- .then((data: v2.UpsertCatalogEntityResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans-metrics/CreateSpansMetric.ts b/examples/v2/spans-metrics/CreateSpansMetric.ts
deleted file mode 100644
index 783734df9f86..000000000000
--- a/examples/v2/spans-metrics/CreateSpansMetric.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Create a span-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansMetricsApi(configuration);
-
-const params: v2.SpansMetricsApiCreateSpansMetricRequest = {
- body: {
- data: {
- attributes: {
- compute: {
- aggregationType: "distribution",
- includePercentiles: false,
- path: "@duration",
- },
- filter: {
- query: "@http.status_code:200 service:my-service",
- },
- groupBy: [
- {
- path: "resource_name",
- tagName: "resource_name",
- },
- ],
- },
- id: "ExampleSpansMetric",
- type: "spans_metrics",
- },
- },
-};
-
-apiInstance
- .createSpansMetric(params)
- .then((data: v2.SpansMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans-metrics/DeleteSpansMetric.ts b/examples/v2/spans-metrics/DeleteSpansMetric.ts
deleted file mode 100644
index dcce85a5eef4..000000000000
--- a/examples/v2/spans-metrics/DeleteSpansMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete a span-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansMetricsApi(configuration);
-
-// there is a valid "spans_metric" in the system
-const SPANS_METRIC_DATA_ID = process.env.SPANS_METRIC_DATA_ID as string;
-
-const params: v2.SpansMetricsApiDeleteSpansMetricRequest = {
- metricId: SPANS_METRIC_DATA_ID,
-};
-
-apiInstance
- .deleteSpansMetric(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans-metrics/GetSpansMetric.ts b/examples/v2/spans-metrics/GetSpansMetric.ts
deleted file mode 100644
index 8c6e2bdebf0d..000000000000
--- a/examples/v2/spans-metrics/GetSpansMetric.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a span-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansMetricsApi(configuration);
-
-// there is a valid "spans_metric" in the system
-const SPANS_METRIC_DATA_ID = process.env.SPANS_METRIC_DATA_ID as string;
-
-const params: v2.SpansMetricsApiGetSpansMetricRequest = {
- metricId: SPANS_METRIC_DATA_ID,
-};
-
-apiInstance
- .getSpansMetric(params)
- .then((data: v2.SpansMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans-metrics/ListSpansMetrics.ts b/examples/v2/spans-metrics/ListSpansMetrics.ts
deleted file mode 100644
index 02568d184134..000000000000
--- a/examples/v2/spans-metrics/ListSpansMetrics.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all span-based metrics returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansMetricsApi(configuration);
-
-apiInstance
- .listSpansMetrics()
- .then((data: v2.SpansMetricsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans-metrics/UpdateSpansMetric.ts b/examples/v2/spans-metrics/UpdateSpansMetric.ts
deleted file mode 100644
index a4f34c615bb6..000000000000
--- a/examples/v2/spans-metrics/UpdateSpansMetric.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Update a span-based metric returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansMetricsApi(configuration);
-
-// there is a valid "spans_metric" in the system
-const SPANS_METRIC_DATA_ID = process.env.SPANS_METRIC_DATA_ID as string;
-
-const params: v2.SpansMetricsApiUpdateSpansMetricRequest = {
- body: {
- data: {
- attributes: {
- compute: {
- includePercentiles: false,
- },
- filter: {
- query: "@http.status_code:200 service:my-service-updated",
- },
- groupBy: [
- {
- path: "resource_name",
- tagName: "resource_name",
- },
- ],
- },
- type: "spans_metrics",
- },
- },
- metricId: SPANS_METRIC_DATA_ID,
-};
-
-apiInstance
- .updateSpansMetric(params)
- .then((data: v2.SpansMetricResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans/AggregateSpans.ts b/examples/v2/spans/AggregateSpans.ts
deleted file mode 100644
index b03b183b9317..000000000000
--- a/examples/v2/spans/AggregateSpans.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Aggregate spans returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansApi(configuration);
-
-const params: v2.SpansApiAggregateSpansRequest = {
- body: {
- data: {
- attributes: {
- compute: [
- {
- aggregation: "count",
- interval: "5m",
- type: "timeseries",
- },
- ],
- filter: {
- from: "now-15m",
- query: "*",
- to: "now",
- },
- },
- type: "aggregate_request",
- },
- },
-};
-
-apiInstance
- .aggregateSpans(params)
- .then((data: v2.SpansAggregateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans/ListSpans.ts b/examples/v2/spans/ListSpans.ts
deleted file mode 100644
index dbc6562350ac..000000000000
--- a/examples/v2/spans/ListSpans.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Search spans returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansApi(configuration);
-
-const params: v2.SpansApiListSpansRequest = {
- body: {
- data: {
- attributes: {
- filter: {
- from: "now-15m",
- query: "*",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 25,
- },
- sort: "timestamp",
- },
- type: "search_request",
- },
- },
-};
-
-apiInstance
- .listSpans(params)
- .then((data: v2.SpansListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans/ListSpansGet.ts b/examples/v2/spans/ListSpansGet.ts
deleted file mode 100644
index 1591b6d7e007..000000000000
--- a/examples/v2/spans/ListSpansGet.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get a list of spans returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansApi(configuration);
-
-apiInstance
- .listSpansGet()
- .then((data: v2.SpansListResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/spans/ListSpansGet_1130763422.ts b/examples/v2/spans/ListSpansGet_1130763422.ts
deleted file mode 100644
index 47b2fb33b5a1..000000000000
--- a/examples/v2/spans/ListSpansGet_1130763422.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a list of spans returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansApi(configuration);
-
-const params: v2.SpansApiListSpansGetRequest = {
- pageLimit: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listSpansGetWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/spans/ListSpans_3495563906.ts b/examples/v2/spans/ListSpans_3495563906.ts
deleted file mode 100644
index 7370761f9876..000000000000
--- a/examples/v2/spans/ListSpans_3495563906.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Search spans returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SpansApi(configuration);
-
-const params: v2.SpansApiListSpansRequest = {
- body: {
- data: {
- attributes: {
- filter: {
- from: "now-15m",
- query: "service:python*",
- to: "now",
- },
- options: {
- timezone: "GMT",
- },
- page: {
- limit: 2,
- },
- sort: "timestamp",
- },
- type: "search_request",
- },
- },
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listSpansWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/synthetics/GetOnDemandConcurrencyCap.ts b/examples/v2/synthetics/GetOnDemandConcurrencyCap.ts
deleted file mode 100644
index 3c9a4923d17a..000000000000
--- a/examples/v2/synthetics/GetOnDemandConcurrencyCap.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get the on-demand concurrency cap returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SyntheticsApi(configuration);
-
-apiInstance
- .getOnDemandConcurrencyCap()
- .then((data: v2.OnDemandConcurrencyCapResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/synthetics/SetOnDemandConcurrencyCap.ts b/examples/v2/synthetics/SetOnDemandConcurrencyCap.ts
deleted file mode 100644
index 64db66446cef..000000000000
--- a/examples/v2/synthetics/SetOnDemandConcurrencyCap.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Save new value for on-demand concurrency cap returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.SyntheticsApi(configuration);
-
-const params: v2.SyntheticsApiSetOnDemandConcurrencyCapRequest = {
- body: {
- onDemandConcurrencyCap: 20,
- },
-};
-
-apiInstance
- .setOnDemandConcurrencyCap(params)
- .then((data: v2.OnDemandConcurrencyCapResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/CreateTeam.ts b/examples/v2/teams/CreateTeam.ts
deleted file mode 100644
index b086c9aac684..000000000000
--- a/examples/v2/teams/CreateTeam.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Create a team returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiCreateTeamRequest = {
- body: {
- data: {
- attributes: {
- handle: "test-handle-a0fc0297eb519635",
- name: "test-name-a0fc0297eb519635",
- },
- relationships: {
- users: {
- data: [],
- },
- },
- type: "team",
- },
- },
-};
-
-apiInstance
- .createTeam(params)
- .then((data: v2.TeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/CreateTeamLink.ts b/examples/v2/teams/CreateTeamLink.ts
deleted file mode 100644
index 8f0a19ad6c89..000000000000
--- a/examples/v2/teams/CreateTeamLink.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Create a team link returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiCreateTeamLinkRequest = {
- body: {
- data: {
- attributes: {
- label: "Link label",
- url: "https://example.com",
- position: 0,
- },
- type: "team_links",
- },
- },
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .createTeamLink(params)
- .then((data: v2.TeamLinkResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/CreateTeamMembership.ts b/examples/v2/teams/CreateTeamMembership.ts
deleted file mode 100644
index 6bf9fb48d12c..000000000000
--- a/examples/v2/teams/CreateTeamMembership.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Add a user to a team returns "Represents a user's association to a team" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiCreateTeamMembershipRequest = {
- body: {
- data: {
- attributes: {
- role: "admin",
- },
- relationships: {
- team: {
- data: {
- id: "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9",
- type: "team",
- },
- },
- user: {
- data: {
- id: "b8626d7e-cedd-11eb-abf5-da7ad0900001",
- type: "users",
- },
- },
- },
- type: "team_memberships",
- },
- },
- teamId: "team_id",
-};
-
-apiInstance
- .createTeamMembership(params)
- .then((data: v2.UserTeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/CreateTeam_252121814.ts b/examples/v2/teams/CreateTeam_252121814.ts
deleted file mode 100644
index ca312762298c..000000000000
--- a/examples/v2/teams/CreateTeam_252121814.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Create a team with V2 fields returns "CREATED" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiCreateTeamRequest = {
- body: {
- data: {
- attributes: {
- handle: "test-handle-a0fc0297eb519635",
- name: "test-name-a0fc0297eb519635",
- avatar: "🥑",
- banner: 7,
- visibleModules: ["m1", "m2"],
- hiddenModules: ["m3"],
- },
- type: "team",
- },
- },
-};
-
-apiInstance
- .createTeam(params)
- .then((data: v2.TeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/DeleteTeam.ts b/examples/v2/teams/DeleteTeam.ts
deleted file mode 100644
index b3a1f58c88aa..000000000000
--- a/examples/v2/teams/DeleteTeam.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Remove a team returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiDeleteTeamRequest = {
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .deleteTeam(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/DeleteTeamLink.ts b/examples/v2/teams/DeleteTeamLink.ts
deleted file mode 100644
index ad27b000ef63..000000000000
--- a/examples/v2/teams/DeleteTeamLink.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Remove a team link returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-// there is a valid "team_link" in the system
-const TEAM_LINK_DATA_ID = process.env.TEAM_LINK_DATA_ID as string;
-
-const params: v2.TeamsApiDeleteTeamLinkRequest = {
- teamId: DD_TEAM_DATA_ID,
- linkId: TEAM_LINK_DATA_ID,
-};
-
-apiInstance
- .deleteTeamLink(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/DeleteTeamMembership.ts b/examples/v2/teams/DeleteTeamMembership.ts
deleted file mode 100644
index 27093f1d0b12..000000000000
--- a/examples/v2/teams/DeleteTeamMembership.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Remove a user from a team returns "No Content" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiDeleteTeamMembershipRequest = {
- teamId: DD_TEAM_DATA_ID,
- userId: "user_id",
-};
-
-apiInstance
- .deleteTeamMembership(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetTeam.ts b/examples/v2/teams/GetTeam.ts
deleted file mode 100644
index 35f34e4d8a94..000000000000
--- a/examples/v2/teams/GetTeam.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiGetTeamRequest = {
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .getTeam(params)
- .then((data: v2.TeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetTeamLink.ts b/examples/v2/teams/GetTeamLink.ts
deleted file mode 100644
index 48efe938aa85..000000000000
--- a/examples/v2/teams/GetTeamLink.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Get a team link returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-// there is a valid "team_link" in the system
-const TEAM_LINK_DATA_ID = process.env.TEAM_LINK_DATA_ID as string;
-
-const params: v2.TeamsApiGetTeamLinkRequest = {
- teamId: DD_TEAM_DATA_ID,
- linkId: TEAM_LINK_DATA_ID,
-};
-
-apiInstance
- .getTeamLink(params)
- .then((data: v2.TeamLinkResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetTeamLinks.ts b/examples/v2/teams/GetTeamLinks.ts
deleted file mode 100644
index ab7e85e5d106..000000000000
--- a/examples/v2/teams/GetTeamLinks.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get links for a team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiGetTeamLinksRequest = {
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .getTeamLinks(params)
- .then((data: v2.TeamLinksResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetTeamMemberships.ts b/examples/v2/teams/GetTeamMemberships.ts
deleted file mode 100644
index 80c28abd8d39..000000000000
--- a/examples/v2/teams/GetTeamMemberships.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get team memberships returns "Represents a user's association to a team" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiGetTeamMembershipsRequest = {
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .getTeamMemberships(params)
- .then((data: v2.UserTeamsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetTeamMemberships_3799131168.ts b/examples/v2/teams/GetTeamMemberships_3799131168.ts
deleted file mode 100644
index f14af753abe2..000000000000
--- a/examples/v2/teams/GetTeamMemberships_3799131168.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Get team memberships returns "Represents a user's association to a team" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiGetTeamMembershipsRequest = {
- teamId: "2e06bf2c-193b-41d4-b3c2-afccc080458f",
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.getTeamMembershipsWithPagination(
- params
- )) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/teams/GetTeamPermissionSettings.ts b/examples/v2/teams/GetTeamPermissionSettings.ts
deleted file mode 100644
index 15e225203797..000000000000
--- a/examples/v2/teams/GetTeamPermissionSettings.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get permission settings for a team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiGetTeamPermissionSettingsRequest = {
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .getTeamPermissionSettings(params)
- .then((data: v2.TeamPermissionSettingsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/GetUserMemberships.ts b/examples/v2/teams/GetUserMemberships.ts
deleted file mode 100644
index ff129b5f617f..000000000000
--- a/examples/v2/teams/GetUserMemberships.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get user memberships returns "Represents a user's association to a team" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.TeamsApiGetUserMembershipsRequest = {
- userUuid: USER_DATA_ID,
-};
-
-apiInstance
- .getUserMemberships(params)
- .then((data: v2.UserTeamsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/ListTeams.ts b/examples/v2/teams/ListTeams.ts
deleted file mode 100644
index 2b3062b4ea8f..000000000000
--- a/examples/v2/teams/ListTeams.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get all teams returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-apiInstance
- .listTeams()
- .then((data: v2.TeamsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/ListTeams_3429963470.ts b/examples/v2/teams/ListTeams_3429963470.ts
deleted file mode 100644
index cca6df742eda..000000000000
--- a/examples/v2/teams/ListTeams_3429963470.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get all teams with fields_team parameter returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiListTeamsRequest = {
- fieldsTeam: ["id", "name", "handle"],
-};
-
-apiInstance
- .listTeams(params)
- .then((data: v2.TeamsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/ListTeams_3592098458.ts b/examples/v2/teams/ListTeams_3592098458.ts
deleted file mode 100644
index 710665bfa972..000000000000
--- a/examples/v2/teams/ListTeams_3592098458.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get all teams returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiListTeamsRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listTeamsWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/teams/UpdateTeam.ts b/examples/v2/teams/UpdateTeam.ts
deleted file mode 100644
index 35a1e2cfbeb9..000000000000
--- a/examples/v2/teams/UpdateTeam.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Update a team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ATTRIBUTES_HANDLE = process.env
- .DD_TEAM_DATA_ATTRIBUTES_HANDLE as string;
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiUpdateTeamRequest = {
- body: {
- data: {
- attributes: {
- handle: DD_TEAM_DATA_ATTRIBUTES_HANDLE,
- name: "Example Team updated",
- avatar: "🥑",
- banner: 7,
- hiddenModules: ["m3"],
- visibleModules: ["m1", "m2"],
- },
- type: "team",
- },
- },
- teamId: DD_TEAM_DATA_ID,
-};
-
-apiInstance
- .updateTeam(params)
- .then((data: v2.TeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/UpdateTeamLink.ts b/examples/v2/teams/UpdateTeamLink.ts
deleted file mode 100644
index 6c3f10934e8b..000000000000
--- a/examples/v2/teams/UpdateTeamLink.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Update a team link returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-// there is a valid "team_link" in the system
-const TEAM_LINK_DATA_ID = process.env.TEAM_LINK_DATA_ID as string;
-
-const params: v2.TeamsApiUpdateTeamLinkRequest = {
- body: {
- data: {
- attributes: {
- label: "New Label",
- url: "https://example.com",
- },
- type: "team_links",
- },
- },
- teamId: DD_TEAM_DATA_ID,
- linkId: TEAM_LINK_DATA_ID,
-};
-
-apiInstance
- .updateTeamLink(params)
- .then((data: v2.TeamLinkResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/UpdateTeamMembership.ts b/examples/v2/teams/UpdateTeamMembership.ts
deleted file mode 100644
index bdd710f23e8b..000000000000
--- a/examples/v2/teams/UpdateTeamMembership.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Update a user's membership attributes on a team returns "Represents a user's association to a team" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-const params: v2.TeamsApiUpdateTeamMembershipRequest = {
- body: {
- data: {
- attributes: {
- role: "admin",
- },
- type: "team_memberships",
- },
- },
- teamId: "team_id",
- userId: "user_id",
-};
-
-apiInstance
- .updateTeamMembership(params)
- .then((data: v2.UserTeamResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/teams/UpdateTeamPermissionSetting.ts b/examples/v2/teams/UpdateTeamPermissionSetting.ts
deleted file mode 100644
index 02a7c49255a7..000000000000
--- a/examples/v2/teams/UpdateTeamPermissionSetting.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Update permission setting for team returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.TeamsApi(configuration);
-
-// there is a valid "dd_team" in the system
-const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
-
-const params: v2.TeamsApiUpdateTeamPermissionSettingRequest = {
- body: {
- data: {
- attributes: {
- value: "admins",
- },
- type: "team_permission_settings",
- },
- },
- teamId: DD_TEAM_DATA_ID,
- action: "manage_membership",
-};
-
-apiInstance
- .updateTeamPermissionSetting(params)
- .then((data: v2.TeamPermissionSettingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetActiveBillingDimensions.ts b/examples/v2/usage-metering/GetActiveBillingDimensions.ts
deleted file mode 100644
index 0c5fa3756a67..000000000000
--- a/examples/v2/usage-metering/GetActiveBillingDimensions.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get active billing dimensions for cost attribution returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-apiInstance
- .getActiveBillingDimensions()
- .then((data: v2.ActiveBillingDimensionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetBillingDimensionMapping.ts b/examples/v2/usage-metering/GetBillingDimensionMapping.ts
deleted file mode 100644
index 67afd626e06e..000000000000
--- a/examples/v2/usage-metering/GetBillingDimensionMapping.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get billing dimension mapping for usage endpoints returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-apiInstance
- .getBillingDimensionMapping()
- .then((data: v2.BillingDimensionsMappingResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetCostByOrg.ts b/examples/v2/usage-metering/GetCostByOrg.ts
deleted file mode 100644
index 999256c25357..000000000000
--- a/examples/v2/usage-metering/GetCostByOrg.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get cost across multi-org account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetCostByOrgRequest = {
- startMonth: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getCostByOrg(params)
- .then((data: v2.CostByOrgResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetEstimatedCostByOrg.ts b/examples/v2/usage-metering/GetEstimatedCostByOrg.ts
deleted file mode 100644
index e97a258a0cb2..000000000000
--- a/examples/v2/usage-metering/GetEstimatedCostByOrg.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Get estimated cost across your account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-apiInstance
- .getEstimatedCostByOrg()
- .then((data: v2.CostByOrgResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.ts b/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.ts
deleted file mode 100644
index a5f058a87e1a..000000000000
--- a/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * GetEstimatedCostByOrg with start_month returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetEstimatedCostByOrgRequest = {
- view: "sub-org",
- startMonth: new Date(),
-};
-
-apiInstance
- .getEstimatedCostByOrg(params)
- .then((data: v2.CostByOrgResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetHistoricalCostByOrg.ts b/examples/v2/usage-metering/GetHistoricalCostByOrg.ts
deleted file mode 100644
index e3fb19834b3c..000000000000
--- a/examples/v2/usage-metering/GetHistoricalCostByOrg.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get historical cost across your account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetHistoricalCostByOrgRequest = {
- view: "sub-org",
- startMonth: new Date(new Date().getTime() + -2 * 86400 * 30 * 1000),
-};
-
-apiInstance
- .getHistoricalCostByOrg(params)
- .then((data: v2.CostByOrgResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetHourlyUsage.ts b/examples/v2/usage-metering/GetHourlyUsage.ts
deleted file mode 100644
index 3f8819ca2c99..000000000000
--- a/examples/v2/usage-metering/GetHourlyUsage.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage by product family returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetHourlyUsageRequest = {
- filterTimestampStart: new Date(new Date().getTime() + -3 * 86400 * 1000),
- filterProductFamilies: "infra_hosts",
-};
-
-apiInstance
- .getHourlyUsage(params)
- .then((data: v2.HourlyUsageResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetMonthlyCostAttribution.ts b/examples/v2/usage-metering/GetMonthlyCostAttribution.ts
deleted file mode 100644
index 66d1389f0e9b..000000000000
--- a/examples/v2/usage-metering/GetMonthlyCostAttribution.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get Monthly Cost Attribution returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetMonthlyCostAttributionRequest = {
- startMonth: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endMonth: new Date(new Date().getTime() + -3 * 86400 * 1000),
- fields: "infra_host_total_cost",
-};
-
-apiInstance
- .getMonthlyCostAttribution(params)
- .then((data: v2.MonthlyCostAttributionResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetProjectedCost.ts b/examples/v2/usage-metering/GetProjectedCost.ts
deleted file mode 100644
index 95cbc5334b82..000000000000
--- a/examples/v2/usage-metering/GetProjectedCost.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get projected cost across your account returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetProjectedCostRequest = {
- view: "sub-org",
-};
-
-apiInstance
- .getProjectedCost(params)
- .then((data: v2.ProjectedCostResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.ts b/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.ts
deleted file mode 100644
index e077beec2e8f..000000000000
--- a/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Get hourly usage for application security returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetUsageApplicationSecurityMonitoringRequest =
- {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
- };
-
-apiInstance
- .getUsageApplicationSecurityMonitoring(params)
- .then((data: v2.UsageApplicationSecurityMonitoringResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.ts b/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.ts
deleted file mode 100644
index a3cfc3134c59..000000000000
--- a/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for Lambda traced invocations returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetUsageLambdaTracedInvocationsRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageLambdaTracedInvocations(params)
- .then((data: v2.UsageLambdaTracedInvocationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/usage-metering/GetUsageObservabilityPipelines.ts b/examples/v2/usage-metering/GetUsageObservabilityPipelines.ts
deleted file mode 100644
index 238cee2d3920..000000000000
--- a/examples/v2/usage-metering/GetUsageObservabilityPipelines.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get hourly usage for observability pipelines returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsageMeteringApi(configuration);
-
-const params: v2.UsageMeteringApiGetUsageObservabilityPipelinesRequest = {
- startHr: new Date(new Date().getTime() + -5 * 86400 * 1000),
- endHr: new Date(new Date().getTime() + -3 * 86400 * 1000),
-};
-
-apiInstance
- .getUsageObservabilityPipelines(params)
- .then((data: v2.UsageObservabilityPipelinesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/CreateUser.ts b/examples/v2/users/CreateUser.ts
deleted file mode 100644
index c39c5b859d98..000000000000
--- a/examples/v2/users/CreateUser.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Create a user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-const params: v2.UsersApiCreateUserRequest = {
- body: {
- data: {
- type: "users",
- attributes: {
- name: "Datadog API Client Python",
- email: "Example-User@datadoghq.com",
- },
- },
- },
-};
-
-apiInstance
- .createUser(params)
- .then((data: v2.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/DisableUser.ts b/examples/v2/users/DisableUser.ts
deleted file mode 100644
index 003134d4bf52..000000000000
--- a/examples/v2/users/DisableUser.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Disable a user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.UsersApiDisableUserRequest = {
- userId: USER_DATA_ID,
-};
-
-apiInstance
- .disableUser(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/GetInvitation.ts b/examples/v2/users/GetInvitation.ts
deleted file mode 100644
index 2afd507fa192..000000000000
--- a/examples/v2/users/GetInvitation.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a user invitation returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// the "user" has a "user_invitation"
-const USER_INVITATION_ID = process.env.USER_INVITATION_ID as string;
-
-const params: v2.UsersApiGetInvitationRequest = {
- userInvitationUuid: USER_INVITATION_ID,
-};
-
-apiInstance
- .getInvitation(params)
- .then((data: v2.UserInvitationResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/GetUser.ts b/examples/v2/users/GetUser.ts
deleted file mode 100644
index b69325ca3130..000000000000
--- a/examples/v2/users/GetUser.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get user details returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.UsersApiGetUserRequest = {
- userId: USER_DATA_ID,
-};
-
-apiInstance
- .getUser(params)
- .then((data: v2.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/ListUserOrganizations.ts b/examples/v2/users/ListUserOrganizations.ts
deleted file mode 100644
index 8e3ddcafe675..000000000000
--- a/examples/v2/users/ListUserOrganizations.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Get a user organization returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-const params: v2.UsersApiListUserOrganizationsRequest = {
- userId: "00000000-0000-9999-0000-000000000000",
-};
-
-apiInstance
- .listUserOrganizations(params)
- .then((data: v2.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/ListUserPermissions.ts b/examples/v2/users/ListUserPermissions.ts
deleted file mode 100644
index 4c9702e69999..000000000000
--- a/examples/v2/users/ListUserPermissions.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get a user permissions returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.UsersApiListUserPermissionsRequest = {
- userId: USER_DATA_ID,
-};
-
-apiInstance
- .listUserPermissions(params)
- .then((data: v2.PermissionsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/ListUsers.ts b/examples/v2/users/ListUsers.ts
deleted file mode 100644
index 23b770e617ce..000000000000
--- a/examples/v2/users/ListUsers.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * List all users returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ATTRIBUTES_EMAIL = process.env
- .USER_DATA_ATTRIBUTES_EMAIL as string;
-
-const params: v2.UsersApiListUsersRequest = {
- filter: USER_DATA_ATTRIBUTES_EMAIL,
-};
-
-apiInstance
- .listUsers(params)
- .then((data: v2.UsersResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/ListUsers_4075885358.ts b/examples/v2/users/ListUsers_4075885358.ts
deleted file mode 100644
index 2e10025c3d21..000000000000
--- a/examples/v2/users/ListUsers_4075885358.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * List all users returns "OK" response with pagination
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-const params: v2.UsersApiListUsersRequest = {
- pageSize: 2,
-};
-
-(async () => {
- try {
- for await (const item of apiInstance.listUsersWithPagination(params)) {
- console.log(item);
- }
- } catch (error) {
- console.error(error);
- }
-})();
diff --git a/examples/v2/users/SendInvitations.ts b/examples/v2/users/SendInvitations.ts
deleted file mode 100644
index da20d78d2a69..000000000000
--- a/examples/v2/users/SendInvitations.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Send invitation emails returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.UsersApiSendInvitationsRequest = {
- body: {
- data: [
- {
- type: "user_invitations",
- relationships: {
- user: {
- data: {
- type: "users",
- id: USER_DATA_ID,
- },
- },
- },
- },
- ],
- },
-};
-
-apiInstance
- .sendInvitations(params)
- .then((data: v2.UserInvitationsResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/users/UpdateUser.ts b/examples/v2/users/UpdateUser.ts
deleted file mode 100644
index 97d8d93e7e99..000000000000
--- a/examples/v2/users/UpdateUser.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Update a user returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.UsersApi(configuration);
-
-// there is a valid "user" in the system
-const USER_DATA_ID = process.env.USER_DATA_ID as string;
-
-const params: v2.UsersApiUpdateUserRequest = {
- body: {
- data: {
- id: USER_DATA_ID,
- type: "users",
- attributes: {
- name: "updated",
- disabled: true,
- },
- },
- },
- userId: USER_DATA_ID,
-};
-
-apiInstance
- .updateUser(params)
- .then((data: v2.UserResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/CancelWorkflowInstance.ts b/examples/v2/workflow-automation/CancelWorkflowInstance.ts
deleted file mode 100644
index 8cb1ce3d1389..000000000000
--- a/examples/v2/workflow-automation/CancelWorkflowInstance.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Cancel a workflow instance returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-const params: v2.WorkflowAutomationApiCancelWorkflowInstanceRequest = {
- workflowId: "ccf73164-1998-4785-a7a3-8d06c7e5f558",
- instanceId: "305a472b-71ab-4ce8-8f8d-75db635627b5",
-};
-
-apiInstance
- .cancelWorkflowInstance(params)
- .then((data: v2.WorklflowCancelInstanceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/CreateWorkflow.ts b/examples/v2/workflow-automation/CreateWorkflow.ts
deleted file mode 100644
index 53666a02c9e1..000000000000
--- a/examples/v2/workflow-automation/CreateWorkflow.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Create a Workflow returns "Successfully created a workflow." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-const params: v2.WorkflowAutomationApiCreateWorkflowRequest = {
- body: {
- data: {
- attributes: {
- description: "A sample workflow.",
- name: "Example Workflow",
- published: true,
- spec: {
- connectionEnvs: [
- {
- connections: [
- {
- connectionId: "11111111-1111-1111-1111-111111111111",
- label: "INTEGRATION_DATADOG",
- },
- ],
- env: "default",
- },
- ],
- handle: "my-handle",
- inputSchema: {
- parameters: [
- {
- defaultValue: "default",
- name: "input",
- type: "STRING",
- },
- ],
- },
- outputSchema: {
- parameters: [
- {
- name: "output",
- type: "ARRAY_OBJECT",
- value: "outputValue",
- },
- ],
- },
- steps: [
- {
- actionId: "com.datadoghq.dd.monitor.listMonitors",
- connectionLabel: "INTEGRATION_DATADOG",
- name: "Step1",
- outboundEdges: [
- {
- branchName: "main",
- nextStepName: "Step2",
- },
- ],
- parameters: [
- {
- name: "tags",
- value: "service:monitoring",
- },
- ],
- },
- {
- actionId: "com.datadoghq.core.noop",
- name: "Step2",
- },
- ],
- triggers: [
- {
- monitorTrigger: {
- rateLimit: {
- count: 1,
- interval: "3600s",
- },
- },
- startStepNames: ["Step1"],
- },
- {
- startStepNames: ["Step1"],
- githubWebhookTrigger: {},
- },
- ],
- },
- tags: ["team:infra", "service:monitoring", "foo:bar"],
- },
- type: "workflows",
- },
- },
-};
-
-apiInstance
- .createWorkflow(params)
- .then((data: v2.CreateWorkflowResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/CreateWorkflowInstance.ts b/examples/v2/workflow-automation/CreateWorkflowInstance.ts
deleted file mode 100644
index 9ef83ec95c88..000000000000
--- a/examples/v2/workflow-automation/CreateWorkflowInstance.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Execute a workflow returns "Created" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-const params: v2.WorkflowAutomationApiCreateWorkflowInstanceRequest = {
- body: {
- meta: {
- payload: {
- input: "value",
- },
- },
- },
- workflowId: "ccf73164-1998-4785-a7a3-8d06c7e5f558",
-};
-
-apiInstance
- .createWorkflowInstance(params)
- .then((data: v2.WorkflowInstanceCreateResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/DeleteWorkflow.ts b/examples/v2/workflow-automation/DeleteWorkflow.ts
deleted file mode 100644
index ff5dd344f7ec..000000000000
--- a/examples/v2/workflow-automation/DeleteWorkflow.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Delete an existing Workflow returns "Successfully deleted a workflow." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-// there is a valid "workflow" in the system
-const WORKFLOW_DATA_ID = process.env.WORKFLOW_DATA_ID as string;
-
-const params: v2.WorkflowAutomationApiDeleteWorkflowRequest = {
- workflowId: WORKFLOW_DATA_ID,
-};
-
-apiInstance
- .deleteWorkflow(params)
- .then((data: any) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/GetWorkflow.ts b/examples/v2/workflow-automation/GetWorkflow.ts
deleted file mode 100644
index 3fc77f75a518..000000000000
--- a/examples/v2/workflow-automation/GetWorkflow.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Get an existing Workflow returns "Successfully got a workflow." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-// there is a valid "workflow" in the system
-const WORKFLOW_DATA_ID = process.env.WORKFLOW_DATA_ID as string;
-
-const params: v2.WorkflowAutomationApiGetWorkflowRequest = {
- workflowId: WORKFLOW_DATA_ID,
-};
-
-apiInstance
- .getWorkflow(params)
- .then((data: v2.GetWorkflowResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/GetWorkflowInstance.ts b/examples/v2/workflow-automation/GetWorkflowInstance.ts
deleted file mode 100644
index 0e7249025d08..000000000000
--- a/examples/v2/workflow-automation/GetWorkflowInstance.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get a workflow instance returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-const params: v2.WorkflowAutomationApiGetWorkflowInstanceRequest = {
- workflowId: "ccf73164-1998-4785-a7a3-8d06c7e5f558",
- instanceId: "305a472b-71ab-4ce8-8f8d-75db635627b5",
-};
-
-apiInstance
- .getWorkflowInstance(params)
- .then((data: v2.WorklflowGetInstanceResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/ListWorkflowInstances.ts b/examples/v2/workflow-automation/ListWorkflowInstances.ts
deleted file mode 100644
index 40c79843e6de..000000000000
--- a/examples/v2/workflow-automation/ListWorkflowInstances.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * List workflow instances returns "OK" response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-const params: v2.WorkflowAutomationApiListWorkflowInstancesRequest = {
- workflowId: "ccf73164-1998-4785-a7a3-8d06c7e5f558",
-};
-
-apiInstance
- .listWorkflowInstances(params)
- .then((data: v2.WorkflowListInstancesResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/examples/v2/workflow-automation/UpdateWorkflow.ts b/examples/v2/workflow-automation/UpdateWorkflow.ts
deleted file mode 100644
index 63157bbfcee1..000000000000
--- a/examples/v2/workflow-automation/UpdateWorkflow.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Update an existing Workflow returns "Successfully updated a workflow." response
- */
-
-import { client, v2 } from "@datadog/datadog-api-client";
-
-const configuration = client.createConfiguration();
-const apiInstance = new v2.WorkflowAutomationApi(configuration);
-
-// there is a valid "workflow" in the system
-const WORKFLOW_DATA_ID = process.env.WORKFLOW_DATA_ID as string;
-
-const params: v2.WorkflowAutomationApiUpdateWorkflowRequest = {
- body: {
- data: {
- attributes: {
- description: "A sample workflow.",
- name: "Example Workflow",
- published: true,
- spec: {
- connectionEnvs: [
- {
- connections: [
- {
- connectionId: "11111111-1111-1111-1111-111111111111",
- label: "INTEGRATION_DATADOG",
- },
- ],
- env: "default",
- },
- ],
- handle: "my-handle",
- inputSchema: {
- parameters: [
- {
- defaultValue: "default",
- name: "input",
- type: "STRING",
- },
- ],
- },
- outputSchema: {
- parameters: [
- {
- name: "output",
- type: "ARRAY_OBJECT",
- value: "outputValue",
- },
- ],
- },
- steps: [
- {
- actionId: "com.datadoghq.dd.monitor.listMonitors",
- connectionLabel: "INTEGRATION_DATADOG",
- name: "Step1",
- outboundEdges: [
- {
- branchName: "main",
- nextStepName: "Step2",
- },
- ],
- parameters: [
- {
- name: "tags",
- value: "service:monitoring",
- },
- ],
- },
- {
- actionId: "com.datadoghq.core.noop",
- name: "Step2",
- },
- ],
- triggers: [
- {
- monitorTrigger: {
- rateLimit: {
- count: 1,
- interval: "3600s",
- },
- },
- startStepNames: ["Step1"],
- },
- {
- startStepNames: ["Step1"],
- githubWebhookTrigger: {},
- },
- ],
- },
- tags: ["team:infra", "service:monitoring", "foo:bar"],
- },
- id: "22222222-2222-2222-2222-222222222222",
- type: "workflows",
- },
- },
- workflowId: WORKFLOW_DATA_ID,
-};
-
-apiInstance
- .updateWorkflow(params)
- .then((data: v2.UpdateWorkflowResponse) => {
- console.log(
- "API called successfully. Returned data: " + JSON.stringify(data)
- );
- })
- .catch((error: any) => console.error(error));
diff --git a/packages/datadog-api-client-common/auth.ts b/packages/datadog-api-client-common/auth.ts
index af56abc8962c..afceba34e287 100644
--- a/packages/datadog-api-client-common/auth.ts
+++ b/packages/datadog-api-client-common/auth.ts
@@ -82,30 +82,28 @@ export class AppKeyAuthAuthentication implements SecurityAuthentication {
}
export type AuthMethods = {
- AuthZ?: SecurityAuthentication;
- apiKeyAuth?: SecurityAuthentication;
- appKeyAuth?: SecurityAuthentication;
-};
+ "AuthZ"?: SecurityAuthentication,
+ "apiKeyAuth"?: SecurityAuthentication,
+ "appKeyAuth"?: SecurityAuthentication
+}
export type ApiKeyConfiguration = string;
-export type HttpBasicConfiguration = { username: string; password: string };
+export type HttpBasicConfiguration = { "username": string, "password": string };
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
export type OAuth2Configuration = { accessToken: string };
export type AuthMethodsConfiguration = {
- AuthZ?: OAuth2Configuration;
- apiKeyAuth?: ApiKeyConfiguration;
- appKeyAuth?: ApiKeyConfiguration;
-};
+ "AuthZ"?: OAuth2Configuration,
+ "apiKeyAuth"?: ApiKeyConfiguration,
+ "appKeyAuth"?: ApiKeyConfiguration
+}
/**
* Creates the authentication methods from a swagger description.
*
*/
-export function configureAuthMethods(
- config: AuthMethodsConfiguration | undefined
-): AuthMethods {
- const authMethods: AuthMethods = {};
+export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods {
+ let authMethods: AuthMethods = {}
if (!config) {
return authMethods;
@@ -113,21 +111,33 @@ export function configureAuthMethods(
if (config["AuthZ"]) {
authMethods["AuthZ"] = new AuthZAuthentication(
+
+
+
+
config["AuthZ"]["accessToken"]
);
}
if (config["apiKeyAuth"]) {
authMethods["apiKeyAuth"] = new ApiKeyAuthAuthentication(
+
config["apiKeyAuth"]
+
+
+
);
}
if (config["appKeyAuth"]) {
authMethods["appKeyAuth"] = new AppKeyAuthAuthentication(
+
config["appKeyAuth"]
+
+
+
);
}
return authMethods;
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/baseapi.ts b/packages/datadog-api-client-common/baseapi.ts
index 8a757d1f1e0e..556360c1a2b9 100644
--- a/packages/datadog-api-client-common/baseapi.ts
+++ b/packages/datadog-api-client-common/baseapi.ts
@@ -27,13 +27,8 @@ export class BaseAPIRequestFactory {
* @extends {Error}
*/
export class RequiredError extends Error {
- constructor(
- public field: string,
- operation: string
- ) {
- super(
- `Required parameter ${field} was null or undefined when calling ${operation}.`
- );
+ constructor(public field: string, operation: string) {
+ super(`Required parameter ${field} was null or undefined when calling ${operation}.`);
this.name = "RequiredError";
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts
index 06fdea6fec4c..e5ee6ef15bd3 100644
--- a/packages/datadog-api-client-common/configuration.ts
+++ b/packages/datadog-api-client-common/configuration.ts
@@ -1,21 +1,7 @@
-import {
- HttpLibrary,
- HttpConfiguration,
- RequestContext,
- ZstdCompressorCallback,
-} from "./http/http";
+import { HttpLibrary, HttpConfiguration, RequestContext, ZstdCompressorCallback } from "./http/http";
import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorphic-fetch";
-import {
- BaseServerConfiguration,
- server1,
- servers,
- operationServers,
-} from "./servers";
-import {
- configureAuthMethods,
- AuthMethods,
- AuthMethodsConfiguration,
-} from "./auth";
+import { BaseServerConfiguration, server1, servers, operationServers } from "./servers";
+import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth";
import { logger } from "../../logger";
export class Configuration {
@@ -46,7 +32,7 @@ export class Configuration {
maxRetries: number | undefined,
backoffBase: number | undefined,
backoffMultiplier: number | undefined,
- unstableOperations: { [name: string]: boolean }
+ unstableOperations: { [name: string]: boolean },
) {
this.baseServer = baseServer;
this.serverIndex = serverIndex;
@@ -55,21 +41,21 @@ export class Configuration {
this.authMethods = authMethods;
this.httpConfig = httpConfig;
this.debug = debug;
- this.enableRetry = enableRetry;
+ this.enableRetry= enableRetry;
this.maxRetries = maxRetries;
this.backoffBase = backoffBase;
this.backoffMultiplier = backoffMultiplier;
this.unstableOperations = unstableOperations;
this.servers = [];
for (const server of servers) {
- this.servers.push(server.clone());
+ this.servers.push(server.clone());
}
this.operationServers = {};
for (const endpoint in operationServers) {
- this.operationServers[endpoint] = [];
- for (const server of operationServers[endpoint]) {
- this.operationServers[endpoint].push(server.clone());
- }
+ this.operationServers[endpoint] = [];
+ for (const server of operationServers[endpoint]) {
+ this.operationServers[endpoint].push(server.clone());
+ }
}
if (backoffBase && backoffBase < 2) {
throw new Error("Backoff base must be at least 2");
@@ -123,7 +109,7 @@ export interface ConfigurationParameters {
/**
* Default index of a server to use for an operation from the predefined server operation map
*/
- operationServerIndices?: { [name: string]: number };
+ operationServerIndices?: { [ name: string ]: number };
/**
* Custom `fetch` function
*/
@@ -139,15 +125,15 @@ export interface ConfigurationParameters {
/**
* Configuration for HTTP transport
*/
- httpConfig?: HttpConfiguration;
+ httpConfig?: HttpConfiguration
/**
* Flag to enable requests tracing
*/
- debug?: boolean;
+ debug?: boolean
/**
* Callback method to compress string body with zstd
*/
- zstdCompressorCallback?: ZstdCompressorCallback;
+ zstdCompressorCallback?: ZstdCompressorCallback
/**
* Maximum of retry attempts allowed
*/
@@ -180,32 +166,20 @@ export interface ConfigurationParameters {
*
* @param conf partial configuration
*/
-export function createConfiguration(
- conf: ConfigurationParameters = {}
-): Configuration {
+export function createConfiguration(conf: ConfigurationParameters = {}): Configuration {
if (typeof process !== "undefined" && process.env && process.env.DD_SITE) {
const serverConf = server1.getConfiguration();
- server1.setVariables({ site: process.env.DD_SITE } as typeof serverConf);
+ server1.setVariables({"site": process.env.DD_SITE} as (typeof serverConf));
for (const op in operationServers) {
operationServers[op][0].setVariables({ site: process.env.DD_SITE });
}
}
const authMethods = conf.authMethods || {};
- if (
- !("apiKeyAuth" in authMethods) &&
- typeof process !== "undefined" &&
- process.env &&
- process.env.DD_API_KEY
- ) {
+ if (!("apiKeyAuth" in authMethods) && typeof process !== "undefined" && process.env && process.env.DD_API_KEY) {
authMethods["apiKeyAuth"] = process.env.DD_API_KEY;
}
- if (
- !("appKeyAuth" in authMethods) &&
- typeof process !== "undefined" &&
- process.env &&
- process.env.DD_APP_KEY
- ) {
+ if (!("appKeyAuth" in authMethods) && typeof process !== "undefined" && process.env && process.env.DD_APP_KEY) {
authMethods["appKeyAuth"] = process.env.DD_APP_KEY;
}
@@ -222,98 +196,93 @@ export function createConfiguration(
conf.backoffBase || 2,
conf.backoffMultiplier || 2,
{
- "v2.createOpenAPI": false,
- "v2.deleteOpenAPI": false,
- "v2.getOpenAPI": false,
- "v2.listAPIs": false,
- "v2.updateOpenAPI": false,
- "v2.cancelDataDeletionRequest": false,
- "v2.createDataDeletionRequest": false,
- "v2.getDataDeletionRequests": false,
- "v2.createDORADeployment": false,
- "v2.createDORAIncident": false,
- "v2.createIncident": false,
- "v2.createIncidentIntegration": false,
- "v2.createIncidentTodo": false,
- "v2.createIncidentType": false,
- "v2.deleteIncident": false,
- "v2.deleteIncidentIntegration": false,
- "v2.deleteIncidentTodo": false,
- "v2.deleteIncidentType": false,
- "v2.getIncident": false,
- "v2.getIncidentIntegration": false,
- "v2.getIncidentTodo": false,
- "v2.getIncidentType": false,
- "v2.listIncidentAttachments": false,
- "v2.listIncidentIntegrations": false,
- "v2.listIncidents": false,
- "v2.listIncidentTodos": false,
- "v2.listIncidentTypes": false,
- "v2.searchIncidents": false,
- "v2.updateIncident": false,
- "v2.updateIncidentAttachments": false,
- "v2.updateIncidentIntegration": false,
- "v2.updateIncidentTodo": false,
- "v2.updateIncidentType": false,
- "v2.createAWSAccount": false,
- "v2.createNewAWSExternalID": false,
- "v2.deleteAWSAccount": false,
- "v2.getAWSAccount": false,
- "v2.listAWSAccounts": false,
- "v2.listAWSNamespaces": false,
- "v2.updateAWSAccount": false,
- "v2.listAWSLogsServices": false,
- "v2.cancelHistoricalJob": false,
- "v2.convertJobResultToSignal": false,
- "v2.deleteHistoricalJob": false,
- "v2.getFinding": false,
- "v2.getHistoricalJob": false,
- "v2.getRuleVersionHistory": false,
- "v2.getSBOM": false,
- "v2.listFindings": false,
- "v2.listHistoricalJobs": false,
- "v2.listVulnerabilities": false,
- "v2.listVulnerableAssets": false,
- "v2.muteFindings": false,
- "v2.runHistoricalJob": false,
- "v2.createScorecardOutcomesBatch": false,
- "v2.createScorecardRule": false,
- "v2.deleteScorecardRule": false,
- "v2.listScorecardOutcomes": false,
- "v2.listScorecardRules": false,
- "v2.updateScorecardRule": false,
- "v2.createIncidentService": false,
- "v2.deleteIncidentService": false,
- "v2.getIncidentService": false,
- "v2.listIncidentServices": false,
- "v2.updateIncidentService": false,
- "v2.createSLOReportJob": false,
- "v2.getSLOReport": false,
- "v2.getSLOReportJobStatus": false,
- "v2.createIncidentTeam": false,
- "v2.deleteIncidentTeam": false,
- "v2.getIncidentTeam": false,
- "v2.listIncidentTeams": false,
- "v2.updateIncidentTeam": false,
- }
+ "v2.createOpenAPI": false,
+ "v2.deleteOpenAPI": false,
+ "v2.getOpenAPI": false,
+ "v2.listAPIs": false,
+ "v2.updateOpenAPI": false,
+ "v2.cancelDataDeletionRequest": false,
+ "v2.createDataDeletionRequest": false,
+ "v2.getDataDeletionRequests": false,
+ "v2.createDORADeployment": false,
+ "v2.createDORAIncident": false,
+ "v2.createIncident": false,
+ "v2.createIncidentIntegration": false,
+ "v2.createIncidentTodo": false,
+ "v2.createIncidentType": false,
+ "v2.deleteIncident": false,
+ "v2.deleteIncidentIntegration": false,
+ "v2.deleteIncidentTodo": false,
+ "v2.deleteIncidentType": false,
+ "v2.getIncident": false,
+ "v2.getIncidentIntegration": false,
+ "v2.getIncidentTodo": false,
+ "v2.getIncidentType": false,
+ "v2.listIncidentAttachments": false,
+ "v2.listIncidentIntegrations": false,
+ "v2.listIncidents": false,
+ "v2.listIncidentTodos": false,
+ "v2.listIncidentTypes": false,
+ "v2.searchIncidents": false,
+ "v2.updateIncident": false,
+ "v2.updateIncidentAttachments": false,
+ "v2.updateIncidentIntegration": false,
+ "v2.updateIncidentTodo": false,
+ "v2.updateIncidentType": false,
+ "v2.createAWSAccount": false,
+ "v2.createNewAWSExternalID": false,
+ "v2.deleteAWSAccount": false,
+ "v2.getAWSAccount": false,
+ "v2.listAWSAccounts": false,
+ "v2.listAWSNamespaces": false,
+ "v2.updateAWSAccount": false,
+ "v2.listAWSLogsServices": false,
+ "v2.cancelHistoricalJob": false,
+ "v2.convertJobResultToSignal": false,
+ "v2.deleteHistoricalJob": false,
+ "v2.getFinding": false,
+ "v2.getHistoricalJob": false,
+ "v2.getRuleVersionHistory": false,
+ "v2.getSBOM": false,
+ "v2.listFindings": false,
+ "v2.listHistoricalJobs": false,
+ "v2.listVulnerabilities": false,
+ "v2.listVulnerableAssets": false,
+ "v2.muteFindings": false,
+ "v2.runHistoricalJob": false,
+ "v2.createScorecardOutcomesBatch": false,
+ "v2.createScorecardRule": false,
+ "v2.deleteScorecardRule": false,
+ "v2.listScorecardOutcomes": false,
+ "v2.listScorecardRules": false,
+ "v2.updateScorecardRule": false,
+ "v2.createIncidentService": false,
+ "v2.deleteIncidentService": false,
+ "v2.getIncidentService": false,
+ "v2.listIncidentServices": false,
+ "v2.updateIncidentService": false,
+ "v2.createSLOReportJob": false,
+ "v2.getSLOReport": false,
+ "v2.getSLOReportJobStatus": false,
+ "v2.createIncidentTeam": false,
+ "v2.deleteIncidentTeam": false,
+ "v2.getIncidentTeam": false,
+ "v2.listIncidentTeams": false,
+ "v2.updateIncidentTeam": false,
+ },
);
- configuration.httpApi.zstdCompressorCallback = conf.zstdCompressorCallback;
+ configuration.httpApi.zstdCompressorCallback = conf.zstdCompressorCallback
configuration.httpApi.debug = configuration.debug;
configuration.httpApi.enableRetry = configuration.enableRetry;
configuration.httpApi.maxRetries = configuration.maxRetries;
- configuration.httpApi.backoffBase = configuration.backoffBase;
+ configuration.httpApi.backoffBase = configuration.backoffBase;
configuration.httpApi.backoffMultiplier = configuration.backoffMultiplier;
configuration.httpApi.fetch = conf.fetch;
return configuration;
}
-export function getServer(
- conf: Configuration,
- endpoint: string
-): BaseServerConfiguration {
- logger.warn(
- "getServer is deprecated, please use Configuration.getServer instead."
- );
+export function getServer(conf: Configuration, endpoint: string): BaseServerConfiguration {
+ logger.warn("getServer is deprecated, please use Configuration.getServer instead.");
return conf.getServer(endpoint);
}
@@ -322,22 +291,15 @@ export function getServer(
*
* @param serverVariables key/value object representing the server variables (site, name, protocol, ...)
*/
-export function setServerVariables(
- conf: Configuration,
- serverVariables: { [key: string]: string }
-): void {
- logger.warn(
- "setServerVariables is deprecated, please use Configuration.setServerVariables instead."
- );
+export function setServerVariables(conf: Configuration, serverVariables: { [key: string]: string }): void {
+ logger.warn("setServerVariables is deprecated, please use Configuration.setServerVariables instead.");
return conf.setServerVariables(serverVariables);
}
/**
* Apply given security authentication method if avaiable in configuration.
*/
-export function applySecurityAuthentication<
- AuthMethodKey extends keyof AuthMethods,
->(
+export function applySecurityAuthentication (
conf: Configuration,
requestContext: RequestContext,
authMethods: AuthMethodKey[]
@@ -348,4 +310,4 @@ export function applySecurityAuthentication<
authMethod.applySecurityAuthentication(requestContext);
}
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/exception.ts b/packages/datadog-api-client-common/exception.ts
index f4dbd80ab5b8..0327294ed683 100644
--- a/packages/datadog-api-client-common/exception.ts
+++ b/packages/datadog-api-client-common/exception.ts
@@ -8,13 +8,10 @@
*
*/
export class ApiException extends Error {
- public constructor(
- public code: number,
- public body: T
- ) {
+ public constructor(public code: number, public body: T) {
super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body));
Object.setPrototypeOf(this, ApiException.prototype);
this.code = code;
this.body = body;
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/http/http.ts b/packages/datadog-api-client-common/http/http.ts
index af839059fb63..ea1299c9bd75 100644
--- a/packages/datadog-api-client-common/http/http.ts
+++ b/packages/datadog-api-client-common/http/http.ts
@@ -97,10 +97,7 @@ export class RequestContext {
* @param url url of the requested resource
* @param httpMethod http method
*/
- public constructor(
- url: string,
- private httpMethod: HttpMethod
- ) {
+ public constructor(url: string, private httpMethod: HttpMethod) {
this.url = new URL(url);
if (!isBrowser) {
this.headers = { "user-agent": userAgent };
@@ -154,12 +151,8 @@ export class RequestContext {
* @param name the name of the query parameter
* @param value the value of the query parameter
* @param collectionFormat the format of the query parameter See https://spec.openapis.org/oas/v3.0.2#style-values
- */
- public setQueryParam(
- name: string,
- value: string | string[],
- collectionFormat: string
- ): void {
+ */
+ public setQueryParam(name: string, value: string | string[], collectionFormat: string): void {
if (collectionFormat === "multi") {
for (const val of value) {
this.url.searchParams.append(name, val);
@@ -168,8 +161,7 @@ export class RequestContext {
}
if (Array.isArray(value)) {
- const delimiter =
- COLLECTION_FORMATS[collectionFormat as keyof typeof COLLECTION_FORMATS];
+ const delimiter = COLLECTION_FORMATS[collectionFormat as keyof typeof COLLECTION_FORMATS];
value = value.join(delimiter);
}
@@ -277,4 +269,4 @@ export interface HttpLibrary {
fetch?: any;
zstdCompressorCallback?: ZstdCompressorCallback;
send(request: RequestContext): Promise;
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/http/isomorphic-fetch.ts b/packages/datadog-api-client-common/http/isomorphic-fetch.ts
index 67a1e3957a4a..891dca54cc2d 100644
--- a/packages/datadog-api-client-common/http/isomorphic-fetch.ts
+++ b/packages/datadog-api-client-common/http/isomorphic-fetch.ts
@@ -1,9 +1,4 @@
-import {
- HttpLibrary,
- RequestContext,
- ResponseContext,
- ZstdCompressorCallback,
-} from "./http";
+import { HttpLibrary, RequestContext, ResponseContext, ZstdCompressorCallback } from "./http";
import { fetch as crossFetch } from "cross-fetch";
import pako from "pako";
import bufferFrom from "buffer-from";
@@ -14,8 +9,8 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
public debug = false;
public zstdCompressorCallback: ZstdCompressorCallback | undefined;
public enableRetry!: boolean;
- public maxRetries!: number;
- public backoffBase!: number;
+ public maxRetries!: number ;
+ public backoffBase!: number ;
public backoffMultiplier!: number;
public fetch: any;
@@ -42,7 +37,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
if (this.zstdCompressorCallback) {
body = this.zstdCompressorCallback(body);
} else {
- throw new Error("zstdCompressorCallback method missing");
+ throw new Error("zstdCompressorCallback method missing")
}
}
}
@@ -57,7 +52,7 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
}
}
}
-
+
return this.executeRequest(request, body, 0, headers);
}
@@ -65,28 +60,27 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
request: RequestContext,
body: any,
currentAttempt: number,
- headers: { [key: string]: string }
+ headers: {[key: string]: string}
): Promise {
const fetchOptions = {
method: request.getHttpMethod().toString(),
body: body,
headers: headers,
signal: request.getHttpConfig().signal,
- };
+ }
try {
- const fetchFunction =
- this.fetch ||
+ const fetchFunction = this.fetch ||
// On non-node environments, use native fetch if available.
// `cross-fetch` incorrectly assumes all browsers have XHR available.
// See https://github.com/lquixada/cross-fetch/issues/78
// TODO: Remove once once above issue is resolved.
- (!isNode && typeof fetch === "function" ? fetch : crossFetch);
+ ((!isNode && typeof fetch === "function") ? fetch : crossFetch);
- const resp = await fetchFunction(request.getUrl(), fetchOptions);
+ const resp = await fetchFunction(request.getUrl(),fetchOptions);
const responseHeaders: { [name: string]: string } = {};
- resp.headers.forEach((value: string, name: string) => {
- responseHeaders[name] = value;
- });
+ resp.headers.forEach((value: string, name: string) => {
+ responseHeaders[name] = value;
+ });
const responseBody = {
text: () => resp.text(),
@@ -112,8 +106,8 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
currentAttempt,
this.maxRetries,
response.httpStatusCode
- )
- ) {
+ )
+ ) {
const delay = this.calculateRetryInterval(
currentAttempt,
this.backoffBase,
@@ -137,31 +131,17 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
});
}
- private shouldRetry(
- enableRetry: boolean,
- currentAttempt: number,
- maxRetries: number,
- responseCode: number
- ): boolean {
- return (
- (responseCode === 429 || responseCode >= 500) &&
- maxRetries > currentAttempt &&
- enableRetry
- );
+ private shouldRetry(enableRetry:boolean, currentAttempt:number, maxRetries:number, responseCode:number):boolean{
+ return (responseCode === 429 || responseCode >= 500 ) && maxRetries > currentAttempt && enableRetry
}
- private calculateRetryInterval(
- currentAttempt: number,
- backoffBase: number,
- backoffMultiplier: number,
- headers: { [name: string]: string }
- ): number {
+ private calculateRetryInterval(currentAttempt:number, backoffBase:number, backoffMultiplier:number, headers: {[name: string]: string}) : number{
if ("x-ratelimit-reset" in headers) {
- const rateLimitHeaderString = headers["x-ratelimit-reset"];
- const retryIntervalFromHeader = parseInt(rateLimitHeaderString, 10);
- return retryIntervalFromHeader;
+ const rateLimitHeaderString = headers["x-ratelimit-reset"]
+ const retryIntervalFromHeader = parseInt(rateLimitHeaderString,10);
+ return retryIntervalFromHeader
} else {
- return backoffMultiplier ** currentAttempt * backoffBase;
+ return (backoffMultiplier ** currentAttempt) * backoffBase
}
}
@@ -211,4 +191,4 @@ export class IsomorphicFetchHttpLibrary implements HttpLibrary {
`\theaders: ${headers}\n`
);
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/index.ts b/packages/datadog-api-client-common/index.ts
index acd4f8f6b99b..36149fa6761f 100644
--- a/packages/datadog-api-client-common/index.ts
+++ b/packages/datadog-api-client-common/index.ts
@@ -1,8 +1,8 @@
export * from "./http/http";
export * from "./http/isomorphic-fetch";
export * from "./auth";
-export { createConfiguration } from "./configuration";
-export { setServerVariables } from "./configuration";
-export { Configuration } from "./configuration";
+export { createConfiguration } from "./configuration"
+export { setServerVariables } from "./configuration"
+export { Configuration } from "./configuration"
export * from "./exception";
-export * from "./servers";
+export * from "./servers";
\ No newline at end of file
diff --git a/packages/datadog-api-client-common/servers.ts b/packages/datadog-api-client-common/servers.ts
index 00f033949a1b..f09c505966a0 100644
--- a/packages/datadog-api-client-common/servers.ts
+++ b/packages/datadog-api-client-common/servers.ts
@@ -6,10 +6,7 @@ import { RequestContext, HttpMethod } from "./http/http";
*
*/
export class BaseServerConfiguration {
- public constructor(
- private url: string,
- private variableConfiguration: { [key: string]: string }
- ) {}
+ public constructor(private url: string, private variableConfiguration: { [key: string]: string }) {}
/**
* Sets the value of the variables of this server.
@@ -21,22 +18,20 @@ export class BaseServerConfiguration {
}
public getConfiguration(): { [key: string]: string } {
- return this.variableConfiguration;
+ return this.variableConfiguration
}
public clone(): BaseServerConfiguration {
- return new BaseServerConfiguration(this.url, {
- ...this.variableConfiguration,
- });
+ return new BaseServerConfiguration(this.url, {...this.variableConfiguration});
}
private getUrl() {
let replacedUrl = this.url;
for (const key in this.variableConfiguration) {
- const re = new RegExp("{" + key + "}", "g");
+ var re = new RegExp("{" + key + "}","g");
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
}
- return replacedUrl;
+ return replacedUrl
}
/**
@@ -47,10 +42,7 @@ export class BaseServerConfiguration {
* @param httpMethod httpMethod to be used
*
*/
- public makeRequestContext(
- endpoint: string,
- httpMethod: HttpMethod
- ): RequestContext {
+ public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext {
return new RequestContext(this.getUrl() + endpoint, httpMethod);
}
}
@@ -61,125 +53,88 @@ export class BaseServerConfiguration {
* url template and variable configuration based on the url.
*
*/
-export class ServerConfiguration<
- T extends { [key: string]: string },
-> extends BaseServerConfiguration {}
+export class ServerConfiguration extends BaseServerConfiguration {}
export const server1 = new ServerConfiguration<{
- site:
- | "datadoghq.com"
- | "us3.datadoghq.com"
- | "us5.datadoghq.com"
- | "ap1.datadoghq.com"
- | "datadoghq.eu"
- | "ddog-gov.com";
- subdomain: string;
-}>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "api",
-});
+ "site":"datadoghq.com" | "us3.datadoghq.com" | "us5.datadoghq.com" | "ap1.datadoghq.com" | "datadoghq.eu" | "ddog-gov.com",
+ "subdomain":string
+ }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "api"
+})
export const server2 = new ServerConfiguration<{
- name: string;
- protocol: string;
-}>("{protocol}://{name}", {
- name: "api.datadoghq.com",
- protocol: "https",
-});
+ "name":string,
+ "protocol":string
+ }>("{protocol}://{name}", {
+ "name": "api.datadoghq.com",
+ "protocol": "https"
+})
export const server3 = new ServerConfiguration<{
- site: string;
- subdomain: string;
-}>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "api",
-});
+ "site":string,
+ "subdomain":string
+ }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "api"
+})
export const servers = [server1, server2, server3];
-export const operationServers: {
- [endpoint: string]: BaseServerConfiguration[];
-} = {
+export const operationServers: { [endpoint: string]: BaseServerConfiguration[] } = {
"v1.IPRangesApi.getIPRanges": [
new ServerConfiguration<{
- site:
- | "datadoghq.com"
- | "us3.datadoghq.com"
- | "us5.datadoghq.com"
- | "ap1.datadoghq.com"
- | "datadoghq.eu"
- | "ddog-gov.com";
- subdomain: string;
- }>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "ip-ranges",
+ "site":"datadoghq.com" | "us3.datadoghq.com" | "us5.datadoghq.com" | "ap1.datadoghq.com" | "datadoghq.eu" | "ddog-gov.com",
+ "subdomain":string }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "ip-ranges"
}),
new ServerConfiguration<{
- name: string;
- protocol: string;
- }>("{protocol}://{name}", {
- name: "ip-ranges.datadoghq.com",
- protocol: "https",
+ "name":string,
+ "protocol":string }>("{protocol}://{name}", {
+ "name": "ip-ranges.datadoghq.com",
+ "protocol": "https"
}),
new ServerConfiguration<{
- subdomain: string;
- }>("https://{subdomain}.datadoghq.com", {
- subdomain: "ip-ranges",
+ "subdomain":string }>("https://{subdomain}.datadoghq.com", {
+ "subdomain": "ip-ranges"
}),
- ],
+ ],
"v1.LogsApi.submitLog": [
new ServerConfiguration<{
- site:
- | "datadoghq.com"
- | "us3.datadoghq.com"
- | "us5.datadoghq.com"
- | "ap1.datadoghq.com"
- | "datadoghq.eu"
- | "ddog-gov.com";
- subdomain: string;
- }>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "http-intake.logs",
+ "site":"datadoghq.com" | "us3.datadoghq.com" | "us5.datadoghq.com" | "ap1.datadoghq.com" | "datadoghq.eu" | "ddog-gov.com",
+ "subdomain":string }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "http-intake.logs"
}),
new ServerConfiguration<{
- name: string;
- protocol: string;
- }>("{protocol}://{name}", {
- name: "http-intake.logs.datadoghq.com",
- protocol: "https",
+ "name":string,
+ "protocol":string }>("{protocol}://{name}", {
+ "name": "http-intake.logs.datadoghq.com",
+ "protocol": "https"
}),
new ServerConfiguration<{
- site: string;
- subdomain: string;
- }>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "http-intake.logs",
+ "site":string,
+ "subdomain":string }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "http-intake.logs"
}),
- ],
+ ],
"v2.LogsApi.submitLog": [
new ServerConfiguration<{
- site:
- | "datadoghq.com"
- | "us3.datadoghq.com"
- | "us5.datadoghq.com"
- | "ap1.datadoghq.com"
- | "datadoghq.eu"
- | "ddog-gov.com";
- subdomain: string;
- }>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "http-intake.logs",
+ "site":"datadoghq.com" | "us3.datadoghq.com" | "us5.datadoghq.com" | "ap1.datadoghq.com" | "datadoghq.eu" | "ddog-gov.com",
+ "subdomain":string }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "http-intake.logs"
}),
new ServerConfiguration<{
- name: string;
- protocol: string;
- }>("{protocol}://{name}", {
- name: "http-intake.logs.datadoghq.com",
- protocol: "https",
+ "name":string,
+ "protocol":string }>("{protocol}://{name}", {
+ "name": "http-intake.logs.datadoghq.com",
+ "protocol": "https"
}),
new ServerConfiguration<{
- site: string;
- subdomain: string;
- }>("https://{subdomain}.{site}", {
- site: "datadoghq.com",
- subdomain: "http-intake.logs",
+ "site":string,
+ "subdomain":string }>("https://{subdomain}.{site}", {
+ "site": "datadoghq.com",
+ "subdomain": "http-intake.logs"
}),
- ],
-};
+ ],
+}
diff --git a/packages/datadog-api-client-common/util.ts b/packages/datadog-api-client-common/util.ts
index c0e165491584..fa1b7cbb945b 100644
--- a/packages/datadog-api-client-common/util.ts
+++ b/packages/datadog-api-client-common/util.ts
@@ -40,8 +40,8 @@ export function dateFromRFC3339String(date: string): DDate {
}
export function dateToRFC3339String(date: Date | DDate): string {
- if (date instanceof DDate && date.originalDate) {
- return date.originalDate;
- }
- return date.toISOString().split(".")[0] + "Z";
-}
+ if (date instanceof DDate && date.originalDate) {
+ return date.originalDate;
+ }
+ return date.toISOString().split('.')[0] + "Z";
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-v1/apis/AWSIntegrationApi.ts b/packages/datadog-api-client-v1/apis/AWSIntegrationApi.ts
index 1946fa71683c..f1efa5414ed4 100644
--- a/packages/datadog-api-client-v1/apis/AWSIntegrationApi.ts
+++ b/packages/datadog-api-client-v1/apis/AWSIntegrationApi.ts
@@ -1,21 +1,19 @@
-import {
- BaseAPIRequestFactory,
- RequiredError,
-} from "../../datadog-api-client-common/baseapi";
-import {
- Configuration,
- applySecurityAuthentication,
-} from "../../datadog-api-client-common/configuration";
+import { BaseAPIRequestFactory, RequiredError } from "../../datadog-api-client-common/baseapi";
+import { Configuration, applySecurityAuthentication} from "../../datadog-api-client-common/configuration";
import {
RequestContext,
HttpMethod,
ResponseContext,
-} from "../../datadog-api-client-common/http/http";
+ HttpFile
+ } from "../../datadog-api-client-common/http/http";
+
+import FormData from "form-data";
import { logger } from "../../../logger";
import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";
+
import { APIErrorResponse } from "../models/APIErrorResponse";
import { AWSAccount } from "../models/AWSAccount";
import { AWSAccountCreateResponse } from "../models/AWSAccountCreateResponse";
@@ -31,31 +29,26 @@ import { AWSTagFilterDeleteRequest } from "../models/AWSTagFilterDeleteRequest";
import { AWSTagFilterListResponse } from "../models/AWSTagFilterListResponse";
export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
- public async createAWSAccount(
- body: AWSAccount,
- _options?: Configuration
- ): Promise {
+
+ public async createAWSAccount(body: AWSAccount,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createAWSAccount");
+ throw new RequiredError('body', 'createAWSAccount');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws";
+ const localVarPath = '/api/v1/integration/aws';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.createAWSAccount")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.createAWSAccount').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccount", ""),
@@ -64,39 +57,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async createAWSEventBridgeSource(
- body: AWSEventBridgeCreateRequest,
- _options?: Configuration
- ): Promise {
+ public async createAWSEventBridgeSource(body: AWSEventBridgeCreateRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createAWSEventBridgeSource");
+ throw new RequiredError('body', 'createAWSEventBridgeSource');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/event_bridge";
+ const localVarPath = '/api/v1/integration/aws/event_bridge';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.createAWSEventBridgeSource")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.createAWSEventBridgeSource').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSEventBridgeCreateRequest", ""),
@@ -105,39 +89,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async createAWSTagFilter(
- body: AWSTagFilterCreateRequest,
- _options?: Configuration
- ): Promise {
+ public async createAWSTagFilter(body: AWSTagFilterCreateRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createAWSTagFilter");
+ throw new RequiredError('body', 'createAWSTagFilter');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/filtering";
+ const localVarPath = '/api/v1/integration/aws/filtering';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.createAWSTagFilter")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.createAWSTagFilter').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSTagFilterCreateRequest", ""),
@@ -146,39 +121,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async createNewAWSExternalID(
- body: AWSAccount,
- _options?: Configuration
- ): Promise {
+ public async createNewAWSExternalID(body: AWSAccount,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createNewAWSExternalID");
+ throw new RequiredError('body', 'createNewAWSExternalID');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/generate_new_external_id";
+ const localVarPath = '/api/v1/integration/aws/generate_new_external_id';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.createNewAWSExternalID")
- .makeRequestContext(localVarPath, HttpMethod.PUT);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.createNewAWSExternalID').makeRequestContext(localVarPath, HttpMethod.PUT);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccount", ""),
@@ -187,39 +153,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async deleteAWSAccount(
- body: AWSAccountDeleteRequest,
- _options?: Configuration
- ): Promise {
+ public async deleteAWSAccount(body: AWSAccountDeleteRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "deleteAWSAccount");
+ throw new RequiredError('body', 'deleteAWSAccount');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws";
+ const localVarPath = '/api/v1/integration/aws';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.deleteAWSAccount")
- .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.deleteAWSAccount').makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccountDeleteRequest", ""),
@@ -228,39 +185,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async deleteAWSEventBridgeSource(
- body: AWSEventBridgeDeleteRequest,
- _options?: Configuration
- ): Promise {
+ public async deleteAWSEventBridgeSource(body: AWSEventBridgeDeleteRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "deleteAWSEventBridgeSource");
+ throw new RequiredError('body', 'deleteAWSEventBridgeSource');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/event_bridge";
+ const localVarPath = '/api/v1/integration/aws/event_bridge';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.deleteAWSEventBridgeSource")
- .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.deleteAWSEventBridgeSource').makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSEventBridgeDeleteRequest", ""),
@@ -269,39 +217,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async deleteAWSTagFilter(
- body: AWSTagFilterDeleteRequest,
- _options?: Configuration
- ): Promise {
+ public async deleteAWSTagFilter(body: AWSTagFilterDeleteRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "deleteAWSTagFilter");
+ throw new RequiredError('body', 'deleteAWSTagFilter');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/filtering";
+ const localVarPath = '/api/v1/integration/aws/filtering';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.deleteAWSTagFilter")
- .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.deleteAWSTagFilter').makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSTagFilterDeleteRequest", ""),
@@ -310,202 +249,130 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAvailableAWSNamespaces(
- _options?: Configuration
- ): Promise {
+ public async listAvailableAWSNamespaces(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/aws/available_namespace_rules";
+ const localVarPath = '/api/v1/integration/aws/available_namespace_rules';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.listAvailableAWSNamespaces")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.listAvailableAWSNamespaces').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAWSAccounts(
- accountId?: string,
- roleName?: string,
- accessKeyId?: string,
- _options?: Configuration
- ): Promise {
+ public async listAWSAccounts(accountId?: string,roleName?: string,accessKeyId?: string,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/aws";
+ const localVarPath = '/api/v1/integration/aws';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.listAWSAccounts")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.listAWSAccounts').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (accountId !== undefined) {
- requestContext.setQueryParam(
- "account_id",
- ObjectSerializer.serialize(accountId, "string", ""),
- ""
- );
+ requestContext.setQueryParam("account_id", ObjectSerializer.serialize(accountId, "string", ""), "");
}
if (roleName !== undefined) {
- requestContext.setQueryParam(
- "role_name",
- ObjectSerializer.serialize(roleName, "string", ""),
- ""
- );
+ requestContext.setQueryParam("role_name", ObjectSerializer.serialize(roleName, "string", ""), "");
}
if (accessKeyId !== undefined) {
- requestContext.setQueryParam(
- "access_key_id",
- ObjectSerializer.serialize(accessKeyId, "string", ""),
- ""
- );
+ requestContext.setQueryParam("access_key_id", ObjectSerializer.serialize(accessKeyId, "string", ""), "");
}
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAWSEventBridgeSources(
- _options?: Configuration
- ): Promise {
+ public async listAWSEventBridgeSources(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/aws/event_bridge";
+ const localVarPath = '/api/v1/integration/aws/event_bridge';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.listAWSEventBridgeSources")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.listAWSEventBridgeSources').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAWSTagFilters(
- accountId: string,
- _options?: Configuration
- ): Promise {
+ public async listAWSTagFilters(accountId: string,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'accountId' is not null or undefined
if (accountId === null || accountId === undefined) {
- throw new RequiredError("accountId", "listAWSTagFilters");
+ throw new RequiredError('accountId', 'listAWSTagFilters');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/filtering";
+ const localVarPath = '/api/v1/integration/aws/filtering';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.listAWSTagFilters")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.listAWSTagFilters').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (accountId !== undefined) {
- requestContext.setQueryParam(
- "account_id",
- ObjectSerializer.serialize(accountId, "string", ""),
- ""
- );
+ requestContext.setQueryParam("account_id", ObjectSerializer.serialize(accountId, "string", ""), "");
}
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async updateAWSAccount(
- body: AWSAccount,
- accountId?: string,
- roleName?: string,
- accessKeyId?: string,
- _options?: Configuration
- ): Promise {
+ public async updateAWSAccount(body: AWSAccount,accountId?: string,roleName?: string,accessKeyId?: string,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "updateAWSAccount");
+ throw new RequiredError('body', 'updateAWSAccount');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws";
+ const localVarPath = '/api/v1/integration/aws';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSIntegrationApi.updateAWSAccount")
- .makeRequestContext(localVarPath, HttpMethod.PUT);
+ const requestContext = _config.getServer('v1.AWSIntegrationApi.updateAWSAccount').makeRequestContext(localVarPath, HttpMethod.PUT);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Query Params
if (accountId !== undefined) {
- requestContext.setQueryParam(
- "account_id",
- ObjectSerializer.serialize(accountId, "string", ""),
- ""
- );
+ requestContext.setQueryParam("account_id", ObjectSerializer.serialize(accountId, "string", ""), "");
}
if (roleName !== undefined) {
- requestContext.setQueryParam(
- "role_name",
- ObjectSerializer.serialize(roleName, "string", ""),
- ""
- );
+ requestContext.setQueryParam("role_name", ObjectSerializer.serialize(roleName, "string", ""), "");
}
if (accessKeyId !== undefined) {
- requestContext.setQueryParam(
- "access_key_id",
- ObjectSerializer.serialize(accessKeyId, "string", ""),
- ""
- );
+ requestContext.setQueryParam("access_key_id", ObjectSerializer.serialize(accessKeyId, "string", ""), "");
}
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccount", ""),
@@ -514,16 +381,14 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
}
export class AWSIntegrationApiResponseProcessor {
+
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
@@ -531,12 +396,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to createAWSAccount
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createAWSAccount(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async createAWSAccount(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSAccountCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -544,16 +405,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSAccountCreateResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 409 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 409||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -562,11 +415,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -574,17 +424,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSAccountCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSAccountCreateResponse",
- ""
+ "AWSAccountCreateResponse", ""
) as AWSAccountCreateResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -594,12 +440,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to createAWSEventBridgeSource
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createAWSEventBridgeSource(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async createAWSEventBridgeSource(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSEventBridgeCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -607,15 +449,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSEventBridgeCreateResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -624,11 +459,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -636,17 +468,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSEventBridgeCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSEventBridgeCreateResponse",
- ""
+ "AWSEventBridgeCreateResponse", ""
) as AWSEventBridgeCreateResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -656,10 +484,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to createAWSTagFilter
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createAWSTagFilter(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async createAWSTagFilter(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -667,15 +493,8 @@ export class AWSIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -684,11 +503,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -696,17 +512,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -716,12 +528,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to createNewAWSExternalID
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createNewAWSExternalID(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async createNewAWSExternalID(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSAccountCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -729,15 +537,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSAccountCreateResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -746,11 +547,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -758,17 +556,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSAccountCreateResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSAccountCreateResponse",
- ""
+ "AWSAccountCreateResponse", ""
) as AWSAccountCreateResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -778,10 +572,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to deleteAWSAccount
* @throws ApiException if the response code was not in [200, 299]
*/
- public async deleteAWSAccount(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async deleteAWSAccount(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -789,16 +581,8 @@ export class AWSIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 409 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 409||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -807,11 +591,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -819,17 +600,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -839,12 +616,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to deleteAWSEventBridgeSource
* @throws ApiException if the response code was not in [200, 299]
*/
- public async deleteAWSEventBridgeSource(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async deleteAWSEventBridgeSource(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSEventBridgeDeleteResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -852,15 +625,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSEventBridgeDeleteResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -869,11 +635,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -881,17 +644,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSEventBridgeDeleteResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSEventBridgeDeleteResponse",
- ""
+ "AWSEventBridgeDeleteResponse", ""
) as AWSEventBridgeDeleteResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -901,10 +660,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to deleteAWSTagFilter
* @throws ApiException if the response code was not in [200, 299]
*/
- public async deleteAWSTagFilter(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async deleteAWSTagFilter(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -912,15 +669,8 @@ export class AWSIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -929,11 +679,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -941,17 +688,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -961,12 +704,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAvailableAWSNamespaces
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAvailableAWSNamespaces(
- response: ResponseContext
- ): Promise> {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAvailableAWSNamespaces(response: ResponseContext): Promise> {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: Array = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -974,11 +713,8 @@ export class AWSIntegrationApiResponseProcessor {
) as Array;
return body;
}
- if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -987,11 +723,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -999,17 +732,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: Array = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "Array",
- ""
+ "Array", ""
) as Array;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -1019,12 +748,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAWSAccounts
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAWSAccounts(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAWSAccounts(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSAccountListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -1032,15 +757,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSAccountListResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -1049,11 +767,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -1061,17 +776,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSAccountListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSAccountListResponse",
- ""
+ "AWSAccountListResponse", ""
) as AWSAccountListResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -1081,12 +792,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAWSEventBridgeSources
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAWSEventBridgeSources(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAWSEventBridgeSources(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSEventBridgeListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -1094,15 +801,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSEventBridgeListResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -1111,11 +811,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -1123,17 +820,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSEventBridgeListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSEventBridgeListResponse",
- ""
+ "AWSEventBridgeListResponse", ""
) as AWSEventBridgeListResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -1143,12 +836,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAWSTagFilters
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAWSTagFilters(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAWSTagFilters(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSTagFilterListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -1156,15 +845,8 @@ export class AWSIntegrationApiResponseProcessor {
) as AWSTagFilterListResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -1173,11 +855,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -1185,17 +864,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSTagFilterListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSTagFilterListResponse",
- ""
+ "AWSTagFilterListResponse", ""
) as AWSTagFilterListResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -1205,10 +880,8 @@ export class AWSIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to updateAWSAccount
* @throws ApiException if the response code was not in [200, 299]
*/
- public async updateAWSAccount(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async updateAWSAccount(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -1216,16 +889,8 @@ export class AWSIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 409 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 409||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -1234,11 +899,8 @@ export class AWSIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -1246,17 +908,13 @@ export class AWSIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
}
@@ -1265,7 +923,7 @@ export interface AWSIntegrationApiCreateAWSAccountRequest {
* AWS Request Object
* @type AWSAccount
*/
- body: AWSAccount;
+ body: AWSAccount
}
export interface AWSIntegrationApiCreateAWSEventBridgeSourceRequest {
@@ -1273,7 +931,7 @@ export interface AWSIntegrationApiCreateAWSEventBridgeSourceRequest {
* Create an Amazon EventBridge source for an AWS account with a given name and region.
* @type AWSEventBridgeCreateRequest
*/
- body: AWSEventBridgeCreateRequest;
+ body: AWSEventBridgeCreateRequest
}
export interface AWSIntegrationApiCreateAWSTagFilterRequest {
@@ -1282,7 +940,7 @@ export interface AWSIntegrationApiCreateAWSTagFilterRequest {
* Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
* @type AWSTagFilterCreateRequest
*/
- body: AWSTagFilterCreateRequest;
+ body: AWSTagFilterCreateRequest
}
export interface AWSIntegrationApiCreateNewAWSExternalIDRequest {
@@ -1292,7 +950,7 @@ export interface AWSIntegrationApiCreateNewAWSExternalIDRequest {
* see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
* @type AWSAccount
*/
- body: AWSAccount;
+ body: AWSAccount
}
export interface AWSIntegrationApiDeleteAWSAccountRequest {
@@ -1300,7 +958,7 @@ export interface AWSIntegrationApiDeleteAWSAccountRequest {
* AWS request object
* @type AWSAccountDeleteRequest
*/
- body: AWSAccountDeleteRequest;
+ body: AWSAccountDeleteRequest
}
export interface AWSIntegrationApiDeleteAWSEventBridgeSourceRequest {
@@ -1308,7 +966,7 @@ export interface AWSIntegrationApiDeleteAWSEventBridgeSourceRequest {
* Delete the Amazon EventBridge source with the given name, region, and associated AWS account.
* @type AWSEventBridgeDeleteRequest
*/
- body: AWSEventBridgeDeleteRequest;
+ body: AWSEventBridgeDeleteRequest
}
export interface AWSIntegrationApiDeleteAWSTagFilterRequest {
@@ -1316,7 +974,7 @@ export interface AWSIntegrationApiDeleteAWSTagFilterRequest {
* Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.
* @type AWSTagFilterDeleteRequest
*/
- body: AWSTagFilterDeleteRequest;
+ body: AWSTagFilterDeleteRequest
}
export interface AWSIntegrationApiListAWSAccountsRequest {
@@ -1324,17 +982,17 @@ export interface AWSIntegrationApiListAWSAccountsRequest {
* Only return AWS accounts that matches this `account_id`.
* @type string
*/
- accountId?: string;
+ accountId?: string
/**
* Only return AWS accounts that matches this role_name.
* @type string
*/
- roleName?: string;
+ roleName?: string
/**
* Only return AWS accounts that matches this `access_key_id`.
* @type string
*/
- accessKeyId?: string;
+ accessKeyId?: string
}
export interface AWSIntegrationApiListAWSTagFiltersRequest {
@@ -1342,7 +1000,7 @@ export interface AWSIntegrationApiListAWSTagFiltersRequest {
* Only return AWS filters that matches this `account_id`.
* @type string
*/
- accountId: string;
+ accountId: string
}
export interface AWSIntegrationApiUpdateAWSAccountRequest {
@@ -1350,24 +1008,24 @@ export interface AWSIntegrationApiUpdateAWSAccountRequest {
* AWS request object
* @type AWSAccount
*/
- body: AWSAccount;
+ body: AWSAccount
/**
* Only return AWS accounts that matches this `account_id`.
* @type string
*/
- accountId?: string;
+ accountId?: string
/**
* Only return AWS accounts that match this `role_name`.
* Required if `account_id` is specified.
* @type string
*/
- roleName?: string;
+ roleName?: string
/**
* Only return AWS accounts that matches this `access_key_id`.
* Required if none of the other two options are specified.
* @type string
*/
- accessKeyId?: string;
+ accessKeyId?: string
}
export class AWSIntegrationApi {
@@ -1375,16 +1033,10 @@ export class AWSIntegrationApi {
private responseProcessor: AWSIntegrationApiResponseProcessor;
private configuration: Configuration;
- public constructor(
- configuration: Configuration,
- requestFactory?: AWSIntegrationApiRequestFactory,
- responseProcessor?: AWSIntegrationApiResponseProcessor
- ) {
+ public constructor(configuration: Configuration, requestFactory?: AWSIntegrationApiRequestFactory, responseProcessor?: AWSIntegrationApiResponseProcessor) {
this.configuration = configuration;
- this.requestFactory =
- requestFactory || new AWSIntegrationApiRequestFactory(configuration);
- this.responseProcessor =
- responseProcessor || new AWSIntegrationApiResponseProcessor();
+ this.requestFactory = requestFactory || new AWSIntegrationApiRequestFactory(configuration);
+ this.responseProcessor = responseProcessor || new AWSIntegrationApiResponseProcessor();
}
/**
@@ -1394,19 +1046,11 @@ export class AWSIntegrationApi {
* A unique AWS Account ID for role based authentication.
* @param param The request object
*/
- public createAWSAccount(
- param: AWSIntegrationApiCreateAWSAccountRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.createAWSAccount(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.createAWSAccount(responseContext);
+ public createAWSAccount(param: AWSIntegrationApiCreateAWSAccountRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.createAWSAccount(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.createAWSAccount(responseContext);
});
});
}
@@ -1415,19 +1059,11 @@ export class AWSIntegrationApi {
* Create an Amazon EventBridge source.
* @param param The request object
*/
- public createAWSEventBridgeSource(
- param: AWSIntegrationApiCreateAWSEventBridgeSourceRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise =
- this.requestFactory.createAWSEventBridgeSource(param.body, options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.createAWSEventBridgeSource(
- responseContext
- );
+ public createAWSEventBridgeSource(param: AWSIntegrationApiCreateAWSEventBridgeSourceRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.createAWSEventBridgeSource(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.createAWSEventBridgeSource(responseContext);
});
});
}
@@ -1436,19 +1072,11 @@ export class AWSIntegrationApi {
* Set an AWS tag filter.
* @param param The request object
*/
- public createAWSTagFilter(
- param: AWSIntegrationApiCreateAWSTagFilterRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.createAWSTagFilter(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.createAWSTagFilter(responseContext);
+ public createAWSTagFilter(param: AWSIntegrationApiCreateAWSTagFilterRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.createAWSTagFilter(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.createAWSTagFilter(responseContext);
});
});
}
@@ -1457,19 +1085,11 @@ export class AWSIntegrationApi {
* Generate a new AWS external ID for a given AWS account ID and role name pair.
* @param param The request object
*/
- public createNewAWSExternalID(
- param: AWSIntegrationApiCreateNewAWSExternalIDRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.createNewAWSExternalID(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.createNewAWSExternalID(responseContext);
+ public createNewAWSExternalID(param: AWSIntegrationApiCreateNewAWSExternalIDRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.createNewAWSExternalID(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.createNewAWSExternalID(responseContext);
});
});
}
@@ -1478,19 +1098,11 @@ export class AWSIntegrationApi {
* Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`.
* @param param The request object
*/
- public deleteAWSAccount(
- param: AWSIntegrationApiDeleteAWSAccountRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.deleteAWSAccount(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.deleteAWSAccount(responseContext);
+ public deleteAWSAccount(param: AWSIntegrationApiDeleteAWSAccountRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.deleteAWSAccount(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.deleteAWSAccount(responseContext);
});
});
}
@@ -1499,19 +1111,11 @@ export class AWSIntegrationApi {
* Delete an Amazon EventBridge source.
* @param param The request object
*/
- public deleteAWSEventBridgeSource(
- param: AWSIntegrationApiDeleteAWSEventBridgeSourceRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise =
- this.requestFactory.deleteAWSEventBridgeSource(param.body, options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.deleteAWSEventBridgeSource(
- responseContext
- );
+ public deleteAWSEventBridgeSource(param: AWSIntegrationApiDeleteAWSEventBridgeSourceRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.deleteAWSEventBridgeSource(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.deleteAWSEventBridgeSource(responseContext);
});
});
}
@@ -1520,19 +1124,11 @@ export class AWSIntegrationApi {
* Delete a tag filtering entry.
* @param param The request object
*/
- public deleteAWSTagFilter(
- param: AWSIntegrationApiDeleteAWSTagFilterRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.deleteAWSTagFilter(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.deleteAWSTagFilter(responseContext);
+ public deleteAWSTagFilter(param: AWSIntegrationApiDeleteAWSTagFilterRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.deleteAWSTagFilter(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.deleteAWSTagFilter(responseContext);
});
});
}
@@ -1541,18 +1137,11 @@ export class AWSIntegrationApi {
* List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.
* @param param The request object
*/
- public listAvailableAWSNamespaces(
- options?: Configuration
- ): Promise> {
- const requestContextPromise =
- this.requestFactory.listAvailableAWSNamespaces(options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAvailableAWSNamespaces(
- responseContext
- );
+ public listAvailableAWSNamespaces( options?: Configuration): Promise> {
+ const requestContextPromise = this.requestFactory.listAvailableAWSNamespaces(options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAvailableAWSNamespaces(responseContext);
});
});
}
@@ -1561,21 +1150,11 @@ export class AWSIntegrationApi {
* List all Datadog-AWS integrations available in your Datadog organization.
* @param param The request object
*/
- public listAWSAccounts(
- param: AWSIntegrationApiListAWSAccountsRequest = {},
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.listAWSAccounts(
- param.accountId,
- param.roleName,
- param.accessKeyId,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAWSAccounts(responseContext);
+ public listAWSAccounts(param: AWSIntegrationApiListAWSAccountsRequest = {}, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.listAWSAccounts(param.accountId,param.roleName,param.accessKeyId,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAWSAccounts(responseContext);
});
});
}
@@ -1584,18 +1163,11 @@ export class AWSIntegrationApi {
* Get all Amazon EventBridge sources.
* @param param The request object
*/
- public listAWSEventBridgeSources(
- options?: Configuration
- ): Promise {
- const requestContextPromise =
- this.requestFactory.listAWSEventBridgeSources(options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAWSEventBridgeSources(
- responseContext
- );
+ public listAWSEventBridgeSources( options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.listAWSEventBridgeSources(options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAWSEventBridgeSources(responseContext);
});
});
}
@@ -1604,19 +1176,11 @@ export class AWSIntegrationApi {
* Get all AWS tag filters.
* @param param The request object
*/
- public listAWSTagFilters(
- param: AWSIntegrationApiListAWSTagFiltersRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.listAWSTagFilters(
- param.accountId,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAWSTagFilters(responseContext);
+ public listAWSTagFilters(param: AWSIntegrationApiListAWSTagFiltersRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.listAWSTagFilters(param.accountId,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAWSTagFilters(responseContext);
});
});
}
@@ -1625,23 +1189,12 @@ export class AWSIntegrationApi {
* Update a Datadog-Amazon Web Services integration.
* @param param The request object
*/
- public updateAWSAccount(
- param: AWSIntegrationApiUpdateAWSAccountRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.updateAWSAccount(
- param.body,
- param.accountId,
- param.roleName,
- param.accessKeyId,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.updateAWSAccount(responseContext);
+ public updateAWSAccount(param: AWSIntegrationApiUpdateAWSAccountRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.updateAWSAccount(param.body,param.accountId,param.roleName,param.accessKeyId,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.updateAWSAccount(responseContext);
});
});
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.ts b/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.ts
index e67642ff6edd..812f51cc013e 100644
--- a/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.ts
+++ b/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.ts
@@ -1,21 +1,19 @@
-import {
- BaseAPIRequestFactory,
- RequiredError,
-} from "../../datadog-api-client-common/baseapi";
-import {
- Configuration,
- applySecurityAuthentication,
-} from "../../datadog-api-client-common/configuration";
+import { BaseAPIRequestFactory, RequiredError } from "../../datadog-api-client-common/baseapi";
+import { Configuration, applySecurityAuthentication} from "../../datadog-api-client-common/configuration";
import {
RequestContext,
HttpMethod,
ResponseContext,
-} from "../../datadog-api-client-common/http/http";
+ HttpFile
+ } from "../../datadog-api-client-common/http/http";
+
+import FormData from "form-data";
import { logger } from "../../../logger";
import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";
+
import { APIErrorResponse } from "../models/APIErrorResponse";
import { AWSAccountAndLambdaRequest } from "../models/AWSAccountAndLambdaRequest";
import { AWSLogsAsyncResponse } from "../models/AWSLogsAsyncResponse";
@@ -24,31 +22,26 @@ import { AWSLogsListServicesResponse } from "../models/AWSLogsListServicesRespon
import { AWSLogsServicesRequest } from "../models/AWSLogsServicesRequest";
export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
- public async checkAWSLogsLambdaAsync(
- body: AWSAccountAndLambdaRequest,
- _options?: Configuration
- ): Promise {
+
+ public async checkAWSLogsLambdaAsync(body: AWSAccountAndLambdaRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "checkAWSLogsLambdaAsync");
+ throw new RequiredError('body', 'checkAWSLogsLambdaAsync');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs/check_async";
+ const localVarPath = '/api/v1/integration/aws/logs/check_async';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.checkAWSLogsLambdaAsync")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.checkAWSLogsLambdaAsync').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccountAndLambdaRequest", ""),
@@ -57,39 +50,30 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async checkAWSLogsServicesAsync(
- body: AWSLogsServicesRequest,
- _options?: Configuration
- ): Promise {
+ public async checkAWSLogsServicesAsync(body: AWSLogsServicesRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "checkAWSLogsServicesAsync");
+ throw new RequiredError('body', 'checkAWSLogsServicesAsync');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs/services_async";
+ const localVarPath = '/api/v1/integration/aws/logs/services_async';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.checkAWSLogsServicesAsync")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.checkAWSLogsServicesAsync').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSLogsServicesRequest", ""),
@@ -98,39 +82,30 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async createAWSLambdaARN(
- body: AWSAccountAndLambdaRequest,
- _options?: Configuration
- ): Promise {
+ public async createAWSLambdaARN(body: AWSAccountAndLambdaRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createAWSLambdaARN");
+ throw new RequiredError('body', 'createAWSLambdaARN');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs";
+ const localVarPath = '/api/v1/integration/aws/logs';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.createAWSLambdaARN")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.createAWSLambdaARN').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccountAndLambdaRequest", ""),
@@ -139,39 +114,30 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async deleteAWSLambdaARN(
- body: AWSAccountAndLambdaRequest,
- _options?: Configuration
- ): Promise {
+ public async deleteAWSLambdaARN(body: AWSAccountAndLambdaRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "deleteAWSLambdaARN");
+ throw new RequiredError('body', 'deleteAWSLambdaARN');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs";
+ const localVarPath = '/api/v1/integration/aws/logs';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.deleteAWSLambdaARN")
- .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.deleteAWSLambdaARN').makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSAccountAndLambdaRequest", ""),
@@ -180,39 +146,30 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async enableAWSLogServices(
- body: AWSLogsServicesRequest,
- _options?: Configuration
- ): Promise {
+ public async enableAWSLogServices(body: AWSLogsServicesRequest,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "enableAWSLogServices");
+ throw new RequiredError('body', 'enableAWSLogServices');
}
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs/services";
+ const localVarPath = '/api/v1/integration/aws/logs/services';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.enableAWSLogServices")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.enableAWSLogServices').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AWSLogsServicesRequest", ""),
@@ -221,64 +178,48 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAWSLogsIntegrations(
- _options?: Configuration
- ): Promise {
+ public async listAWSLogsIntegrations(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs";
+ const localVarPath = '/api/v1/integration/aws/logs';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.listAWSLogsIntegrations")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.listAWSLogsIntegrations').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAWSLogsServices(
- _options?: Configuration
- ): Promise {
+ public async listAWSLogsServices(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/aws/logs/services";
+ const localVarPath = '/api/v1/integration/aws/logs/services';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AWSLogsIntegrationApi.listAWSLogsServices")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AWSLogsIntegrationApi.listAWSLogsServices').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
}
export class AWSLogsIntegrationApiResponseProcessor {
+
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
@@ -286,12 +227,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to checkAWSLogsLambdaAsync
* @throws ApiException if the response code was not in [200, 299]
*/
- public async checkAWSLogsLambdaAsync(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async checkAWSLogsLambdaAsync(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSLogsAsyncResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -299,15 +236,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as AWSLogsAsyncResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -316,11 +246,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -328,17 +255,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSLogsAsyncResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSLogsAsyncResponse",
- ""
+ "AWSLogsAsyncResponse", ""
) as AWSLogsAsyncResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -348,12 +271,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to checkAWSLogsServicesAsync
* @throws ApiException if the response code was not in [200, 299]
*/
- public async checkAWSLogsServicesAsync(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async checkAWSLogsServicesAsync(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: AWSLogsAsyncResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -361,15 +280,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as AWSLogsAsyncResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -378,11 +290,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -390,17 +299,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: AWSLogsAsyncResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "AWSLogsAsyncResponse",
- ""
+ "AWSLogsAsyncResponse", ""
) as AWSLogsAsyncResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -410,10 +315,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to createAWSLambdaARN
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createAWSLambdaARN(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async createAWSLambdaARN(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -421,15 +324,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -438,11 +334,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -450,17 +343,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -470,10 +359,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to deleteAWSLambdaARN
* @throws ApiException if the response code was not in [200, 299]
*/
- public async deleteAWSLambdaARN(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async deleteAWSLambdaARN(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -481,15 +368,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -498,11 +378,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -510,17 +387,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -530,10 +403,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to enableAWSLogServices
* @throws ApiException if the response code was not in [200, 299]
*/
- public async enableAWSLogServices(response: ResponseContext): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async enableAWSLogServices(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -541,15 +412,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as any;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -558,11 +422,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -570,17 +431,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: any = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "any",
- ""
+ "any", ""
) as any;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -590,12 +447,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAWSLogsIntegrations
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAWSLogsIntegrations(
- response: ResponseContext
- ): Promise> {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAWSLogsIntegrations(response: ResponseContext): Promise> {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
const body: Array = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
@@ -603,15 +456,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as Array;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 400||response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -620,11 +466,8 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
@@ -632,17 +475,13 @@ export class AWSLogsIntegrationApiResponseProcessor {
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: Array = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "Array",
- ""
+ "Array", ""
) as Array;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
/**
@@ -652,25 +491,17 @@ export class AWSLogsIntegrationApiResponseProcessor {
* @params response Response returned by the server for a request to listAWSLogsServices
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listAWSLogsServices(
- response: ResponseContext
- ): Promise> {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async listAWSLogsServices(response: ResponseContext): Promise> {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
- const body: Array =
- ObjectSerializer.deserialize(
- ObjectSerializer.parse(await response.body.text(), contentType),
- "Array"
- ) as Array;
+ const body: Array = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "Array"
+ ) as Array;
return body;
}
- if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -679,30 +510,22 @@ export class AWSLogsIntegrationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- const body: Array =
- ObjectSerializer.deserialize(
- ObjectSerializer.parse(await response.body.text(), contentType),
- "Array",
- ""
- ) as Array;
+ const body: Array = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "Array", ""
+ ) as Array;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
}
@@ -711,7 +534,7 @@ export interface AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest {
* Check AWS Log Lambda Async request body.
* @type AWSAccountAndLambdaRequest
*/
- body: AWSAccountAndLambdaRequest;
+ body: AWSAccountAndLambdaRequest
}
export interface AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest {
@@ -719,7 +542,7 @@ export interface AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest {
* Check AWS Logs Async Services request body.
* @type AWSLogsServicesRequest
*/
- body: AWSLogsServicesRequest;
+ body: AWSLogsServicesRequest
}
export interface AWSLogsIntegrationApiCreateAWSLambdaARNRequest {
@@ -727,7 +550,7 @@ export interface AWSLogsIntegrationApiCreateAWSLambdaARNRequest {
* AWS Log Lambda Async request body.
* @type AWSAccountAndLambdaRequest
*/
- body: AWSAccountAndLambdaRequest;
+ body: AWSAccountAndLambdaRequest
}
export interface AWSLogsIntegrationApiDeleteAWSLambdaARNRequest {
@@ -735,7 +558,7 @@ export interface AWSLogsIntegrationApiDeleteAWSLambdaARNRequest {
* Delete AWS Lambda ARN request body.
* @type AWSAccountAndLambdaRequest
*/
- body: AWSAccountAndLambdaRequest;
+ body: AWSAccountAndLambdaRequest
}
export interface AWSLogsIntegrationApiEnableAWSLogServicesRequest {
@@ -743,7 +566,7 @@ export interface AWSLogsIntegrationApiEnableAWSLogServicesRequest {
* Enable AWS Log Services request body.
* @type AWSLogsServicesRequest
*/
- body: AWSLogsServicesRequest;
+ body: AWSLogsServicesRequest
}
export class AWSLogsIntegrationApi {
@@ -751,44 +574,28 @@ export class AWSLogsIntegrationApi {
private responseProcessor: AWSLogsIntegrationApiResponseProcessor;
private configuration: Configuration;
- public constructor(
- configuration: Configuration,
- requestFactory?: AWSLogsIntegrationApiRequestFactory,
- responseProcessor?: AWSLogsIntegrationApiResponseProcessor
- ) {
+ public constructor(configuration: Configuration, requestFactory?: AWSLogsIntegrationApiRequestFactory, responseProcessor?: AWSLogsIntegrationApiResponseProcessor) {
this.configuration = configuration;
- this.requestFactory =
- requestFactory || new AWSLogsIntegrationApiRequestFactory(configuration);
- this.responseProcessor =
- responseProcessor || new AWSLogsIntegrationApiResponseProcessor();
+ this.requestFactory = requestFactory || new AWSLogsIntegrationApiRequestFactory(configuration);
+ this.responseProcessor = responseProcessor || new AWSLogsIntegrationApiResponseProcessor();
}
/**
* Test if permissions are present to add a log-forwarding triggers for the given services and AWS account. The input
* is the same as for Enable an AWS service log collection. Subsequent requests will always repeat the above, so this
* endpoint can be polled intermittently instead of blocking.
- *
+ *
* - Returns a status of 'created' when it's checking if the Lambda exists in the account.
* - Returns a status of 'waiting' while checking.
* - Returns a status of 'checked and ok' if the Lambda exists.
* - Returns a status of 'error' if the Lambda does not exist.
* @param param The request object
*/
- public checkAWSLogsLambdaAsync(
- param: AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.checkAWSLogsLambdaAsync(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.checkAWSLogsLambdaAsync(
- responseContext
- );
+ public checkAWSLogsLambdaAsync(param: AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.checkAWSLogsLambdaAsync(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.checkAWSLogsLambdaAsync(responseContext);
});
});
}
@@ -798,7 +605,7 @@ export class AWSLogsIntegrationApi {
* given services and AWS account. Input is the same as for `EnableAWSLogServices`.
* Done async, so can be repeatedly polled in a non-blocking fashion until
* the async request completes.
- *
+ *
* - Returns a status of `created` when it's checking if the permissions exists
* in the AWS account.
* - Returns a status of `waiting` while checking.
@@ -806,21 +613,11 @@ export class AWSLogsIntegrationApi {
* - Returns a status of `error` if the Lambda does not exist.
* @param param The request object
*/
- public checkAWSLogsServicesAsync(
- param: AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.checkAWSLogsServicesAsync(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.checkAWSLogsServicesAsync(
- responseContext
- );
+ public checkAWSLogsServicesAsync(param: AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.checkAWSLogsServicesAsync(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.checkAWSLogsServicesAsync(responseContext);
});
});
}
@@ -829,19 +626,11 @@ export class AWSLogsIntegrationApi {
* Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection.
* @param param The request object
*/
- public createAWSLambdaARN(
- param: AWSLogsIntegrationApiCreateAWSLambdaARNRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.createAWSLambdaARN(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.createAWSLambdaARN(responseContext);
+ public createAWSLambdaARN(param: AWSLogsIntegrationApiCreateAWSLambdaARNRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.createAWSLambdaARN(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.createAWSLambdaARN(responseContext);
});
});
}
@@ -850,19 +639,11 @@ export class AWSLogsIntegrationApi {
* Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account.
* @param param The request object
*/
- public deleteAWSLambdaARN(
- param: AWSLogsIntegrationApiDeleteAWSLambdaARNRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.deleteAWSLambdaARN(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.deleteAWSLambdaARN(responseContext);
+ public deleteAWSLambdaARN(param: AWSLogsIntegrationApiDeleteAWSLambdaARNRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.deleteAWSLambdaARN(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.deleteAWSLambdaARN(responseContext);
});
});
}
@@ -871,19 +652,11 @@ export class AWSLogsIntegrationApi {
* Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration.
* @param param The request object
*/
- public enableAWSLogServices(
- param: AWSLogsIntegrationApiEnableAWSLogServicesRequest,
- options?: Configuration
- ): Promise {
- const requestContextPromise = this.requestFactory.enableAWSLogServices(
- param.body,
- options
- );
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.enableAWSLogServices(responseContext);
+ public enableAWSLogServices(param: AWSLogsIntegrationApiEnableAWSLogServicesRequest, options?: Configuration): Promise {
+ const requestContextPromise = this.requestFactory.enableAWSLogServices(param.body,options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.enableAWSLogServices(responseContext);
});
});
}
@@ -892,18 +665,11 @@ export class AWSLogsIntegrationApi {
* List all Datadog-AWS Logs integrations configured in your Datadog account.
* @param param The request object
*/
- public listAWSLogsIntegrations(
- options?: Configuration
- ): Promise> {
- const requestContextPromise =
- this.requestFactory.listAWSLogsIntegrations(options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAWSLogsIntegrations(
- responseContext
- );
+ public listAWSLogsIntegrations( options?: Configuration): Promise> {
+ const requestContextPromise = this.requestFactory.listAWSLogsIntegrations(options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAWSLogsIntegrations(responseContext);
});
});
}
@@ -912,17 +678,12 @@ export class AWSLogsIntegrationApi {
* Get the list of current AWS services that Datadog offers automatic log collection. Use returned service IDs with the services parameter for the Enable an AWS service log collection API endpoint.
* @param param The request object
*/
- public listAWSLogsServices(
- options?: Configuration
- ): Promise> {
- const requestContextPromise =
- this.requestFactory.listAWSLogsServices(options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.listAWSLogsServices(responseContext);
+ public listAWSLogsServices( options?: Configuration): Promise> {
+ const requestContextPromise = this.requestFactory.listAWSLogsServices(options);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.listAWSLogsServices(responseContext);
});
});
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-v1/apis/AuthenticationApi.ts b/packages/datadog-api-client-v1/apis/AuthenticationApi.ts
index 6155b12e490b..215c68be7d32 100644
--- a/packages/datadog-api-client-v1/apis/AuthenticationApi.ts
+++ b/packages/datadog-api-client-v1/apis/AuthenticationApi.ts
@@ -1,32 +1,32 @@
-import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
-import {
- Configuration,
- applySecurityAuthentication,
-} from "../../datadog-api-client-common/configuration";
+import { BaseAPIRequestFactory, RequiredError } from "../../datadog-api-client-common/baseapi";
+import { Configuration, applySecurityAuthentication} from "../../datadog-api-client-common/configuration";
import {
RequestContext,
HttpMethod,
ResponseContext,
-} from "../../datadog-api-client-common/http/http";
+ HttpFile
+ } from "../../datadog-api-client-common/http/http";
+
+import FormData from "form-data";
import { logger } from "../../../logger";
import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";
+
import { APIErrorResponse } from "../models/APIErrorResponse";
import { AuthenticationValidationResponse } from "../models/AuthenticationValidationResponse";
export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
+
public async validate(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/validate";
+ const localVarPath = '/api/v1/validate';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AuthenticationApi.validate")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AuthenticationApi.validate').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -38,6 +38,7 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
}
export class AuthenticationApiResponseProcessor {
+
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
@@ -45,25 +46,17 @@ export class AuthenticationApiResponseProcessor {
* @params response Response returned by the server for a request to validate
* @throws ApiException if the response code was not in [200, 299]
*/
- public async validate(
- response: ResponseContext
- ): Promise {
- const contentType = ObjectSerializer.normalizeMediaType(
- response.headers["content-type"]
- );
+ public async validate(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (response.httpStatusCode === 200) {
- const body: AuthenticationValidationResponse =
- ObjectSerializer.deserialize(
- ObjectSerializer.parse(await response.body.text(), contentType),
- "AuthenticationValidationResponse"
- ) as AuthenticationValidationResponse;
+ const body: AuthenticationValidationResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "AuthenticationValidationResponse"
+ ) as AuthenticationValidationResponse;
return body;
}
- if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
- const bodyText = ObjectSerializer.parse(
- await response.body.text(),
- contentType
- );
+ if (response.httpStatusCode === 403||response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(await response.body.text(), contentType);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
@@ -72,30 +65,22 @@ export class AuthenticationApiResponseProcessor {
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
- throw new ApiException(
- response.httpStatusCode,
- bodyText
- );
- }
+ throw new ApiException(response.httpStatusCode, bodyText);
+ }
throw new ApiException(response.httpStatusCode, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- const body: AuthenticationValidationResponse =
- ObjectSerializer.deserialize(
- ObjectSerializer.parse(await response.body.text(), contentType),
- "AuthenticationValidationResponse",
- ""
- ) as AuthenticationValidationResponse;
+ const body: AuthenticationValidationResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "AuthenticationValidationResponse", ""
+ ) as AuthenticationValidationResponse;
return body;
}
const body = (await response.body.text()) || "";
- throw new ApiException(
- response.httpStatusCode,
- 'Unknown API Status Code!\nBody: "' + body + '"'
- );
+ throw new ApiException(response.httpStatusCode, "Unknown API Status Code!\nBody: \"" + body + "\"");
}
}
@@ -104,32 +89,22 @@ export class AuthenticationApi {
private responseProcessor: AuthenticationApiResponseProcessor;
private configuration: Configuration;
- public constructor(
- configuration: Configuration,
- requestFactory?: AuthenticationApiRequestFactory,
- responseProcessor?: AuthenticationApiResponseProcessor
- ) {
+ public constructor(configuration: Configuration, requestFactory?: AuthenticationApiRequestFactory, responseProcessor?: AuthenticationApiResponseProcessor) {
this.configuration = configuration;
- this.requestFactory =
- requestFactory || new AuthenticationApiRequestFactory(configuration);
- this.responseProcessor =
- responseProcessor || new AuthenticationApiResponseProcessor();
+ this.requestFactory = requestFactory || new AuthenticationApiRequestFactory(configuration);
+ this.responseProcessor = responseProcessor || new AuthenticationApiResponseProcessor();
}
/**
* Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.
* @param param The request object
*/
- public validate(
- options?: Configuration
- ): Promise {
+ public validate( options?: Configuration): Promise {
const requestContextPromise = this.requestFactory.validate(options);
- return requestContextPromise.then((requestContext) => {
- return this.configuration.httpApi
- .send(requestContext)
- .then((responseContext) => {
- return this.responseProcessor.validate(responseContext);
+ return requestContextPromise.then(requestContext => {
+ return this.configuration.httpApi.send(requestContext).then(responseContext => {
+ return this.responseProcessor.validate(responseContext);
});
});
}
-}
+}
\ No newline at end of file
diff --git a/packages/datadog-api-client-v1/apis/AzureIntegrationApi.ts b/packages/datadog-api-client-v1/apis/AzureIntegrationApi.ts
index fa4615024bf0..3a02434a6b02 100644
--- a/packages/datadog-api-client-v1/apis/AzureIntegrationApi.ts
+++ b/packages/datadog-api-client-v1/apis/AzureIntegrationApi.ts
@@ -1,50 +1,44 @@
-import {
- BaseAPIRequestFactory,
- RequiredError,
-} from "../../datadog-api-client-common/baseapi";
-import {
- Configuration,
- applySecurityAuthentication,
-} from "../../datadog-api-client-common/configuration";
+import { BaseAPIRequestFactory, RequiredError } from "../../datadog-api-client-common/baseapi";
+import { Configuration, applySecurityAuthentication} from "../../datadog-api-client-common/configuration";
import {
RequestContext,
HttpMethod,
ResponseContext,
-} from "../../datadog-api-client-common/http/http";
+ HttpFile
+ } from "../../datadog-api-client-common/http/http";
+
+import FormData from "form-data";
import { logger } from "../../../logger";
import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";
+
import { APIErrorResponse } from "../models/APIErrorResponse";
import { AzureAccount } from "../models/AzureAccount";
+import { AzureAccountListResponse } from "../models/AzureAccountListResponse";
export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
- public async createAzureIntegration(
- body: AzureAccount,
- _options?: Configuration
- ): Promise {
+
+ public async createAzureIntegration(body: AzureAccount,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "createAzureIntegration");
+ throw new RequiredError('body', 'createAzureIntegration');
}
// Path Params
- const localVarPath = "/api/v1/integration/azure";
+ const localVarPath = '/api/v1/integration/azure';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AzureIntegrationApi.createAzureIntegration")
- .makeRequestContext(localVarPath, HttpMethod.POST);
+ const requestContext = _config.getServer('v1.AzureIntegrationApi.createAzureIntegration').makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AzureAccount", ""),
@@ -53,39 +47,30 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async deleteAzureIntegration(
- body: AzureAccount,
- _options?: Configuration
- ): Promise {
+ public async deleteAzureIntegration(body: AzureAccount,_options?: Configuration): Promise {
const _config = _options || this.configuration;
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "deleteAzureIntegration");
+ throw new RequiredError('body', 'deleteAzureIntegration');
}
// Path Params
- const localVarPath = "/api/v1/integration/azure";
+ const localVarPath = '/api/v1/integration/azure';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AzureIntegrationApi.deleteAzureIntegration")
- .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ const requestContext = _config.getServer('v1.AzureIntegrationApi.deleteAzureIntegration').makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
- ]);
+ "application/json"]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(body, "AzureAccount", ""),
@@ -94,63 +79,47 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setBody(serializedBody);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async listAzureIntegration(
- _options?: Configuration
- ): Promise {
+ public async listAzureIntegration(_options?: Configuration): Promise {
const _config = _options || this.configuration;
// Path Params
- const localVarPath = "/api/v1/integration/azure";
+ const localVarPath = '/api/v1/integration/azure';
// Make Request Context
- const requestContext = _config
- .getServer("v1.AzureIntegrationApi.listAzureIntegration")
- .makeRequestContext(localVarPath, HttpMethod.GET);
+ const requestContext = _config.getServer('v1.AzureIntegrationApi.listAzureIntegration').makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
// Apply auth methods
- applySecurityAuthentication(_config, requestContext, [
- "apiKeyAuth",
- "appKeyAuth",
- ]);
+ applySecurityAuthentication(_config, requestContext, ["apiKeyAuth", "appKeyAuth"]);
return requestContext;
}
- public async updateAzureHostFilters(
- body: AzureAccount,
- _options?: Configuration
- ): Promise