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

fix(doc): problematic polling operation for lro delete #1442

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/getstarted/azure-core/step06.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ alias ServiceTraits = SupportsRepeatableRequests &
alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;

interface Widgets {
@sharedRoute
@doc("Gets status of a Widget operation.")
getWidgetOperationStatus is Operations.GetResourceOperationStatus<Widget>;

@sharedRoute
@doc("Gets status of a Widget delete operation.")
getWidgetDeleteOperationStatus is Operations.GetResourceOperationStatus<Widget, never>;

@doc("Fetch a Widget by name.")
getWidget is Operations.ResourceRead<Widget>;

Expand All @@ -28,7 +33,7 @@ interface Widgets {
createOrUpdateWidget is Operations.LongRunningResourceCreateOrUpdate<Widget>;
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft Aug 29, 2024

Choose a reason for hiding this comment

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

@markcowl
Is it OK for us to replace this example with LongRunningResourceCreateOrReplace?

As Azure guideline (DPG)
DO NOT implement PATCH as an LRO. If LRO update semantics are required, implement it using the LRO POST action pattern .

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated according to Weidong's comment. I can roll back to previous comment if needed.


@doc("Delete a Widget asynchronously.")
@pollingOperation(Widgets.getWidgetOperationStatus)
@pollingOperation(Widgets.getWidgetDeleteOperationStatus)
deleteWidget is Operations.LongRunningResourceDelete<Widget>;

@doc("List Widget resources.")
Expand Down
Loading