• Home
  • API
  • Configuration
  • Azure credentials
  • PUT credentials

Azure credentials API - PUT credentials

Updates an existing Azure credentials configuration. Check the connection status for these credentials after 10 minutes with the GET credentials request.

If a credentials configuration with the specified ID doesn’t exist, a new configuration is created.

The request consumes and produces an application/json payload.

PUTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/azure/credentials/{id}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/azure/credentials/{id}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/azure/credentials/{id}

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The ID of the Azure credentials configuration to be updated.

pathrequired
bodyAzureCredentials

The JSON body of the request. Contains updated parameters of the Azure credentials configuration.

bodyoptional

Request body objects

The AzureCredentials object

Configuration of Azure app-level credentials.

ElementTypeDescriptionRequired
metadataConfigurationMetadata

Metadata useful for debugging

optional
idstring

The Dynatrace entity ID of the Azure credentials configuration.

optional
labelstring

The unique name of the Azure credentials configuration.

Allowed characters are letters, numbers, and spaces. Also the special characters .+-_ are allowed.

required
appIdstring

The application ID (also referred to as client ID).

The field is required when creating a new credentials configuration.

The field is ignored during an update, the old value remains unaffected.

optional
directoryIdstring

The directory ID (also referred to as tenant ID).

The field is required when creating a new credentials configuration.

The field is ignored during an update, the old value remains unaffected.

optional
keystring

The secret key associated with the application ID.

For security reasons, GET requests return this field as null.

Submit your key on creation or update of the configuration.

The field is required when creating a new credentials configuration. If the field is omitted during an update, the old value remains unaffected.

optional
activeboolean

The monitoring is enabled (true) or disabled (false).

If not set on creation, the true value is used.

If the field is omitted during an update, the old value remains unaffected.

optional
autoTaggingboolean

The automatic capture of Azure tags is on (true) or off (false).

required
monitorOnlyTaggedEntitiesboolean

Monitor only resources that have specified Azure tags (true) or all resources (false).

required
monitorOnlyTagPairsCloudTag[]

A list of Azure tags to be monitored.

You can specify up to 20 tags. A resource tagged with any of the specified tags is monitored.

Only applicable when the monitorOnlyTaggedEntities parameter is set to true.

optional
monitorOnlyExcludingTagPairsCloudTag[]

A list of Azure tags to be excluded from monitoring.

You can specify up to 20 tags. A resource tagged with any of the specified tags will not be monitored.

Only applicable when the monitorOnlyTaggedEntities parameter is set to true.

optional
supportingServicesAzureSupportingService[]

Deprecated. To manage services use /azure/credentials/{id}/services operation. Built-in services are not supported here.

A list of Azure services to be monitored. Available services are listed by /azure/supportedServices operation.

For each service, a list of metrics and dimensions can be specified. A list of supported metrics and dimensions for a given service can be checked in documentation.

List of metrics can be skipped (set to null), resulting in recommended (default) set of metrics and dimensions being chosen for monitoring.

optional

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescriptionRequired
clusterVersionstring

Dynatrace version.

optional
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

optional
currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

optional

The CloudTag object

A cloud tag.

ElementTypeDescriptionRequired
namestring

The name of the tag.

optional
valuestring

The value of the tag.

If set to null, then resources with any value of the tag are monitored.

optional

The AzureSupportingService object

A service to be monitored.

ElementTypeDescriptionRequired
namestring

The name of the service. Valid supported service names can be discovered using /azure/supportedServices restAPI

required
monitoredMetricsAzureMonitoredMetric[]

A list of metrics to be monitored for this service. It must include all the recommended metrics. If the list is null then recommended list of metrics for this service will be monitored.

optional

The AzureMonitoredMetric object

A metric of service to be monitored.

ElementTypeDescriptionRequired
namestring

The name of the metric of the service.

required
dimensionsstring[]

A list of metric's dimensions names. It must include all the recommended dimensions.

required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "metadata": { "clusterVersion": "1.192.1", "configurationVersions": [ 4, 2 ], "currentConfigurationVersions": [ "1.0.4", "1.23" ] }, "id": "string", "label": "string", "appId": "string", "directoryId": "string", "key": "string", "active": true, "autoTagging": true, "monitorOnlyTaggedEntities": true, "monitorOnlyTagPairs": [ { "name": "string", "value": "string" } ], "monitorOnlyExcludingTagPairs": [ {} ], "supportingServices": [ { "name": "string", "monitoredMetrics": [ { "name": "string", "dimensions": [ "string" ] } ] } ] }

Response

Response codes

CodeTypeDescription
201EntityShortRepresentation

Success. The new Azure credentials configuration has been created. The response body contains the ID of the configuration.

204

Success. The Azure credentials configuration has been updated. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

descriptionstring

A short description of the Dynatrace entity.

Response body JSON model

json
{ "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a", "name": "Dynatrace entity", "description": "Dynatrace entity for the REST API example" }

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/azure/credentials/{id}/validator
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/azure/credentials/{id}/validator
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/azure/credentials/{id}/validator

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

CodeTypeDescription
204

Validated. The submitted configuration is valid. The response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Example

In this example, the request updates the Azure credentials configuration from the POST request example.

It provides a new password and changes monitoring mode from resources with specified tags to all resources:

  • monitorOnlyTaggedEntities value has been changed to false
  • monitorOnlyTagPairs array is empty.

The API token is passed in the Authorization header.

Because the request body is lengthy, it is truncated in this example Curl section. See the full body in the Request body section.

Curl

bash
curl -X PUT \ https://mySampleEnv.live.dynatrace.com/api/config/v1/azure/credentials/AZURE_CREDENTIALS-357FDA338DAAF338 \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \ -H 'Content-Type: application/json' \ -d '{<truncated - see the Request body section >}'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/config/v1/azure/credentials/AZURE_CREDENTIALS-357FDA338DAAF338

Request body

json
{ "id": "AZURE_CREDENTIALS-357FDA338DAAF338", "label": "Booking application", "appId": "c4431dec-34fe-4d4c-ad93-aea38b4f944e", "directoryId": "f836b63d-8c92-4ad8-a314-bb1eeka46aa1", "key": "p459-346vs;ojkg[]", "active": true, "autoTagging": true, "monitorOnlyTaggedEntities": false, "monitorOnlyTagPairs": [] }

Response code

204

Related topics
  • Microsoft Azure Integrations

    Set up Dynatrace deep code monitoring on Azure using OneAgent or OpenTelemetry.