subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure_stack.subscriptions_admin.subscriptions |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified identifier. |
delegatedProviderSubscriptionId | string | Parent DelegatedProvider subscription identifier. |
displayName | string | Subscription name. |
externalReferenceId | string | External reference identifier. |
offerId | string | Identifier of the offer under the scope of a delegated provider. |
owner | string | Subscription owner. |
routingResourceManagerType | string | Resource manager type. |
state | string | Subscription notification state. |
subscriptionId | string | Subscription identifier. |
tenantId | string | Directory tenant identifier. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | subscriptionId, targetSubscriptionId | Get a specified subscription. |
list | SELECT | subscriptionId | Get the list of subscriptions. |
create_or_update | INSERT | subscriptionId, targetSubscriptionId | Creates or updates the specified subscription. |
delete | DELETE | subscriptionId, targetSubscriptionId | Delete the specified subscription. |
check_identity_health | EXEC | subscriptionId | Checks the identity health |
check_name_availability | EXEC | subscriptionId | Get the list of subscriptions. |
move_subscriptions | EXEC | subscriptionId, data__resources | Move subscriptions between delegated provider offers. |
restore_data | EXEC | subscriptionId | Restores the data |
validate_move_subscriptions | EXEC | subscriptionId, data__resources | Validate that user subscriptions can be moved between delegated provider offers. |
SELECT
examples
Get the list of subscriptions.
SELECT
id,
delegatedProviderSubscriptionId,
displayName,
externalReferenceId,
offerId,
owner,
routingResourceManagerType,
state,
subscriptionId,
tenantId
FROM azure_stack.subscriptions_admin.subscriptions
WHERE 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_stack.subscriptions_admin.subscriptions (
subscriptionId,
targetSubscriptionId,
delegatedProviderSubscriptionId,
displayName,
id,
externalReferenceId,
offerId,
owner,
routingResourceManagerType,
state,
subscriptionId,
tenantId
)
SELECT
'{{ subscriptionId }}',
'{{ targetSubscriptionId }}',
'{{ delegatedProviderSubscriptionId }}',
'{{ displayName }}',
'{{ id }}',
'{{ externalReferenceId }}',
'{{ offerId }}',
'{{ owner }}',
'{{ routingResourceManagerType }}',
'{{ state }}',
'{{ subscriptionId }}',
'{{ tenantId }}'
;
- name: your_resource_model_name
props:
- name: delegatedProviderSubscriptionId
value: string
- name: displayName
value: string
- name: id
value: string
- name: externalReferenceId
value: string
- name: offerId
value: string
- name: owner
value: string
- name: routingResourceManagerType
value: []
- name: state
value: []
- name: subscriptionId
value: string
- name: tenantId
value: string
DELETE
example
Deletes the specified subscriptions
resource.
/*+ delete */
DELETE FROM azure_stack.subscriptions_admin.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}'
AND targetSubscriptionId = '{{ targetSubscriptionId }}';