Skip to content

Latest commit

 

History

History
603 lines (431 loc) · 21.8 KB

File metadata and controls

603 lines (431 loc) · 21.8 KB

datadog-api-client.v1.AWSIntegrationApi

All URIs are relative to https://api.datadoghq.com

Method HTTP request Description
createAWSAccount POST /api/v1/integration/aws Create an AWS integration
createAWSTagFilter POST /api/v1/integration/aws/filtering Set an AWS tag filter
createNewAWSExternalID PUT /api/v1/integration/aws/generate_new_external_id Generate a new external ID
deleteAWSAccount DELETE /api/v1/integration/aws Delete an AWS integration
deleteAWSTagFilter DELETE /api/v1/integration/aws/filtering Delete a tag filtering entry
listAWSAccounts GET /api/v1/integration/aws List all AWS integrations
listAWSTagFilters GET /api/v1/integration/aws/filtering Get all AWS tag filters
listAvailableAWSNamespaces GET /api/v1/integration/aws/available_namespace_rules List namespace rules
updateAWSAccount PUT /api/v1/integration/aws Update an AWS integration

createAWSAccount

AWSAccountCreateResponse createAWSAccount(body)

Create a Datadog-Amazon Web Services integration. Using the POST method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiCreateAWSAccountRequest = {
  // AWSAccount | AWS Request Object
  body: {
    accessKeyId: "accessKeyId_example",
    accountId: "1234567",
    accountSpecificNamespaceRules: {
      key: true,
    },
    excludedRegions: ["us-east-1", "us-west-2"],
    filterTags: ["<KEY>:<VALUE>"],
    hostTags: ["<KEY>:<VALUE>"],
    roleName: "DatadogAWSIntegrationRole",
    secretAccessKey: "secretAccessKey_example",
  },
};

apiInstance
  .createAWSAccount(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
body AWSAccount AWS Request Object

Return type

AWSAccountCreateResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Authentication Error -
409 Conflict Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createAWSTagFilter

any createAWSTagFilter(body)

Set an AWS tag filter.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiCreateAWSTagFilterRequest = {
  // AWSTagFilterCreateRequest | Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
  body: {
    accountId: "1234567",
    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));

Parameters

Name Type Description Notes
body AWSTagFilterCreateRequest Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.

Return type

any

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

createNewAWSExternalID

AWSAccountCreateResponse createNewAWSExternalID(body)

Generate a new AWS external ID for a given AWS account ID and role name pair.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiCreateNewAWSExternalIDRequest = {
  // AWSAccount | Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
  body: {
    accessKeyId: "accessKeyId_example",
    accountId: "1234567",
    accountSpecificNamespaceRules: {
      key: true,
    },
    excludedRegions: ["us-east-1", "us-west-2"],
    filterTags: ["<KEY>:<VALUE>"],
    hostTags: ["<KEY>:<VALUE>"],
    roleName: "DatadogAWSIntegrationRole",
    secretAccessKey: "secretAccessKey_example",
  },
};

apiInstance
  .createNewAWSExternalID(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
body AWSAccount Your Datadog role delegation name. For more information about your AWS account Role name, see the Datadog AWS integration configuration info.

Return type

AWSAccountCreateResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

deleteAWSAccount

any deleteAWSAccount(body)

Delete a Datadog-AWS integration matching the specified account_id and role_name parameters.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiDeleteAWSAccountRequest = {
  // AWSAccountDeleteRequest | AWS request object
  body: {
    accessKeyId: "accessKeyId_example",
    accountId: "1234567",
    roleName: "DatadogAWSIntegrationRole",
  },
};

apiInstance
  .deleteAWSAccount(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
body AWSAccountDeleteRequest AWS request object

Return type

any

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Authentication Error -
409 Conflict Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAWSTagFilter

any deleteAWSTagFilter(body)

Delete a tag filtering entry.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiDeleteAWSTagFilterRequest = {
  // AWSTagFilterDeleteRequest | Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.
  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));

Parameters

Name Type Description Notes
body AWSTagFilterDeleteRequest Delete a tag filtering entry for a given AWS account and `dd-aws` namespace.

Return type

any

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

listAWSAccounts

AWSAccountListResponse listAWSAccounts()

List all Datadog-AWS integrations available in your Datadog organization.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiListAWSAccountsRequest = {
  // string | Only return AWS accounts that matches this `account_id`. (optional)
  accountId: "account_id_example",
  // string | Only return AWS accounts that matches this role_name. (optional)
  roleName: "role_name_example",
  // string | Only return AWS accounts that matches this `access_key_id`. (optional)
  accessKeyId: "access_key_id_example",
};

apiInstance
  .listAWSAccounts(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
accountId [string] Only return AWS accounts that matches this `account_id`. (optional) defaults to undefined
roleName [string] Only return AWS accounts that matches this role_name. (optional) defaults to undefined
accessKeyId [string] Only return AWS accounts that matches this `access_key_id`. (optional) defaults to undefined

Return type

AWSAccountListResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

listAWSTagFilters

AWSTagFilterListResponse listAWSTagFilters()

Get all AWS tag filters.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiListAWSTagFiltersRequest = {
  // string | Only return AWS filters that matches this `account_id`.
  accountId: "account_id_example",
};

apiInstance
  .listAWSTagFilters(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
accountId [string] Only return AWS filters that matches this `account_id`. defaults to undefined

Return type

AWSTagFilterListResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

listAvailableAWSNamespaces

Array listAvailableAWSNamespaces()

List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

apiInstance
  .listAvailableAWSNamespaces()
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

Array

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
403 Authentication Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAWSAccount

any updateAWSAccount(body)

Update a Datadog-Amazon Web Services integration.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.AWSIntegrationApi(configuration);

let params: v1.AWSIntegrationApiUpdateAWSAccountRequest = {
  // AWSAccount | AWS request object
  body: {
    accessKeyId: "accessKeyId_example",
    accountId: "1234567",
    accountSpecificNamespaceRules: {
      key: true,
    },
    excludedRegions: ["us-east-1", "us-west-2"],
    filterTags: ["<KEY>:<VALUE>"],
    hostTags: ["<KEY>:<VALUE>"],
    roleName: "DatadogAWSIntegrationRole",
    secretAccessKey: "secretAccessKey_example",
  },
  // string | Only return AWS accounts that matches this `account_id`. (optional)
  accountId: "account_id_example",
  // string | Only return AWS accounts that match this `role_name`. Required if `account_id` is specified. (optional)
  roleName: "role_name_example",
  // string | Only return AWS accounts that matches this `access_key_id`. Required if none of the other two options are specified. (optional)
  accessKeyId: "access_key_id_example",
};

apiInstance
  .updateAWSAccount(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
body AWSAccount AWS request object
accountId [string] Only return AWS accounts that matches this `account_id`. (optional) defaults to undefined
roleName [string] Only return AWS accounts that match this `role_name`. Required if `account_id` is specified. (optional) defaults to undefined
accessKeyId [string] Only return AWS accounts that matches this `access_key_id`. Required if none of the other two options are specified. (optional) defaults to undefined

Return type

any

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Authentication Error -
409 Conflict Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]