authorization_policies
Creates, updates, deletes, gets or lists an authorization_policies
resource.
Overview
Name | authorization_policies |
Type | Resource |
Id | azure_extras.customer_insights.authorization_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_hub
OK. Successfully get the authorization policy.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
properties | object | The authorization policy. |
type | string | Resource type. |
OK. Successfully get all the authorization policies in the hub.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
properties | object | The authorization policy. |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , hubName , authorizationPolicyName , subscriptionId | Gets an authorization policy in the hub. | |
list_by_hub | select | resourceGroupName , hubName , subscriptionId | Gets all the authorization policies in a specified hub. | |
create_or_update | insert | resourceGroupName , hubName , authorizationPolicyName , subscriptionId | Creates an authorization policy or updates an existing authorization policy. | |
regenerate_primary_key | exec | resourceGroupName , hubName , authorizationPolicyName , subscriptionId | Regenerates the primary policy key of the specified authorization policy. | |
regenerate_secondary_key | exec | resourceGroupName , hubName , authorizationPolicyName , subscriptionId | Regenerates 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.
Name | Datatype | Description |
---|---|---|
authorizationPolicyName | string | The name of the policy. |
hubName | string | The name of the hub. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string | Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
SELECT
examples
- get
- list_by_hub
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
;
Gets all the authorization policies in a specified hub.
SELECT
id,
name,
properties,
type
FROM azure_extras.customer_insights.authorization_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND hubName = '{{ hubName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: authorization_policies
props:
- name: resourceGroupName
value: string
description: Required parameter for the authorization_policies resource.
- name: hubName
value: string
description: Required parameter for the authorization_policies resource.
- name: authorizationPolicyName
value: string
description: Required parameter for the authorization_policies resource.
- name: subscriptionId
value: string
description: Required parameter for the authorization_policies resource.
- name: properties
value: object
description: |
The authorization policy.
Lifecycle Methods
- regenerate_primary_key
- regenerate_secondary_key
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
;
Regenerates the secondary policy key of the specified authorization policy.
EXEC azure_extras.customer_insights.authorization_policies.regenerate_secondary_key
@resourceGroupName='{{ resourceGroupName }}' --required,
@hubName='{{ hubName }}' --required,
@authorizationPolicyName='{{ authorizationPolicyName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;