Skip to content

specify additional conditional headers for blob & container operations #951

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

Merged
merged 3 commits into from
Jul 21, 2022

Conversation

bmc-msft
Copy link
Contributor

@bmc-msft bmc-msft commented Jul 20, 2022

Flush out the rest of the conditional operations headers for blob & container operations

Ref: https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations

With this change, users will be able to do things like:

    let yesterday = Utc::now() - chrono::Duration::days(1);
    blob_client
        .delete()
        .if_modified_since(IfModifiedSinceCondition::Modified(yesterday))
        .into_future()
        .await?;

Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just had some thoughts for us to noodle on, but nothing actionable right now.

headers.add(self.sequence_number_condition);
headers.add(self.if_modified_since_condition);
headers.add(self.if_match_condition);
headers.add(self.if_sequence_number);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could figure out how to apply these headers without having to write this code over and over in different operations.

@rylev rylev merged commit 1b51eed into Azure:main Jul 21, 2022
bmc-msft pushed a commit to bmc-msft/azure-sdk-for-rust that referenced this pull request Jul 21, 2022
@bmc-msft bmc-msft deleted the add-conditional-headers branch July 21, 2022 14:37
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.

Question about blob operations with etag conditions.
2 participants