Skip to main content

workspace_policies

Creates, updates, deletes, gets or lists a workspace_policies resource.

Overview

Nameworkspace_policies
TypeResource
Idazure.api_management.workspace_policies

Fields

NameDatatypeDescription
formattextfield from the properties object
policyIdtextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
valuetextfield from the properties object
workspaceIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTpolicyId, resourceGroupName, serviceName, subscriptionId, workspaceIdGet the policy configuration at the API level.
list_by_apiSELECTresourceGroupName, serviceName, subscriptionId, workspaceIdGet the policy configuration at the workspace level.
create_or_updateINSERTpolicyId, resourceGroupName, serviceName, subscriptionId, workspaceIdCreates or updates policy configuration for the workspace.
deleteDELETEIf-Match, policyId, resourceGroupName, serviceName, subscriptionId, workspaceIdDeletes the policy configuration at the workspace.

SELECT examples

Get the policy configuration at the workspace level.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new workspace_policies resource.

/*+ create */
INSERT INTO azure.api_management.workspace_policies (
policyId,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ policyId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ properties }}'
;

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 }}';