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
- vw_policy_fragments
- policy_fragments
Name | Datatype | Description |
---|---|---|
id | text | field from the properties object |
description | text | field from the properties object |
format | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
value | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Policy fragment contract properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | id, resourceGroupName, serviceName, subscriptionId | Gets a policy fragment. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Gets all policy fragments. |
create_or_update | INSERT | id, resourceGroupName, serviceName, subscriptionId | Creates or updates a policy fragment. |
delete | DELETE | If-Match, id, resourceGroupName, serviceName, subscriptionId | Deletes a policy fragment. |
SELECT
examples
Gets all policy fragments.
- vw_policy_fragments
- policy_fragments
SELECT
id,
description,
format,
provisioning_state,
resourceGroupName,
serviceName,
subscriptionId,
value
FROM azure.api_management.vw_policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new policy_fragments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.policy_fragments (
id,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ id }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: value
value: string
- name: description
value: string
- name: format
value: string
- name: provisioningState
value: string
DELETE
example
Deletes the specified policy_fragments
resource.
/*+ delete */
DELETE FROM azure.api_management.policy_fragments
WHERE If-Match = '{{ If-Match }}'
AND id = '{{ id }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';