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

Add OnlyIfUnchanged parameter to CreateUpdate & Delete operations #9056

Merged
merged 1 commit into from
May 22, 2020

Conversation

sarangan12
Copy link
Member

Specification for this PR
Currently in the SDK we expose ETagOperationOptions which has AccessCondition. It should be removed. We should not expose it. Instead, we need to introduce a boolean value OnlyIfUnchanged. This value must be used to determine if the etag value should be sent to the server or not.

  1. For CreateOrUpdate, this is straight forward: we already take entire models that have an ETag, so you just get that and, if onlyIfUnchanged is true, pass the If-Match header.
  2. For Delete, which takes stringName as inputParameter, Unconditionally delete resources.
  3. For Delete, which takes the model as inputParameter, Use onlyIfUnchanged similar to CreateOrUpdate.

This is related to issue #8517

@xirzec Please review and approve
@ramya-rao-a FYI

@sarangan12 sarangan12 requested a review from xirzec May 21, 2020 08:49
@sarangan12 sarangan12 requested a review from bterlson as a code owner May 21, 2020 08:49
Copy link
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

Approved with a couple minor suggestions

@sarangan12 sarangan12 merged commit 1677605 into Azure:master May 22, 2020
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