workspace_policy_fragments
Creates, updates, deletes, gets or lists a workspace_policy_fragments
resource.
Overview
Name | workspace_policy_fragments |
Type | Resource |
Id | azure.api_management.workspace_policy_fragments |
Fields
- vw_workspace_policy_fragments
- workspace_policy_fragments
Name | Datatype | Description |
---|---|---|
id | text | field from the properties object |
description | text | field from the properties object |
format | text | field from the properties object |
provisioning_state | 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 fragment contract properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | id, resourceGroupName, serviceName, subscriptionId, workspaceId | Gets a policy fragment. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId, workspaceId | Gets all policy fragments defined within a workspace. |
create_or_update | INSERT | id, resourceGroupName, serviceName, subscriptionId, workspaceId | Creates or updates a policy fragment. |
delete | DELETE | If-Match, id, resourceGroupName, serviceName, subscriptionId, workspaceId | Deletes a policy fragment. |
SELECT
examples
Gets all policy fragments defined within a workspace.
- vw_workspace_policy_fragments
- workspace_policy_fragments
SELECT
id,
description,
format,
provisioning_state,
resourceGroupName,
serviceName,
subscriptionId,
value,
workspaceId
FROM azure.api_management.vw_workspace_policy_fragments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';
SELECT
properties
FROM azure.api_management.workspace_policy_fragments
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_policy_fragments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.workspace_policy_fragments (
id,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ id }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: value
value: string
- name: description
value: string
- name: format
value: string
- name: provisioningState
value: string
DELETE
example
Deletes the specified workspace_policy_fragments
resource.
/*+ delete */
DELETE FROM azure.api_management.workspace_policy_fragments
WHERE If-Match = '{{ If-Match }}'
AND id = '{{ id }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';