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

The following fields are returned by SELECT queries:

Get the policy restriction of the Api Management service.

NameDatatypeDescription
propertiesobjectProperties of the Policy Restriction.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serviceName, policyRestrictionIdGet the policy restriction of the Api Management service.
list_by_serviceselectsubscriptionId, resourceGroupName, serviceNameGets all policy restrictions of API Management services.
create_or_updateinsertsubscriptionId, resourceGroupName, serviceName, policyRestrictionIdIf-MatchCreates or updates the policy restriction configuration of the Api Management service.
updateupdatesubscriptionId, resourceGroupName, serviceName, policyRestrictionId, If-MatchUpdates the policy restriction configuration of the Api Management service.
deletedeletesubscriptionId, resourceGroupName, serviceName, policyRestrictionIdIf-MatchDeletes the policy restriction configuration of the Api Management Service.

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
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
policyRestrictionIdstringPolicy restrictions after an entity level
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.

SELECT examples

Get the policy restriction of the Api Management service.

SELECT
properties
FROM azure.api_management.policy_restrictions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND policyRestrictionId = '{{ policyRestrictionId }}' -- required
;

INSERT examples

Creates or updates the policy restriction configuration of the Api Management service.

INSERT INTO azure.api_management.policy_restrictions (
data__properties,
subscriptionId,
resourceGroupName,
serviceName,
policyRestrictionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ policyRestrictionId }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates the policy restriction configuration of the Api Management service.

UPDATE azure.api_management.policy_restrictions
SET
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND policyRestrictionId = '{{ policyRestrictionId }}' --required
AND If-Match = '{{ If-Match }}' --required
RETURNING
properties;

DELETE examples

Deletes the policy restriction configuration of the Api Management Service.

DELETE FROM azure.api_management.policy_restrictions
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND policyRestrictionId = '{{ policyRestrictionId }}' --required
AND If-Match = '{{ If-Match }}'
;