Skip to main content

log_profiles

Creates, updates, deletes, gets or lists a log_profiles resource.

Overview

Namelog_profiles
TypeResource
Idazure.monitor.log_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
categoriesarraythe categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'. Required.
locationstringThe geo-location where the resource lives. Required.
locationsarrayList 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. Required.
retentionPolicyobjectthe retention policy for the events in the log. Required.
serviceBusRuleIdstringThe 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}'.
storageAccountIdstringthe resource id of the storage account to which you would like to send the Activity Log.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlog_profile_name, subscription_idGets the log profile.
listselectsubscription_idList the log profiles.
create_or_updateinsertlog_profile_name, subscription_id, location, propertiesCreate or update a log profile in Azure Monitoring REST API.
updateupdatelog_profile_name, subscription_idUpdates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.
create_or_updatereplacelog_profile_name, subscription_id, location, propertiesCreate or update a log profile in Azure Monitoring REST API.
deletedeletelog_profile_name, subscription_idDeletes the log profile.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
log_profile_namestringThe name of the log profile. Required.
subscription_idstring

SELECT examples

Gets the log profile.

SELECT
id,
name,
categories,
location,
locations,
retentionPolicy,
serviceBusRuleId,
storageAccountId,
systemData,
tags,
type
FROM azure.monitor.log_profiles
WHERE log_profile_name = '{{ log_profile_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.monitor.log_profiles (
tags,
location,
properties,
log_profile_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ log_profile_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.

UPDATE azure.monitor.log_profiles
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
log_profile_name = '{{ log_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

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

REPLACE azure.monitor.log_profiles
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
log_profile_name = '{{ log_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the log profile.

DELETE FROM azure.monitor.log_profiles
WHERE log_profile_name = '{{ log_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;