Intégration Azure
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Intégration Azure

Configurez votre intégration Datadog/Azure directement via l’API Datadog. Pour en savoir plus, consultez la page sur l’intégration Datadog/Azure.

Create an Azure integration

POST https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/azure

Présentation

Create a Datadog-Azure integration.

Using the POST method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization.

Using the PUT method updates your integration configuration by replacing your current configuration with the new one sent to your Datadog organization.

Requête

Body Data (required)

Create a Datadog-Azure integration for your Datadog account request body.

Expand All

Champ

Type

Description

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

errors

[string]

Errors in your configuration.

host_filters

string

Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one of the defined tags are imported into Datadog.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

tenant_name

string

Your Azure Active Directory ID.

{
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt",
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest"
}

Réponse

OK

Expand All

Champ

Type

Description

No response body

{}

Bad Request

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code


                                        # Curl command
curl -X POST "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/integration/azure" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{}
EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    body := *datadog.NewAzureAccount() // AzureAccount | Create a Datadog-Azure integration for your Datadog account request body.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.AzureIntegrationApi.CreateAzureIntegration(context.Background()).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.CreateAzureIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateAzureIntegration`: interface{}
    fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.CreateAzureIntegration`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.AzureIntegrationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient);
        AzureAccount body = new AzureAccount(); // AzureAccount | Create a Datadog-Azure integration for your Datadog account request body.
        try {
            Object result = api.createAzureIntegration()
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AzureIntegrationApi#createAzureIntegration");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.AzureIntegration.create(
    tenant_name="<AZURE_TENANT_NAME>",
    host_filters="<KEY_1>:<VALUE_1>,<KEY_2>:<VALUE_2>",
    client_id="<AZURE_CLIENT_ID>",
    client_secret="<AZURE_CLIENT_SECRET>"
)
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

config= {
    "tenant_name": "<AZURE_TENANT_NAME>",
    "client_id": "<AZURE_CLIENT_ID>",
    "client_secret": "<AZURE_CLIENT_SECRET>",
    "host_filters": "<KEY_1>:<VALUE_1>,<KEY_2>:<VALUE_2>"
  }

dog = Dogapi::Client.new(api_key, app_key)

dog.azure_integration_create(config)

Delete an Azure integration

DELETE https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/azure

Présentation

Delete a given Datadog-Azure integration from your Datadog account.

Requête

Body Data (required)

Delete a given Datadog-Azure integration request body.

Expand All

Champ

Type

Description

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

errors

[string]

Errors in your configuration.

host_filters

string

Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one of the defined tags are imported into Datadog.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

tenant_name

string

Your Azure Active Directory ID.

{
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt",
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest"
}

Réponse

OK

Expand All

Champ

Type

Description

No response body

{}

Bad Request

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code


                                        # Curl command
curl -X DELETE "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/integration/azure" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{}
EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    body := *datadog.NewAzureAccount() // AzureAccount | Delete a given Datadog-Azure integration request body.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.AzureIntegrationApi.DeleteAzureIntegration(context.Background()).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.DeleteAzureIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteAzureIntegration`: interface{}
    fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.DeleteAzureIntegration`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.AzureIntegrationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient);
        AzureAccount body = new AzureAccount(); // AzureAccount | Delete a given Datadog-Azure integration request body.
        try {
            Object result = api.deleteAzureIntegration()
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AzureIntegrationApi#deleteAzureIntegration");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.AzureIntegration.delete(
    tenant_name="<AZURE_TENANT_NAME>",
    client_id="<AZURE_CLIENT_ID>"
)
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

config = {
    "tenant_name": '<AZURE_TENANT_NAME>',
    "client_id": '<AZURE_CLIENT_ID>'
  }

dog.azure_integration_delete(config)

List all Azure integrations

GET https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/azure

Présentation

List all Datadog-Azure integrations configured in your Datadog account.

Réponse

OK

Accounts configured for your organization.

Expand All

Champ

Type

Description

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

errors

[string]

Errors in your configuration.

host_filters

string

Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one of the defined tags are imported into Datadog.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

tenant_name

string

Your Azure Active Directory ID.

{
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt",
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest"
}

Bad Request

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code


                                        # Curl command
curl -X GET "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/integration/azure" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )


    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.AzureIntegrationApi.ListAzureIntegration(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.ListAzureIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListAzureIntegration`: []AzureAccount
    fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.ListAzureIntegration`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.AzureIntegrationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient);
        try {
            List<AzureAccount> result = api.listAzureIntegration()
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AzureIntegrationApi#listAzureIntegration");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.AzureIntegration.list()
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

dog.azure_integration_list

Update an Azure integration

PUT https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/azure

Présentation

Update a Datadog-Azure integration. Requires an existing tenant_name and client_id. Any other fields supplied will overwrite existing values. To overwrite tenant_name or client_id, use new_tenant_name and new_client_id. To leave a field unchanged, do not supply that field in the payload.

Requête

Body Data (required)

Update a Datadog-Azure integration request body.

Expand All

Champ

Type

Description

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

errors

[string]

Errors in your configuration.

host_filters

string

Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one of the defined tags are imported into Datadog.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

tenant_name

string

Your Azure Active Directory ID.

{
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt",
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest"
}

Réponse

OK

Expand All

Champ

Type

Description

No response body

{}

Bad Request

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code


                                        # Curl command
curl -X PUT "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/integration/azure" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{}
EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    body :=  // AzureAccount | Update a Datadog-Azure integration request body.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.AzureIntegrationApi.UpdateAzureIntegration(context.Background()).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.UpdateAzureIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateAzureIntegration`: interface{}
    fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.UpdateAzureIntegration`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.AzureIntegrationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient);
        AzureAccount body = new AzureAccount(); // AzureAccount | Update a Datadog-Azure integration request body.
        try {
            Object result = api.updateAzureIntegration()
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AzureIntegrationApi#updateAzureIntegration");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Update Azure integration host filters

POST https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/azure/host_filters

Présentation

Update the defined list of host filters for a given Datadog-Azure integration.

Requête

Body Data (required)

Update a Datadog-Azure integration’s host filters request body.

Expand All

Champ

Type

Description

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

errors

[string]

Errors in your configuration.

host_filters

string

Limit the Azure instances that are pulled into Datadog by using tags. Only hosts that match one of the defined tags are imported into Datadog.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

tenant_name

string

Your Azure Active Directory ID.

{
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt",
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest"
}

Réponse

OK

Expand All

Champ

Type

Description

No response body

{}

Bad Request

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication Error

Error response object.

Expand All

Champ

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code


                                        # Curl command
curl -X POST "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/integration/azure/host_filters" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{}
EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    body :=  // AzureAccount | Update a Datadog-Azure integration's host filters request body.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.AzureIntegrationApi.UpdateAzureHostFilters(context.Background()).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.UpdateAzureHostFilters``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateAzureHostFilters`: interface{}
    fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.UpdateAzureHostFilters`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.AzureIntegrationApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        AzureIntegrationApi apiInstance = new AzureIntegrationApi(defaultClient);
        AzureAccount body = new AzureAccount(); // AzureAccount | Update a Datadog-Azure integration's host filters request body.
        try {
            Object result = api.updateAzureHostFilters()
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AzureIntegrationApi#updateAzureHostFilters");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.AzureIntegration.update_host_filters(
    tenant_name="<AZURE_TENANT_NAME>",
    host_filters="new:filters",
    client_id="<AZURE_CLIENT_ID>"
)
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

config= {
    "tenant_name": "<AZURE_TENANT_NAME>",
    "client_id": "<AZURE_CLIENT_ID>",
    "host_filters": "<NEW_KEY>:<NEW_VALUE>"
  }

dog = Dogapi::Client.new(api_key, app_key)

dog.azure_integration_update_host_filters(config)