List Elastic Cloud integration accounts
https://api.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.us3.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.us5.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.datadoghq.eu/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.ap1.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.ap2.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.uk1.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.ddog-gov.com/api/v2/integration-interfaces/elastic-cloud/accountshttps://api.us2.ddog-gov.com/api/v2/integration-interfaces/elastic-cloud/accountsPrésentation
List Elastic Cloud integration accounts.
Réponse
OK
Response payload for a list of Elastic Cloud integration accounts.
data [required]List of Elastic Cloud integration accounts.
attributes [required]Attributes of an Elastic Cloud integration account returned in responses.
authenticationAuthentication configured on the Elastic Cloud integration account.
<auth_type=basic>The basic authentication method and username configured on the account.
auth_type [required]The authentication method type.
basicbasicusername [required]Non-secret username or public identifier for the credential pair.
dataflowsData Datadog collects from Elastic Cloud, keyed by dataflow id.
elastic-cloud-detailed-index-statsPrimary shard metrics broken down per index, rather than aggregated across the cluster.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-index-statsMetrics for individual indices. Only the indices granted to the role of the user in authentication are collected.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-metricsNode-level statistics for the clusters in your deployment, such as the number of nodes and the number of documents on each node. This is the integration's baseline collection: it is always on and cannot be turned off, which is why it appears in responses only.
enabledWhether Datadog collects this data. Always true, because this collection cannot be turned off.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-pending-task-statsMetrics for cluster-level changes that have been submitted but not yet executed.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-primary-shard-graceful-timeoutTolerance for slow primary shard requests, keeping the rest of the collection running when a primary shard request times out instead of failing the run. Only has an effect alongside elastic-cloud-primary-shard-stats.
enabledWhether this tolerance is applied.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-primary-shard-statsMetrics covering only the cluster's primary shards.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-shard-allocation-statsMetrics for how many shards are allocated to each data node, and the disk space they use.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
elastic-cloud-slm-statsMetrics about the actions taken by snapshot lifecycle management. Requires the read_slm Elasticsearch cluster privilege on the role of the user in authentication; without it this dataflow collects no data.
enabledWhether Datadog collects this data.
statusRead-only collection status of a dataflow.
healthCollection health of a single dataflow.
DATAFLOW_HEALTH_OK, DATAFLOW_HEALTH_BROKEN, DATAFLOW_HEALTH_UNKNOWNmessageHuman-readable detail, populated when the dataflow is not healthy.
updated_atTime the status was last computed.
name [required]Human-readable name of the Elastic Cloud integration account.
settings [required]Settings configured on the Elastic Cloud integration account.
tagsComma-separated list of custom tags for this Elastic Cloud deployment.
url [required]Elastic Cloud deployment URL.
id [required]Server-generated unique identifier of the Elastic Cloud integration account.
type [required]The type of the integration account resource. Always integration-account.
integration-accountintegration-account{
"data": [
{
"attributes": {
"authentication": {
"auth_type": "basic",
"username": "datadog"
},
"dataflows": {
"elastic-cloud-detailed-index-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-index-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-metrics": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-pending-task-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-primary-shard-graceful-timeout": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-primary-shard-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-shard-allocation-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
},
"elastic-cloud-slm-stats": {
"enabled": true,
"status": {
"health": "DATAFLOW_HEALTH_OK",
"message": "",
"updated_at": "2026-06-25T08:30:50Z"
}
}
},
"name": "elastic-cloud-prod",
"settings": {
"tags": "env:prod,team:saasint",
"url": "https://example.es.us-central1.gcp.cloud.es.io:9243"
}
},
"id": "953a0060-81ec-4221-aed4-d4733b59cd96",
"type": "integration-account"
}
]
}Bad Request
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Found
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Exemple de code
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/elastic-cloud/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"// List Elastic Cloud integration accounts returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.ListElasticCloudIntegrationAccounts", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewElasticCloudIntegrationApi(apiClient)
resp, r, err := api.ListElasticCloudIntegrationAccounts(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ElasticCloudIntegrationApi.ListElasticCloudIntegrationAccounts`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `ElasticCloudIntegrationApi.ListElasticCloudIntegrationAccounts`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// List Elastic Cloud integration accounts returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ElasticCloudIntegrationApi;
import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountsResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.listElasticCloudIntegrationAccounts", true);
ElasticCloudIntegrationApi apiInstance = new ElasticCloudIntegrationApi(defaultClient);
try {
ElasticCloudIntegrationAccountsResponse result =
apiInstance.listElasticCloudIntegrationAccounts();
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling ElasticCloudIntegrationApi#listElasticCloudIntegrationAccounts");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
List Elastic Cloud integration accounts returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.elastic_cloud_integration_api import ElasticCloudIntegrationApi
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["list_elastic_cloud_integration_accounts"] = True
with ApiClient(configuration) as api_client:
api_instance = ElasticCloudIntegrationApi(api_client)
response = api_instance.list_elastic_cloud_integration_accounts()
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# List Elastic Cloud integration accounts returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.list_elastic_cloud_integration_accounts".to_sym] = true
end
api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAPI.new
p api_instance.list_elastic_cloud_integration_accounts()
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"// List Elastic Cloud integration accounts returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_elastic_cloud_integration::ElasticCloudIntegrationAPI;
#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration
.set_unstable_operation_enabled("v2.list_elastic_cloud_integration_accounts", true);
let api = ElasticCloudIntegrationAPI::with_config(configuration);
let resp = api.list_elastic_cloud_integration_accounts().await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run/**
* List Elastic Cloud integration accounts returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
configuration.unstableOperations["v2.listElasticCloudIntegrationAccounts"] =
true;
const apiInstance = new v2.ElasticCloudIntegrationApi(configuration);
apiInstance
.listElasticCloudIntegrationAccounts()
.then((data: v2.ElasticCloudIntegrationAccountsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" npx tsx "example.ts"