Skip to main content

policy_restrictions

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

Overview

Namepolicy_restrictions
TypeResource
Idazure.api_management.policy_restrictions

Fields

NameDatatypeDescription
policyRestrictionIdtextfield from the properties object
require_basetextfield from the properties object
resourceGroupNametextfield from the properties object
scopetextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTpolicyRestrictionId, resourceGroupName, serviceName, subscriptionIdGet the policy restriction of the Api Management service.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdGets all policy restrictions of API Management services.
create_or_updateINSERTpolicyRestrictionId, resourceGroupName, serviceName, subscriptionIdCreates or updates the policy restriction configuration of the Api Management service.
deleteDELETEpolicyRestrictionId, resourceGroupName, serviceName, subscriptionIdDeletes the policy restriction configuration of the Api Management Service.
updateUPDATEIf-Match, policyRestrictionId, resourceGroupName, serviceName, subscriptionIdUpdates the policy restriction configuration of the Api Management service.

SELECT examples

Gets all policy restrictions of API Management services.

SELECT
policyRestrictionId,
require_base,
resourceGroupName,
scope,
serviceName,
subscriptionId
FROM azure.api_management.vw_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.

/*+ create */
INSERT INTO azure.api_management.policy_restrictions (
policyRestrictionId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ policyRestrictionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';