Table: azure_storage_share_file - Query Azure Storage Files using SQL
Azure Storage Files is a service within Microsoft Azure that offers fully managed file shares in the cloud accessible via the industry-standard Server Message Block (SMB) protocol. Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. It provides a simple, secure, and scalable solution for sharing data between applications running in your virtual machines.
Table Usage Guide
The azure_storage_share_file
table provides insights into Azure Storage Files within Microsoft Azure. As a DevOps engineer, explore file-specific details through this table, including file name, share name, content length, last modified time, and more. Utilize it to uncover information about files, such as those with large content length, the shares they are associated with, and their last modified time.
Examples
Basic info
Explore the settings and configurations of your Azure storage shares to understand their storage capacity and accessibility. This can help in optimizing storage usage and ensuring the right protocols are enabled for secure and efficient data access.
select name, storage_account_name, type, access_tier, share_quota, enabled_protocolsfrom azure_storage_share_file;
select name, storage_account_name, type, access_tier, share_quota, enabled_protocolsfrom azure_storage_share_file;
List file shares with default access tier
Determine the areas in which file shares are set to the default 'TransactionOptimized' access tier in Azure storage. This can help identify potential areas for optimization and cost savings.
select name, storage_account_name, type, access_tier, access_tier_change_time, share_quota, enabled_protocolsfrom azure_storage_share_filewhere access_tier = 'TransactionOptimized';
select name, storage_account_name, type, access_tier, access_tier_change_time, share_quota, enabled_protocolsfrom azure_storage_share_filewhere access_tier = 'TransactionOptimized';
Get file share with maximum share quota
Explore which file share within your Azure storage has the maximum quota. This is useful for understanding your storage usage and managing resources effectively.
select name, storage_account_name, type, access_tier, access_tier_change_time, share_quota, enabled_protocolsfrom azure_storage_share_fileorder by share_quota desclimit 1;
select name, storage_account_name, type, access_tier, access_tier_change_time, share_quota, enabled_protocolsfrom azure_storage_share_fileorder by share_quota desclimit 1;
Schema for azure_storage_share_file
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
access_tier | text | Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. | |
access_tier_change_time | timestamp with time zone | Indicates the last modification time for share access tier. | |
access_tier_status | text | Indicates if there is a pending transition for access tier. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
deleted | boolean | Indicates whether the share was deleted. | |
deleted_time | timestamp with time zone | The deleted time if the share was deleted. | |
enabled_protocols | text | The authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS'. | |
id | text | Fully qualified resource ID for the resource. | |
last_modified_time | timestamp with time zone | Returns the date and time the share was last modified. | |
metadata | jsonb | A name-value pair to associate with the share as metadata. | |
name | text | = | The name of the resource. |
remaining_retention_days | bigint | Remaining retention days for share that was soft deleted. | |
resource_group | text | = | The resource group which holds this resource. |
root_squash | text | The property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. | |
share_quota | bigint | The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. | |
share_usage_bytes | bigint | The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
storage_account_name | text | = | The name of the storage account. |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
title | text | Title of the resource. | |
type | text | The type of the resource. | |
version | text | The version of the share. |
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_storage_share_file