Microsoft.Insights logprofiles
The logprofiles resource type can be deployed with operations that target:
- Subscription - See subscription deployment commands
For a list of changed properties in each API version, see change log.
To create a Microsoft.Insights/logprofiles resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Insights/logprofiles@2016-03-01' = {
location: 'string'
name: 'string'
properties: {
categories: [
'string'
]
locations: [
'string'
]
retentionPolicy: {
days: int
enabled: bool
}
serviceBusRuleId: 'string'
storageAccountId: 'string'
}
tags: {
{customized property}: 'string'
}
}
Name | Description | Value |
---|---|---|
categories | the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' | string[] (required) |
locations | List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location. | string[] (required) |
retentionPolicy | the retention policy for the events in the log. | RetentionPolicy (required) |
serviceBusRuleId | The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. | string |
storageAccountId | the resource id of the storage account to which you would like to send the Activity Log. | string |
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The log profile properties of the resource. | LogProfileProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
Name | Description | Value |
---|
Name | Description | Value |
---|---|---|
days | the number of days for the retention in days. A value of 0 will retain the events indefinitely. | int Constraints: Min value = 0 (required) |
enabled | a value indicating whether the retention policy is enabled. | bool (required) |
The logprofiles resource type can be deployed with operations that target:
- Subscription - See subscription deployment commands
For a list of changed properties in each API version, see change log.
To create a Microsoft.Insights/logprofiles resource, add the following JSON to your template.
{
"type": "Microsoft.Insights/logprofiles",
"apiVersion": "2016-03-01",
"name": "string",
"location": "string",
"properties": {
"categories": [ "string" ],
"locations": [ "string" ],
"retentionPolicy": {
"days": "int",
"enabled": "bool"
},
"serviceBusRuleId": "string",
"storageAccountId": "string"
},
"tags": {
"{customized property}": "string"
}
}
Name | Description | Value |
---|---|---|
categories | the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' | string[] (required) |
locations | List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location. | string[] (required) |
retentionPolicy | the retention policy for the events in the log. | RetentionPolicy (required) |
serviceBusRuleId | The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. | string |
storageAccountId | the resource id of the storage account to which you would like to send the Activity Log. | string |
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2016-03-01' |
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The log profile properties of the resource. | LogProfileProperties (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Insights/logprofiles' |
Name | Description | Value |
---|
Name | Description | Value |
---|---|---|
days | the number of days for the retention in days. A value of 0 will retain the events indefinitely. | int Constraints: Min value = 0 (required) |
enabled | a value indicating whether the retention policy is enabled. | bool (required) |
The logprofiles resource type can be deployed with operations that target:
- Subscription
For a list of changed properties in each API version, see change log.
To create a Microsoft.Insights/logprofiles resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Insights/logprofiles@2016-03-01"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
categories = [
"string"
]
locations = [
"string"
]
retentionPolicy = {
days = int
enabled = bool
}
serviceBusRuleId = "string"
storageAccountId = "string"
}
})
}
Name | Description | Value |
---|---|---|
categories | the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' | string[] (required) |
locations | List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location. | string[] (required) |
retentionPolicy | the retention policy for the events in the log. | RetentionPolicy (required) |
serviceBusRuleId | The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. | string |
storageAccountId | the resource id of the storage account to which you would like to send the Activity Log. | string |
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The log profile properties of the resource. | LogProfileProperties (required) |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Insights/logprofiles@2016-03-01" |
Name | Description | Value |
---|
Name | Description | Value |
---|---|---|
days | the number of days for the retention in days. A value of 0 will retain the events indefinitely. | int Constraints: Min value = 0 (required) |
enabled | a value indicating whether the retention policy is enabled. | bool (required) |
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Log profile | AVM Resource Module for Log profile |