steampipe plugin install azure

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_protocols
from
azure_storage_share_file;
select
name,
storage_account_name,
type,
access_tier,
share_quota,
enabled_protocols
from
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_protocols
from
azure_storage_share_file
where
access_tier = 'TransactionOptimized';
select
name,
storage_account_name,
type,
access_tier,
access_tier_change_time,
share_quota,
enabled_protocols
from
azure_storage_share_file
where
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_protocols
from
azure_storage_share_file
order by
share_quota desc
limit
1;
select
name,
storage_account_name,
type,
access_tier,
access_tier_change_time,
share_quota,
enabled_protocols
from
azure_storage_share_file
order by
share_quota desc
limit
1;

Schema for azure_storage_share_file

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
access_tiertextAccess tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool.
access_tier_change_timetimestamp with time zoneIndicates the last modification time for share access tier.
access_tier_statustextIndicates if there is a pending transition for access tier.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cloud_environmenttextThe Azure Cloud Environment.
deletedbooleanIndicates whether the share was deleted.
deleted_timetimestamp with time zoneThe deleted time if the share was deleted.
enabled_protocolstextThe authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS'.
idtextFully qualified resource ID for the resource.
last_modified_timetimestamp with time zoneReturns the date and time the share was last modified.
metadatajsonbA name-value pair to associate with the share as metadata.
nametext=The name of the resource.
remaining_retention_daysbigintRemaining retention days for share that was soft deleted.
resource_grouptext=The resource group which holds this resource.
root_squashtextThe property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'.
share_quotabigintThe 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_bytesbigintThe approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.
storage_account_nametext=The name of the storage account.
subscription_idtextThe Azure Subscription ID in which the resource is located.
titletextTitle of the resource.
typetextThe type of the resource.
versiontextThe 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