1.3.2.6 State Diagrams for Asynchronous Operations
For asynchronous operations, the valid states are Deleting, Failed, Succeeded, and Updating. In the following state diagram, the caller makes a PUT operation on an asynchronous resource and receives an operationId, which is used to monitor the state of the operation including failure details if a failure occurs.
Figure 4: State diagram for asynchronous PUT and GET operations
In the following state diagram, the caller makes a DELETE operation on an asynchronous resource and receives back the operationId, location, and Retry-After, which are used to monitor the state of the operation including failure details if a failure occurs.
Figure 5: State diagram for asynchronous DELETE operations
Provisioning State changes for Parent/Child resources or dependent resources
Case 1: A parent resource is updated.
The property.provisioningState element of the ancestor resource is in the Updating state until it succeeds or fails, and then is moved to the appropriate final state.
The property.provisioningState element of all descendant resources will be in the same state.
Recursively the property.provisioningState element of all descendant resources of the parent's child resources are updated.
Example 1: If a logicalNetworks resource is updated then its property.provisioningState element is updated along with all subnets resources under it and all ipPools resources under all subnets resources under the original logicalNetworks resource.
Case 2: A descendant resource is updated.
Recursively the property.provisioningState element of the ancestor resource of the descendant resource is updated.
The property.provisioningState element of the descendant resource is updated.
The property.provisioningState element of all descendant resources of the specific descendant resource are updated.
The property.provisioningState element of any other descendant resources of the parent are not updated.
Example 1: If a subnets resource is updated then its property.provisioningState element is updated along with the property.provisioningState element of the parent logicalNetworks resource and all ipPools resources under the specific subnets resource. Any other subnets under the original logicalNetworks resource will not have their property.provisioningState element updated.
Example 2: If an ipPools resource is updated then its property.provisioningState element is updated along with the property.provisioningState element of the parent subnets resource and the property.provisioningState element of the subnets' parent logicalNetworks resource. But if there are any other subnets resources under the logicalNetworks resource and ipPools resources under these subnets resources, their property.provisioningState elements will not be updated.
Note Deleting a child resource is a special case because the child object will have its property.provisioningState element set to Deleting state while its ancestor resource will be set to Updating state until the DELETE operation has succeeded or failed.
Case 3: An asynchronous operation on a resource with dependencies is updated
The property.provisioningState element of the resource is in the Updating state until it succeeds or fails and then is moved to the appropriate final state.
The property.provisioningState element of the dependent resource is not updated.
Example 1: A gateways resource takes a dependency on a GatewayPools resource. Then the GatewayPools resource is updated. The GatewayPools resource's property.provisioningState element will be in the updating state until the asynchronous operation has succeeded for failed but the gateways resource's property.provisioningState is not changed from the current state.