workspace_subscriptions
Creates, updates, deletes, gets or lists a workspace_subscriptions
resource.
Overview
Name | workspace_subscriptions |
Type | Resource |
Id | azure.api_management.workspace_subscriptions |
Fields
- vw_workspace_subscriptions
- workspace_subscriptions
Name | Datatype | Description |
---|---|---|
allow_tracing | text | field from the properties object |
created_date | text | field from the properties object |
display_name | text | field from the properties object |
end_date | text | field from the properties object |
expiration_date | text | field from the properties object |
notification_date | text | field from the properties object |
owner_id | text | field from the properties object |
primary_key | text | field from the properties object |
resourceGroupName | text | field from the properties object |
scope | text | field from the properties object |
secondary_key | text | field from the properties object |
serviceName | text | field from the properties object |
sid | text | field from the properties object |
start_date | text | field from the properties object |
state | text | field from the properties object |
state_comment | 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 | Subscription details. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Gets the specified Subscription entity. |
list | SELECT | resourceGroupName, serviceName, subscriptionId, workspaceId | Lists all subscriptions of the workspace in an API Management service instance. |
create_or_update | INSERT | resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Creates or updates the subscription of specified user to the specified product. |
delete | DELETE | If-Match, resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Deletes the specified subscription. |
update | UPDATE | If-Match, resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Updates the details of a subscription specified by its identifier. |
regenerate_primary_key | EXEC | resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Regenerates primary key of existing subscription of the workspace in an API Management service instance. |
regenerate_secondary_key | EXEC | resourceGroupName, serviceName, sid, subscriptionId, workspaceId | Regenerates 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.
- vw_workspace_subscriptions
- workspace_subscriptions
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 }}';
SELECT
properties
FROM azure.api_management.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.workspace_subscriptions (
resourceGroupName,
serviceName,
sid,
subscriptionId,
workspaceId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ sid }}',
'{{ subscriptionId }}',
'{{ workspaceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: ownerId
value: string
- name: scope
value: string
- name: displayName
value: string
- name: primaryKey
value: string
- name: secondaryKey
value: string
- name: state
value: string
- name: allowTracing
value: boolean
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 }}';