Integración Azure

Configura tu integración Azure en Datadog directamente a través de la API Datadog. Para obtener más información, consulta la página de la integración Azure en Datadog.

GET https://api.ap1.datadoghq.com/api/v1/integration/azurehttps://api.datadoghq.eu/api/v1/integration/azurehttps://api.ddog-gov.com/api/v1/integration/azurehttps://api.datadoghq.com/api/v1/integration/azurehttps://api.us3.datadoghq.com/api/v1/integration/azurehttps://api.us5.datadoghq.com/api/v1/integration/azure

Información general

Enumera todas las integraciones Azure en Datadog, configuradas en tu cuenta de Datadog. This endpoint requires the azure_configuration_read permission.

Respuesta

OK

Accounts configured for your organization.

Expand All

Campo

Tipo

Descripción

app_service_plan_filters

string

Limit the Azure app service plans that are pulled into Datadog using tags. Only app service plans that match one of the defined tags are imported into Datadog.

automute

boolean

Silence monitors for expected Azure VM shutdowns.

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

container_app_filters

string

Limit the Azure container apps that are pulled into Datadog using tags. Only container apps that match one of the defined tags are imported into Datadog.

cspm_enabled

boolean

When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. Note: This requires resource_collection_enabled to be set to true.

custom_metrics_enabled

boolean

Enable custom metrics for your organization.

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.

metrics_enabled

boolean

Enable Azure metrics for your organization.

metrics_enabled_default

boolean

Enable Azure metrics for your organization for resource providers where no resource provider config is specified.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

resource_collection_enabled

boolean

When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.

resource_provider_configs

[object]

Configuration settings applied to resources from the specified Azure resource providers.

metrics_enabled

boolean

Collect metrics for resources from this provider.

namespace

string

The provider namespace to apply this configuration to.

tenant_name

string

Your Azure Active Directory ID.

usage_metrics_enabled

boolean

Enable azure.usage metrics for your organization.

{
  "app_service_plan_filters": "key:value,filter:example",
  "automute": true,
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO",
  "container_app_filters": "key:value,filter:example",
  "cspm_enabled": true,
  "custom_metrics_enabled": true,
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "metrics_enabled": true,
  "metrics_enabled_default": true,
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "resource_collection_enabled": true,
  "resource_provider_configs": [
    {
      "metrics_enabled": true,
      "namespace": "Microsoft.Compute"
    }
  ],
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest",
  "usage_metrics_enabled": true
}

Bad Request

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Ejemplo de código

