Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idazure.api_management.workspaces

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
display_nametextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
workspaceIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionId, workspaceIdGets the details of the workspace specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists all workspaces of the API Management service instance.
create_or_updateINSERTresourceGroupName, serviceName, subscriptionId, workspaceIdCreates a new workspace or updates an existing one.
deleteDELETEIf-Match, resourceGroupName, serviceName, subscriptionId, workspaceIdDeletes the specified workspace.
updateUPDATEIf-Match, resourceGroupName, serviceName, subscriptionId, workspaceIdUpdates the details of the workspace specified by its identifier.

SELECT examples

Lists all workspaces of the API Management service instance.

SELECT
description,
display_name,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId
FROM azure.api_management.vw_workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a workspaces resource.

/*+ update */
UPDATE azure.api_management.workspaces
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';

DELETE example

Deletes the specified workspaces resource.

/*+ delete */
DELETE FROM azure.api_management.workspaces
WHERE If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceId = '{{ workspaceId }}';