Skip to main content

authorization_policies

Creates, updates, deletes, gets or lists an authorization_policies resource.

Overview

Nameauthorization_policies
TypeResource
Idazure_extras.customer_insights.authorization_policies

Fields

The following fields are returned by SELECT queries:

OK. Successfully get the authorization policy.

NameDatatypeDescription
idstringResource ID.
namestringResource name.
propertiesobjectThe authorization policy.
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, hubName, authorizationPolicyName, subscriptionIdGets an authorization policy in the hub.
list_by_hubselectresourceGroupName, hubName, subscriptionIdGets all the authorization policies in a specified hub.
create_or_updateinsertresourceGroupName, hubName, authorizationPolicyName, subscriptionIdCreates an authorization policy or updates an existing authorization policy.
regenerate_primary_keyexecresourceGroupName, hubName, authorizationPolicyName, subscriptionIdRegenerates the primary policy key of the specified authorization policy.
regenerate_secondary_keyexecresourceGroupName, hubName, authorizationPolicyName, subscriptionIdRegenerates the secondary policy key of the specified authorization policy.

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
authorizationPolicyNamestringThe name of the policy.
hubNamestringThe name of the hub.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringGets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

SELECT examples

Gets an authorization policy in the hub.

SELECT
id,
name,
properties,
type
FROM azure_extras.customer_insights.authorization_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND hubName = '{{ hubName }}' -- required
AND authorizationPolicyName = '{{ authorizationPolicyName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates an authorization policy or updates an existing authorization policy.

INSERT INTO azure_extras.customer_insights.authorization_policies (
data__properties,
resourceGroupName,
hubName,
authorizationPolicyName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ hubName }}',
'{{ authorizationPolicyName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
properties,
type
;

Lifecycle Methods

Regenerates the primary policy key of the specified authorization policy.

EXEC azure_extras.customer_insights.authorization_policies.regenerate_primary_key 
@resourceGroupName='{{ resourceGroupName }}' --required,
@hubName='{{ hubName }}' --required,
@authorizationPolicyName='{{ authorizationPolicyName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;