Skip to main content

product_policies

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

Overview

Nameproduct_policies
TypeResource
Idazure.api_management.product_policies

Fields

NameDatatypeDescription
formattextfield from the properties object
policyIdtextfield from the properties object
productIdtextfield 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, productId, resourceGroupName, serviceName, subscriptionIdGet the policy configuration at the Product level.
list_by_productSELECTproductId, resourceGroupName, serviceName, subscriptionIdGet the policy configuration at the Product level.
create_or_updateINSERTpolicyId, productId, resourceGroupName, serviceName, subscriptionIdCreates or updates policy configuration for the Product.
deleteDELETEIf-Match, policyId, productId, resourceGroupName, serviceName, subscriptionIdDeletes the policy configuration at the Product.

SELECT examples

Get the policy configuration at the Product level.

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

INSERT example

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

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

DELETE example

Deletes the specified product_policies resource.

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