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

Move get_account_information operation #1056

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Conversation

rylev
Copy link
Contributor

@rylev rylev commented Aug 31, 2022

Despite this change being relatively large in terms of number of lines of code changed, it's actually very simple. It's composed of two related changes (and the rest is just making the compiler happy):

  • StorageClient::get_account_information was moved to BlobServiceClient. This operation only has to do with the blob storage account and thus should not be on the more general StorageClient. It makes much more sense for it to be in the blob_storage crate.
  • The storage crate was composed of the core module and the account module. The account module only contained the code for the get_account_information operation. Since this has moved to another crate, this module can be deleted which leaves the core module all alone. This PR removes the core module and moves all of its contents to the top level of azure_storage crate.

Users will have to make two changes to their code:

  • Instead of using the StorageClient to get blob storage account info, they'll need to use the BlobServiceClient.
  • If they were importing anything from azure_storage::core, they'll need to just delete core::.

This is the first step in a series of much bigger changes that @gorzell and I are doing together.

@rylev rylev requested a review from bmc-msft August 31, 2022 15:16
@bmc-msft bmc-msft merged commit ccca509 into Azure:main Aug 31, 2022
@cataggar
Copy link
Member

That sounds fine. It does match the documentation.

image

Aside, that operation does not work with OAuth. I learned that the hard way over the weekend. Azure/azure-sdk-for-net#30761 (comment)

https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information#authorization

Note: OAuth-based authorization via an Access Token from AAD/MSI or a User Delegation SAS is not supported with this API.

@rylev rylev deleted the get-blob-account branch August 31, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants