product_policies
Creates, updates, deletes, gets or lists a product_policies
resource.
Overview
Name | product_policies |
Type | Resource |
Id | azure.api_management.product_policies |
Fields
- vw_product_policies
- product_policies
Name | Datatype | Description |
---|---|---|
format | text | field from the properties object |
policyId | text | field from the properties object |
productId | 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 contract Properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | policyId, productId, resourceGroupName, serviceName, subscriptionId | Get the policy configuration at the Product level. |
list_by_product | SELECT | productId, resourceGroupName, serviceName, subscriptionId | Get the policy configuration at the Product level. |
create_or_update | INSERT | policyId, productId, resourceGroupName, serviceName, subscriptionId | Creates or updates policy configuration for the Product. |
delete | DELETE | If-Match, policyId, productId, resourceGroupName, serviceName, subscriptionId | Deletes the policy configuration at the Product. |
SELECT
examples
Get the policy configuration at the Product level.
- vw_product_policies
- product_policies
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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.product_policies (
policyId,
productId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ policyId }}',
'{{ productId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: value
value: string
- name: format
value: string
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 }}';