// List all Azure integrations 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/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewAzureIntegrationApi(apiClient)
	resp, r, err := api.ListAzureIntegration(ctx)

	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)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.ListAzureIntegration`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

POST https://api.ap1.datadoghq.com/api/v1/integration/azurehttps://api.datadoghq.eu/api/v1/integration/azurehttps://api.ddog-gov.com/api/v1/integration/azurehttps://api.datadoghq.com/api/v1/integration/azurehttps://api.us3.datadoghq.com/api/v1/integration/azurehttps://api.us5.datadoghq.com/api/v1/integration/azure

Información general

Crea una integración Azure en Datadog.

Utilizando el método POST actualiza la configuración de tu integración añadiendo tu nueva configuración a la que existe en tu organización Datadog.

Utilizando el método PUT actualiza la configuración de tu integración reemplazando tu configuración actual con la nueva, enviada a tu organización Datadog.

This endpoint requires the azure_configurations_manage permission.

Solicitud

Body Data (required)

Crea una integración Azure en Datadog para el cuerpo de una solicitud de tu cuenta de Datadog.

Expand All

Campo

Tipo

Descripción

app_service_plan_filters

string

Limit the Azure app service plans that are pulled into Datadog using tags. Only app service plans that match one of the defined tags are imported into Datadog.

automute

boolean

Silence monitors for expected Azure VM shutdowns.

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

container_app_filters

string

Limit the Azure container apps that are pulled into Datadog using tags. Only container apps that match one of the defined tags are imported into Datadog.

cspm_enabled

boolean

When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. Note: This requires resource_collection_enabled to be set to true.

custom_metrics_enabled

boolean

Enable custom metrics for your organization.

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.

metrics_enabled

boolean

Enable Azure metrics for your organization.

metrics_enabled_default

boolean

Enable Azure metrics for your organization for resource providers where no resource provider config is specified.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

resource_collection_enabled

boolean

When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.

resource_provider_configs

[object]

Configuration settings applied to resources from the specified Azure resource providers.

metrics_enabled

boolean

Collect metrics for resources from this provider.

namespace

string

The provider namespace to apply this configuration to.

tenant_name

string

Your Azure Active Directory ID.

usage_metrics_enabled

boolean

Enable azure.usage metrics for your organization.

{
  "app_service_plan_filters": "key:value,filter:example",
  "automute": true,
  "client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO",
  "container_app_filters": "key:value,filter:example",
  "cspm_enabled": true,
  "custom_metrics_enabled": true,
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "new_tenant_name": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "resource_collection_enabled": true,
  "tenant_name": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}

Respuesta

OK

Expand All

Campo

Tipo

Descripción

No response body

{}

Bad Request

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Ejemplo de código

// Create an Azure integration 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/datadogV1"
)

func main() {
	body := datadogV1.AzureAccount{
		AppServicePlanFilters: datadog.PtrString("key:value,filter:example"),
		Automute:              datadog.PtrBool(true),
		ClientId:              datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		ClientSecret:          datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"),
		ContainerAppFilters:   datadog.PtrString("key:value,filter:example"),
		CspmEnabled:           datadog.PtrBool(true),
		CustomMetricsEnabled:  datadog.PtrBool(true),
		Errors: []string{
			"*",
		},
		HostFilters:               datadog.PtrString("key:value,filter:example"),
		NewClientId:               datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		NewTenantName:             datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		ResourceCollectionEnabled: datadog.PtrBool(true),
		TenantName:                datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewAzureIntegrationApi(apiClient)
	resp, r, err := api.CreateAzureIntegration(ctx, body)

	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)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.CreateAzureIntegration`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

DELETE https://api.ap1.datadoghq.com/api/v1/integration/azurehttps://api.datadoghq.eu/api/v1/integration/azurehttps://api.ddog-gov.com/api/v1/integration/azurehttps://api.datadoghq.com/api/v1/integration/azurehttps://api.us3.datadoghq.com/api/v1/integration/azurehttps://api.us5.datadoghq.com/api/v1/integration/azure

Información general

Elimina una integración Azure en Datadog determinada de tu cuenta de AWS. This endpoint requires the azure_configurations_manage permission.

Solicitud

Body Data (required)

Elimina el cuerpo de una solicitud de integración Azure en Datadog determinada.

Expand All

Campo

Tipo

Descripción

app_service_plan_filters

string

Limit the Azure app service plans that are pulled into Datadog using tags. Only app service plans that match one of the defined tags are imported into Datadog.

automute

boolean

Silence monitors for expected Azure VM shutdowns.

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

container_app_filters

string

Limit the Azure container apps that are pulled into Datadog using tags. Only container apps that match one of the defined tags are imported into Datadog.

cspm_enabled

boolean

When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. Note: This requires resource_collection_enabled to be set to true.

custom_metrics_enabled

boolean

Enable custom metrics for your organization.

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.

metrics_enabled

boolean

Enable Azure metrics for your organization.

metrics_enabled_default

boolean

Enable Azure metrics for your organization for resource providers where no resource provider config is specified.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

resource_collection_enabled

boolean

When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.

resource_provider_configs

[object]

Configuration settings applied to resources from the specified Azure resource providers.

metrics_enabled

boolean

Collect metrics for resources from this provider.

namespace

string

The provider namespace to apply this configuration to.

tenant_name

string

Your Azure Active Directory ID.

usage_metrics_enabled

boolean

Enable azure.usage metrics for your organization.

{
  "client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "tenant_name": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}

Respuesta

OK

Expand All

Campo

Tipo

Descripción

No response body

{}

Bad Request

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Ejemplo de código

// Delete an Azure integration 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/datadogV1"
)

