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

allow creating LeaseId from Uuid #1361

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

demoray
Copy link
Contributor

@demoray demoray commented Sep 7, 2023

The documentation of for LeaseId states it must be in the format of a UUID.

x-ms-proposed-lease-id: Optional for acquire, and required for change. Proposed lease ID, in a GUID string format. Blob Storage returns 400 (Invalid request) if the proposed lease ID isn't in the correct format. See Guid Constructor (String) for a list of valid formats.

Right now, users that have a lease id as a Uuid must convert it into a string, then from_str the result.

This allows directly converting to a LeaseId from a Uuid.

ref: https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container?tabs=azure-ad

The documentation of for LeaseId states it must be in the format of a UUID.

> x-ms-proposed-lease-id: <ID>	Optional for acquire, and required for change. Proposed lease ID, in a GUID string format. Blob Storage returns 400 (Invalid request) if the proposed lease ID isn't in the correct format. See Guid Constructor (String) for a list of valid formats.

Right now, users that have a lease id as a Uuid must convert it into a string, then from_str the result.

This allows directly converting to a LeaseId from a Uuid.

ref: https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container?tabs=azure-ad
@demoray demoray merged commit 805336e into Azure:main Sep 8, 2023
16 checks passed
@demoray demoray deleted the allow-creation-of-leaseid-from-uuid branch September 8, 2023 14:36
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.

2 participants