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
- vw_workspace_policies
- workspace_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 |
workspaceId | 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, workspaceId | Get the policy configuration at the API level. |
list_by_api | SELECT | resourceGroupName, serviceName, subscriptionId, workspaceId | Get the policy configuration at the workspace level. |
create_or_update | INSERT | policyId, resourceGroupName, serviceName, subscriptionId, workspaceId | Creates or updates policy configuration for the workspace. |
delete | DELETE | If-Match, policyId, resourceGroupName, serviceName, subscriptionId, workspaceId | Deletes the policy configuration at the workspace. |
SELECT
examples
Get the policy configuration at the workspace level.
- vw_workspace_policies
- workspace_policies
SELECT
format,
policyId,
resourceGroupName,
serviceName,
subscriptionId,
value,
workspaceId
FROM azure.api_management.vw_workspace_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
SELECT
properties
FROM azure.api_management.workspace_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new workspace_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.workspace_policies (
policyId,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ policyId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: value
value: string
- name: format
value: string
DELETE
example
Deletes the specified workspace_policies
resource.
/*+ delete */
DELETE FROM azure.api_management.workspace_policies
WHERE If-Match = '{{ If-Match }}'
AND policyId = '{{ policyId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';