Skip to content
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

Question regards to getting _models.BlobContainer object of public container #34209

Closed
landscapepainter opened this issue Feb 7, 2024 · 7 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@landscapepainter
Copy link

I'm trying to interact with the public container using the sdk. For the containers I created under my subscription id, I'm using the following script to successfully get the _models.BlobContainer object:

      container = self.storage_client.blob_containers.get(
          self.resource_group_name,
          self.storage_account_name,
          self.name
      )

But for public containers, I cannot find a way to do so. What are some recommended ways to interact with a public container object?

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files) labels Feb 7, 2024
@mccoyp
Copy link
Member

mccoyp commented Feb 7, 2024

Hi @landscapepainter, thank you for opening an issue! It looks like you're using a Storage library, but would you be able to share what package you're using (and which version) specifically?

I'll tag some folks who should be able to help; we'll get back to you as soon as possible.

@mccoyp mccoyp added Service Attention Workflow: This issue is responsible by Azure service team. and removed needs-team-triage Workflow: This issue needs the team to triage. labels Feb 7, 2024
Copy link

github-actions bot commented Feb 7, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 7, 2024
@mccoyp mccoyp added Mgmt This issue is related to a management-plane library. and removed Client This issue points to a problem in the data-plane of the library. labels Feb 7, 2024
@mccoyp mccoyp assigned msyyc and unassigned jalauzon-msft and vincenttran-msft Feb 7, 2024
@landscapepainter
Copy link
Author

landscapepainter commented Feb 8, 2024

Hi @mccoyp @msyyc, I'm currently using the following package:

Name: azure-mgmt-storage
Version: 21.1.0
Summary: Microsoft Azure Storage Management Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: [email protected]
License: MIT License
Location: /opt/conda/envs/sky-dev/lib/python3.9/site-packages
Requires: azure-common, azure-mgmt-core, isodate
Required-by: azure-cli

And the self.storage_client I am using is an instance of from from azure.mgmt.storage import StorageManagementClient

@landscapepainter
Copy link
Author

@msyyc @mccoyp Also, how do I check if the url of the public container provided exists or not?

Thanks for all the great work. I'm currenty working to integrate Azure blob storage into Skypilot: skypilot-org/skypilot#3032

@ChenxiJiang333
Copy link
Member

ChenxiJiang333 commented Feb 18, 2024

Hi @landscapepainter.
For public container, do you mean the container that allows public read access? If so, you can get its data through this sample:

    account_url = "https://<storageaccount>.blob.core.windows.net"
    client = BlobServiceClient(
        #credential=DefaultAzureCredential(), do not pass credential
        account_url=account_url,
    )

    container_client = client.get_container_client(<containername>)

    print(container_client.exists())

    for blob in container_client.list_blobs():
        print(f"blobs: {blob.name}")

But if you also want to modify it, I guess there's no such a way since it's blocked by the limited permission.

@xiangyan99 xiangyan99 added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Feb 29, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Feb 29, 2024
Copy link

Hi @landscapepainter. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

github-actions bot commented Mar 7, 2024

Hi @landscapepainter, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Mar 7, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

7 participants