policy_restrictions
Creates, updates, deletes, gets or lists a policy_restrictions
resource.
Overview
Name | policy_restrictions |
Type | Resource |
Id | azure.api_management.policy_restrictions |
Fields
- vw_policy_restrictions
- policy_restrictions
Name | Datatype | Description |
---|---|---|
policyRestrictionId | text | field from the properties object |
require_base | text | field from the properties object |
resourceGroupName | text | field from the properties object |
scope | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Policy restrictions contract properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | policyRestrictionId, resourceGroupName, serviceName, subscriptionId | Get the policy restriction of the Api Management service. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Gets all policy restrictions of API Management services. |
create_or_update | INSERT | policyRestrictionId, resourceGroupName, serviceName, subscriptionId | Creates or updates the policy restriction configuration of the Api Management service. |
delete | DELETE | policyRestrictionId, resourceGroupName, serviceName, subscriptionId | Deletes the policy restriction configuration of the Api Management Service. |
update | UPDATE | If-Match, policyRestrictionId, resourceGroupName, serviceName, subscriptionId | Updates the policy restriction configuration of the Api Management service. |
SELECT
examples
Gets all policy restrictions of API Management services.
- vw_policy_restrictions
- policy_restrictions
SELECT
policyRestrictionId,
require_base,
resourceGroupName,
scope,
serviceName,
subscriptionId
FROM azure.api_management.vw_policy_restrictions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.policy_restrictions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new policy_restrictions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.policy_restrictions (
policyRestrictionId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ policyRestrictionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: scope
value: string
- name: requireBase
value: string
UPDATE
example
Updates a policy_restrictions
resource.
/*+ update */
UPDATE azure.api_management.policy_restrictions
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND policyRestrictionId = '{{ policyRestrictionId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified policy_restrictions
resource.
/*+ delete */
DELETE FROM azure.api_management.policy_restrictions
WHERE policyRestrictionId = '{{ policyRestrictionId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';