func main() {
	body := datadogV1.AzureAccount{
		ClientId:   datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		TenantName: datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewAzureIntegrationApi(apiClient)
	resp, r, err := api.DeleteAzureIntegration(ctx, body)

	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)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.DeleteAzureIntegration`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

PUT https://api.ap1.datadoghq.com/api/v1/integration/azurehttps://api.datadoghq.eu/api/v1/integration/azurehttps://api.ddog-gov.com/api/v1/integration/azurehttps://api.datadoghq.com/api/v1/integration/azurehttps://api.us3.datadoghq.com/api/v1/integration/azurehttps://api.us5.datadoghq.com/api/v1/integration/azure

Información general

Actualizar una integración Azure en Datadog requiere un nombre_de_inquilino y un id_de_cliente existentes. Cualquier otro campo suministrado reemplazará los valores existentes. Para reemplazar un nombre_de_inquilino y un id_de_cliente, utiliza un nuevo_nombre_de_inquilino y un nuevo_id_de_cliente. Para no modificar un campo, no lo incluyas en la carga útil. This endpoint requires the azure_configuration_edit permission.

Solicitud

Body Data (required)

Actualiza el cuerpo de una solicitud de integración Azure en Datadog.

Expand All

Campo

Tipo

Descripción

app_service_plan_filters

string

Limit the Azure app service plans that are pulled into Datadog using tags. Only app service plans that match one of the defined tags are imported into Datadog.

automute

boolean

Silence monitors for expected Azure VM shutdowns.

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

container_app_filters

string

Limit the Azure container apps that are pulled into Datadog using tags. Only container apps that match one of the defined tags are imported into Datadog.

cspm_enabled

boolean

When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. Note: This requires resource_collection_enabled to be set to true.

custom_metrics_enabled

boolean

Enable custom metrics for your organization.

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.

metrics_enabled

boolean

Enable Azure metrics for your organization.

metrics_enabled_default

boolean

Enable Azure metrics for your organization for resource providers where no resource provider config is specified.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

resource_collection_enabled

boolean

When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.

resource_provider_configs

[object]

Configuration settings applied to resources from the specified Azure resource providers.

metrics_enabled

boolean

Collect metrics for resources from this provider.

namespace

string

The provider namespace to apply this configuration to.

tenant_name

string

Your Azure Active Directory ID.

usage_metrics_enabled

boolean

Enable azure.usage metrics for your organization.

{
  "app_service_plan_filters": "key:value,filter:example",
  "automute": true,
  "client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO",
  "container_app_filters": "key:value,filter:example",
  "cspm_enabled": true,
  "custom_metrics_enabled": true,
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "new_client_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "new_tenant_name": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "resource_collection_enabled": true,
  "tenant_name": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}

Respuesta

OK

Expand All

Campo

Tipo

Descripción

No response body

{}

Bad Request

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Ejemplo de código

// Update an Azure integration 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/datadogV1"
)

func main() {
	body := datadogV1.AzureAccount{
		AppServicePlanFilters: datadog.PtrString("key:value,filter:example"),
		Automute:              datadog.PtrBool(true),
		ClientId:              datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		ClientSecret:          datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"),
		ContainerAppFilters:   datadog.PtrString("key:value,filter:example"),
		CspmEnabled:           datadog.PtrBool(true),
		CustomMetricsEnabled:  datadog.PtrBool(true),
		Errors: []string{
			"*",
		},
		HostFilters:               datadog.PtrString("key:value,filter:example"),
		NewClientId:               datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		NewTenantName:             datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
		ResourceCollectionEnabled: datadog.PtrBool(true),
		TenantName:                datadog.PtrString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewAzureIntegrationApi(apiClient)
	resp, r, err := api.UpdateAzureIntegration(ctx, body)

	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)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.UpdateAzureIntegration`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

POST https://api.ap1.datadoghq.com/api/v1/integration/azure/host_filtershttps://api.datadoghq.eu/api/v1/integration/azure/host_filtershttps://api.ddog-gov.com/api/v1/integration/azure/host_filtershttps://api.datadoghq.com/api/v1/integration/azure/host_filtershttps://api.us3.datadoghq.com/api/v1/integration/azure/host_filtershttps://api.us5.datadoghq.com/api/v1/integration/azure/host_filters

Información general

Actualiza la lista definida de filtros de hosts para una determinada integración Azure en Datadog. This endpoint requires the azure_configuration_edit permission.

Solicitud

Body Data (required)

Actualiza el cuerpo de los filtros de hosts de una integración Azure en Datadog.

Expand All

Campo

Tipo

Descripción

app_service_plan_filters

string

Limit the Azure app service plans that are pulled into Datadog using tags. Only app service plans that match one of the defined tags are imported into Datadog.

automute

boolean

Silence monitors for expected Azure VM shutdowns.

client_id

string

Your Azure web application ID.

client_secret

string

Your Azure web application secret key.

container_app_filters

string

Limit the Azure container apps that are pulled into Datadog using tags. Only container apps that match one of the defined tags are imported into Datadog.

cspm_enabled

boolean

When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. Note: This requires resource_collection_enabled to be set to true.

custom_metrics_enabled

boolean

Enable custom metrics for your organization.

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.

metrics_enabled

boolean

Enable Azure metrics for your organization.

metrics_enabled_default

boolean

Enable Azure metrics for your organization for resource providers where no resource provider config is specified.

new_client_id

string

Your New Azure web application ID.

new_tenant_name

string

Your New Azure Active Directory ID.

resource_collection_enabled

boolean

When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.

resource_provider_configs

[object]

Configuration settings applied to resources from the specified Azure resource providers.

metrics_enabled

boolean

Collect metrics for resources from this provider.

namespace

string

The provider namespace to apply this configuration to.

tenant_name

string

Your Azure Active Directory ID.

usage_metrics_enabled

boolean

Enable azure.usage metrics for your organization.

{
  "app_service_plan_filters": "key:value,filter:example",
  "automute": true,
  "client_id": "testc7f6-1234-5678-9101-3fcbf464test",
  "client_secret": "TestingRh2nx664kUy5dIApvM54T4AtO",
  "container_app_filters": "key:value,filter:example",
  "cspm_enabled": true,
  "custom_metrics_enabled": true,
  "errors": [
    "*"
  ],
  "host_filters": "key:value,filter:example",
  "metrics_enabled": true,
  "metrics_enabled_default": true,
  "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test",
  "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest",
  "resource_collection_enabled": true,
  "resource_provider_configs": [
    {
      "metrics_enabled": true,
      "namespace": "Microsoft.Compute"
    }
  ],
  "tenant_name": "testc44-1234-5678-9101-cc00736ftest",
  "usage_metrics_enabled": true
}

Respuesta

OK

Expand All

Campo

Tipo

Descripción

No response body

{}

Bad Request

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Authentication Error

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

Array of errors returned by the API.

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

Ejemplo de código

// Update Azure integration host filters 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/datadogV1"
)

