api_operation_policies
Creates, updates, deletes, gets or lists a api_operation_policies
resource.
Overview
Name | api_operation_policies |
Type | Resource |
Id | azure.api_management.api_operation_policies |
Fields
- vw_api_operation_policies
- api_operation_policies
Name | Datatype | Description |
---|---|---|
apiId | text | field from the properties object |
format | text | field from the properties object |
operationId | 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 | apiId, operationId, policyId, resourceGroupName, serviceName, subscriptionId | Get the policy configuration at the API Operation level. |
list_by_operation | SELECT | apiId, operationId, resourceGroupName, serviceName, subscriptionId | Get the list of policy configuration at the API Operation level. |
create_or_update | INSERT | apiId, operationId, policyId, resourceGroupName, serviceName, subscriptionId | Creates or updates policy configuration for the API Operation level. |
delete | DELETE | If-Match, apiId, operationId, policyId, resourceGroupName, serviceName, subscriptionId | Deletes the policy configuration at the Api Operation. |
SELECT
examples
Get the list of policy configuration at the API Operation level.
- vw_api_operation_policies
- api_operation_policies
SELECT
apiId,
format,
operationId,
policyId,
resourceGroupName,
serviceName,
subscriptionId,
value
FROM azure.api_management.vw_api_operation_policies
WHERE apiId = '{{ apiId }}'
AND operationId = '{{ operationId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.api_operation_policies
WHERE apiId = '{{ apiId }}'
AND operationId = '{{ operationId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new api_operation_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.api_operation_policies (
apiId,
operationId,
policyId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ apiId }}',
'{{ operationId }}',
'{{ 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 api_operation_policies
resource.
/*+ delete */
DELETE FROM azure.api_management.api_operation_policies
WHERE If-Match = '{{ If-Match }}'
AND apiId = '{{ apiId }}'
AND operationId = '{{ operationId }}'
AND policyId = '{{ policyId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';