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

NameDatatypeDescription
idtextAzure resource Id
nametextAzure resource name
categoriestextfield from the properties object
locationtextResource location
locationstextfield from the properties object
logProfileNametextfield from the properties object
retention_policytextfield from the properties object
service_bus_rule_idtextfield from the properties object
storage_account_idtextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextGets 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.
typetextAzure resource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTlogProfileName, subscriptionIdGets the log profile.
listSELECTsubscriptionIdList the log profiles.
create_or_updateINSERTlogProfileName, subscriptionId, data__propertiesCreate or update a log profile in Azure Monitoring REST API.
deleteDELETElogProfileName, subscriptionIdDeletes the log profile.
updateUPDATElogProfileName, subscriptionIdUpdates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.

SELECT examples

List the log profiles.

SELECT
id,
name,
categories,
location,
locations,
logProfileName,
retention_policy,
service_bus_rule_id,
storage_account_id,
subscriptionId,
system_data,
tags,
type
FROM azure.monitor.vw_log_profiles
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new log_profiles resource.

/*+ create */
INSERT INTO azure.monitor.log_profiles (
logProfileName,
subscriptionId,
data__properties,
location,
tags,
properties
)
SELECT
'{{ logProfileName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;

UPDATE example

Updates a log_profiles resource.

/*+ update */
UPDATE azure.monitor.log_profiles
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
logProfileName = '{{ logProfileName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified log_profiles resource.

/*+ delete */
DELETE FROM azure.monitor.log_profiles
WHERE logProfileName = '{{ logProfileName }}'
AND subscriptionId = '{{ subscriptionId }}';