func main() {
	body := datadogV1.AzureAccount{
		AppServicePlanFilters: datadog.PtrString("key:value,filter:example"),
		Automute:              datadog.PtrBool(true),
		ClientId:              datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"),
		ClientSecret:          datadog.PtrString("TestingRh2nx664kUy5dIApvM54T4AtO"),
		ContainerAppFilters:   datadog.PtrString("key:value,filter:example"),
		CspmEnabled:           datadog.PtrBool(true),
		CustomMetricsEnabled:  datadog.PtrBool(true),
		Errors: []string{
			"*",
		},
		HostFilters:               datadog.PtrString("key:value,filter:example"),
		MetricsEnabled:            datadog.PtrBool(true),
		MetricsEnabledDefault:     datadog.PtrBool(true),
		NewClientId:               datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
		NewTenantName:             datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
		ResourceCollectionEnabled: datadog.PtrBool(true),
		ResourceProviderConfigs: []datadogV1.ResourceProviderConfig{
			{
				MetricsEnabled: datadog.PtrBool(true),
				Namespace:      datadog.PtrString("Microsoft.Compute"),
			},
		},
		TenantName:          datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
		UsageMetricsEnabled: datadog.PtrBool(true),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewAzureIntegrationApi(apiClient)
	resp, r, err := api.UpdateAzureHostFilters(ctx, body)

	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)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AzureIntegrationApi.UpdateAzureHostFilters`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

PREVIEWING: drodriguezhdez/add_public_docs_log_summarization