az monitor log-profiles

Manage log profiles.

Commands

az monitor log-profiles create Create or update a log profile in Azure Monitoring REST API.
az monitor log-profiles delete Deletes the log profile.
az monitor log-profiles list List the log profiles.
az monitor log-profiles show Gets the log profile.
az monitor log-profiles update Update a log profile.

az monitor log-profiles create

Create or update a log profile in Azure Monitoring REST API.

az monitor log-profiles create --categories
--days
--enabled
--location
--locations
--name
[--service-bus-rule-id]
[--storage-account-id]
[--tags]

Required Parameters

--categories
Space separated categories of the logs.Some values are: 'Write', 'Delete', and/or 'Action.'.
--days
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
--enabled
A value indicating whether the retention policy is enabled.
--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--locations
Space separated list of regions for which Activity Log events should be stored.
--name -n
The name of the log profile.

Optional Parameters

--service-bus-rule-id
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}'.
--storage-account-id
The resource id of the storage account to which you would like to send the Activity Log.
--tags
Space separated tags in 'key[=value]' format. Use "" to clear existing tags.

az monitor log-profiles delete

Deletes the log profile.

az monitor log-profiles delete --name

Required Parameters

--name -n
The name of the log profile.

az monitor log-profiles list

List the log profiles.

az monitor log-profiles list

az monitor log-profiles show

Gets the log profile.

az monitor log-profiles show --name

Required Parameters

--name -n
The name of the log profile.

az monitor log-profiles update

Update a log profile.

az monitor log-profiles update --name
[--add]
[--remove]
[--set]

Required Parameters

--name -n
The name of the log profile.

Optional Parameters

--add
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .
--remove
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
--set
Update an object by specifying a property path and value to set. Example: --set property1.property2=.