New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider separating container public access from get/set_container_acl #220
Comments
@tjprescott , the backend API for changing public access level and ACL is shared. Refer to https://msdn.microsoft.com/en-us/library/azure/dd179391.aspx. |
@pemari-msft can we know the reason why this issue was closed? Was it won't fix or already fixed or by design? |
Please see @hasonmsft 's comment: |
As an aside, |
Thank you for the response. |
@pemari-msft @hasonmsft we implemented a workaround on our side: https://github.com/Azure/azure-cli/blob/master/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py#L237 I'd like to have you guys reconsider to integrate this approach in the SDK instead. Otherwise, every API usage on clients would have to set the ACL in this approach. |
How can I get the container Public Access value? I can't seem to get it from the GetContainerProperties call. |
Hi @paragsalgaonkar, please use the |
Thank you for your reply @zezha-msft I want to get the access level of a blob or a container, so I need to get programmatically in python whether the access level is set to either 'blob', 'container and blob' or 'private'. Is there a way to get this information? |
hi @paragsalgaonkar, please refer to the sample |
Hey, thank you so much @zezha-msft. |
Hi @paragsalgaonkar, glad to help! 👍 |
Currently if you want to know the public access level of a container, you have to use the
get_container_acl
call. One would reasonably expect thatget_container_acl
would return the ACL only, not the ACL and maybe some other properties too. Public access seems like it would logically be returned by theget_container_properties
call since it is a property of the container itself, whereas the ACL is a list of stored settings for use in generating SAS tokens.Another scenario in which this conflation of the two concepts is painful is when you just want to update the public access policy for a container. This can easily be done in the portal, but if you try:
This will result in wiping out your container's ACL, which almost certainly wasn't your intent. Instead, you have to do a call to
get_container_acl
(even though you don't want to change anything) and then pass the signed identifiers back in to the call toset_container_acl
to perserve them.There isn't a call for
set_container_properties
but it might be good from a usability standpoint to consider creating one and splitting out that functionality.The text was updated successfully, but these errors were encountered: