Skip to main content

policies

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

Overview

Namepolicies
TypeResource
Idazure.api_management.policies

Fields

NameDatatypeDescription
formattextfield from the properties object
policyIdtextfield 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
getSELECTpolicyId, resourceGroupName, serviceName, subscriptionIdGet the Global policy definition of the Api Management service.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists all the Global Policy definitions of the Api Management service.
create_or_updateINSERTpolicyId, resourceGroupName, serviceName, subscriptionIdCreates or updates the global policy configuration of the Api Management service.
deleteDELETEIf-Match, policyId, resourceGroupName, serviceName, subscriptionIdDeletes the global policy configuration of the Api Management Service.

SELECT examples

Lists all the Global Policy definitions of the Api Management service.

SELECT
format,
policyId,
resourceGroupName,
serviceName,
subscriptionId,
value
FROM azure.api_management.vw_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

DELETE example

Deletes the specified policies resource.

/*+ delete */
DELETE FROM azure.api_management.policies
WHERE If-Match = '{{ If-Match }}'
AND policyId = '{{ policyId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';