Skip to main content

workspace_subscriptions

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

Overview

Nameworkspace_subscriptions
TypeResource
Idazure.api_management.workspace_subscriptions

Fields

NameDatatypeDescription
allow_tracingtextfield from the properties object
created_datetextfield from the properties object
display_nametextfield from the properties object
end_datetextfield from the properties object
expiration_datetextfield from the properties object
notification_datetextfield from the properties object
owner_idtextfield from the properties object
primary_keytextfield from the properties object
resourceGroupNametextfield from the properties object
scopetextfield from the properties object
secondary_keytextfield from the properties object
serviceNametextfield from the properties object
sidtextfield from the properties object
start_datetextfield from the properties object
statetextfield from the properties object
state_commenttextfield from the properties object
subscriptionIdtextfield from the properties object
workspaceIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, sid, subscriptionId, workspaceIdGets the specified Subscription entity.
listSELECTresourceGroupName, serviceName, subscriptionId, workspaceIdLists all subscriptions of the workspace in an API Management service instance.
create_or_updateINSERTresourceGroupName, serviceName, sid, subscriptionId, workspaceIdCreates or updates the subscription of specified user to the specified product.
deleteDELETEIf-Match, resourceGroupName, serviceName, sid, subscriptionId, workspaceIdDeletes the specified subscription.
updateUPDATEIf-Match, resourceGroupName, serviceName, sid, subscriptionId, workspaceIdUpdates the details of a subscription specified by its identifier.
regenerate_primary_keyEXECresourceGroupName, serviceName, sid, subscriptionId, workspaceIdRegenerates primary key of existing subscription of the workspace in an API Management service instance.
regenerate_secondary_keyEXECresourceGroupName, serviceName, sid, subscriptionId, workspaceIdRegenerates secondary key of existing subscription of the workspace in an API Management service instance.

SELECT examples

Lists all subscriptions of the workspace in an API Management service instance.

SELECT
allow_tracing,
created_date,
display_name,
end_date,
expiration_date,
notification_date,
owner_id,
primary_key,
resourceGroupName,
scope,
secondary_key,
serviceName,
sid,
start_date,
state,
state_comment,
subscriptionId,
workspaceId
FROM azure.api_management.vw_workspace_subscriptions
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_subscriptions resource.

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

UPDATE example

Updates a workspace_subscriptions resource.

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

DELETE example

Deletes the specified workspace_subscriptions resource.

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