subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | azure.resource.subscriptions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74. |
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. |
managedByTenants | array | An array containing the tenants managing the subscription. |
state | string | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Known values are: "Enabled", "Warned", "PastDue", "Disabled", and "Deleted". (Enabled, Warned, PastDue, Disabled, Deleted) |
subscriptionId | string | The subscription ID. |
subscriptionPolicies | object | The subscription policies. |
tags | object | The tags attached to the subscription. |
tenantId | string | The subscription tenant ID. |
| Name | Datatype | Description |
|---|---|---|
id | string | The fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74. |
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. |
managedByTenants | array | An array containing the tenants managing the subscription. |
state | string | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Known values are: "Enabled", "Warned", "PastDue", "Disabled", and "Deleted". (Enabled, Warned, PastDue, Disabled, Deleted) |
subscriptionId | string | The subscription ID. |
subscriptionPolicies | object | The subscription policies. |
tags | object | The tags attached to the subscription. |
tenantId | string | The subscription tenant ID. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | subscription_id | Gets details about a specified subscription. | |
list | select | Gets all subscriptions for a tenant. | ||
list_locations | exec | subscription_id | includeExtendedLocations | Gets all available geo-locations. This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list. |
check_zone_peers | exec | subscription_id | Compares a subscriptions logical zone mapping. |
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 |
|---|---|---|
subscription_id | string | The ID of the target subscription. The value must be an UUID. Required. |
includeExtendedLocations | boolean | Whether to include extended locations. Default value is None. |
SELECT examples
- get
- list
Gets details about a specified subscription.
SELECT
id,
authorizationSource,
displayName,
managedByTenants,
state,
subscriptionId,
subscriptionPolicies,
tags,
tenantId
FROM azure.resource.subscriptions
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Gets all subscriptions for a tenant.
SELECT
id,
authorizationSource,
displayName,
managedByTenants,
state,
subscriptionId,
subscriptionPolicies,
tags,
tenantId
FROM azure.resource.subscriptions
;
Lifecycle Methods
- list_locations
- check_zone_peers
Gets all available geo-locations. This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
EXEC azure.resource.subscriptions.list_locations
@subscription_id='{{ subscription_id }}' --required,
@includeExtendedLocations={{ includeExtendedLocations }}
;
Compares a subscriptions logical zone mapping.
EXEC azure.resource.subscriptions.check_zone_peers
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"location": "{{ location }}",
"subscriptionIds": "{{ subscriptionIds }}"
}'
;