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

Override the ms-version header? #1290

Closed
simon-mo opened this issue Jun 2, 2023 · 3 comments
Closed

Override the ms-version header? #1290

simon-mo opened this issue Jun 2, 2023 · 3 comments

Comments

@simon-mo
Copy link
Contributor

simon-mo commented Jun 2, 2023

Hi there!

I have an use case that needs a newer version of the VERSION tag than the hard coded version for an Azure block blob API (to get around the size limit of 100MB). Is there any recommendation for overwriting it?

@johnbatty
Copy link
Contributor

Hmm, yes the current API version specified seems pretty old ("2019-12-12"):
https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/storage/src/clients.rs#L25

The docs say...

The current version of Azure Storage is 2023-01-03, and using that version is recommended where possible.

All the available versions are listed here:
https://learn.microsoft.com/en-us/rest/api/storageservices/previous-azure-storage-service-versions

@demoray One option would be to bump the SDK API version to the latest. This obviously has the potential to break API calls if there have been incompatible changes to existing APIs, but I think we are better finding and fixing these (if any) rather than permanently remaining on an ancient API version. Thoughts?

A workaround with the existing SDK would be to define and add a custom Policy to your Blob Service Client that replaces the header version with the version that you need. See here for some background on Pipelines and Policies:

I can share some example code that demonstrates this.

@johnbatty
Copy link
Contributor

See example code here that demonstrates how you can configure the blob service client to modify requests with a custom policy:
https://github.com/Azure/azure-sdk-for-rust/pull/1297/files

@simon-mo
Copy link
Contributor Author

simon-mo commented Jun 9, 2023

Thank you. This will work great!

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

No branches or pull requests

3 participants