workspace_policies
Creates, updates, deletes, gets or lists a workspace_policies
resource.
Overview
Name | workspace_policies |
Type | Resource |
Id | azure.api_management.workspace_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_api
Workspace Policy information.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy. |
Workspace Policy Collection.
Name | Datatype | Description |
---|---|---|
properties | object | Properties of the Policy. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serviceName , workspaceId , policyId , subscriptionId | format | Get the policy configuration at the API level. |
list_by_api | select | resourceGroupName , serviceName , workspaceId , subscriptionId | Get the policy configuration at the workspace level. | |
create_or_update | insert | resourceGroupName , serviceName , workspaceId , policyId , subscriptionId | If-Match | Creates or updates policy configuration for the workspace. |
delete | delete | resourceGroupName , serviceName , workspaceId , policyId , If-Match , subscriptionId | Deletes the policy configuration at the workspace. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
If-Match | string | ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. |
policyId | string | The identifier of the Policy. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
workspaceId | string | Workspace identifier. Must be unique in the current API Management service instance. |
If-Match | string | ETag of the Entity. Not required when creating an entity, but required when updating an entity. |
format | string | Policy Export Format. |
SELECT
examples
- get
- list_by_api
Get the policy configuration at the API level.
SELECT
properties
FROM azure.api_management.workspace_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceId = '{{ workspaceId }}' -- required
AND policyId = '{{ policyId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND format = '{{ format }}'
;
Get the policy configuration at the workspace level.
SELECT
properties
FROM azure.api_management.workspace_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceId = '{{ workspaceId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates policy configuration for the workspace.
INSERT INTO azure.api_management.workspace_policies (
data__properties,
resourceGroupName,
serviceName,
workspaceId,
policyId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ workspaceId }}',
'{{ policyId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;
# Description fields are for documentation purposes
- name: workspace_policies
props:
- name: resourceGroupName
value: string
description: Required parameter for the workspace_policies resource.
- name: serviceName
value: string
description: Required parameter for the workspace_policies resource.
- name: workspaceId
value: string
description: Required parameter for the workspace_policies resource.
- name: policyId
value: string
description: Required parameter for the workspace_policies resource.
- name: subscriptionId
value: string
description: Required parameter for the workspace_policies resource.
- name: properties
value: object
description: |
Properties of the Policy.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
DELETE
examples
- delete
Deletes the policy configuration at the workspace.
DELETE FROM azure.api_management.workspace_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceId = '{{ workspaceId }}' --required
AND policyId = '{{ policyId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;