diagnostic_settings
Creates, updates, deletes, gets or lists a diagnostic_settings
resource.
Overview
Name | diagnostic_settings |
Type | Resource |
Id | azure.monitor.diagnostic_settings |
Fields
- vw_diagnostic_settings
- diagnostic_settings
Name | Datatype | Description |
---|---|---|
id | text | Azure resource Id |
name | text | Azure resource name |
event_hub_authorization_rule_id | text | field from the properties object |
event_hub_name | text | field from the properties object |
location | text | Resource location |
log_analytics_destination_type | text | field from the properties object |
logs | text | field from the properties object |
marketplace_partner_id | text | field from the properties object |
metrics | text | field from the properties object |
resourceUri | text | field from the properties object |
service_bus_rule_id | text | field from the properties object |
storage_account_id | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. |
type | text | Azure resource type |
workspace_id | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name |
location | string | Resource location |
properties | object | The diagnostic settings. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. |
type | string | Azure resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, resourceUri | Gets the active diagnostic settings for the specified resource. |
list | SELECT | resourceUri | Gets the active diagnostic settings list for the specified resource. |
create_or_update | INSERT | name, resourceUri | Creates or updates diagnostic settings for the specified resource. |
delete | DELETE | name, resourceUri | Deletes existing diagnostic settings for the specified resource. |
SELECT
examples
Gets the active diagnostic settings list for the specified resource.
- vw_diagnostic_settings
- diagnostic_settings
SELECT
id,
name,
event_hub_authorization_rule_id,
event_hub_name,
location,
log_analytics_destination_type,
logs,
marketplace_partner_id,
metrics,
resourceUri,
service_bus_rule_id,
storage_account_id,
system_data,
tags,
type,
workspace_id
FROM azure.monitor.vw_diagnostic_settings
WHERE resourceUri = '{{ resourceUri }}';
SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.diagnostic_settings
WHERE resourceUri = '{{ resourceUri }}';
INSERT
example
Use the following StackQL query and manifest file to create a new diagnostic_settings
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.monitor.diagnostic_settings (
name,
resourceUri,
location,
tags,
properties
)
SELECT
'{{ name }}',
'{{ resourceUri }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: storageAccountId
value: string
- name: serviceBusRuleId
value: string
- name: eventHubAuthorizationRuleId
value: string
- name: eventHubName
value: string
- name: metrics
value:
- - name: timeGrain
value: string
- name: category
value: string
- name: enabled
value: boolean
- name: retentionPolicy
value:
- name: enabled
value: boolean
- name: days
value: integer
- name: logs
value:
- - name: category
value: string
- name: categoryGroup
value: string
- name: enabled
value: boolean
- name: workspaceId
value: string
- name: marketplacePartnerId
value: string
- name: logAnalyticsDestinationType
value: string
DELETE
example
Deletes the specified diagnostic_settings
resource.
/*+ delete */
DELETE FROM azure.monitor.diagnostic_settings
WHERE name = '{{ name }}'
AND resourceUri = '{{ resourceUri }}';