policy_fragments
Creates, updates, deletes, gets or lists a policy_fragments
resource.
Overview
Name | policy_fragments |
Type | Resource |
Id | azure.api_management.policy_fragments |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_service
Successfully returned a policy fragment.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy Fragment. |
Successfully returned an array of policy fragments.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy Fragment. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serviceName , id , subscriptionId | format | Gets a policy fragment. |
list_by_service | select | resourceGroupName , serviceName , subscriptionId | $filter , $orderby , $top , $skip | Gets all policy fragments. |
create_or_update | insert | resourceGroupName , serviceName , id , subscriptionId | If-Match | Creates or updates a policy fragment. |
delete | delete | resourceGroupName , serviceName , id , If-Match , subscriptionId | Deletes a policy fragment. |
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. |
id | string | A resource identifier. |
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. |
$filter | string | | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br> |
$orderby | string | OData order by query option. |
$skip | integer (int32) | Number of records to skip. |
$top | integer (int32) | Number of records to return. |
If-Match | string | ETag of the Entity. Not required when creating an entity, but required when updating an entity. |
format | string | Policy fragment content format. |
SELECT
examples
- get
- list_by_service
Gets a policy fragment.
SELECT
properties
FROM azure.api_management.policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND id = '{{ id }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND format = '{{ format }}'
;
Gets all policy fragments.
SELECT
properties
FROM azure.api_management.policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $orderby = '{{ $orderby }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a policy fragment.
INSERT INTO azure.api_management.policy_fragments (
data__properties,
resourceGroupName,
serviceName,
id,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ id }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;
# Description fields are for documentation purposes
- name: policy_fragments
props:
- name: resourceGroupName
value: string
description: Required parameter for the policy_fragments resource.
- name: serviceName
value: string
description: Required parameter for the policy_fragments resource.
- name: id
value: string
description: Required parameter for the policy_fragments resource.
- name: subscriptionId
value: string
description: Required parameter for the policy_fragments resource.
- name: properties
value: object
description: |
Properties of the Policy Fragment.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
DELETE
examples
- delete
Deletes a policy fragment.
DELETE FROM azure.api_management.policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND id = '{{ id }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;