workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | azure.api_management.workspaces |
Fields
- vw_workspaces
- workspaces
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
display_name | 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 |
workspaceId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Workspace entity properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, subscriptionId, workspaceId | Gets the details of the workspace specified by its identifier. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists all workspaces of the API Management service instance. |
create_or_update | INSERT | resourceGroupName, serviceName, subscriptionId, workspaceId | Creates a new workspace or updates an existing one. |
delete | DELETE | If-Match, resourceGroupName, serviceName, subscriptionId, workspaceId | Deletes the specified workspace. |
update | UPDATE | If-Match, resourceGroupName, serviceName, subscriptionId, workspaceId | Updates the details of the workspace specified by its identifier. |
SELECT
examples
Lists all workspaces of the API Management service instance.
- vw_workspaces
- workspaces
SELECT
description,
display_name,
resourceGroupName,
serviceName,
subscriptionId,
workspaceId
FROM azure.api_management.vw_workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.workspaces (
resourceGroupName,
serviceName,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: displayName
value: string
- name: description
value: string
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 }}';