All URIs are relative to https://api.datadoghq.com
| Method | HTTP request | Description |
|---|---|---|
| createGCPIntegration | POST /api/v1/integration/gcp | Create a GCP integration |
| deleteGCPIntegration | DELETE /api/v1/integration/gcp | Delete a GCP integration |
| listGCPIntegration | GET /api/v1/integration/gcp | List all GCP integrations |
| updateGCPIntegration | PUT /api/v1/integration/gcp | Update a GCP integration |
any createGCPIntegration(body)
Create a Datadog-GCP integration.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.GCPIntegrationApi(configuration);
let params: v1.GCPIntegrationApiCreateGCPIntegrationRequest = {
// GCPAccount | Create a Datadog-GCP integration.
body: {
authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
authUri: "https://accounts.google.com/o/oauth2/auth",
automute: true,
clientEmail: "api-dev@datadog-sandbox.iam.gserviceaccount.com",
clientId: "123456712345671234567",
clientX509CertUrl:
"https://www.googleapis.com/robot/v1/metadata/x509/<CLIENT_EMAIL>",
errors: ["*"],
hostFilters: "key:value,filter:example",
privateKey: "private_key",
privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
projectId: "datadog-apitest",
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));| Name | Type | Description | Notes |
|---|---|---|---|
| body | GCPAccount | Create a Datadog-GCP integration. |
any
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any deleteGCPIntegration(body)
Delete a given Datadog-GCP integration.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.GCPIntegrationApi(configuration);
let params: v1.GCPIntegrationApiDeleteGCPIntegrationRequest = {
// GCPAccount | Delete a given Datadog-GCP integration.
body: {
authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
authUri: "https://accounts.google.com/o/oauth2/auth",
automute: true,
clientEmail: "api-dev@datadog-sandbox.iam.gserviceaccount.com",
clientId: "123456712345671234567",
clientX509CertUrl:
"https://www.googleapis.com/robot/v1/metadata/x509/<CLIENT_EMAIL>",
errors: ["*"],
hostFilters: "key:value,filter:example",
privateKey: "private_key",
privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
projectId: "datadog-apitest",
tokenUri: "https://accounts.google.com/o/oauth2/token",
type: "service_account",
},
};
apiInstance
.deleteGCPIntegration(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| body | GCPAccount | Delete a given Datadog-GCP integration. |
any
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array listGCPIntegration()
List all Datadog-GCP integrations configured in your Datadog account.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.GCPIntegrationApi(configuration);
apiInstance
.listGCPIntegration()
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));This endpoint does not need any parameter.
Array
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
any updateGCPIntegration(body)
Update a Datadog-GCP integrations host_filters and/or auto-mute.
Requires a project_id and client_email, however these fields cannot be updated.
If you need to update these fields, delete and use the create (POST) endpoint.
The unspecified fields will keep their original values.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.GCPIntegrationApi(configuration);
let params: v1.GCPIntegrationApiUpdateGCPIntegrationRequest = {
// GCPAccount | Update a Datadog-GCP integration.
body: {
authProviderX509CertUrl: "https://www.googleapis.com/oauth2/v1/certs",
authUri: "https://accounts.google.com/o/oauth2/auth",
automute: true,
clientEmail: "api-dev@datadog-sandbox.iam.gserviceaccount.com",
clientId: "123456712345671234567",
clientX509CertUrl:
"https://www.googleapis.com/robot/v1/metadata/x509/<CLIENT_EMAIL>",
errors: ["*"],
hostFilters: "key:value,filter:example",
privateKey: "private_key",
privateKeyId: "123456789abcdefghi123456789abcdefghijklm",
projectId: "datadog-apitest",
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));| Name | Type | Description | Notes |
|---|---|---|---|
| body | GCPAccount | Update a Datadog-GCP integration. |
any
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]