az monitor diagnostic-settings subscription
Manage diagnostic settings for subscription.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor diagnostic-settings subscription create |
Create subscription diagnostic settings for the specified resource. |
Core | GA |
az monitor diagnostic-settings subscription delete |
Deletes existing subscription diagnostic settings for the specified resource. |
Core | GA |
az monitor diagnostic-settings subscription list |
Gets the active subscription diagnostic settings list for the specified subscriptionId. :keyword callable cls: A custom type or function that will be passed the direct response:return: SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response):rtype: ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection:raises ~azure.core.exceptions.HttpResponseError:. |
Core | GA |
az monitor diagnostic-settings subscription show |
Gets the active subscription diagnostic settings for the specified resource. |
Core | GA |
az monitor diagnostic-settings subscription update |
Update subscription diagnostic settings for the specified resource. |
Core | GA |
az monitor diagnostic-settings subscription create
Create subscription diagnostic settings for the specified resource.
az monitor diagnostic-settings subscription create --name
[--event-hub-auth-rule]
[--event-hub-name]
[--location]
[--logs]
[--service-bus-rule]
[--storage-account]
[--workspace]
Examples
Create diagnostic settings for a subscription with EventHub.
az monitor diagnostic-settings subscription create -n {name} --location westus --event-hub-auth-rule {eventHubRuleID} --storage-account {storageAccount} --logs "[{category:Security,enabled:true},{category:Administrative,enabled:true},{category:ServiceHealth,enabled:true},{category:Alert,enabled:true},{category:Recommendation,enabled:true},{category:Policy,enabled:true},{category:Autoscale,enabled:true},{category:ResourceHealth,enabled:true}]"
Required Parameters
The name of the diagnostic setting.
Optional Parameters
The resource Id for the event hub authorization rule.
The name of the event hub. If none is specified, the default event hub will be selected.
Location of the resource.
JSON encoded list of logs settings. Use '@{file}' to load from a file. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 resourceID}/authorizationrules/{key name}'.
The resource id of the storage account to which you would like to send the Activity Log.
The resource id of the log analytics workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor diagnostic-settings subscription delete
Deletes existing subscription diagnostic settings for the specified resource.
az monitor diagnostic-settings subscription delete [--ids]
[--name]
[--subscription]
[--yes]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the diagnostic setting.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor diagnostic-settings subscription list
Gets the active subscription diagnostic settings list for the specified subscriptionId. :keyword callable cls: A custom type or function that will be passed the direct response:return: SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response):rtype: ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection:raises ~azure.core.exceptions.HttpResponseError:.
az monitor diagnostic-settings subscription list
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor diagnostic-settings subscription show
Gets the active subscription diagnostic settings for the specified resource.
az monitor diagnostic-settings subscription show [--ids]
[--name]
[--subscription]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the diagnostic setting.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor diagnostic-settings subscription update
Update subscription diagnostic settings for the specified resource.
az monitor diagnostic-settings subscription update [--add]
[--event-hub-auth-rule]
[--event-hub-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--location]
[--logs]
[--name]
[--remove]
[--service-bus-rule]
[--set]
[--storage-account]
[--subscription]
[--workspace]
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
The resource Id for the event hub authorization rule.
The name of the event hub. If none is specified, the default event hub will be selected.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Location of the resource.
JSON encoded list of logs settings. Use '@{file}' to load from a file. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the diagnostic setting.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
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 resourceID}/authorizationrules/{key name}'.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
The resource id of the storage account to which you would like to send the Activity Log.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The resource id of the log analytics workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.