Table: azure_subscription - Query Azure Subscriptions using SQL
Azure Subscriptions act as a logical container for resources deployed on Microsoft Azure. They provide a mechanism to organize access to Azure resources, manage costs, and track billing. Each Azure Subscription can have a different billing and payment setup, allowing flexibility in how users and organizations pay for the usage of Azure Services.
Table Usage Guide
The azure_subscription
table provides insights into Azure Subscriptions within Microsoft Azure. As a cloud architect or administrator, explore subscription-specific details through this table, including subscription IDs, names, states, and tenants. Utilize it to manage and organize access to Azure resources, track billing, and understand the cost management setup across different subscriptions.
Examples
Basic info
Explore the status and policies of your Azure subscriptions to understand their current state and source of authorization. This can help in managing and optimizing your cloud resources effectively.
select id, subscription_id, display_name, tenant_id, state, authorization_source, subscription_policiesfrom azure_subscription;
select id, subscription_id, display_name, tenant_id, state, authorization_source, subscription_policiesfrom azure_subscription;
Schema for azure_subscription
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
authorization_source | text | The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. | |
cloud_environment | text | The Azure Cloud Environment. | |
display_name | text | A friendly name that identifies a subscription. | |
id | text | The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. | |
managed_by_tenants | jsonb | An array containing the tenants managing the subscription. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: 'StateEnabled', 'StateWarned', 'StatePastDue', 'StateDisabled', 'StateDeleted' | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The subscription ID. |
subscription_policies | jsonb | The subscription policies. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | The subscription tenant ID. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_subscription