az logz sub-rule
Note
This reference is part of the logz extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az logz sub-rule command. Learn more about extensions.
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage sub account tag rule with logz.
Commands
Name | Description | Type | Status |
---|---|---|---|
az logz sub-rule create |
Create a tag rule set for a given sub account resource. |
Extension | Experimental |
az logz sub-rule delete |
Delete a tag rule set for a given monitor resource. |
Extension | Experimental |
az logz sub-rule list |
List the tag rules for a given sub account resource. |
Extension | Experimental |
az logz sub-rule show |
Get a tag rule set for a given monitor resource. |
Extension | Experimental |
az logz sub-rule update |
Update a tag rule set for a given sub account resource. |
Extension | Experimental |
az logz sub-rule create
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a tag rule set for a given sub account resource.
az logz sub-rule create --monitor-name
--resource-group
--rule-set-name
--sub-account-name
[--filtering-tags]
[--send-aad-logs {false, true}]
[--send-activity-logs {false, true}]
[--send-subscription-logs {false, true}]
Examples
SubAccountTagRules_CreateOrUpdate
az logz sub-rule create --monitor-name "myMonitor" --filtering-tags name="Environment" action="Include" value="Prod" --filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-activity-logs true --send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default" --sub-account-name "SubAccount1"
Required Parameters
Monitor resource name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Rule set name of sub account.
Sub Account resource name.
Optional Parameters
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.
Usage: --filtering-tags name=XX value=XX action=XX
name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
Multiple actions can be specified by using more than one --filtering-tags argument.
Flag specifying if AAD logs should be sent for the Monitor resource.
Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
Flag specifying if subscription logs should be sent for the Monitor resource.
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 logz sub-rule delete
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a tag rule set for a given monitor resource.
az logz sub-rule delete [--ids]
[--monitor-name]
[--resource-group]
[--rule-set-name]
[--sub-account-name]
[--subscription]
[--yes]
Examples
TagRules_Delete
az logz sub-rule delete --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" --sub-account-name "SubAccount1"
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.
Monitor resource name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Rule set name of monitor.
Sub Account resource name.
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 logz sub-rule list
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List the tag rules for a given sub account resource.
az logz sub-rule list --monitor-name
--resource-group
--sub-account-name
Examples
SubAccountTagRules_List
az logz sub-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup" --sub-account-name "SubAccount1"
Required Parameters
Monitor resource name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Sub Account resource name.
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 logz sub-rule show
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a tag rule set for a given monitor resource.
az logz sub-rule show [--ids]
[--monitor-name]
[--resource-group]
[--rule-set-name]
[--sub-account-name]
[--subscription]
Examples
SubAccountTagRules_Get
az logz sub-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" --sub-account-name "SubAccount1"
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.
Monitor resource name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Rule set name of monitor.
Sub Account resource name.
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 logz sub-rule update
Command group 'logz' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a tag rule set for a given sub account resource.
az logz sub-rule update [--add]
[--filtering-tags]
[--force-string]
[--ids]
[--monitor-name]
[--remove]
[--resource-group]
[--rule-set-name]
[--send-aad-logs {false, true}]
[--send-activity-logs {false, true}]
[--send-subscription-logs {false, true}]
[--set]
[--sub-account-name]
[--subscription]
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>
.
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.
Usage: --filtering-tags name=XX value=XX action=XX
name: The name (also known as the key) of the tag. value: The value of the tag. action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
Multiple actions can be specified by using more than one --filtering-tags argument.
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.
Monitor resource name.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Rule set name of sub account.
Flag specifying if AAD logs should be sent for the Monitor resource.
Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
Flag specifying if subscription logs should be sent for the Monitor resource.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Sub Account resource name.
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.
Azure CLI