Tag Rules - Create Or Update
Create a TagRule
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/tagRules/{ruleSetName}?api-version=2021-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
monitor
|
path | True |
string |
Monitor resource name |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
rule
|
path | True |
string |
Monitor resource name |
subscription
|
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. |
Request Body
Name | Type | Description |
---|---|---|
properties.logRules |
Set of rules for sending logs for the Monitor resource. |
|
properties.metricRules |
Set of rules for sending metrics for the Monitor resource. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
ARM operation completed successfully. |
|
201 Created |
ARM create operation completed successfully. |
|
Other Status Codes |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Tag |
Tag |
TagRules_CreateOrUpdate_MaximumSet_Gen
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Dynatrace.Observability/monitors/myMonitor/tagRules/default?api-version=2021-09-01
{
"properties": {
"logRules": {
"sendAadLogs": "Enabled",
"sendSubscriptionLogs": "Enabled",
"sendActivityLogs": "Enabled",
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
},
{
"name": "Environment",
"value": "Dev",
"action": "Exclude"
}
]
},
"metricRules": {
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
}
]
},
"provisioningState": "Accepted"
}
}
Sample response
{
"properties": {
"logRules": {
"sendAadLogs": "Enabled",
"sendSubscriptionLogs": "Enabled",
"sendActivityLogs": "Enabled",
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
},
{
"name": "Environment",
"value": "Dev",
"action": "Exclude"
}
]
},
"metricRules": {
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
}
]
},
"provisioningState": "Accepted"
},
"systemData": {
"createdBy": "alice@microsoft.com",
"createdByType": "User",
"createdAt": "2021-07-16T04:25:21.040Z",
"lastModifiedBy": "alice@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-16T04:25:21.040Z"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Dynatrace.Observability/monitors/myMonitor/tagRules/default",
"name": "default",
"type": "Dynatrace.Observability/monitors/tagRules"
}
Azure-AsyncOperation: https://foo.com/operationstatus
{
"properties": {
"logRules": {
"sendAadLogs": "Enabled",
"sendSubscriptionLogs": "Enabled",
"sendActivityLogs": "Enabled",
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
},
{
"name": "Environment",
"value": "Dev",
"action": "Exclude"
}
]
},
"metricRules": {
"filteringTags": [
{
"name": "Environment",
"value": "Prod",
"action": "Include"
}
]
},
"provisioningState": "Accepted"
},
"systemData": {
"createdBy": "alice@microsoft.com",
"createdByType": "User",
"createdAt": "2021-07-16T04:25:21.040Z",
"lastModifiedBy": "alice@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-16T04:25:21.040Z"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Dynatrace.Observability/monitors/myMonitor/tagRules/default",
"name": "default",
"type": "Dynatrace.Observability/monitors/tagRules"
}
TagRules_CreateOrUpdate_MinimumSet_Gen
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Dynatrace.Observability/monitors/myMonitor/tagRules/default?api-version=2021-09-01
{
"properties": {}
}
Sample response
{
"properties": {}
}
Azure-AsyncOperation: https://foo.com/operationstatus
{
"properties": {}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Filtering |
The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored. |
Log |
Set of rules for sending logs for the Monitor resource. |
Metric |
Set of rules for sending metrics for the Monitor resource. |
Provisioning |
Provisioning state of the monitoring resource |
Send |
Indicates whether AAD logs are being sent. |
Send |
Indicates whether activity logs are being sent. |
Send |
Indicates whether subscription logs are being sent. |
system |
Metadata pertaining to creation and last modification of the resource. |
Tag |
Valid actions for a filtering tag. Exclusion takes priority over inclusion. |
Tag |
Tag rules for a monitor resource |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
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 |
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 |
List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs 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 |
Flag specifying if AAD logs should be sent for the Monitor resource. |
|
sendActivityLogs |
Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. |
|
sendSubscriptionLogs |
Flag specifying if subscription logs should be sent for the Monitor resource. |
MetricRules
Set of rules for sending metrics for the Monitor resource.
Name | Type | Description |
---|---|---|
filteringTags |
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. |
ProvisioningState
Provisioning state of the monitoring resource
Value | Description |
---|---|
Accepted | |
Creating | |
Updating | |
Deleting | |
Succeeded | |
Failed | |
Canceled | |
Deleted | |
NotSpecified |
SendAadLogsStatus
Indicates whether AAD logs are being sent.
Value | Description |
---|---|
Enabled | |
Disabled |
SendActivityLogsStatus
Indicates whether activity logs are being sent.
Value | Description |
---|---|
Enabled | |
Disabled |
SendSubscriptionLogsStatus
Indicates whether subscription logs are being sent.
Value | Description |
---|---|
Enabled | |
Disabled |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
TagAction
Valid actions for a filtering tag. Exclusion takes priority over inclusion.
Value | Description |
---|---|
Include | |
Exclude |
TagRule
Tag rules for a monitor resource
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.logRules |
Set of rules for sending logs for the Monitor resource. |
|
properties.metricRules |
Set of rules for sending metrics for the Monitor resource. |
|
properties.provisioningState |
Provisioning state of the resource. |
|
systemData |
System metadata for this resource. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |