subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure.api_management.subscriptions |
Fields
- vw_subscriptions
- 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 |
Name | Datatype | Description |
---|---|---|
properties | object | Subscription details. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, sid, subscriptionId | Gets the specified Subscription entity. |
list | SELECT | resourceGroupName, serviceName, subscriptionId | Lists all subscriptions of the API Management service instance. |
create_or_update | INSERT | resourceGroupName, serviceName, sid, subscriptionId | Creates or updates the subscription of specified user to the specified product. |
delete | DELETE | If-Match, resourceGroupName, serviceName, sid, subscriptionId | Deletes the specified subscription. |
update | UPDATE | If-Match, resourceGroupName, serviceName, sid, subscriptionId | Updates the details of a subscription specified by its identifier. |
regenerate_primary_key | EXEC | resourceGroupName, serviceName, sid, subscriptionId | Regenerates primary key of existing subscription of the API Management service instance. |
regenerate_secondary_key | EXEC | resourceGroupName, serviceName, sid, subscriptionId | Regenerates secondary key of existing subscription of the API Management service instance. |
SELECT
examples
Lists all subscriptions of the API Management service instance.
- vw_subscriptions
- 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
FROM azure.api_management.vw_subscriptions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.subscriptions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new subscriptions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.subscriptions (
resourceGroupName,
serviceName,
sid,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ sid }}',
'{{ subscriptionId }}',
'{{ 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 subscriptions
resource.
/*+ update */
UPDATE azure.api_management.subscriptions
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND sid = '{{ sid }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified subscriptions
resource.
/*+ delete */
DELETE FROM azure.api_management.subscriptions
WHERE If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND sid = '{{ sid }}'
AND subscriptionId = '{{ subscriptionId }}';