简体   繁体   English

如何使用 Azure CLI 从特定的 Azure 存储帐户获取所有容器?

[英]How to Get All the Containers From a Specific Azure Storage Account using Azure CLI?

How to Get All the Containers From a Specific Azure Storage Account using Azure CLI?如何使用 Azure CLI 从特定的 Azure 存储帐户获取所有容器? How to set context in azure cli like we set context in Powershell?如何像我们在 Powershell 中设置上下文一样在 azure cli 中设置上下文? $ctx = $storageAccount.Context $ctx = $storageAccount.Context

How can we achieve this using Azure CLI?我们如何使用 Azure CLI 实现这一目标?

Get the storage account from which container has to be retrieved获取必须从中检索容器的存储帐户

Get the storage account context获取存储帐户上下文

List all the containers列出所有容器

Get All the Container list获取所有容器列表

az storage container list --account-name <Storage Account Name> --account-key <Storage Account Key> --query "[].{Name:name}" --output table

在此处输入图像描述

Set & Get Context设置和获取上下文

# example to set the Az context
Set-AzContext -Subscription  "XXXX-XXXX-XXXX-XXXX"

Refer Set AzContext & Get AzContext请参阅设置 AzContext获取 AzContext

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从公共 azure 私人存储帐户连接到 azure static web 应用程序 - How to connect to a azure private storage account from a public azure static web app 从 Azure Devops Hosted Agents 访问私有存储帐户 - Accessing a private storage account from Azure Devops Hosted Agents 使用 Azure CLI 获取 Azure 应用程序网关的“principalId”值 - Using Azure CLI Get the 'principalId' value of an Azure Application Gateway 从存储帐户(Azure Data lake)读取 pdf 文件,无需使用 python 下载 - Read pdf file from storage account (Azure Data lake) without downloading it using python 如何将备份日志(1 年保留日志)从日志分析工作区移动到 azure 存储帐户 - How to move backup logs (1 year retention logs) from log analytics workspace to azure storage account PowerShell REST 从 Azure 存储帐户表中删除 - PowerShell REST DELETE from Azure Storage Account Table 从 azure blob 存储中获取文件名 - Get file names from azure blob storage Azure:如何为存储帐户中的容器提供有限的访问级别? - Azure: How to provide limited Access Level to a Container in a Storage Account? 如何使用 Azure SQL 从 Azure Key Vault 获取机密? - How to get the secrets from Azure Key Vault Using Azure SQL? 如何使用 RBAC 连接到 Azure 表存储 - How to connect to Azure Table Storage using RBAC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM