-
Notifications
You must be signed in to change notification settings - Fork 357
/
common_019.proto
1041 lines (899 loc) · 52.5 KB
/
common_019.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Generated by the C++ microgenerator.
// If you make any local changes, they will be lost.
// file:///workspace/generator/discovery/compute_public_google_rest_v1.json
// revision: 20230920
syntax = "proto3";
package google.cloud.cpp.compute.v1;
import "google/cloud/compute/v1/internal/common_029.proto";
import "google/cloud/compute/v1/internal/common_074.proto";
// The specification for allowing client-side cross-origin requests. For more
// information about the W3C recommendation for cross-origin resource sharing
// (CORS), see Fetch API Living Standard.
message CorsPolicy {
// In response to a preflight request, setting this to true indicates that the
// actual request can include user credentials. This field translates to the
// Access-Control-Allow-Credentials header. Default is false.
optional bool allow_credentials = 1;
// Specifies the content for the Access-Control-Allow-Headers header.
repeated string allow_headers = 2;
// Specifies the content for the Access-Control-Allow-Methods header.
repeated string allow_methods = 3;
// Specifies a regular expression that matches allowed origins. For more
// information about the regular expression syntax, see Syntax. An origin is
// allowed if it matches either an item in allowOrigins or an item in
// allowOriginRegexes. Regular expressions can only be used when the
// loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
repeated string allow_origin_regexes = 4;
// Specifies the list of origins that is allowed to do CORS requests. An
// origin is allowed if it matches either an item in allowOrigins or an item
// in allowOriginRegexes.
repeated string allow_origins = 5;
// If true, the setting specifies the CORS policy is disabled. The default
// value of false, which indicates that the CORS policy is in effect.
optional bool disabled = 6;
// Specifies the content for the Access-Control-Expose-Headers header.
repeated string expose_headers = 7;
// Specifies how long results of a preflight request can be cached in seconds.
// This field translates to the Access-Control-Max-Age header.
optional int32 max_age = 8;
}
// UrlMaps A host-matching rule for a URL. If matched, will use the named
// PathMatcher to select the BackendService.
message HostRule {
// An optional description of this resource. Provide this property when you
// create the resource.
optional string description = 1;
// The list of host patterns to match. They must be valid hostnames with
// optional port numbers in the format host:port. * matches any string of
// ([a-z0-9-.]*). In that case, * must be the first character, and if followed
// by anything, the immediate following character must be either - or .. *
// based matching is not supported when the URL map is bound to a target gRPC
// proxy that has the validateForProxyless field set to true.
repeated string hosts = 2;
// The name of the PathMatcher to use to match the path portion of the URL if
// the hostRule matches the URL's host portion.
optional string path_matcher = 3;
}
// Specification for how requests are aborted as part of fault injection.
message HttpFaultAbort {
// The HTTP status code used to abort the request. The value must be from 200
// to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP
// status code according to this mapping table. HTTP status 200 is mapped to
// gRPC status UNKNOWN. Injecting an OK status is currently not supported by
// Traffic Director.
optional uint32 http_status = 1;
// The percentage of traffic for connections, operations, or requests that is
// aborted as part of fault injection. The value must be from 0.0 to 100.0
// inclusive.
optional double percentage = 2;
}
// Specifies the delay introduced by the load balancer before forwarding the
// request to the backend service as part of fault injection.
message HttpFaultDelay {
// Specifies the value of the fixed delay interval.
optional Duration fixed_delay = 1;
// The percentage of traffic for connections, operations, or requests for
// which a delay is introduced as part of fault injection. The value must be
// from 0.0 to 100.0 inclusive.
optional double percentage = 2;
}
// The specification for fault injection introduced into traffic to test the
// resiliency of clients to backend service failure. As part of fault injection,
// when clients send requests to a backend service, delays can be introduced by
// the load balancer on a percentage of requests before sending those request to
// the backend service. Similarly requests from clients can be aborted by the
// load balancer for a percentage of requests.
message HttpFaultInjection {
// The specification for how client requests are aborted as part of fault
// injection.
optional HttpFaultAbort abort = 1;
// The specification for how client requests are delayed as part of fault
// injection, before being sent to a backend service.
optional HttpFaultDelay delay = 2;
}
// The request and response header transformations that take effect before the
// request is passed along to the selected backendService.
message HttpHeaderAction {
// Headers to add to a matching request before forwarding the request to the
// backendService.
repeated HttpHeaderOption request_headers_to_add = 1;
// A list of header names for headers that need to be removed from the request
// before forwarding the request to the backendService.
repeated string request_headers_to_remove = 2;
// Headers to add the response before sending the response back to the client.
repeated HttpHeaderOption response_headers_to_add = 3;
// A list of header names for headers that need to be removed from the
// response before sending the response back to the client.
repeated string response_headers_to_remove = 4;
}
// matchRule criteria for request header matches.
message HttpHeaderMatch {
// The value should exactly match contents of exactMatch. Only one of
// exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or
// rangeMatch must be set.
optional string exact_match = 1;
// The name of the HTTP header to match. For matching against the HTTP
// request's authority, use a headerMatch with the header name ":authority".
// For matching a request's method, use the headerName ":method". When the URL
// map is bound to a target gRPC proxy that has the validateForProxyless field
// set to true, only non-binary user-specified custom metadata and the
// `content-type` header are supported. The following transport-level headers
// cannot be used in header matching rules: `:authority`, `:method`, `:path`,
// `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`,
// `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`,
// `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`.
optional string header_name = 2;
// If set to false, the headerMatch is considered a match if the preceding
// match criteria are met. If set to true, the headerMatch is considered a
// match if the preceding match criteria are NOT met. The default setting is
// false.
optional bool invert_match = 3;
// The value of the header must start with the contents of prefixMatch. Only
// one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or
// rangeMatch must be set.
optional string prefix_match = 4;
// A header with the contents of headerName must exist. The match takes place
// whether or not the request's header has a value. Only one of exactMatch,
// prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be
// set.
optional bool present_match = 5;
// The header value must be an integer and its value must be in the range
// specified in rangeMatch. If the header does not contain an integer, number
// or is empty, the match fails. For example for a range [-5, 0] - -3 will
// match. - 0 will not match. - 0.25 will not match. - -3someString will not
// match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
// presentMatch or rangeMatch must be set. rangeMatch is not supported for
// load balancers that have loadBalancingScheme set to EXTERNAL.
optional Int64RangeMatch range_match = 6;
// The value of the header must match the regular expression specified in
// regexMatch. For more information about regular expression syntax, see
// Syntax. For matching against a port specified in the HTTP request, use a
// headerMatch with headerName set to PORT and a regular expression that
// satisfies the RFC2616 Host header's port specifier. Only one of exactMatch,
// prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be
// set. Regular expressions can only be used when the loadBalancingScheme is
// set to INTERNAL_SELF_MANAGED.
optional string regex_match = 7;
// The value of the header must end with the contents of suffixMatch. Only one
// of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or
// rangeMatch must be set.
optional string suffix_match = 8;
}
// Specification determining how headers are added to requests or responses.
message HttpHeaderOption {
// The name of the header.
optional string header_name = 1;
// The value of the header to add.
optional string header_value = 2;
// If false, headerValue is appended to any values that already exist for the
// header. If true, headerValue is set for the header, discarding any values
// that were set for that header. The default value is false.
optional bool replace = 3;
}
// HttpRouteRuleMatch criteria for a request's query parameter.
message HttpQueryParameterMatch {
// The queryParameterMatch matches if the value of the parameter exactly
// matches the contents of exactMatch. Only one of presentMatch, exactMatch,
// or regexMatch must be set.
optional string exact_match = 1;
// The name of the query parameter to match. The query parameter must exist in
// the request, in the absence of which the request match fails.
optional string name = 2;
// Specifies that the queryParameterMatch matches if the request contains the
// query parameter, irrespective of whether the parameter has a value or not.
// Only one of presentMatch, exactMatch, or regexMatch must be set.
optional bool present_match = 3;
// The queryParameterMatch matches if the value of the parameter matches the
// regular expression specified by regexMatch. For more information about
// regular expression syntax, see Syntax. Only one of presentMatch,
// exactMatch, or regexMatch must be set. Regular expressions can only be used
// when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
optional string regex_match = 4;
}
// Specifies settings for an HTTP redirect.
message HttpRedirectAction {
// The host that is used in the redirect response instead of the one that was
// supplied in the request. The value must be from 1 to 255 characters.
optional string host_redirect = 1;
// If set to true, the URL scheme in the redirected request is set to HTTPS.
// If set to false, the URL scheme of the redirected request remains the same
// as that of the request. This must only be set for URL maps used in
// TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
// The default is set to false.
optional bool https_redirect = 2;
// The path that is used in the redirect response instead of the one that was
// supplied in the request. pathRedirect cannot be supplied together with
// prefixRedirect. Supply one alone or neither. If neither is supplied, the
// path of the original request is used for the redirect. The value must be
// from 1 to 1024 characters.
optional string path_redirect = 3;
// The prefix that replaces the prefixMatch specified in the
// HttpRouteRuleMatch, retaining the remaining portion of the URL before
// redirecting the request. prefixRedirect cannot be supplied together with
// pathRedirect. Supply one alone or neither. If neither is supplied, the path
// of the original request is used for the redirect. The value must be from 1
// to 1024 characters.
optional string prefix_redirect = 4;
// The HTTP Status code to use for this RedirectAction. Supported values are:
// - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to
// 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to
// 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the
// request method is retained. - PERMANENT_REDIRECT, which corresponds to 308.
// In this case, the request method is retained.
// FOUND: Http Status Code 302 - Found.
// MOVED_PERMANENTLY_DEFAULT: Http Status Code 301 - Moved Permanently.
// PERMANENT_REDIRECT: Http Status Code 308 - Permanent Redirect maintaining
// HTTP method.
// SEE_OTHER: Http Status Code 303 - See Other.
// TEMPORARY_REDIRECT: Http Status Code 307 - Temporary Redirect maintaining
// HTTP method.
optional string redirect_response_code = 5;
// If set to true, any accompanying query portion of the original URL is
// removed before redirecting the request. If set to false, the query portion
// of the original URL is retained. The default is set to false.
optional bool strip_query = 6;
}
// The retry policy associates with HttpRouteRule
message HttpRetryPolicy {
// Specifies the allowed number retries. This number must be > 0. If not
// specified, defaults to 1.
optional uint32 num_retries = 1;
// Specifies a non-zero timeout per retry attempt. If not specified, will use
// the timeout set in the HttpRouteAction field. If timeout in the
// HttpRouteAction field is not set, this field uses the largest timeout among
// all backend services associated with the route. Not supported when the URL
// map is bound to a target gRPC proxy that has the validateForProxyless field
// set to true.
optional Duration per_try_timeout = 2;
// Specifies one or more conditions when this retry policy applies. Valid
// values are: - 5xx: retry is attempted if the instance or endpoint responds
// with any 5xx response code, or if the instance or endpoint does not respond
// at all. For example, disconnects, reset, read timeout, connection failure,
// and refused streams. - gateway-error: Similar to 5xx, but only applies to
// response codes 502, 503 or 504. - connect-failure: a retry is attempted on
// failures connecting to the instance or endpoint. For example, connection
// timeouts. - retriable-4xx: a retry is attempted if the instance or endpoint
// responds with a 4xx response code. The only error that you can retry is
// error code 409. - refused-stream: a retry is attempted if the instance or
// endpoint resets the stream with a REFUSED_STREAM error code. This reset
// type indicates that it is safe to retry. - cancelled: a retry is attempted
// if the gRPC status code in the response header is set to cancelled. -
// deadline-exceeded: a retry is attempted if the gRPC status code in the
// response header is set to deadline-exceeded. - internal: a retry is
// attempted if the gRPC status code in the response header is set to
// internal. - resource-exhausted: a retry is attempted if the gRPC status
// code in the response header is set to resource-exhausted. - unavailable: a
// retry is attempted if the gRPC status code in the response header is set to
// unavailable. Only the following codes are supported when the URL map is
// bound to target gRPC proxy that has validateForProxyless field set to true.
// - cancelled - deadline-exceeded - internal - resource-exhausted -
// unavailable
repeated string retry_conditions = 3;
}
message HttpRouteAction {
// The specification for allowing client-side cross-origin requests. For more
// information about the W3C recommendation for cross-origin resource sharing
// (CORS), see Fetch API Living Standard. Not supported when the URL map is
// bound to a target gRPC proxy.
optional CorsPolicy cors_policy = 1;
// The specification for fault injection introduced into traffic to test the
// resiliency of clients to backend service failure. As part of fault
// injection, when clients send requests to a backend service, delays can be
// introduced by a load balancer on a percentage of requests before sending
// those requests to the backend service. Similarly requests from clients can
// be aborted by the load balancer for a percentage of requests. timeout and
// retry_policy is ignored by clients that are configured with a
// fault_injection_policy if: 1. The traffic is generated by fault injection
// AND 2. The fault injection is not a delay fault injection. Fault injection
// is not supported with the classic Application Load Balancer . To see which
// load balancers support fault injection, see Load balancing: Routing and
// traffic management features.
optional HttpFaultInjection fault_injection_policy = 2;
// Specifies the maximum duration (timeout) for streams on the selected route.
// Unlike the timeout field where the timeout duration starts from the time
// the request has been fully processed (known as *end-of-stream*), the
// duration in this field is computed from the beginning of the stream until
// the response has been processed, including all retries. A stream that does
// not complete in this duration is closed. If not specified, this field uses
// the maximum maxStreamDuration value among all backend services associated
// with the route. This field is only allowed if the Url map is used with
// backend services with loadBalancingScheme set to INTERNAL_SELF_MANAGED.
optional Duration max_stream_duration = 3;
// Specifies the policy on how requests intended for the route's backends are
// shadowed to a separate mirrored backend service. The load balancer does not
// wait for responses from the shadow service. Before sending traffic to the
// shadow service, the host / authority header is suffixed with -shadow. Not
// supported when the URL map is bound to a target gRPC proxy that has the
// validateForProxyless field set to true.
optional RequestMirrorPolicy request_mirror_policy = 4;
// Specifies the retry policy associated with this route.
optional HttpRetryPolicy retry_policy = 5;
// Specifies the timeout for the selected route. Timeout is computed from the
// time the request has been fully processed (known as *end-of-stream*) up
// until the response has been processed. Timeout includes all retries. If not
// specified, this field uses the largest timeout among all backend services
// associated with the route. Not supported when the URL map is bound to a
// target gRPC proxy that has validateForProxyless field set to true.
optional Duration timeout = 6;
// The spec to modify the URL of the request, before forwarding the request to
// the matched service. urlRewrite is the only action supported in UrlMaps for
// classic Application Load Balancers. Not supported when the URL map is bound
// to a target gRPC proxy that has the validateForProxyless field set to true.
optional UrlRewrite url_rewrite = 7;
// A list of weighted backend services to send traffic to when a route match
// occurs. The weights determine the fraction of traffic that flows to their
// corresponding backend service. If all traffic needs to go to a single
// backend service, there must be one weightedBackendService with weight set
// to a non-zero number. After a backend service is identified and before
// forwarding the request to the backend service, advanced routing actions
// such as URL rewrites and header transformations are applied depending on
// additional settings specified in this HttpRouteAction.
repeated WeightedBackendService weighted_backend_services = 8;
}
// The HttpRouteRule setting specifies how to match an HTTP request and the
// corresponding routing action that load balancing proxies perform.
message HttpRouteRule {
// The short description conveying the intent of this routeRule. The
// description can have a maximum length of 1024 characters.
optional string description = 1;
// Specifies changes to request and response headers that need to take effect
// for the selected backendService. The headerAction value specified here is
// applied before the matching pathMatchers[].headerAction and after
// pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction
// HeaderAction is not supported for load balancers that have their
// loadBalancingScheme set to EXTERNAL. Not supported when the URL map is
// bound to a target gRPC proxy that has validateForProxyless field set to
// true.
optional HttpHeaderAction header_action = 2;
// The list of criteria for matching attributes of a request to this
// routeRule. This list has OR semantics: the request matches this routeRule
// when any of the matchRules are satisfied. However predicates within a given
// matchRule have AND semantics. All predicates within a matchRule must match
// for the request to match the rule.
repeated HttpRouteRuleMatch match_rules = 3;
// For routeRules within a given pathMatcher, priority determines the order in
// which a load balancer interprets routeRules. RouteRules are evaluated in
// order of priority, from the lowest to highest number. The priority of a
// rule decreases as its number increases (1, 2, 3, N+1). The first rule that
// matches the request is applied. You cannot configure two or more routeRules
// with the same priority. Priority for each rule must be set to a number from
// 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you
// to add or remove rules in the future without affecting the rest of the
// rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority
// numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13
// to 15 in the future without any impact on existing rules.
optional int32 priority = 4;
// In response to a matching matchRule, the load balancer performs advanced
// routing actions, such as URL rewrites and header transformations, before
// forwarding the request to the selected backend. If routeAction specifies
// any weightedBackendServices, service must not be set. Conversely if service
// is set, routeAction cannot contain any weightedBackendServices. Only one of
// urlRedirect, service or routeAction.weightedBackendService must be set. URL
// maps for classic Application Load Balancers only support the urlRewrite
// action within a route rule's routeAction.
optional HttpRouteAction route_action = 5;
// The full or partial URL of the backend service resource to which traffic is
// directed if this rule is matched. If routeAction is also specified,
// advanced routing actions, such as URL rewrites, take effect before sending
// the request to the backend. However, if service is specified, routeAction
// cannot contain any weightedBackendServices. Conversely, if routeAction
// specifies any weightedBackendServices, service must not be specified. Only
// one of urlRedirect, service or routeAction.weightedBackendService must be
// set.
optional string service = 6;
// When this rule is matched, the request is redirected to a URL specified by
// urlRedirect. If urlRedirect is specified, service or routeAction must not
// be set. Not supported when the URL map is bound to a target gRPC proxy.
optional HttpRedirectAction url_redirect = 7;
}
// HttpRouteRuleMatch specifies a set of criteria for matching requests to an
// HttpRouteRule. All specified criteria must be satisfied for a match to occur.
message HttpRouteRuleMatch {
// For satisfying the matchRule condition, the path of the request must
// exactly match the value specified in fullPathMatch after removing any query
// parameters and anchor that may be part of the original URL. fullPathMatch
// must be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch
// or regexMatch must be specified.
optional string full_path_match = 1;
// Specifies a list of header match criteria, all of which must match
// corresponding headers in the request.
repeated HttpHeaderMatch header_matches = 2;
// Specifies that prefixMatch and fullPathMatch matches are case sensitive.
// The default value is false. ignoreCase must not be used with regexMatch.
// Not supported when the URL map is bound to a target gRPC proxy.
optional bool ignore_case = 3;
// Opaque filter criteria used by the load balancer to restrict routing
// configuration to a limited set of xDS compliant clients. In their xDS
// requests to the load balancer, xDS clients present node metadata. When
// there is a match, the relevant routing configuration is made available to
// those proxies. For each metadataFilter in this list, if its
// filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels
// must match the corresponding label provided in the metadata. If its
// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must
// match with corresponding labels provided in the metadata. If multiple
// metadata filters are specified, all of them need to be satisfied in order
// to be considered a match. metadataFilters specified here is applied after
// those specified in ForwardingRule that refers to the UrlMap this
// HttpRouteRuleMatch belongs to. metadataFilters only applies to load
// balancers that have loadBalancingScheme set to INTERNAL_SELF_MANAGED. Not
// supported when the URL map is bound to a target gRPC proxy that has
// validateForProxyless field set to true.
repeated MetadataFilter metadata_filters = 4;
// If specified, the route is a pattern match expression that must match the
// :path header once the query string is removed. A pattern match allows you
// to match - The value must be between 1 and 1024 characters - The pattern
// must start with a leading slash ("/") - There may be no more than 5
// operators in pattern Precisely one of prefix_match, full_path_match,
// regex_match or path_template_match must be set.
optional string path_template_match = 8;
// For satisfying the matchRule condition, the request's path must begin with
// the specified prefixMatch. prefixMatch must begin with a /. The value must
// be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch or
// regexMatch must be specified.
optional string prefix_match = 5;
// Specifies a list of query parameter match criteria, all of which must match
// corresponding query parameters in the request. Not supported when the URL
// map is bound to a target gRPC proxy.
repeated HttpQueryParameterMatch query_parameter_matches = 6;
// For satisfying the matchRule condition, the path of the request must
// satisfy the regular expression specified in regexMatch after removing any
// query parameters and anchor supplied with the original URL. For more
// information about regular expression syntax, see Syntax. Only one of
// prefixMatch, fullPathMatch or regexMatch must be specified. Regular
// expressions can only be used when the loadBalancingScheme is set to
// INTERNAL_SELF_MANAGED.
optional string regex_match = 7;
}
// HttpRouteRuleMatch criteria for field values that must stay within the
// specified integer range.
message Int64RangeMatch {
// The end of the range (exclusive) in signed long integer format.
optional string range_end = 1;
// The start of the range (inclusive) in signed long integer format.
optional string range_start = 2;
}
// A matcher for the path portion of the URL. The BackendService from the
// longest-matched rule will serve the URL. If no rule was matched, the default
// service is used.
message PathMatcher {
// defaultRouteAction takes effect when none of the pathRules or routeRules
// match. The load balancer performs advanced routing actions, such as URL
// rewrites and header transformations, before forwarding the request to the
// selected backend. If defaultRouteAction specifies any
// weightedBackendServices, defaultService must not be set. Conversely if
// defaultService is set, defaultRouteAction cannot contain any
// weightedBackendServices. Only one of defaultRouteAction or
// defaultUrlRedirect must be set. URL maps for classic Application Load
// Balancers only support the urlRewrite action within a path matcher's
// defaultRouteAction.
optional HttpRouteAction default_route_action = 1;
// The full or partial URL to the BackendService resource. This URL is used if
// none of the pathRules or routeRules defined by this PathMatcher are
// matched. For example, the following are all valid URLs to a BackendService
// resource: - https://www.googleapis.com/compute/v1/projects/project
// /global/backendServices/backendService -
// compute/v1/projects/project/global/backendServices/backendService -
// global/backendServices/backendService If defaultRouteAction is also
// specified, advanced routing actions, such as URL rewrites, take effect
// before sending the request to the backend. However, if defaultService is
// specified, defaultRouteAction cannot contain any weightedBackendServices.
// Conversely, if defaultRouteAction specifies any weightedBackendServices,
// defaultService must not be specified. Only one of defaultService,
// defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be
// set. Authorization requires one or more of the following Google IAM
// permissions on the specified resource default_service: -
// compute.backendBuckets.use - compute.backendServices.use
optional string default_service = 2;
// When none of the specified pathRules or routeRules match, the request is
// redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect
// is specified, defaultService or defaultRouteAction must not be set. Not
// supported when the URL map is bound to a target gRPC proxy.
optional HttpRedirectAction default_url_redirect = 3;
// An optional description of this resource. Provide this property when you
// create the resource.
optional string description = 4;
// Specifies changes to request and response headers that need to take effect
// for the selected backend service. HeaderAction specified here are applied
// after the matching HttpRouteRule HeaderAction and before the HeaderAction
// in the UrlMap HeaderAction is not supported for load balancers that have
// their loadBalancingScheme set to EXTERNAL. Not supported when the URL map
// is bound to a target gRPC proxy that has validateForProxyless field set to
// true.
optional HttpHeaderAction header_action = 5;
// The name to which this PathMatcher is referred by the HostRule.
optional string name = 6;
// The list of path rules. Use this list instead of routeRules when routing
// based on simple path matching is all that's required. The order by which
// path rules are specified does not matter. Matches are always done on the
// longest-path-first basis. For example: a pathRule with a path /a/b/c/* will
// match before /a/b/* irrespective of the order in which those paths appear
// in this list. Within a given pathMatcher, only one of pathRules or
// routeRules must be set.
repeated PathRule path_rules = 7;
// The list of HTTP route rules. Use this list instead of pathRules when
// advanced route matching and routing actions are desired. routeRules are
// evaluated in order of priority, from the lowest to highest number. Within a
// given pathMatcher, you can set only one of pathRules or routeRules.
repeated HttpRouteRule route_rules = 8;
}
// A path-matching rule for a URL. If matched, will use the specified
// BackendService to handle the traffic arriving at this URL.
message PathRule {
// The list of path patterns to match. Each must start with / and the only
// place a * is allowed is at the end following a /. The string fed to the
// path matcher does not include any text after the first ? or #, and those
// chars are not allowed here.
repeated string paths = 1;
// In response to a matching path, the load balancer performs advanced routing
// actions, such as URL rewrites and header transformations, before forwarding
// the request to the selected backend. If routeAction specifies any
// weightedBackendServices, service must not be set. Conversely if service is
// set, routeAction cannot contain any weightedBackendServices. Only one of
// routeAction or urlRedirect must be set. URL maps for classic Application
// Load Balancers only support the urlRewrite action within a path rule's
// routeAction.
optional HttpRouteAction route_action = 2;
// The full or partial URL of the backend service resource to which traffic is
// directed if this rule is matched. If routeAction is also specified,
// advanced routing actions, such as URL rewrites, take effect before sending
// the request to the backend. However, if service is specified, routeAction
// cannot contain any weightedBackendServices. Conversely, if routeAction
// specifies any weightedBackendServices, service must not be specified. Only
// one of urlRedirect, service or routeAction.weightedBackendService must be
// set.
optional string service = 3;
// When a path pattern is matched, the request is redirected to a URL
// specified by urlRedirect. If urlRedirect is specified, service or
// routeAction must not be set. Not supported when the URL map is bound to a
// target gRPC proxy.
optional HttpRedirectAction url_redirect = 4;
}
// A policy that specifies how requests intended for the route's backends are
// shadowed to a separate mirrored backend service. The load balancer doesn't
// wait for responses from the shadow service. Before sending traffic to the
// shadow service, the host or authority header is suffixed with -shadow.
message RequestMirrorPolicy {
// The full or partial URL to the BackendService resource being mirrored to.
// The backend service configured for a mirroring policy must reference
// backends that are of the same type as the original backend service matched
// in the URL map. Serverless NEG backends are not currently supported as a
// mirrored backend service.
optional string backend_service = 1;
}
message TestFailure {
// The actual output URL evaluated by a load balancer containing the scheme,
// host, path and query parameters.
optional string actual_output_url = 1;
// Actual HTTP status code for rule with `urlRedirect` calculated by load
// balancer
optional int32 actual_redirect_response_code = 2;
// BackendService or BackendBucket returned by load balancer.
optional string actual_service = 3;
// The expected output URL evaluated by a load balancer containing the scheme,
// host, path and query parameters.
optional string expected_output_url = 4;
// Expected HTTP status code for rule with `urlRedirect` calculated by load
// balancer
optional int32 expected_redirect_response_code = 5;
// Expected BackendService or BackendBucket resource the given URL should be
// mapped to.
optional string expected_service = 6;
// HTTP headers of the request.
repeated UrlMapTestHeader headers = 7;
// Host portion of the URL.
optional string host = 8;
// Path portion including query parameters in the URL.
optional string path = 9;
}
// Represents a URL Map resource. Compute Engine has two URL Map resources: *
// [Global](/compute/docs/reference/rest/v1/urlMaps) *
// [Regional](/compute/docs/reference/rest/v1/regionUrlMaps) A URL map resource
// is a component of certain types of cloud load balancers and Traffic Director:
// * urlMaps are used by global external Application Load Balancers, classic
// Application Load Balancers, and cross-region internal Application Load
// Balancers. * regionUrlMaps are used by internal Application Load Balancers,
// regional external Application Load Balancers and regional internal
// Application Load Balancers. For a list of supported URL map features by the
// load balancer type, see the Load balancing features: Routing and traffic
// management table. For a list of supported URL map features for Traffic
// Director, see the Traffic Director features: Routing and traffic management
// table. This resource defines mappings from hostnames and URL paths to either
// a backend service or a backend bucket. To use the global urlMaps resource,
// the backend service must have a loadBalancingScheme of either EXTERNAL or
// INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service
// must have a loadBalancingScheme of INTERNAL_MANAGED. For more information,
// read URL Map Concepts.
message UrlMap {
// [Output Only] Creation timestamp in RFC3339 text format.
optional string creation_timestamp = 1;
// defaultRouteAction takes effect when none of the hostRules match. The load
// balancer performs advanced routing actions, such as URL rewrites and header
// transformations, before forwarding the request to the selected backend. If
// defaultRouteAction specifies any weightedBackendServices, defaultService
// must not be set. Conversely if defaultService is set, defaultRouteAction
// cannot contain any weightedBackendServices. Only one of defaultRouteAction
// or defaultUrlRedirect must be set. URL maps for classic Application Load
// Balancers only support the urlRewrite action within defaultRouteAction.
// defaultRouteAction has no effect when the URL map is bound to a target gRPC
// proxy that has the validateForProxyless field set to true.
optional HttpRouteAction default_route_action = 2;
// The full or partial URL of the defaultService resource to which traffic is
// directed if none of the hostRules match. If defaultRouteAction is also
// specified, advanced routing actions, such as URL rewrites, take effect
// before sending the request to the backend. However, if defaultService is
// specified, defaultRouteAction cannot contain any weightedBackendServices.
// Conversely, if routeAction specifies any weightedBackendServices, service
// must not be specified. Only one of defaultService, defaultUrlRedirect , or
// defaultRouteAction.weightedBackendService must be set. defaultService has
// no effect when the URL map is bound to a target gRPC proxy that has the
// validateForProxyless field set to true.
optional string default_service = 3;
// When none of the specified hostRules match, the request is redirected to a
// URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified,
// defaultService or defaultRouteAction must not be set. Not supported when
// the URL map is bound to a target gRPC proxy.
optional HttpRedirectAction default_url_redirect = 4;
// An optional description of this resource. Provide this property when you
// create the resource.
optional string description = 5;
// Fingerprint of this resource. A hash of the contents stored in this object.
// This field is used in optimistic locking. This field is ignored when
// inserting a UrlMap. An up-to-date fingerprint must be provided in order to
// update the UrlMap, otherwise the request will fail with error 412
// conditionNotMet. To see the latest fingerprint, make a get() request to
// retrieve a UrlMap.
optional string fingerprint = 6;
// Specifies changes to request and response headers that need to take effect
// for the selected backendService. The headerAction specified here take
// effect after headerAction specified under pathMatcher. headerAction is not
// supported for load balancers that have their loadBalancingScheme set to
// EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy
// that has validateForProxyless field set to true.
optional HttpHeaderAction header_action = 7;
// The list of host rules to use against the URL.
repeated HostRule host_rules = 8;
// [Output Only] The unique identifier for the resource. This identifier is
// defined by the server.
optional string id = 9;
// [Output Only] Type of the resource. Always compute#urlMaps for url maps.
optional string kind = 10;
// Name of the resource. Provided by the client when the resource is created.
// The name must be 1-63 characters long, and comply with RFC1035.
// Specifically, the name must be 1-63 characters long and match the regular
// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
// must be a lowercase letter, and all following characters must be a dash,
// lowercase letter, or digit, except the last character, which cannot be a
// dash.
optional string name = 11;
// The list of named PathMatchers to use against the URL.
repeated PathMatcher path_matchers = 12;
// [Output Only] URL of the region where the regional URL map resides. This
// field is not applicable to global URL maps. You must specify this field as
// part of the HTTP request URL. It is not settable as a field in the request
// body.
optional string region = 13;
// [Output Only] Server-defined URL for the resource.
optional string self_link = 14;
// The list of expected URL mapping tests. Request to update the UrlMap
// succeeds only if all test cases pass. You can specify a maximum of 100
// tests per UrlMap. Not supported when the URL map is bound to a target gRPC
// proxy that has validateForProxyless field set to true.
repeated UrlMapTest tests = 15;
}
// Contains a list of UrlMap resources.
message UrlMapList {
// [Output Only] Unique identifier for the resource; defined by the server.
optional string id = 1;
// A list of UrlMap resources.
repeated UrlMap items = 2;
// Type of resource.
optional string kind = 3;
// [Output Only] This token allows you to get the next page of results for
// list requests. If the number of results is larger than maxResults, use the
// nextPageToken as a value for the query parameter pageToken in the next list
// request. Subsequent list requests will have their own nextPageToken to
// continue paging through the results.
optional string next_page_token = 4;
// [Output Only] Server-defined URL for this resource.
optional string self_link = 5;
message Warning {
// [Output Only] A warning code, if applicable. For example, Compute Engine
// returns NO_RESULTS_ON_PAGE if there are no results in the response.
// CLEANUP_FAILED: Warning about failed cleanup of transient changes made by
// a failed operation.
// DEPRECATED_RESOURCE_USED: A link to a deprecated resource was created.
// DEPRECATED_TYPE_USED: When deploying and at least one of the resources
// has a type marked as deprecated
// DISK_SIZE_LARGER_THAN_IMAGE_SIZE: The user created a boot disk that is
// larger than image size.
// EXPERIMENTAL_TYPE_USED: When deploying and at least one of the resources
// has a type marked as experimental
// EXTERNAL_API_WARNING: Warning that is present in an external api call
// FIELD_VALUE_OVERRIDEN: Warning that value of a field has been overridden.
// Deprecated unused field.
// INJECTED_KERNELS_DEPRECATED: The operation involved use of an injected
// kernel, which is deprecated.
// INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB: A WEIGHTED_MAGLEV backend
// service is associated with a health check that is not of type
// HTTP/HTTPS/HTTP2.
// LARGE_DEPLOYMENT_WARNING: When deploying a deployment with a exceedingly
// large number of resources
// LIST_OVERHEAD_QUOTA_EXCEED: Resource can't be retrieved due to list
// overhead quota exceed which captures the amount of resources filtered out
// by user-defined list filter.
// MISSING_TYPE_DEPENDENCY: A resource depends on a missing type
// NEXT_HOP_ADDRESS_NOT_ASSIGNED: The route's nextHopIp address is not
// assigned to an instance on the network.
// NEXT_HOP_CANNOT_IP_FORWARD: The route's next hop instance cannot ip
// forward.
// NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE: The route's nextHopInstance URL
// refers to an instance that does not have an ipv6 interface on the same
// network as the route.
// NEXT_HOP_INSTANCE_NOT_FOUND: The route's nextHopInstance URL refers to an
// instance that does not exist.
// NEXT_HOP_INSTANCE_NOT_ON_NETWORK: The route's nextHopInstance URL refers
// to an instance that is not on the same network as the route.
// NEXT_HOP_NOT_RUNNING: The route's next hop instance does not have a
// status of RUNNING.
// NOT_CRITICAL_ERROR: Error which is not critical. We decided to continue
// the process despite the mentioned error.
// NO_RESULTS_ON_PAGE: No results are present on a particular list page.
// PARTIAL_SUCCESS: Success is reported, but some results may be missing due
// to errors
// REQUIRED_TOS_AGREEMENT: The user attempted to use a resource that
// requires a TOS they have not accepted.
// RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING: Warning that a resource is in
// use.
// RESOURCE_NOT_DELETED: One or more of the resources set to auto-delete
// could not be deleted because they were in use.
// SCHEMA_VALIDATION_IGNORED: When a resource schema validation is ignored.
// SINGLE_INSTANCE_PROPERTY_TEMPLATE: Instance template used in instance
// group manager is valid as such, but its application does not make a lot
// of sense, because it allows only single instance in instance group.
// UNDECLARED_PROPERTIES: When undeclared properties in the schema are
// present
// UNREACHABLE: A given scope cannot be reached.
optional string code = 1;
message DataItem {
// [Output Only] A key that provides more detail on the warning being
// returned. For example, for warnings where there are no results in a
// list request for a particular zone, this key might be scope and the key
// value might be the zone name. Other examples might be a key indicating
// a deprecated resource and a suggested replacement, or a warning about
// invalid network settings (for example, if an instance attempts to
// perform IP forwarding but is not enabled for IP forwarding).
optional string key = 1;
// [Output Only] A warning data value corresponding to the key.
optional string value = 2;
}
// [Output Only] Metadata about this warning in key: value format. For
// example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
repeated DataItem data = 2;
// [Output Only] A human-readable description of the warning code.
optional string message = 3;
}
// [Output Only] Informational warning message.
optional Warning warning = 6;
}
// Message for the expected URL mappings.
message UrlMapTest {
// Description of this test case.
optional string description = 1;
// The expected output URL evaluated by the load balancer containing the
// scheme, host, path and query parameters. For rules that forward requests to
// backends, the test passes only when expectedOutputUrl matches the request
// forwarded by the load balancer to backends. For rules with urlRewrite, the
// test verifies that the forwarded request matches hostRewrite and
// pathPrefixRewrite in the urlRewrite action. When service is specified,
// expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test
// passes only if expectedOutputUrl matches the URL in the load balancer's
// redirect response. If urlRedirect specifies https_redirect, the test passes
// only if the scheme in expectedOutputUrl is also set to HTTPS. If
// urlRedirect specifies strip_query, the test passes only if
// expectedOutputUrl does not contain any query parameters. expectedOutputUrl
// is optional when service is specified.
optional string expected_output_url = 2;
// For rules with urlRedirect, the test passes only if
// expectedRedirectResponseCode matches the HTTP status code in load
// balancer's redirect response. expectedRedirectResponseCode cannot be set
// when service is set.
optional int32 expected_redirect_response_code = 3;
// HTTP headers for this request. If headers contains a host header, then host
// must also match the header value.
repeated UrlMapTestHeader headers = 4;
// Host portion of the URL. If headers contains a host header, then host must
// also match the header value.
optional string host = 5;
// Path portion of the URL.
optional string path = 6;
// Expected BackendService or BackendBucket resource the given URL should be
// mapped to. The service field cannot be set if expectedRedirectResponseCode
// is set.
optional string service = 7;
}
// HTTP headers used in UrlMapTests.
message UrlMapTestHeader {
// Header name.
optional string name = 1;
// Header value.
optional string value = 2;
}
// Message representing the validation result for a UrlMap.
message UrlMapValidationResult {
repeated string load_errors = 1;
// Whether the given UrlMap can be successfully loaded. If false, 'loadErrors'
// indicates the reasons.
optional bool load_succeeded = 2;
repeated TestFailure test_failures = 3;
// If successfully loaded, this field indicates whether the test passed. If
// false, 'testFailures's indicate the reason of failure.
optional bool test_passed = 4;
}
message UrlMapsValidateResponse {
optional UrlMapValidationResult result = 1;
}
// The spec for modifying the path before sending the request to the matched
// backend service.
message UrlRewrite {
// Before forwarding the request to the selected service, the request's host
// header is replaced with contents of hostRewrite. The value must be from 1
// to 255 characters.
optional string host_rewrite = 1;
// Before forwarding the request to the selected backend service, the matching
// portion of the request's path is replaced by pathPrefixRewrite. The value
// must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 2;
// If specified, the pattern rewrites the URL path (based on the :path
// header) using the HTTP template syntax. A corresponding path_template_match
// must be specified. Any template variables must exist in the