Skip to main content

access_policies

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

Overview

Nameaccess_policies
TypeResource
Idazure.time_series_insights.access_policies

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
descriptiontextfield from the properties object
accessPolicyNametextfield from the properties object
environmentNametextfield from the properties object
principal_object_idtextfield from the properties object
resourceGroupNametextfield from the properties object
rolestextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccessPolicyName, environmentName, resourceGroupName, subscriptionIdGets the access policy with the specified name in the specified environment.
list_by_environmentSELECTenvironmentName, resourceGroupName, subscriptionIdLists all the available access policies associated with the environment.
create_or_updateINSERTaccessPolicyName, environmentName, resourceGroupName, subscriptionId, data__propertiesCreate or update an access policy in the specified environment.
deleteDELETEaccessPolicyName, environmentName, resourceGroupName, subscriptionIdDeletes the access policy with the specified name in the specified subscription, resource group, and environment
updateUPDATEaccessPolicyName, environmentName, resourceGroupName, subscriptionIdUpdates the access policy with the specified name in the specified subscription, resource group, and environment.

SELECT examples

Lists all the available access policies associated with the environment.

SELECT
id,
name,
description,
accessPolicyName,
environmentName,
principal_object_id,
resourceGroupName,
roles,
subscriptionId,
type
FROM azure.time_series_insights.vw_access_policies
WHERE environmentName = '{{ environmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.time_series_insights.access_policies (
accessPolicyName,
environmentName,
resourceGroupName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ accessPolicyName }}',
'{{ environmentName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

UPDATE example

Updates a access_policies resource.

/*+ update */
UPDATE azure.time_series_insights.access_policies
SET
properties = '{{ properties }}'
WHERE
accessPolicyName = '{{ accessPolicyName }}'
AND environmentName = '{{ environmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified access_policies resource.

/*+ delete */
DELETE FROM azure.time_series_insights.access_policies
WHERE accessPolicyName = '{{ accessPolicyName }}'
AND environmentName = '{{ environmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';