Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idazure_stack.subscriptions_admin.subscriptions

Fields

NameDatatypeDescription
idstringFully qualified identifier.
delegatedProviderSubscriptionIdstringParent DelegatedProvider subscription identifier.
displayNamestringSubscription name.
externalReferenceIdstringExternal reference identifier.
offerIdstringIdentifier of the offer under the scope of a delegated provider.
ownerstringSubscription owner.
routingResourceManagerTypestringResource manager type.
statestringSubscription notification state.
subscriptionIdstringSubscription identifier.
tenantIdstringDirectory tenant identifier.

Methods

NameAccessible byRequired ParamsDescription
getSELECTsubscriptionId, targetSubscriptionIdGet a specified subscription.
listSELECTsubscriptionIdGet the list of subscriptions.
create_or_updateINSERTsubscriptionId, targetSubscriptionIdCreates or updates the specified subscription.
deleteDELETEsubscriptionId, targetSubscriptionIdDelete the specified subscription.
check_identity_healthEXECsubscriptionIdChecks the identity health
check_name_availabilityEXECsubscriptionIdGet the list of subscriptions.
move_subscriptionsEXECsubscriptionId, data__resourcesMove subscriptions between delegated provider offers.
restore_dataEXECsubscriptionIdRestores the data
validate_move_subscriptionsEXECsubscriptionId, data__resourcesValidate 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.

/*+ 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 }}'
;

DELETE example

Deletes the specified subscriptions resource.

/*+ delete */
DELETE FROM azure_stack.subscriptions_admin.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}'
AND targetSubscriptionId = '{{ targetSubscriptionId }}';