@@ -353,6 +353,7 @@ public partial class ActionGroup
353353                    var  _finalUri  =  _response . GetFirstHeader ( @"Location" ) ; 
354354                    var  asyncOperation  =  _response . GetFirstHeader ( @"Azure-AsyncOperation" ) ; 
355355                    var  location  =  _response . GetFirstHeader ( @"Location" ) ; 
356+                     var  operationLocation  =  _response . GetFirstHeader ( @"Operation-Location" ) ; 
356357                    while  ( request . Method  ==  System . Net . Http . HttpMethod . Put  &&  _response . StatusCode  ==  global System . Net . HttpStatusCode . OK  ||  _response . StatusCode  ==  global System . Net . HttpStatusCode . Created  ||  _response . StatusCode  ==  global System . Net . HttpStatusCode . Accepted  ) 
357358                    { 
358359                        // delay before making the next polling request 
@@ -365,7 +366,10 @@ public partial class ActionGroup
365366                        if  ( ! global System . String . IsNullOrEmpty ( _response . GetFirstHeader ( @"Location" ) ) )  { 
366367                            location  =  _response . GetFirstHeader ( @"Location" ) ; 
367368                        } 
368-                         var  _uri  =  global System . String . IsNullOrEmpty ( asyncOperation )  ?  global System . String . IsNullOrEmpty ( location )  ?  _originalUri  :  location  :  asyncOperation ; 
369+                         if  ( ! global System . String . IsNullOrEmpty ( _response . GetFirstHeader ( @"Operation-Location" ) ) )  { 
370+                             operationLocation  =  _response . GetFirstHeader ( @"Operation-Location" ) ; 
371+                         } 
372+                         var  _uri  =  global System . String . IsNullOrEmpty ( asyncOperation )  ?  global System . String . IsNullOrEmpty ( location )  ?  global System . String . IsNullOrEmpty ( operationLocation )  ?  _originalUri  :  operationLocation  :  location  :  asyncOperation ; 
369373                        request  =  request . CloneAndDispose ( new  global System . Uri ( _uri ) ,  Microsoft . Azure . PowerShell . Cmdlets . Monitor . ActionGroup . Runtime . Method . Get ) ; 
370374
371375                        // and let's look at the current response body and see if we have some information we can give back to the listener 
@@ -506,6 +510,7 @@ public partial class ActionGroup
506510                    var  _finalUri  =  _response . GetFirstHeader ( @"Location" ) ; 
507511                    var  asyncOperation  =  _response . GetFirstHeader ( @"Azure-AsyncOperation" ) ; 
508512                    var  location  =  _response . GetFirstHeader ( @"Location" ) ; 
513+                     var  operationLocation  =  _response . GetFirstHeader ( @"Operation-Location" ) ; 
509514                    while  ( request . Method  ==  System . Net . Http . HttpMethod . Put  &&  _response . StatusCode  ==  global System . Net . HttpStatusCode . OK  ||  _response . StatusCode  ==  global System . Net . HttpStatusCode . Created  ||  _response . StatusCode  ==  global System . Net . HttpStatusCode . Accepted  ) 
510515                    { 
511516                        // delay before making the next polling request 
@@ -518,7 +523,10 @@ public partial class ActionGroup
518523                        if  ( ! global System . String . IsNullOrEmpty ( _response . GetFirstHeader ( @"Location" ) ) )  { 
519524                            location  =  _response . GetFirstHeader ( @"Location" ) ; 
520525                        } 
521-                         var  _uri  =  global System . String . IsNullOrEmpty ( asyncOperation )  ?  global System . String . IsNullOrEmpty ( location )  ?  _originalUri  :  location  :  asyncOperation ; 
526+                         if  ( ! global System . String . IsNullOrEmpty ( _response . GetFirstHeader ( @"Operation-Location" ) ) )  { 
527+                             operationLocation  =  _response . GetFirstHeader ( @"Operation-Location" ) ; 
528+                         } 
529+                         var  _uri  =  global System . String . IsNullOrEmpty ( asyncOperation )  ?  global System . String . IsNullOrEmpty ( location )  ?  global System . String . IsNullOrEmpty ( operationLocation )  ?  _originalUri  :  operationLocation  :  location  :  asyncOperation ; 
522530                        request  =  request . CloneAndDispose ( new  global System . Uri ( _uri ) ,  Microsoft . Azure . PowerShell . Cmdlets . Monitor . ActionGroup . Runtime . Method . Get ) ; 
523531
524532                        // and let's look at the current response body and see if we have some information we can give back to the listener 
@@ -644,7 +652,7 @@ public partial class ActionGroup
644652            } 
645653        } 
646654
647-         /// <summary>Update a new action group or Update  an existing one.</summary> 
655+         /// <summary>Update a new action group or update  an existing one.</summary> 
648656        /// <param name="subscriptionId">The ID of the target subscription.</param> 
649657        /// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param> 
650658        /// <param name="actionGroupName">The name of the action group.</param> 
@@ -694,7 +702,7 @@ public partial class ActionGroup
694702            } 
695703        } 
696704
697-         /// <summary>Update a new action group or Update  an existing one.</summary> 
705+         /// <summary>Update a new action group or update  an existing one.</summary> 
698706        /// <param name="viaIdentity"></param> 
699707        /// <param name="body">The action group to create or use for the update.</param> 
700708        /// <param name="onOk">a delegate that is called when the remote service returns 200 (OK).</param> 
@@ -754,7 +762,7 @@ public partial class ActionGroup
754762            } 
755763        } 
756764
757-         /// <summary>Update a new action group or Update  an existing one.</summary> 
765+         /// <summary>Update a new action group or update  an existing one.</summary> 
758766        /// <param name="viaIdentity"></param> 
759767        /// <param name="body">The action group to create or use for the update.</param> 
760768        /// <param name="eventListener">an <see cref="Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.IEventListener" /> instance that will receive events.</param> 
@@ -811,7 +819,7 @@ public partial class ActionGroup
811819            } 
812820        } 
813821
814-         /// <summary>Update a new action group or Update  an existing one.</summary> 
822+         /// <summary>Update a new action group or update  an existing one.</summary> 
815823        /// <param name="subscriptionId">The ID of the target subscription.</param> 
816824        /// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param> 
817825        /// <param name="actionGroupName">The name of the action group.</param> 
@@ -860,7 +868,7 @@ public partial class ActionGroup
860868            } 
861869        } 
862870
863-         /// <summary>Update a new action group or Update  an existing one.</summary> 
871+         /// <summary>Update a new action group or update  an existing one.</summary> 
864872        /// <param name="subscriptionId">The ID of the target subscription.</param> 
865873        /// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param> 
866874        /// <param name="actionGroupName">The name of the action group.</param> 
@@ -906,7 +914,7 @@ public partial class ActionGroup
906914            } 
907915        } 
908916
909-         /// <summary>Update a new action group or Update  an existing one.</summary> 
917+         /// <summary>Update a new action group or update  an existing one.</summary> 
910918        /// <param name="subscriptionId">The ID of the target subscription.</param> 
911919        /// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param> 
912920        /// <param name="actionGroupName">The name of the action group.</param> 
0 commit comments