Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idazure.resource.subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe fully qualified ID for the subscription. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74.
authorizationSourcestringThe authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.
displayNamestringThe subscription display name.
managedByTenantsarrayAn array containing the tenants managing the subscription.
statestringThe 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)
subscriptionIdstringThe subscription ID.
subscriptionPoliciesobjectThe subscription policies.
tagsobjectThe tags attached to the subscription.
tenantIdstringThe subscription tenant ID.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscription_idGets details about a specified subscription.
listselectGets all subscriptions for a tenant.
list_locationsexecsubscription_idincludeExtendedLocationsGets 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_peersexecsubscription_idCompares 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.

NameDatatypeDescription
subscription_idstringThe ID of the target subscription. The value must be an UUID. Required.
includeExtendedLocationsbooleanWhether to include extended locations. Default value is None.

SELECT examples

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
;

Lifecycle Methods

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 }}
;