Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idazure.subscription.subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
acceptedDatestring (date-time)The UTC date and time when the transfer request was accepted.
createdDatestring (date-time)The UTC date and time when the transfer request was created.
destinationOwnerIdstringDestination Owner Id where Subscription will be accepted.
destinationTenantIdstringDestination Tenant Id where Subscription will be accepted.
expiresOnstring (date-time)Subscription Initiate Request Expiry time.
sourceOwnerEmailstringThe email address of the user who initiated the transfer request. If the request was generated by a Service Principal, this field may be null.
sourceOwnerIdstringThe object id of the user who initiated the transfer request.
sourceTenantIdstringThe id of the tenant where the subscription originally resided.
statusstringStatus of the subscription transfer operation. Known values are: "Initialized", "InProgress", and "Completed". (Initialized, InProgress, Completed)
subscriptionIdstringThe id of the subscription being transferred.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_target_directoryselectsubscription_idThe operation to list Initiator Subscription Changed Request.
get_target_directoryexecsubscription_idThe operation to view Initiator Subscription Changed Request.
put_target_directoryexecsubscription_idThe operation to initiate Subscription Changed Request.
delete_target_directoryexecsubscription_idThe operation to delete Initiator Subscription Changed Request.
accept_target_directoryexecsubscription_idThe operation to accept Subscription Changed Request.
target_directory_statusexecsubscription_idThe operation for Acceptor to view the accepted request.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subscription_idstringSubscription Id. Required.

SELECT examples

The operation to list Initiator Subscription Changed Request.

SELECT
id,
name,
acceptedDate,
createdDate,
destinationOwnerId,
destinationTenantId,
expiresOn,
sourceOwnerEmail,
sourceOwnerId,
sourceTenantId,
status,
subscriptionId,
systemData,
type
FROM azure.subscription.subscriptions
WHERE subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

The operation to view Initiator Subscription Changed Request.

EXEC azure.subscription.subscriptions.get_target_directory 
@subscription_id='{{ subscription_id }}' --required
;