policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | azure.api_management.policies |
Fields
- vw_policies
- policies
Name | Datatype | Description |
---|---|---|
format | text | field from the properties object |
policyId | 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, resourceGroupName, serviceName, subscriptionId | Get the Global policy definition of the Api Management service. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists all the Global Policy definitions of the Api Management service. |
create_or_update | INSERT | policyId, resourceGroupName, serviceName, subscriptionId | Creates or updates the global policy configuration of the Api Management service. |
delete | DELETE | If-Match, policyId, resourceGroupName, serviceName, subscriptionId | Deletes the global policy configuration of the Api Management Service. |
SELECT
examples
Lists all the Global Policy definitions of the Api Management service.
- vw_policies
- policies
SELECT
format,
policyId,
resourceGroupName,
serviceName,
subscriptionId,
value
FROM azure.api_management.vw_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.policies (
policyId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ policyId }}',
'{{ 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 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 }}';