SIGN IN SIGN UP

[Microsoft.AzureResilienceManagement] Model listReportDownloadUrl as an async action (2026-08-31-preview) (#45801)

* Model listReportDownloadUrl as an async action (Microsoft.AzureResilienceManagement)

drills/drillRuns is registered with enableAsyncOperation: true and POST
SynchronizeBeginExtension, so ProviderHub routes every POST action on the
resource type through its async pipeline and always emits 202 before the request
is dispatched to the RP. listReportDownloadUrl was the only ArmResourceActionSync
in the provider, and its swagger declared only 200 and default, so ARM rejected
the platform's own 202 during response validation:

  412 HttpResponsePayloadAPISpecValidationFailed
  INVALID_RESPONSE_CODE at 2026-08-31-preview/openapi.json

enableAsyncOperation is resource-type scoped with no per-action override, so the
action is declared async to match the platform. The action's contract is now
identical in shape to the sibling generateReport action.

The request body also becomes required: ProviderHub's controller emitter does not
honour OptionalRequestBody and generates a null check that throws, so an optional
body meant a spec-compliant caller that omitted it received a 500 rather than the
documented default. There are no callers of this preview action yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6296905e-6100-4914-bb58-0601b5e08293

* Update listReportDownloadUrl example for the async contract

Model validation failed with RESPONSE_STATUS_CODE_NOT_IN_EXAMPLE because the
example still documented only the 200 response. Adds the 202 response with the
location header and the now-required operation-id header parameter, matching the
sibling DrillRuns_GenerateReport example.

Edits the source example under examples/2026-08-31-preview (examples-dir in
tspconfig.yaml); the copy under preview/2026-08-31-preview/examples is emitter
output regenerated by tsp compile.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6296905e-6100-4914-bb58-0601b5e08293

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6296905e-6100-4914-bb58-0601b5e08293
A
Arpit Jain committed
232716e16c4b24af7939009d2933562da40e63df
Parent: a6abb3b
Committed by GitHub <noreply@github.com> on 8/26/2026, 5:50:06 AM