Does Azure Bastion Basic support create-only PUT in API version 2024-05-01?

Yogo Koyama 0 Reputation points
2026-11-23T06:15:50.15+00:00

Does Microsoft.Network/bastionHosts Create or Update (2024-05-01) officially support If-None-Match: * or another create-only condition? What response should we expect if the same resource ID already exists, or if a prior create request for that ID has been accepted and is still running?

If there is no create-only guarantee, is there a supported way to verify before sending a PUT that all accepted operations affecting the target Bastion and its Public IP or AzureBastionSubnet have reached a terminal state, including operations whose IDs are unknown to the caller?

Please point to the official API contract or documentation and clarify if either guarantee is unavailable.

Azure Bastion
Azure Bastion

An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Alex Burlachenko 26,135 Reputation points MVP Volunteer Moderator
    2026-11-23T12:24:01.29+00:00

    Yogo Koyama hi & thx for join me at Q&A platform,

    important distinction is between general ARM concurrency behavior and guarantees explicitly documented for the Bastion resource provider. The Bastion Create Or Update API is a PUT operation. Its published contract doesn't explicitly document support for If-None-Match: * as a create-only condition.

    If that condition is supported and enforced, an existing resource should produce 412 Precondition Failed. However, I wouldn't assume this behavior is guaranteed for Microsoft.Network/bastionHosts API 2024-05-01 without confirmation from Microsoft. A normal PUT can create or update the resource. Concurrent operations may produce 409 Conflict, but there's no documented guarantee of a specific response when an earlier creation is still running.

    Regarding your second question, there's no documented atomic API that confirms all operations affecting the Bastion, Public IP, and AzureBastionSubnet have completed, particularly when their operation IDs are unknown.

    Checking provisioningState and Activity Log can help, but neither provides a race-free synchronization guarantee.

    For automation, I'd serialize operations on these resources, track the asynchronous operation URLs returned by ARM, and wait for terminal states before proceeding. A preliminary GET alone isn't sufficient.

    https://learn.microsoft.com/en-us/rest/api/virtualnetwork/bastion-hosts/create-or-update

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations

    For a strict create-only guarantee, I'd request explicit confirmation from the Azure Networking team for this particular API version rather than rely on undocumented behavior.

    Best regards,

    Alex

    💬 P.S. Did this help? Mark it as the solution: it keeps me motivated!

    ➕ Follow me on Q&A for more answers

    📝 And feel free to visit my blog → https://ctrlaltdel.blog/

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.