【问题标题】:Azure Powershell Container Creation - error messageAzure Powershell 容器创建 - 错误消息
【发布时间】:2022-11-10 18:19:47
【问题描述】:

我正在尝试创建一个存储容器来保存 MS Azure 中的 blob 图像。我正在使用 Azure Powershell。

我创建了一个资源组和一个存储帐户,并运行了以下命令:

$blobStorageAccountKey = ((Get-AzStorageAccountKey -ResourceGroupName cloud-shell-storage-westeurope -Name "robStorageAccount")| Where-Object {$_.KeyName -eq "key1"}).Value

$blobStorageContext = New-AzStorageContext -StorageAccountName "robStorageAccount" -StorageAccountKey $blobStorageAccountKey

但是当我运行此命令时,我收到以下错误:

New-AzStorageContainer -Name images -Context $blobStorageContext

    New-AzStorageContainer: One of the request inputs is out of range.                                                      
    RequestId:9b0b4ec8-801e-004c-3e02-eaedfa000000                                                                          
    Time:2022-10-27T12:52:06.5326241Z                                                                                       
    Status: 400 (One of the request inputs is out of range.)                                                                
    ErrorCode: OutOfRangeInput                                                                                              
    Content:                                                                                                                
    <?xml version="1.0" encoding="utf-8"?><Error><Code>OutOfRangeInput</Code><Message>One of the request inputs is out of range.
    RequestId:9b0b4ec8-801e-004c-3e02-eaedfa000000                                                                          
    Time:2022-10-27T12:52:06.5326241Z</Message></Error>                                                                     
    Headers:                                                                                                                
    Server: Microsoft-HTTPAPI/2.0                                                                                           
    x-ms-request-id: 9b0b4ec8-801e-004c-3e02-eaedfa000000                                                                   
    x-ms-error-code: OutOfRangeInput                                                                                        
    Date: Thu, 27 Oct 2022 12:52:05 GMT                                                                                     
    Content-Length: 226                                                                                                     
    Content-Type: application/xml

关于在此处检查什么以及运行任何有用的 azure powershell 命令的任何想法?

谢谢,

罗伯特

【问题讨论】:

    标签: azure powershell azure-storage


    【解决方案1】:

    我尝试在我的环境中重现相同的内容,并使用以下命令成功创建了容器:

    $storageAccoun= Get-AzStorageAccount -ResourceGroupName testruk -Name StorageAccName
    
    $CTX = $storageAccoun.Context
    
    New-AzStorageContainer -Name ContainerName -Context $ctx -Permission blob
    

    在 Portal 中,Container 已成功创建,如下所示

    【讨论】:

      猜你喜欢
      • 2023-02-07
      • 1970-01-01
      • 1970-01-01
      • 2013-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-05
      相关资源
      最近更新 更多