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
The following fields are returned by SELECT
queries:
- get
- list_by_service
Get the policy restriction of the Api Management service.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy Restriction. |
Returns an array of Policy Restrictions.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy Restriction. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , serviceName , policyRestrictionId | Get the policy restriction of the Api Management service. | |
list_by_service | select | subscriptionId , resourceGroupName , serviceName | Gets all policy restrictions of API Management services. | |
create_or_update | insert | subscriptionId , resourceGroupName , serviceName , policyRestrictionId | If-Match | Creates or updates the policy restriction configuration of the Api Management service. |
update | update | subscriptionId , resourceGroupName , serviceName , policyRestrictionId , If-Match | Updates the policy restriction configuration of the Api Management service. | |
delete | delete | subscriptionId , resourceGroupName , serviceName , policyRestrictionId | If-Match | Deletes 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.
Name | Datatype | Description |
---|---|---|
If-Match | string | ETag 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. |
policyRestrictionId | string | Policy restrictions after an entity level |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
If-Match | string | ETag of the Entity. Not required when creating an entity, but required when updating an entity. |
SELECT
examples
- get
- list_by_service
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
;
Gets all policy restrictions of API Management services.
SELECT
properties
FROM azure.api_management.policy_restrictions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: policy_restrictions
props:
- name: subscriptionId
value: string
description: Required parameter for the policy_restrictions resource.
- name: resourceGroupName
value: string
description: Required parameter for the policy_restrictions resource.
- name: serviceName
value: string
description: Required parameter for the policy_restrictions resource.
- name: policyRestrictionId
value: string
description: Required parameter for the policy_restrictions resource.
- name: properties
value: object
description: |
Properties of the Policy Restriction.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
UPDATE
examples
- update
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
- delete
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 }}'
;