Share via


Monitored Subscriptions - List

List the subscriptions currently being monitored by the Datadog monitor resource.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions?api-version=2023-10-20

URI Parameters

Name In Required Type Description
monitorName
path True

string

Monitor resource name

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

MonitoredSubscriptionPropertiesList

Success

Other Status Codes

ErrorResponse

Default error response.

Examples

Monitors_GetMonitoredSubscriptions

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions?api-version=2023-10-20

Sample response

{
  "value": [
    {
      "name": "default",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions/default",
      "type": "Microsoft.Datadog/monitors/monitoredSubscriptions",
      "properties": {
        "monitoredSubscriptionList": [
          {
            "subscriptionId": "/subscriptions/00000000-0000-0000-0000-000000000000",
            "status": "Active",
            "tagRules": {
              "logRules": {
                "sendAadLogs": false,
                "sendSubscriptionLogs": true,
                "sendResourceLogs": true,
                "filteringTags": [
                  {
                    "name": "Environment",
                    "value": "Prod",
                    "action": "Include"
                  },
                  {
                    "name": "Environment",
                    "value": "Dev",
                    "action": "Exclude"
                  }
                ]
              },
              "metricRules": {
                "filteringTags": []
              },
              "automuting": true
            }
          },
          {
            "subscriptionId": "/subscriptions/00000000-0000-0000-0000-000000000001",
            "status": "Failed",
            "tagRules": {
              "logRules": {
                "sendAadLogs": false,
                "sendSubscriptionLogs": true,
                "sendResourceLogs": true,
                "filteringTags": [
                  {
                    "name": "Environment",
                    "value": "Prod",
                    "action": "Include"
                  },
                  {
                    "name": "Environment",
                    "value": "Dev",
                    "action": "Exclude"
                  }
                ]
              },
              "metricRules": {
                "filteringTags": []
              },
              "automuting": true
            }
          }
        ]
      }
    }
  ]
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FilteringTag

The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.

LogRules

Set of rules for sending logs for the Monitor resource.

MetricRules

Set of rules for sending metrics for the Monitor resource.

MonitoredSubscription

The list of subscriptions and it's monitoring status by current Datadog monitor.

MonitoredSubscriptionProperties

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

MonitoredSubscriptionPropertiesList
MonitoringTagRulesProperties

Definition of the properties for a TagRules resource.

Operation

The operation for the patch on the resource.

ProvisioningState
Status

The state of monitoring.

SubscriptionList

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

TagAction

Valid actions for a filtering tag. Exclusion takes priority over inclusion.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

FilteringTag

The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.

Name Type Description
action

TagAction

Valid actions for a filtering tag. Exclusion takes priority over inclusion.

name

string

The name (also known as the key) of the tag.

value

string

The value of the tag.

LogRules

Set of rules for sending logs for the Monitor resource.

Name Type Description
filteringTags

FilteringTag[]

List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

sendAadLogs

boolean

Flag specifying if AAD logs should be sent for the Monitor resource.

sendResourceLogs

boolean

Flag specifying if Azure resource logs should be sent for the Monitor resource.

sendSubscriptionLogs

boolean

Flag specifying if Azure subscription logs should be sent for the Monitor resource.

MetricRules

Set of rules for sending metrics for the Monitor resource.

Name Type Description
filteringTags

FilteringTag[]

List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

MonitoredSubscription

The list of subscriptions and it's monitoring status by current Datadog monitor.

Name Type Description
error

string

The reason of not monitoring the subscription.

status

Status

The state of monitoring.

subscriptionId

string

The subscriptionId to be monitored.

tagRules

MonitoringTagRulesProperties

Definition of the properties for a TagRules resource.

MonitoredSubscriptionProperties

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

Name Type Description
id

string

The id of the monitored subscription resource.

name

string

Name of the monitored subscription resource.

properties

SubscriptionList

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

type

string

The type of the monitored subscription resource.

MonitoredSubscriptionPropertiesList

Name Type Description
nextLink

string

Link to the next set of results, if any.

value

MonitoredSubscriptionProperties[]

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

MonitoringTagRulesProperties

Definition of the properties for a TagRules resource.

Name Type Description
automuting

boolean

Configuration to enable/disable auto-muting flag

customMetrics

boolean

Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent.

logRules

LogRules

Set of rules for sending logs for the Monitor resource.

metricRules

MetricRules

Set of rules for sending metrics for the Monitor resource.

provisioningState

ProvisioningState

Operation

The operation for the patch on the resource.

Value Description
AddBegin
AddComplete
DeleteBegin
DeleteComplete
Active

ProvisioningState

Value Description
Accepted
Creating
Updating
Deleting
Succeeded
Failed
Canceled
Deleted
NotSpecified

Status

The state of monitoring.

Value Description
InProgress
Active
Failed
Deleting

SubscriptionList

The request to update subscriptions needed to be monitored by the Datadog monitor resource.

Name Type Description
monitoredSubscriptionList

MonitoredSubscription[]

List of subscriptions and the state of the monitoring.

operation

Operation

The operation for the patch on the resource.

TagAction

Valid actions for a filtering tag. Exclusion takes priority over inclusion.

Value Description
Include
Exclude