Skip to main content

policy_fragments

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

Overview

Namepolicy_fragments
TypeResource
Idazure.api_management.policy_fragments

Fields

NameDatatypeDescription
idtextfield from the properties object
descriptiontextfield from the properties object
formattextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
valuetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTid, resourceGroupName, serviceName, subscriptionIdGets a policy fragment.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdGets all policy fragments.
create_or_updateINSERTid, resourceGroupName, serviceName, subscriptionIdCreates or updates a policy fragment.
deleteDELETEIf-Match, id, resourceGroupName, serviceName, subscriptionIdDeletes a policy fragment.

SELECT examples

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

INSERT example

Use the following StackQL query and manifest file to create a new policy_fragments resource.

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

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