class_docstr: A hook which wraps an Azure Volume.
  
  :param azure_container_volume_conn_id: Reference to the
      :ref:`Azure Container Volume connection id <howto/connection:azure_container_volume>`
      of an Azure account of which container volumes should be used.
docstr: Get Azure File Volume storage key.
docstr_tok: ["Get","Azure","File","Volume","storage","key","."]
code: def get_storagekey(
      self, *, storage_account_name: str | None = None
  ) -> str:
      """Get Azure File Volume storage key."""
      conn = self.get_connection(self.conn_id)
      extras = conn.extra_dejson
      connection_string = self._get_field(extras, "connection_string")
      if connection_string:
          for keyvalue in connection_string.split(";"):
              key, value = keyvalue.split("=", 1)
              if key == "AccountKey":
                  return value
  
      subscription_id = self._get_field(extras, "subscription_id")
      resource_group = self._get_field(extras, "resource_group")
      if subscription_id and storage_account_name and resource_group:
          managed_identity_client_id = self._get_field(
              extras, "managed_identity_client_id"
          )
          workload_identity_tenant_id = self._get_field(
              extras, "workload_identity_tenant_id"
          )
          credential = get_sync_default_azure_credential(
              managed_identity_client_id=managed_identity_client_id,
              workload_identity_tenant_id=workload_identity_tenant_id,
          )
          storage_client = StorageManagementClient(
              credential, subscription_id
          )
          storage_account_list_keys_result = (
              storage_client.storage_accounts.list_keys(
                  resource_group, storage_account_name
              )
          )
          return storage_account_list_keys_result.as_dict()["keys"][0][
              "value"
          ]
  
      return conn.password
  
file_path: airflow/airflow/providers/microsoft/azure/hooks/container_volume.py
imports: from __future__ import annotations
  from typing import Any
  from azure.mgmt.containerinstance.models import AzureFileVolume, Volume
  from azure.mgmt.storage import StorageManagementClient
  from airflow.hooks.base import BaseHook
  from airflow.providers.microsoft.azure.utils import add_managed_identity_connection_widgets, get_field, get_sync_default_azure_credential
label_desc: Use image node_id 5 for calling the AzureContainerVolumeHook obj's underlying member method code with example usage: obj.get_storagekey() and returns: conn, storage_account_list_keys_result, value