subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure.subscription.subscriptions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK - Returns information about the subscription.
Name | Datatype | Description |
---|---|---|
id | string | The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. |
authorizationSource | string | The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. |
displayName | string | The subscription display name. |
state | string | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. |
subscriptionId | string | The subscription ID. |
subscriptionPolicies | object | The subscription policies. |
tags | object | Tags for the subscription |
tenantId | string | The tenant ID. For example, 00000000-0000-0000-0000-000000000000. |
OK - Returns an array of subscriptions.
Name | Datatype | Description |
---|---|---|
id | string | The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. |
authorizationSource | string | The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. |
displayName | string | The subscription display name. |
state | string | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. |
subscriptionId | string | The subscription ID. |
subscriptionPolicies | object | The subscription policies. |
tags | object | Tags for the subscription |
tenantId | string | The tenant ID. For example, 00000000-0000-0000-0000-000000000000. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId | Gets details about a specified subscription. | |
list | select | Gets all subscriptions for a tenant. | ||
cancel | exec | subscriptionId | The operation to cancel a subscription | |
rename | exec | subscriptionId | The operation to rename a subscription | |
enable | exec | subscriptionId | The operation to enable a subscription | |
accept_ownership | exec | subscriptionId | Accept subscription ownership. | |
accept_ownership_status | exec | subscriptionId | Accept subscription ownership status. |
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.
Name | Datatype | Description |
---|---|---|
subscriptionId | string | Subscription Id. |
SELECT
examples
- get
- list
Gets details about a specified subscription.
SELECT
id,
authorizationSource,
displayName,
state,
subscriptionId,
subscriptionPolicies,
tags,
tenantId
FROM azure.subscription.subscriptions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
Gets all subscriptions for a tenant.
SELECT
id,
authorizationSource,
displayName,
state,
subscriptionId,
subscriptionPolicies,
tags,
tenantId
FROM azure.subscription.subscriptions
;
Lifecycle Methods
- cancel
- rename
- enable
- accept_ownership
- accept_ownership_status
The operation to cancel a subscription
EXEC azure.subscription.subscriptions.cancel
@subscriptionId='{{ subscriptionId }}' --required
;
The operation to rename a subscription
EXEC azure.subscription.subscriptions.rename
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"subscriptionName": "{{ subscriptionName }}"
}'
;
The operation to enable a subscription
EXEC azure.subscription.subscriptions.enable
@subscriptionId='{{ subscriptionId }}' --required
;
Accept subscription ownership.
EXEC azure.subscription.subscriptions.accept_ownership
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Accept subscription ownership status.
EXEC azure.subscription.subscriptions.accept_ownership_status
@subscriptionId='{{ subscriptionId }}' --required
;