none
azure storage container access level RRS feed

  • Question

  • I am creating azure storage container with CLI command

     

    az storage container create -n "teststorage" --public-access "container" --connection-string DefaultEndpointsProtocol=https;AccountName=mystorageaccname;AccountKey=mystorageacckey 

    output of this command is True & it creates a container with private access level (not with container or public access level) but when I do it from the portal it changes to public access level, please help for above if I am missing on something?

    and for this particular activity, i am not seeing activity log saying access level change or any log which can specifically tell it's trying to change access level for container !!

    please help through this.

    Monday, September 16, 2019 9:34 AM

Answers

  •  

    az storage container create -n "teststorage" --public-access "container" --connection-string DefaultEndpointsProtocol=https;AccountName=mystorageaccname;AccountKey=mystorageacckey 

    output of this command is True & it creates a container with private access level (not with container or public access level) but when I do it from the portal it changes to public access level, please help for above if I am missing on something?

    Can you try removing double quotes around container and try:

    --public-access container

    I couldn't reproduce the issue. 

    Executed below command:

    C:\Users\vaibhav>az storage container create -n "testvc" --public-access "container" --connection-string DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net
    

    And noticed that the container had container based public access as required


    Cheers
    Vaibhav
    MCSA (SQL Server 2014)


    Monday, September 16, 2019 10:07 AM

All replies

  •  

    az storage container create -n "teststorage" --public-access "container" --connection-string DefaultEndpointsProtocol=https;AccountName=mystorageaccname;AccountKey=mystorageacckey 

    output of this command is True & it creates a container with private access level (not with container or public access level) but when I do it from the portal it changes to public access level, please help for above if I am missing on something?

    Can you try removing double quotes around container and try:

    --public-access container

    I couldn't reproduce the issue. 

    Executed below command:

    C:\Users\vaibhav>az storage container create -n "testvc" --public-access "container" --connection-string DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net
    

    And noticed that the container had container based public access as required


    Cheers
    Vaibhav
    MCSA (SQL Server 2014)


    Monday, September 16, 2019 10:07 AM
  • Hi ,

    Thanks for the reply .

    Tried the same and yes found out that access level is getting changed.

    but still cant see this activity get logged in activity log in the portal when doing through CLI or python sdk .

    can you please let me know if you have any idea on this .

    Thanks 

    Sheefali

    Monday, September 16, 2019 12:30 PM

  • can you please let me know if you have any idea on this .


    Try running the same command with extra flat at the end i.e.

    --debug

    When I ran it, it showed me the properties for containers that are being set instead of just showing created:true in output. See if it gives any hint. 


    Cheers
    Vaibhav
    MCSA (SQL Server 2014)

    Monday, September 16, 2019 1:07 PM
  • Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Wednesday, September 18, 2019 6:56 AM
    Moderator
  • @sheefali Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Monday, September 23, 2019 7:11 AM
    Moderator

  • can you please let me know if you have any idea on this .

    Thanks 

    Sheefali

    Sheefali, can you revert on how this issue was resolved? Did --debug flag help you identify the root cause?

    Cheers
    Vaibhav
    MCSA (SQL Server 2014)

    Tuesday, September 24, 2019 5:07 AM