Skip to content

Virtual Network operations return 200 with Azure-AsyncOperation #12828

@jiasli

Description

@jiasli

The REST spec says 200 is returned for "Update successful":

"responses": {
"200": {
"description": "Update successful. The operation returns the resulting VirtualNetwork resource.",
"schema": {
"$ref": "#/definitions/VirtualNetwork"
}
},

Public doc: https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtualnetworks/createorupdate#response

When I am updating the virtualNetworks, I got 200 with Azure-AsyncOperation in the response header:

> az network vnet create --name myVnetA1 --resource-group myResourceGroupA --location eastus --address-prefix 10.0.0.0/16 --debug

azure.core.pipeline.policies._universal: Request URL: 'https://management.azure.com/subscriptions/414af076-009b-4282-9a0a-acf75bcb037e/resourceGroups/myResourceGroupA/providers/Microsoft.Network/virtualNetworks/myVnetA1?api-version=2020-07-01'
azure.core.pipeline.policies._universal: Request method: 'PUT'

azure.core.pipeline.policies._universal: Response status: 200
azure.core.pipeline.policies._universal: Response headers:
azure.core.pipeline.policies._universal:     'Azure-AsyncOperation': 'https://management.azure.com/subscriptions/414af076-009b-4282-9a0a-acf75bcb037e/providers/Microsoft.Network/locations/eastus/operations/c03bc43c-fe8f-48b7-9060-395483f80590?api-version=2020-07-01'

This is against the document Track asynchronous Azure operations - 200 response shouldn't have Azure-AsyncOperation header. Only 201 or 202 can.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions