@@ -148,13 +148,13 @@ export class ClientContext {
148
148
this . applySessionToken ( request ) ;
149
149
150
150
// read will use ReadEndpoint since it uses GET operation
151
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
152
- diagnosticNode ,
153
- request . resourceType ,
154
- request . operationType ,
155
- 0 ,
156
- options ,
157
- ) ;
151
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
152
+ diagnosticNode : diagnosticNode ,
153
+ resourceType : request . resourceType ,
154
+ operationType : request . operationType ,
155
+ startServiceEndpointIndex : 0 ,
156
+ excludedLocations : options ?. excludedLocations ,
157
+ } ) ;
158
158
const response = await executePlugins (
159
159
diagnosticNode ,
160
160
request ,
@@ -219,13 +219,13 @@ export class ClientContext {
219
219
if ( query !== undefined ) {
220
220
request . method = HTTPMethod . post ;
221
221
}
222
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
223
- diagnosticNode ,
224
- request . resourceType ,
225
- request . operationType ,
226
- 0 ,
227
- options ,
228
- ) ;
222
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
223
+ diagnosticNode : diagnosticNode ,
224
+ resourceType : request . resourceType ,
225
+ operationType : request . operationType ,
226
+ startServiceEndpointIndex : 0 ,
227
+ excludedLocations : options ?. excludedLocations ,
228
+ } ) ;
229
229
request . headers = await this . buildHeaders ( request ) ;
230
230
231
231
if ( startEpk !== undefined && endEpk !== undefined ) {
@@ -282,13 +282,13 @@ export class ClientContext {
282
282
operationType : OperationType . Read ,
283
283
resourceType,
284
284
} ) ;
285
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
286
- diagnosticNode ,
287
- request . resourceType ,
288
- request . operationType ,
289
- 0 ,
290
- options ,
291
- ) ;
285
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
286
+ diagnosticNode : diagnosticNode ,
287
+ resourceType : request . resourceType ,
288
+ operationType : request . operationType ,
289
+ startServiceEndpointIndex : 0 ,
290
+ excludedLocations : options ?. excludedLocations ,
291
+ } ) ;
292
292
request . headers = await this . buildHeaders ( request ) ;
293
293
if ( correlatedActivityId !== undefined ) {
294
294
request . headers [ HttpHeaders . CorrelatedActivityId ] = correlatedActivityId ;
@@ -368,13 +368,13 @@ export class ClientContext {
368
368
request . partitionKeyRangeId = partitionKeyRangeId ;
369
369
this . applySessionToken ( request ) ;
370
370
// deleteResource will use WriteEndpoint since it uses DELETE operation
371
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
372
- diagnosticNode ,
373
- request . resourceType ,
374
- request . operationType ,
375
- 0 ,
376
- options ,
377
- ) ;
371
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
372
+ diagnosticNode : diagnosticNode ,
373
+ resourceType : request . resourceType ,
374
+ operationType : request . operationType ,
375
+ startServiceEndpointIndex : 0 ,
376
+ excludedLocations : options ?. excludedLocations ,
377
+ } ) ;
378
378
const response = await executePlugins (
379
379
diagnosticNode ,
380
380
request ,
@@ -433,13 +433,13 @@ export class ClientContext {
433
433
this . applySessionToken ( request ) ;
434
434
435
435
// patch will use WriteEndpoint
436
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
437
- diagnosticNode ,
438
- request . resourceType ,
439
- request . operationType ,
440
- 0 ,
441
- options ,
442
- ) ;
436
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
437
+ diagnosticNode : diagnosticNode ,
438
+ resourceType : request . resourceType ,
439
+ operationType : request . operationType ,
440
+ startServiceEndpointIndex : 0 ,
441
+ excludedLocations : options ?. excludedLocations ,
442
+ } ) ;
443
443
const response = await executePlugins (
444
444
diagnosticNode ,
445
445
request ,
@@ -494,13 +494,13 @@ export class ClientContext {
494
494
// create will use WriteEndpoint since it uses POST operation
495
495
this . applySessionToken ( request ) ;
496
496
497
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
498
- diagnosticNode ,
499
- request . resourceType ,
500
- request . operationType ,
501
- 0 ,
502
- options ,
503
- ) ;
497
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
498
+ diagnosticNode : diagnosticNode ,
499
+ resourceType : request . resourceType ,
500
+ operationType : request . operationType ,
501
+ startServiceEndpointIndex : 0 ,
502
+ excludedLocations : options ?. excludedLocations ,
503
+ } ) ;
504
504
const response = await executePlugins (
505
505
diagnosticNode ,
506
506
request ,
@@ -602,13 +602,13 @@ export class ClientContext {
602
602
this . applySessionToken ( request ) ;
603
603
604
604
// replace will use WriteEndpoint since it uses PUT operation
605
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
606
- diagnosticNode ,
607
- request . resourceType ,
608
- request . operationType ,
609
- 0 ,
610
- options ,
611
- ) ;
605
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
606
+ diagnosticNode : diagnosticNode ,
607
+ resourceType : request . resourceType ,
608
+ operationType : request . operationType ,
609
+ startServiceEndpointIndex : 0 ,
610
+ excludedLocations : options ?. excludedLocations ,
611
+ } ) ;
612
612
const response = await executePlugins (
613
613
diagnosticNode ,
614
614
request ,
@@ -664,13 +664,13 @@ export class ClientContext {
664
664
this . applySessionToken ( request ) ;
665
665
666
666
// upsert will use WriteEndpoint since it uses POST operation
667
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
668
- diagnosticNode ,
669
- request . resourceType ,
670
- request . operationType ,
671
- 0 ,
672
- options ,
673
- ) ;
667
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
668
+ diagnosticNode : diagnosticNode ,
669
+ resourceType : request . resourceType ,
670
+ operationType : request . operationType ,
671
+ startServiceEndpointIndex : 0 ,
672
+ excludedLocations : options ?. excludedLocations ,
673
+ } ) ;
674
674
const response = await executePlugins (
675
675
diagnosticNode ,
676
676
request ,
@@ -726,13 +726,13 @@ export class ClientContext {
726
726
request . headers = await this . buildHeaders ( request ) ;
727
727
request . partitionKeyRangeId = partitionKeyRangeId ;
728
728
// executeStoredProcedure will use WriteEndpoint since it uses POST operation
729
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
730
- diagnosticNode ,
731
- request . resourceType ,
732
- request . operationType ,
733
- 0 ,
734
- options ,
735
- ) ;
729
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
730
+ diagnosticNode : diagnosticNode ,
731
+ resourceType : request . resourceType ,
732
+ operationType : request . operationType ,
733
+ startServiceEndpointIndex : 0 ,
734
+ excludedLocations : options ?. excludedLocations ,
735
+ } ) ;
736
736
const response = await executePlugins (
737
737
diagnosticNode ,
738
738
request ,
@@ -840,13 +840,13 @@ export class ClientContext {
840
840
841
841
this . applySessionToken ( request ) ;
842
842
843
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
844
- diagnosticNode ,
845
- request . resourceType ,
846
- request . operationType ,
847
- 0 ,
848
- options ,
849
- ) ;
843
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
844
+ diagnosticNode : diagnosticNode ,
845
+ resourceType : request . resourceType ,
846
+ operationType : request . operationType ,
847
+ startServiceEndpointIndex : 0 ,
848
+ excludedLocations : options ?. excludedLocations ,
849
+ } ) ;
850
850
const response = await executePlugins (
851
851
diagnosticNode ,
852
852
request ,
@@ -902,13 +902,13 @@ export class ClientContext {
902
902
request . headers [ HttpHeaders . BatchContinueOnError ] = bulkOptions . continueOnError ?? true ;
903
903
this . applySessionToken ( request ) ;
904
904
905
- request . endpoint = await this . globalEndpointManager . resolveServiceEndpoint (
906
- diagnosticNode ,
907
- request . resourceType ,
908
- request . operationType ,
909
- 0 ,
910
- options ,
911
- ) ;
905
+ request . endpoint = await this . globalEndpointManager . resolveServiceEndpointInternal ( {
906
+ diagnosticNode : diagnosticNode ,
907
+ resourceType : request . resourceType ,
908
+ operationType : request . operationType ,
909
+ startServiceEndpointIndex : 0 ,
910
+ excludedLocations : options ?. excludedLocations ,
911
+ } ) ;
912
912
const response = await executePlugins (
913
913
diagnosticNode ,
914
914
request ,
0 commit comments