google-apis-networkservices_v1 0.10.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/apis/networkservices_v1/classes.rb +1923 -13
- data/lib/google/apis/networkservices_v1/gem_version.rb +3 -3
- data/lib/google/apis/networkservices_v1/representations.rb +838 -74
- data/lib/google/apis/networkservices_v1/service.rb +1488 -170
- metadata +5 -5
@@ -429,6 +429,1316 @@ module Google
|
|
429
429
|
end
|
430
430
|
end
|
431
431
|
|
432
|
+
# Gateway represents the configuration for a proxy, typically a load balancer.
|
433
|
+
# It captures the ip:port over which the services are exposed by the proxy,
|
434
|
+
# along with any policy configurations. Routes have reference to to Gateways to
|
435
|
+
# dictate how requests should be routed by this Gateway.
|
436
|
+
class Gateway
|
437
|
+
include Google::Apis::Core::Hashable
|
438
|
+
|
439
|
+
# Output only. The timestamp when the resource was created.
|
440
|
+
# Corresponds to the JSON property `createTime`
|
441
|
+
# @return [String]
|
442
|
+
attr_accessor :create_time
|
443
|
+
|
444
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
445
|
+
# Corresponds to the JSON property `description`
|
446
|
+
# @return [String]
|
447
|
+
attr_accessor :description
|
448
|
+
|
449
|
+
# Optional. Set of label tags associated with the Gateway resource.
|
450
|
+
# Corresponds to the JSON property `labels`
|
451
|
+
# @return [Hash<String,String>]
|
452
|
+
attr_accessor :labels
|
453
|
+
|
454
|
+
# Required. Name of the Gateway resource. It matches pattern `projects/*/
|
455
|
+
# locations/*/gateways/`.
|
456
|
+
# Corresponds to the JSON property `name`
|
457
|
+
# @return [String]
|
458
|
+
attr_accessor :name
|
459
|
+
|
460
|
+
# Required. One or more ports that the Gateway must receive traffic on. The
|
461
|
+
# proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports
|
462
|
+
# specified below.
|
463
|
+
# Corresponds to the JSON property `ports`
|
464
|
+
# @return [Array<Fixnum>]
|
465
|
+
attr_accessor :ports
|
466
|
+
|
467
|
+
# Required. Immutable. Scope determines how configuration across multiple
|
468
|
+
# Gateway instances are merged. The configuration for multiple Gateway instances
|
469
|
+
# with the same scope will be merged as presented as a single coniguration to
|
470
|
+
# the proxy/load balancer. Max length 64 characters. Scope should start with a
|
471
|
+
# letter and can only have letters, numbers, hyphens.
|
472
|
+
# Corresponds to the JSON property `scope`
|
473
|
+
# @return [String]
|
474
|
+
attr_accessor :scope
|
475
|
+
|
476
|
+
# Output only. Server-defined URL of this resource
|
477
|
+
# Corresponds to the JSON property `selfLink`
|
478
|
+
# @return [String]
|
479
|
+
attr_accessor :self_link
|
480
|
+
|
481
|
+
# Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS
|
482
|
+
# traffic is terminated. If empty, TLS termination is disabled.
|
483
|
+
# Corresponds to the JSON property `serverTlsPolicy`
|
484
|
+
# @return [String]
|
485
|
+
attr_accessor :server_tls_policy
|
486
|
+
|
487
|
+
# Immutable. The type of the customer managed gateway.
|
488
|
+
# Corresponds to the JSON property `type`
|
489
|
+
# @return [String]
|
490
|
+
attr_accessor :type
|
491
|
+
|
492
|
+
# Output only. The timestamp when the resource was updated.
|
493
|
+
# Corresponds to the JSON property `updateTime`
|
494
|
+
# @return [String]
|
495
|
+
attr_accessor :update_time
|
496
|
+
|
497
|
+
def initialize(**args)
|
498
|
+
update!(**args)
|
499
|
+
end
|
500
|
+
|
501
|
+
# Update properties of this object
|
502
|
+
def update!(**args)
|
503
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
504
|
+
@description = args[:description] if args.key?(:description)
|
505
|
+
@labels = args[:labels] if args.key?(:labels)
|
506
|
+
@name = args[:name] if args.key?(:name)
|
507
|
+
@ports = args[:ports] if args.key?(:ports)
|
508
|
+
@scope = args[:scope] if args.key?(:scope)
|
509
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
510
|
+
@server_tls_policy = args[:server_tls_policy] if args.key?(:server_tls_policy)
|
511
|
+
@type = args[:type] if args.key?(:type)
|
512
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
# GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or
|
517
|
+
# Gateway resource is routed.
|
518
|
+
class GrpcRoute
|
519
|
+
include Google::Apis::Core::Hashable
|
520
|
+
|
521
|
+
# Output only. The timestamp when the resource was created.
|
522
|
+
# Corresponds to the JSON property `createTime`
|
523
|
+
# @return [String]
|
524
|
+
attr_accessor :create_time
|
525
|
+
|
526
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
527
|
+
# Corresponds to the JSON property `description`
|
528
|
+
# @return [String]
|
529
|
+
attr_accessor :description
|
530
|
+
|
531
|
+
# Optional. Gateways defines a list of gateways this GrpcRoute is attached to,
|
532
|
+
# as one of the routing rules to route the requests served by the gateway. Each
|
533
|
+
# gateway reference should match the pattern: `projects/*/locations/global/
|
534
|
+
# gateways/`
|
535
|
+
# Corresponds to the JSON property `gateways`
|
536
|
+
# @return [Array<String>]
|
537
|
+
attr_accessor :gateways
|
538
|
+
|
539
|
+
# Required. Service hostnames with an optional port for which this route
|
540
|
+
# describes traffic. Format: [:] Hostname is the fully qualified domain name of
|
541
|
+
# a network host. This matches the RFC 1123 definition of a hostname with 2
|
542
|
+
# notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a
|
543
|
+
# wildcard label (*.). The wildcard label must appear by itself as the first
|
544
|
+
# label. Hostname can be "precise" which is a domain name without the
|
545
|
+
# terminating dot of a network host (e.g. "foo.example.com") or "wildcard",
|
546
|
+
# which is a domain name prefixed with a single wildcard label (e.g. *.example.
|
547
|
+
# com). Note that as per RFC1035 and RFC1123, a label must consist of lower case
|
548
|
+
# alphanumeric characters or '-', and must start and end with an alphanumeric
|
549
|
+
# character. No other punctuation is allowed. The routes associated with a Mesh
|
550
|
+
# or Gateway must have unique hostnames. If you attempt to attach multiple
|
551
|
+
# routes with conflicting hostnames, the configuration will be rejected. For
|
552
|
+
# example, while it is acceptable for routes for the hostnames "*.foo.bar.com"
|
553
|
+
# and "*.bar.com" to be associated with the same route, it is not possible to
|
554
|
+
# associate two routes both with "*.bar.com" or both with "bar.com". If a port
|
555
|
+
# is specified, then gRPC clients must use the channel URI with the port to
|
556
|
+
# match this rule (i.e. "xds:///service:123"), otherwise they must supply the
|
557
|
+
# URI without a port (i.e. "xds:///service").
|
558
|
+
# Corresponds to the JSON property `hostnames`
|
559
|
+
# @return [Array<String>]
|
560
|
+
attr_accessor :hostnames
|
561
|
+
|
562
|
+
# Optional. Set of label tags associated with the GrpcRoute resource.
|
563
|
+
# Corresponds to the JSON property `labels`
|
564
|
+
# @return [Hash<String,String>]
|
565
|
+
attr_accessor :labels
|
566
|
+
|
567
|
+
# Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as
|
568
|
+
# one of the routing rules to route the requests served by the mesh. Each mesh
|
569
|
+
# reference should match the pattern: `projects/*/locations/global/meshes/`
|
570
|
+
# Corresponds to the JSON property `meshes`
|
571
|
+
# @return [Array<String>]
|
572
|
+
attr_accessor :meshes
|
573
|
+
|
574
|
+
# Required. Name of the GrpcRoute resource. It matches pattern `projects/*/
|
575
|
+
# locations/global/grpcRoutes/`
|
576
|
+
# Corresponds to the JSON property `name`
|
577
|
+
# @return [String]
|
578
|
+
attr_accessor :name
|
579
|
+
|
580
|
+
# Required. A list of detailed rules defining how to route traffic. Within a
|
581
|
+
# single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching
|
582
|
+
# GrpcRoute.RouteRule will be executed. At least one rule must be supplied.
|
583
|
+
# Corresponds to the JSON property `rules`
|
584
|
+
# @return [Array<Google::Apis::NetworkservicesV1::GrpcRouteRouteRule>]
|
585
|
+
attr_accessor :rules
|
586
|
+
|
587
|
+
# Output only. Server-defined URL of this resource
|
588
|
+
# Corresponds to the JSON property `selfLink`
|
589
|
+
# @return [String]
|
590
|
+
attr_accessor :self_link
|
591
|
+
|
592
|
+
# Output only. The timestamp when the resource was updated.
|
593
|
+
# Corresponds to the JSON property `updateTime`
|
594
|
+
# @return [String]
|
595
|
+
attr_accessor :update_time
|
596
|
+
|
597
|
+
def initialize(**args)
|
598
|
+
update!(**args)
|
599
|
+
end
|
600
|
+
|
601
|
+
# Update properties of this object
|
602
|
+
def update!(**args)
|
603
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
604
|
+
@description = args[:description] if args.key?(:description)
|
605
|
+
@gateways = args[:gateways] if args.key?(:gateways)
|
606
|
+
@hostnames = args[:hostnames] if args.key?(:hostnames)
|
607
|
+
@labels = args[:labels] if args.key?(:labels)
|
608
|
+
@meshes = args[:meshes] if args.key?(:meshes)
|
609
|
+
@name = args[:name] if args.key?(:name)
|
610
|
+
@rules = args[:rules] if args.key?(:rules)
|
611
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
612
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
613
|
+
end
|
614
|
+
end
|
615
|
+
|
616
|
+
# The destination to which traffic will be routed.
|
617
|
+
class GrpcRouteDestination
|
618
|
+
include Google::Apis::Core::Hashable
|
619
|
+
|
620
|
+
# Required. The URL of a destination service to which to route traffic. Must
|
621
|
+
# refer to either a BackendService or ServiceDirectoryService.
|
622
|
+
# Corresponds to the JSON property `serviceName`
|
623
|
+
# @return [String]
|
624
|
+
attr_accessor :service_name
|
625
|
+
|
626
|
+
# Optional. Specifies the proportion of requests forwarded to the backend
|
627
|
+
# referenced by the serviceName field. This is computed as: weight/Sum(weights
|
628
|
+
# in this destination list). For non-zero values, there may be some epsilon from
|
629
|
+
# the exact proportion defined here depending on the precision an implementation
|
630
|
+
# supports. If only one serviceName is specified and it has a weight greater
|
631
|
+
# than 0, 100% of the traffic is forwarded to that backend. If weights are
|
632
|
+
# specified for any one service name, they need to be specified for all of them.
|
633
|
+
# If weights are unspecified for all services, then, traffic is distributed in
|
634
|
+
# equal proportions to all of them.
|
635
|
+
# Corresponds to the JSON property `weight`
|
636
|
+
# @return [Fixnum]
|
637
|
+
attr_accessor :weight
|
638
|
+
|
639
|
+
def initialize(**args)
|
640
|
+
update!(**args)
|
641
|
+
end
|
642
|
+
|
643
|
+
# Update properties of this object
|
644
|
+
def update!(**args)
|
645
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
646
|
+
@weight = args[:weight] if args.key?(:weight)
|
647
|
+
end
|
648
|
+
end
|
649
|
+
|
650
|
+
# The specification for fault injection introduced into traffic to test the
|
651
|
+
# resiliency of clients to destination service failure. As part of fault
|
652
|
+
# injection, when clients send requests to a destination, delays can be
|
653
|
+
# introduced on a percentage of requests before sending those requests to the
|
654
|
+
# destination service. Similarly requests from clients can be aborted by for a
|
655
|
+
# percentage of requests.
|
656
|
+
class GrpcRouteFaultInjectionPolicy
|
657
|
+
include Google::Apis::Core::Hashable
|
658
|
+
|
659
|
+
# Specification of how client requests are aborted as part of fault injection
|
660
|
+
# before being sent to a destination.
|
661
|
+
# Corresponds to the JSON property `abort`
|
662
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteFaultInjectionPolicyAbort]
|
663
|
+
attr_accessor :abort
|
664
|
+
|
665
|
+
# Specification of how client requests are delayed as part of fault injection
|
666
|
+
# before being sent to a destination.
|
667
|
+
# Corresponds to the JSON property `delay`
|
668
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteFaultInjectionPolicyDelay]
|
669
|
+
attr_accessor :delay
|
670
|
+
|
671
|
+
def initialize(**args)
|
672
|
+
update!(**args)
|
673
|
+
end
|
674
|
+
|
675
|
+
# Update properties of this object
|
676
|
+
def update!(**args)
|
677
|
+
@abort = args[:abort] if args.key?(:abort)
|
678
|
+
@delay = args[:delay] if args.key?(:delay)
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
682
|
+
# Specification of how client requests are aborted as part of fault injection
|
683
|
+
# before being sent to a destination.
|
684
|
+
class GrpcRouteFaultInjectionPolicyAbort
|
685
|
+
include Google::Apis::Core::Hashable
|
686
|
+
|
687
|
+
# The HTTP status code used to abort the request. The value must be between 200
|
688
|
+
# and 599 inclusive.
|
689
|
+
# Corresponds to the JSON property `httpStatus`
|
690
|
+
# @return [Fixnum]
|
691
|
+
attr_accessor :http_status
|
692
|
+
|
693
|
+
# The percentage of traffic which will be aborted. The value must be between [0,
|
694
|
+
# 100]
|
695
|
+
# Corresponds to the JSON property `percentage`
|
696
|
+
# @return [Fixnum]
|
697
|
+
attr_accessor :percentage
|
698
|
+
|
699
|
+
def initialize(**args)
|
700
|
+
update!(**args)
|
701
|
+
end
|
702
|
+
|
703
|
+
# Update properties of this object
|
704
|
+
def update!(**args)
|
705
|
+
@http_status = args[:http_status] if args.key?(:http_status)
|
706
|
+
@percentage = args[:percentage] if args.key?(:percentage)
|
707
|
+
end
|
708
|
+
end
|
709
|
+
|
710
|
+
# Specification of how client requests are delayed as part of fault injection
|
711
|
+
# before being sent to a destination.
|
712
|
+
class GrpcRouteFaultInjectionPolicyDelay
|
713
|
+
include Google::Apis::Core::Hashable
|
714
|
+
|
715
|
+
# Specify a fixed delay before forwarding the request.
|
716
|
+
# Corresponds to the JSON property `fixedDelay`
|
717
|
+
# @return [String]
|
718
|
+
attr_accessor :fixed_delay
|
719
|
+
|
720
|
+
# The percentage of traffic on which delay will be injected. The value must be
|
721
|
+
# between [0, 100]
|
722
|
+
# Corresponds to the JSON property `percentage`
|
723
|
+
# @return [Fixnum]
|
724
|
+
attr_accessor :percentage
|
725
|
+
|
726
|
+
def initialize(**args)
|
727
|
+
update!(**args)
|
728
|
+
end
|
729
|
+
|
730
|
+
# Update properties of this object
|
731
|
+
def update!(**args)
|
732
|
+
@fixed_delay = args[:fixed_delay] if args.key?(:fixed_delay)
|
733
|
+
@percentage = args[:percentage] if args.key?(:percentage)
|
734
|
+
end
|
735
|
+
end
|
736
|
+
|
737
|
+
# A match against a collection of headers.
|
738
|
+
class GrpcRouteHeaderMatch
|
739
|
+
include Google::Apis::Core::Hashable
|
740
|
+
|
741
|
+
# Required. The key of the header.
|
742
|
+
# Corresponds to the JSON property `key`
|
743
|
+
# @return [String]
|
744
|
+
attr_accessor :key
|
745
|
+
|
746
|
+
# Optional. Specifies how to match against the value of the header. If not
|
747
|
+
# specified, a default value of EXACT is used.
|
748
|
+
# Corresponds to the JSON property `type`
|
749
|
+
# @return [String]
|
750
|
+
attr_accessor :type
|
751
|
+
|
752
|
+
# Required. The value of the header.
|
753
|
+
# Corresponds to the JSON property `value`
|
754
|
+
# @return [String]
|
755
|
+
attr_accessor :value
|
756
|
+
|
757
|
+
def initialize(**args)
|
758
|
+
update!(**args)
|
759
|
+
end
|
760
|
+
|
761
|
+
# Update properties of this object
|
762
|
+
def update!(**args)
|
763
|
+
@key = args[:key] if args.key?(:key)
|
764
|
+
@type = args[:type] if args.key?(:type)
|
765
|
+
@value = args[:value] if args.key?(:value)
|
766
|
+
end
|
767
|
+
end
|
768
|
+
|
769
|
+
# Specifies a match against a method.
|
770
|
+
class GrpcRouteMethodMatch
|
771
|
+
include Google::Apis::Core::Hashable
|
772
|
+
|
773
|
+
# Optional. Specifies that matches are case sensitive. The default value is true.
|
774
|
+
# case_sensitive must not be used with a type of REGULAR_EXPRESSION.
|
775
|
+
# Corresponds to the JSON property `caseSensitive`
|
776
|
+
# @return [Boolean]
|
777
|
+
attr_accessor :case_sensitive
|
778
|
+
alias_method :case_sensitive?, :case_sensitive
|
779
|
+
|
780
|
+
# Required. Name of the method to match against. If unspecified, will match all
|
781
|
+
# methods.
|
782
|
+
# Corresponds to the JSON property `grpcMethod`
|
783
|
+
# @return [String]
|
784
|
+
attr_accessor :grpc_method
|
785
|
+
|
786
|
+
# Required. Name of the service to match against. If unspecified, will match all
|
787
|
+
# services.
|
788
|
+
# Corresponds to the JSON property `grpcService`
|
789
|
+
# @return [String]
|
790
|
+
attr_accessor :grpc_service
|
791
|
+
|
792
|
+
# Optional. Specifies how to match against the name. If not specified, a default
|
793
|
+
# value of "EXACT" is used.
|
794
|
+
# Corresponds to the JSON property `type`
|
795
|
+
# @return [String]
|
796
|
+
attr_accessor :type
|
797
|
+
|
798
|
+
def initialize(**args)
|
799
|
+
update!(**args)
|
800
|
+
end
|
801
|
+
|
802
|
+
# Update properties of this object
|
803
|
+
def update!(**args)
|
804
|
+
@case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
|
805
|
+
@grpc_method = args[:grpc_method] if args.key?(:grpc_method)
|
806
|
+
@grpc_service = args[:grpc_service] if args.key?(:grpc_service)
|
807
|
+
@type = args[:type] if args.key?(:type)
|
808
|
+
end
|
809
|
+
end
|
810
|
+
|
811
|
+
# The specifications for retries.
|
812
|
+
class GrpcRouteRetryPolicy
|
813
|
+
include Google::Apis::Core::Hashable
|
814
|
+
|
815
|
+
# Specifies the allowed number of retries. This number must be > 0. If not
|
816
|
+
# specpfied, default to 1.
|
817
|
+
# Corresponds to the JSON property `numRetries`
|
818
|
+
# @return [Fixnum]
|
819
|
+
attr_accessor :num_retries
|
820
|
+
|
821
|
+
# - connect-failure: Router will retry on failures connecting to Backend
|
822
|
+
# Services, for example due to connection timeouts. - refused-stream: Router
|
823
|
+
# will retry if the backend service resets the stream with a REFUSED_STREAM
|
824
|
+
# error code. This reset type indicates that it is safe to retry. - cancelled:
|
825
|
+
# Router will retry if the gRPC status code in the response header is set to
|
826
|
+
# cancelled - deadline-exceeded: Router will retry if the gRPC status code in
|
827
|
+
# the response header is set to deadline-exceeded - resource-exhausted: Router
|
828
|
+
# will retry if the gRPC status code in the response header is set to resource-
|
829
|
+
# exhausted - unavailable: Router will retry if the gRPC status code in the
|
830
|
+
# response header is set to unavailable
|
831
|
+
# Corresponds to the JSON property `retryConditions`
|
832
|
+
# @return [Array<String>]
|
833
|
+
attr_accessor :retry_conditions
|
834
|
+
|
835
|
+
def initialize(**args)
|
836
|
+
update!(**args)
|
837
|
+
end
|
838
|
+
|
839
|
+
# Update properties of this object
|
840
|
+
def update!(**args)
|
841
|
+
@num_retries = args[:num_retries] if args.key?(:num_retries)
|
842
|
+
@retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
|
843
|
+
end
|
844
|
+
end
|
845
|
+
|
846
|
+
# Specifies how to route matched traffic.
|
847
|
+
class GrpcRouteRouteAction
|
848
|
+
include Google::Apis::Core::Hashable
|
849
|
+
|
850
|
+
# Optional. The destination services to which traffic should be forwarded. If
|
851
|
+
# multiple destinations are specified, traffic will be split between Backend
|
852
|
+
# Service(s) according to the weight field of these destinations.
|
853
|
+
# Corresponds to the JSON property `destinations`
|
854
|
+
# @return [Array<Google::Apis::NetworkservicesV1::GrpcRouteDestination>]
|
855
|
+
attr_accessor :destinations
|
856
|
+
|
857
|
+
# The specification for fault injection introduced into traffic to test the
|
858
|
+
# resiliency of clients to destination service failure. As part of fault
|
859
|
+
# injection, when clients send requests to a destination, delays can be
|
860
|
+
# introduced on a percentage of requests before sending those requests to the
|
861
|
+
# destination service. Similarly requests from clients can be aborted by for a
|
862
|
+
# percentage of requests.
|
863
|
+
# Corresponds to the JSON property `faultInjectionPolicy`
|
864
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteFaultInjectionPolicy]
|
865
|
+
attr_accessor :fault_injection_policy
|
866
|
+
|
867
|
+
# The specifications for retries.
|
868
|
+
# Corresponds to the JSON property `retryPolicy`
|
869
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteRetryPolicy]
|
870
|
+
attr_accessor :retry_policy
|
871
|
+
|
872
|
+
# Optional. Specifies the timeout for selected route. Timeout is computed from
|
873
|
+
# the time the request has been fully processed (i.e. end of stream) up until
|
874
|
+
# the response has been completely processed. Timeout includes all retries.
|
875
|
+
# Corresponds to the JSON property `timeout`
|
876
|
+
# @return [String]
|
877
|
+
attr_accessor :timeout
|
878
|
+
|
879
|
+
def initialize(**args)
|
880
|
+
update!(**args)
|
881
|
+
end
|
882
|
+
|
883
|
+
# Update properties of this object
|
884
|
+
def update!(**args)
|
885
|
+
@destinations = args[:destinations] if args.key?(:destinations)
|
886
|
+
@fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
|
887
|
+
@retry_policy = args[:retry_policy] if args.key?(:retry_policy)
|
888
|
+
@timeout = args[:timeout] if args.key?(:timeout)
|
889
|
+
end
|
890
|
+
end
|
891
|
+
|
892
|
+
# Criteria for matching traffic. A RouteMatch will be considered to match when
|
893
|
+
# all supplied fields match.
|
894
|
+
class GrpcRouteRouteMatch
|
895
|
+
include Google::Apis::Core::Hashable
|
896
|
+
|
897
|
+
# Optional. Specifies a collection of headers to match.
|
898
|
+
# Corresponds to the JSON property `headers`
|
899
|
+
# @return [Array<Google::Apis::NetworkservicesV1::GrpcRouteHeaderMatch>]
|
900
|
+
attr_accessor :headers
|
901
|
+
|
902
|
+
# Specifies a match against a method.
|
903
|
+
# Corresponds to the JSON property `method`
|
904
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteMethodMatch]
|
905
|
+
attr_accessor :method_prop
|
906
|
+
|
907
|
+
def initialize(**args)
|
908
|
+
update!(**args)
|
909
|
+
end
|
910
|
+
|
911
|
+
# Update properties of this object
|
912
|
+
def update!(**args)
|
913
|
+
@headers = args[:headers] if args.key?(:headers)
|
914
|
+
@method_prop = args[:method_prop] if args.key?(:method_prop)
|
915
|
+
end
|
916
|
+
end
|
917
|
+
|
918
|
+
# Describes how to route traffic.
|
919
|
+
class GrpcRouteRouteRule
|
920
|
+
include Google::Apis::Core::Hashable
|
921
|
+
|
922
|
+
# Specifies how to route matched traffic.
|
923
|
+
# Corresponds to the JSON property `action`
|
924
|
+
# @return [Google::Apis::NetworkservicesV1::GrpcRouteRouteAction]
|
925
|
+
attr_accessor :action
|
926
|
+
|
927
|
+
# Optional. Matches define conditions used for matching the rule against
|
928
|
+
# incoming gRPC requests. Each match is independent, i.e. this rule will be
|
929
|
+
# matched if ANY one of the matches is satisfied. If no matches field is
|
930
|
+
# specified, this rule will unconditionally match traffic.
|
931
|
+
# Corresponds to the JSON property `matches`
|
932
|
+
# @return [Array<Google::Apis::NetworkservicesV1::GrpcRouteRouteMatch>]
|
933
|
+
attr_accessor :matches
|
934
|
+
|
935
|
+
def initialize(**args)
|
936
|
+
update!(**args)
|
937
|
+
end
|
938
|
+
|
939
|
+
# Update properties of this object
|
940
|
+
def update!(**args)
|
941
|
+
@action = args[:action] if args.key?(:action)
|
942
|
+
@matches = args[:matches] if args.key?(:matches)
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
# HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh
|
947
|
+
# or Gateway resource.
|
948
|
+
class HttpRoute
|
949
|
+
include Google::Apis::Core::Hashable
|
950
|
+
|
951
|
+
# Output only. The timestamp when the resource was created.
|
952
|
+
# Corresponds to the JSON property `createTime`
|
953
|
+
# @return [String]
|
954
|
+
attr_accessor :create_time
|
955
|
+
|
956
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
957
|
+
# Corresponds to the JSON property `description`
|
958
|
+
# @return [String]
|
959
|
+
attr_accessor :description
|
960
|
+
|
961
|
+
# Optional. Gateways defines a list of gateways this HttpRoute is attached to,
|
962
|
+
# as one of the routing rules to route the requests served by the gateway. Each
|
963
|
+
# gateway reference should match the pattern: `projects/*/locations/global/
|
964
|
+
# gateways/`
|
965
|
+
# Corresponds to the JSON property `gateways`
|
966
|
+
# @return [Array<String>]
|
967
|
+
attr_accessor :gateways
|
968
|
+
|
969
|
+
# Required. Hostnames define a set of hosts that should match against the HTTP
|
970
|
+
# host header to select a HttpRoute to process the request. Hostname is the
|
971
|
+
# fully qualified domain name of a network host, as defined by RFC 1123 with the
|
972
|
+
# exception that: - IPs are not allowed. - A hostname may be prefixed with a
|
973
|
+
# wildcard label (*.). The wildcard label must appear by itself as the first
|
974
|
+
# label. Hostname can be "precise" which is a domain name without the
|
975
|
+
# terminating dot of a network host (e.g. "foo.example.com") or "wildcard",
|
976
|
+
# which is a domain name prefixed with a single wildcard label (e.g. *.example.
|
977
|
+
# com). Note that as per RFC1035 and RFC1123, a label must consist of lower case
|
978
|
+
# alphanumeric characters or '-', and must start and end with an alphanumeric
|
979
|
+
# character. No other punctuation is allowed. The routes associated with a Mesh
|
980
|
+
# or Gateways must have unique hostnames. If you attempt to attach multiple
|
981
|
+
# routes with conflicting hostnames, the configuration will be rejected. For
|
982
|
+
# example, while it is acceptable for routes for the hostnames "*.foo.bar.com"
|
983
|
+
# and "*.bar.com" to be associated with the same Mesh (or Gateways under the
|
984
|
+
# same scope), it is not possible to associate two routes both with "*.bar.com"
|
985
|
+
# or both with "bar.com".
|
986
|
+
# Corresponds to the JSON property `hostnames`
|
987
|
+
# @return [Array<String>]
|
988
|
+
attr_accessor :hostnames
|
989
|
+
|
990
|
+
# Optional. Set of label tags associated with the HttpRoute resource.
|
991
|
+
# Corresponds to the JSON property `labels`
|
992
|
+
# @return [Hash<String,String>]
|
993
|
+
attr_accessor :labels
|
994
|
+
|
995
|
+
# Optional. Meshes defines a list of meshes this HttpRoute is attached to, as
|
996
|
+
# one of the routing rules to route the requests served by the mesh. Each mesh
|
997
|
+
# reference should match the pattern: `projects/*/locations/global/meshes/` The
|
998
|
+
# attached Mesh should be of a type SIDECAR
|
999
|
+
# Corresponds to the JSON property `meshes`
|
1000
|
+
# @return [Array<String>]
|
1001
|
+
attr_accessor :meshes
|
1002
|
+
|
1003
|
+
# Required. Name of the HttpRoute resource. It matches pattern `projects/*/
|
1004
|
+
# locations/global/httpRoutes/http_route_name>`.
|
1005
|
+
# Corresponds to the JSON property `name`
|
1006
|
+
# @return [String]
|
1007
|
+
attr_accessor :name
|
1008
|
+
|
1009
|
+
# Required. Rules that define how traffic is routed and handled. Rules will be
|
1010
|
+
# matched sequentially based on the RouteMatch specified for the rule.
|
1011
|
+
# Corresponds to the JSON property `rules`
|
1012
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRouteRouteRule>]
|
1013
|
+
attr_accessor :rules
|
1014
|
+
|
1015
|
+
# Output only. Server-defined URL of this resource
|
1016
|
+
# Corresponds to the JSON property `selfLink`
|
1017
|
+
# @return [String]
|
1018
|
+
attr_accessor :self_link
|
1019
|
+
|
1020
|
+
# Output only. The timestamp when the resource was updated.
|
1021
|
+
# Corresponds to the JSON property `updateTime`
|
1022
|
+
# @return [String]
|
1023
|
+
attr_accessor :update_time
|
1024
|
+
|
1025
|
+
def initialize(**args)
|
1026
|
+
update!(**args)
|
1027
|
+
end
|
1028
|
+
|
1029
|
+
# Update properties of this object
|
1030
|
+
def update!(**args)
|
1031
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
1032
|
+
@description = args[:description] if args.key?(:description)
|
1033
|
+
@gateways = args[:gateways] if args.key?(:gateways)
|
1034
|
+
@hostnames = args[:hostnames] if args.key?(:hostnames)
|
1035
|
+
@labels = args[:labels] if args.key?(:labels)
|
1036
|
+
@meshes = args[:meshes] if args.key?(:meshes)
|
1037
|
+
@name = args[:name] if args.key?(:name)
|
1038
|
+
@rules = args[:rules] if args.key?(:rules)
|
1039
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
1040
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
# The Specification for allowing client side cross-origin requests.
|
1045
|
+
class HttpRouteCorsPolicy
|
1046
|
+
include Google::Apis::Core::Hashable
|
1047
|
+
|
1048
|
+
# In response to a preflight request, setting this to true indicates that the
|
1049
|
+
# actual request can include user credentials. This translates to the Access-
|
1050
|
+
# Control-Allow-Credentials header. Default value is false.
|
1051
|
+
# Corresponds to the JSON property `allowCredentials`
|
1052
|
+
# @return [Boolean]
|
1053
|
+
attr_accessor :allow_credentials
|
1054
|
+
alias_method :allow_credentials?, :allow_credentials
|
1055
|
+
|
1056
|
+
# Specifies the content for Access-Control-Allow-Headers header.
|
1057
|
+
# Corresponds to the JSON property `allowHeaders`
|
1058
|
+
# @return [Array<String>]
|
1059
|
+
attr_accessor :allow_headers
|
1060
|
+
|
1061
|
+
# Specifies the content for Access-Control-Allow-Methods header.
|
1062
|
+
# Corresponds to the JSON property `allowMethods`
|
1063
|
+
# @return [Array<String>]
|
1064
|
+
attr_accessor :allow_methods
|
1065
|
+
|
1066
|
+
# Specifies the regular expression patterns that match allowed origins. For
|
1067
|
+
# regular expression grammar, please see https://github.com/google/re2/wiki/
|
1068
|
+
# Syntax.
|
1069
|
+
# Corresponds to the JSON property `allowOriginRegexes`
|
1070
|
+
# @return [Array<String>]
|
1071
|
+
attr_accessor :allow_origin_regexes
|
1072
|
+
|
1073
|
+
# Specifies the list of origins that will be allowed to do CORS requests. An
|
1074
|
+
# origin is allowed if it matches either an item in allow_origins or an item in
|
1075
|
+
# allow_origin_regexes.
|
1076
|
+
# Corresponds to the JSON property `allowOrigins`
|
1077
|
+
# @return [Array<String>]
|
1078
|
+
attr_accessor :allow_origins
|
1079
|
+
|
1080
|
+
# If true, the CORS policy is disabled. The default value is false, which
|
1081
|
+
# indicates that the CORS policy is in effect.
|
1082
|
+
# Corresponds to the JSON property `disabled`
|
1083
|
+
# @return [Boolean]
|
1084
|
+
attr_accessor :disabled
|
1085
|
+
alias_method :disabled?, :disabled
|
1086
|
+
|
1087
|
+
# Specifies the content for Access-Control-Expose-Headers header.
|
1088
|
+
# Corresponds to the JSON property `exposeHeaders`
|
1089
|
+
# @return [Array<String>]
|
1090
|
+
attr_accessor :expose_headers
|
1091
|
+
|
1092
|
+
# Specifies how long result of a preflight request can be cached in seconds.
|
1093
|
+
# This translates to the Access-Control-Max-Age header.
|
1094
|
+
# Corresponds to the JSON property `maxAge`
|
1095
|
+
# @return [String]
|
1096
|
+
attr_accessor :max_age
|
1097
|
+
|
1098
|
+
def initialize(**args)
|
1099
|
+
update!(**args)
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
# Update properties of this object
|
1103
|
+
def update!(**args)
|
1104
|
+
@allow_credentials = args[:allow_credentials] if args.key?(:allow_credentials)
|
1105
|
+
@allow_headers = args[:allow_headers] if args.key?(:allow_headers)
|
1106
|
+
@allow_methods = args[:allow_methods] if args.key?(:allow_methods)
|
1107
|
+
@allow_origin_regexes = args[:allow_origin_regexes] if args.key?(:allow_origin_regexes)
|
1108
|
+
@allow_origins = args[:allow_origins] if args.key?(:allow_origins)
|
1109
|
+
@disabled = args[:disabled] if args.key?(:disabled)
|
1110
|
+
@expose_headers = args[:expose_headers] if args.key?(:expose_headers)
|
1111
|
+
@max_age = args[:max_age] if args.key?(:max_age)
|
1112
|
+
end
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
# Specifications of a destination to which the request should be routed to.
|
1116
|
+
class HttpRouteDestination
|
1117
|
+
include Google::Apis::Core::Hashable
|
1118
|
+
|
1119
|
+
# The URL of a BackendService to route traffic to.
|
1120
|
+
# Corresponds to the JSON property `serviceName`
|
1121
|
+
# @return [String]
|
1122
|
+
attr_accessor :service_name
|
1123
|
+
|
1124
|
+
# Specifies the proportion of requests forwarded to the backend referenced by
|
1125
|
+
# the serviceName field. This is computed as: weight/Sum(weights in this
|
1126
|
+
# destination list). For non-zero values, there may be some epsilon from the
|
1127
|
+
# exact proportion defined here depending on the precision an implementation
|
1128
|
+
# supports. If only one serviceName is specified and it has a weight greater
|
1129
|
+
# than 0, 100% of the traffic is forwarded to that backend. If weights are
|
1130
|
+
# specified for any one service name, they need to be specified for all of them.
|
1131
|
+
# If weights are unspecified for all services, then, traffic is distributed in
|
1132
|
+
# equal proportions to all of them.
|
1133
|
+
# Corresponds to the JSON property `weight`
|
1134
|
+
# @return [Fixnum]
|
1135
|
+
attr_accessor :weight
|
1136
|
+
|
1137
|
+
def initialize(**args)
|
1138
|
+
update!(**args)
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
# Update properties of this object
|
1142
|
+
def update!(**args)
|
1143
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
1144
|
+
@weight = args[:weight] if args.key?(:weight)
|
1145
|
+
end
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# The specification for fault injection introduced into traffic to test the
|
1149
|
+
# resiliency of clients to destination service failure. As part of fault
|
1150
|
+
# injection, when clients send requests to a destination, delays can be
|
1151
|
+
# introduced by client proxy on a percentage of requests before sending those
|
1152
|
+
# requests to the destination service. Similarly requests can be aborted by
|
1153
|
+
# client proxy for a percentage of requests.
|
1154
|
+
class HttpRouteFaultInjectionPolicy
|
1155
|
+
include Google::Apis::Core::Hashable
|
1156
|
+
|
1157
|
+
# Specification of how client requests are aborted as part of fault injection
|
1158
|
+
# before being sent to a destination.
|
1159
|
+
# Corresponds to the JSON property `abort`
|
1160
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicyAbort]
|
1161
|
+
attr_accessor :abort
|
1162
|
+
|
1163
|
+
# Specification of how client requests are delayed as part of fault injection
|
1164
|
+
# before being sent to a destination.
|
1165
|
+
# Corresponds to the JSON property `delay`
|
1166
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicyDelay]
|
1167
|
+
attr_accessor :delay
|
1168
|
+
|
1169
|
+
def initialize(**args)
|
1170
|
+
update!(**args)
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
# Update properties of this object
|
1174
|
+
def update!(**args)
|
1175
|
+
@abort = args[:abort] if args.key?(:abort)
|
1176
|
+
@delay = args[:delay] if args.key?(:delay)
|
1177
|
+
end
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
# Specification of how client requests are aborted as part of fault injection
|
1181
|
+
# before being sent to a destination.
|
1182
|
+
class HttpRouteFaultInjectionPolicyAbort
|
1183
|
+
include Google::Apis::Core::Hashable
|
1184
|
+
|
1185
|
+
# The HTTP status code used to abort the request. The value must be between 200
|
1186
|
+
# and 599 inclusive.
|
1187
|
+
# Corresponds to the JSON property `httpStatus`
|
1188
|
+
# @return [Fixnum]
|
1189
|
+
attr_accessor :http_status
|
1190
|
+
|
1191
|
+
# The percentage of traffic which will be aborted. The value must be between [0,
|
1192
|
+
# 100]
|
1193
|
+
# Corresponds to the JSON property `percentage`
|
1194
|
+
# @return [Fixnum]
|
1195
|
+
attr_accessor :percentage
|
1196
|
+
|
1197
|
+
def initialize(**args)
|
1198
|
+
update!(**args)
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
# Update properties of this object
|
1202
|
+
def update!(**args)
|
1203
|
+
@http_status = args[:http_status] if args.key?(:http_status)
|
1204
|
+
@percentage = args[:percentage] if args.key?(:percentage)
|
1205
|
+
end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
# Specification of how client requests are delayed as part of fault injection
|
1209
|
+
# before being sent to a destination.
|
1210
|
+
class HttpRouteFaultInjectionPolicyDelay
|
1211
|
+
include Google::Apis::Core::Hashable
|
1212
|
+
|
1213
|
+
# Specify a fixed delay before forwarding the request.
|
1214
|
+
# Corresponds to the JSON property `fixedDelay`
|
1215
|
+
# @return [String]
|
1216
|
+
attr_accessor :fixed_delay
|
1217
|
+
|
1218
|
+
# The percentage of traffic on which delay will be injected. The value must be
|
1219
|
+
# between [0, 100]
|
1220
|
+
# Corresponds to the JSON property `percentage`
|
1221
|
+
# @return [Fixnum]
|
1222
|
+
attr_accessor :percentage
|
1223
|
+
|
1224
|
+
def initialize(**args)
|
1225
|
+
update!(**args)
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
# Update properties of this object
|
1229
|
+
def update!(**args)
|
1230
|
+
@fixed_delay = args[:fixed_delay] if args.key?(:fixed_delay)
|
1231
|
+
@percentage = args[:percentage] if args.key?(:percentage)
|
1232
|
+
end
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# Specifies how to select a route rule based on HTTP request headers.
|
1236
|
+
class HttpRouteHeaderMatch
|
1237
|
+
include Google::Apis::Core::Hashable
|
1238
|
+
|
1239
|
+
# The value of the header should match exactly the content of exact_match.
|
1240
|
+
# Corresponds to the JSON property `exactMatch`
|
1241
|
+
# @return [String]
|
1242
|
+
attr_accessor :exact_match
|
1243
|
+
|
1244
|
+
# The name of the HTTP header to match against.
|
1245
|
+
# Corresponds to the JSON property `header`
|
1246
|
+
# @return [String]
|
1247
|
+
attr_accessor :header
|
1248
|
+
|
1249
|
+
# If specified, the match result will be inverted before checking. Default value
|
1250
|
+
# is set to false.
|
1251
|
+
# Corresponds to the JSON property `invertMatch`
|
1252
|
+
# @return [Boolean]
|
1253
|
+
attr_accessor :invert_match
|
1254
|
+
alias_method :invert_match?, :invert_match
|
1255
|
+
|
1256
|
+
# The value of the header must start with the contents of prefix_match.
|
1257
|
+
# Corresponds to the JSON property `prefixMatch`
|
1258
|
+
# @return [String]
|
1259
|
+
attr_accessor :prefix_match
|
1260
|
+
|
1261
|
+
# A header with header_name must exist. The match takes place whether or not the
|
1262
|
+
# header has a value.
|
1263
|
+
# Corresponds to the JSON property `presentMatch`
|
1264
|
+
# @return [Boolean]
|
1265
|
+
attr_accessor :present_match
|
1266
|
+
alias_method :present_match?, :present_match
|
1267
|
+
|
1268
|
+
# Represents an integer value range.
|
1269
|
+
# Corresponds to the JSON property `rangeMatch`
|
1270
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteHeaderMatchIntegerRange]
|
1271
|
+
attr_accessor :range_match
|
1272
|
+
|
1273
|
+
# The value of the header must match the regular expression specified in
|
1274
|
+
# regex_match. For regular expression grammar, please see: https://github.com/
|
1275
|
+
# google/re2/wiki/Syntax
|
1276
|
+
# Corresponds to the JSON property `regexMatch`
|
1277
|
+
# @return [String]
|
1278
|
+
attr_accessor :regex_match
|
1279
|
+
|
1280
|
+
# The value of the header must end with the contents of suffix_match.
|
1281
|
+
# Corresponds to the JSON property `suffixMatch`
|
1282
|
+
# @return [String]
|
1283
|
+
attr_accessor :suffix_match
|
1284
|
+
|
1285
|
+
def initialize(**args)
|
1286
|
+
update!(**args)
|
1287
|
+
end
|
1288
|
+
|
1289
|
+
# Update properties of this object
|
1290
|
+
def update!(**args)
|
1291
|
+
@exact_match = args[:exact_match] if args.key?(:exact_match)
|
1292
|
+
@header = args[:header] if args.key?(:header)
|
1293
|
+
@invert_match = args[:invert_match] if args.key?(:invert_match)
|
1294
|
+
@prefix_match = args[:prefix_match] if args.key?(:prefix_match)
|
1295
|
+
@present_match = args[:present_match] if args.key?(:present_match)
|
1296
|
+
@range_match = args[:range_match] if args.key?(:range_match)
|
1297
|
+
@regex_match = args[:regex_match] if args.key?(:regex_match)
|
1298
|
+
@suffix_match = args[:suffix_match] if args.key?(:suffix_match)
|
1299
|
+
end
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
# Represents an integer value range.
|
1303
|
+
class HttpRouteHeaderMatchIntegerRange
|
1304
|
+
include Google::Apis::Core::Hashable
|
1305
|
+
|
1306
|
+
# End of the range (exclusive)
|
1307
|
+
# Corresponds to the JSON property `end`
|
1308
|
+
# @return [Fixnum]
|
1309
|
+
attr_accessor :end
|
1310
|
+
|
1311
|
+
# Start of the range (inclusive)
|
1312
|
+
# Corresponds to the JSON property `start`
|
1313
|
+
# @return [Fixnum]
|
1314
|
+
attr_accessor :start
|
1315
|
+
|
1316
|
+
def initialize(**args)
|
1317
|
+
update!(**args)
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# Update properties of this object
|
1321
|
+
def update!(**args)
|
1322
|
+
@end = args[:end] if args.key?(:end)
|
1323
|
+
@start = args[:start] if args.key?(:start)
|
1324
|
+
end
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
# The specification for modifying HTTP header in HTTP request and HTTP response.
|
1328
|
+
class HttpRouteHeaderModifier
|
1329
|
+
include Google::Apis::Core::Hashable
|
1330
|
+
|
1331
|
+
# Add the headers with given map where key is the name of the header, value is
|
1332
|
+
# the value of the header.
|
1333
|
+
# Corresponds to the JSON property `add`
|
1334
|
+
# @return [Hash<String,String>]
|
1335
|
+
attr_accessor :add
|
1336
|
+
|
1337
|
+
# Remove headers (matching by header names) specified in the list.
|
1338
|
+
# Corresponds to the JSON property `remove`
|
1339
|
+
# @return [Array<String>]
|
1340
|
+
attr_accessor :remove
|
1341
|
+
|
1342
|
+
# Completely overwrite/replace the headers with given map where key is the name
|
1343
|
+
# of the header, value is the value of the header.
|
1344
|
+
# Corresponds to the JSON property `set`
|
1345
|
+
# @return [Hash<String,String>]
|
1346
|
+
attr_accessor :set
|
1347
|
+
|
1348
|
+
def initialize(**args)
|
1349
|
+
update!(**args)
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
# Update properties of this object
|
1353
|
+
def update!(**args)
|
1354
|
+
@add = args[:add] if args.key?(:add)
|
1355
|
+
@remove = args[:remove] if args.key?(:remove)
|
1356
|
+
@set = args[:set] if args.key?(:set)
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# Specifications to match a query parameter in the request.
|
1361
|
+
class HttpRouteQueryParameterMatch
|
1362
|
+
include Google::Apis::Core::Hashable
|
1363
|
+
|
1364
|
+
# The value of the query parameter must exactly match the contents of
|
1365
|
+
# exact_match. Only one of exact_match, regex_match, or present_match must be
|
1366
|
+
# set.
|
1367
|
+
# Corresponds to the JSON property `exactMatch`
|
1368
|
+
# @return [String]
|
1369
|
+
attr_accessor :exact_match
|
1370
|
+
|
1371
|
+
# Specifies that the QueryParameterMatcher matches if request contains query
|
1372
|
+
# parameter, irrespective of whether the parameter has a value or not. Only one
|
1373
|
+
# of exact_match, regex_match, or present_match must be set.
|
1374
|
+
# Corresponds to the JSON property `presentMatch`
|
1375
|
+
# @return [Boolean]
|
1376
|
+
attr_accessor :present_match
|
1377
|
+
alias_method :present_match?, :present_match
|
1378
|
+
|
1379
|
+
# The name of the query parameter to match.
|
1380
|
+
# Corresponds to the JSON property `queryParameter`
|
1381
|
+
# @return [String]
|
1382
|
+
attr_accessor :query_parameter
|
1383
|
+
|
1384
|
+
# The value of the query parameter must match the regular expression specified
|
1385
|
+
# by regex_match. For regular expression grammar, please see https://github.com/
|
1386
|
+
# google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match
|
1387
|
+
# must be set.
|
1388
|
+
# Corresponds to the JSON property `regexMatch`
|
1389
|
+
# @return [String]
|
1390
|
+
attr_accessor :regex_match
|
1391
|
+
|
1392
|
+
def initialize(**args)
|
1393
|
+
update!(**args)
|
1394
|
+
end
|
1395
|
+
|
1396
|
+
# Update properties of this object
|
1397
|
+
def update!(**args)
|
1398
|
+
@exact_match = args[:exact_match] if args.key?(:exact_match)
|
1399
|
+
@present_match = args[:present_match] if args.key?(:present_match)
|
1400
|
+
@query_parameter = args[:query_parameter] if args.key?(:query_parameter)
|
1401
|
+
@regex_match = args[:regex_match] if args.key?(:regex_match)
|
1402
|
+
end
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
# The specification for redirecting traffic.
|
1406
|
+
class HttpRouteRedirect
|
1407
|
+
include Google::Apis::Core::Hashable
|
1408
|
+
|
1409
|
+
# The host that will be used in the redirect response instead of the one that
|
1410
|
+
# was supplied in the request.
|
1411
|
+
# Corresponds to the JSON property `hostRedirect`
|
1412
|
+
# @return [String]
|
1413
|
+
attr_accessor :host_redirect
|
1414
|
+
|
1415
|
+
# If set to true, the URL scheme in the redirected request is set to https. If
|
1416
|
+
# set to false, the URL scheme of the redirected request will remain the same as
|
1417
|
+
# that of the request. The default is set to false.
|
1418
|
+
# Corresponds to the JSON property `httpsRedirect`
|
1419
|
+
# @return [Boolean]
|
1420
|
+
attr_accessor :https_redirect
|
1421
|
+
alias_method :https_redirect?, :https_redirect
|
1422
|
+
|
1423
|
+
# The path that will be used in the redirect response instead of the one that
|
1424
|
+
# was supplied in the request. path_redirect can not be supplied together with
|
1425
|
+
# prefix_redirect. Supply one alone or neither. If neither is supplied, the path
|
1426
|
+
# of the original request will be used for the redirect.
|
1427
|
+
# Corresponds to the JSON property `pathRedirect`
|
1428
|
+
# @return [String]
|
1429
|
+
attr_accessor :path_redirect
|
1430
|
+
|
1431
|
+
# The port that will be used in the redirected request instead of the one that
|
1432
|
+
# was supplied in the request.
|
1433
|
+
# Corresponds to the JSON property `portRedirect`
|
1434
|
+
# @return [Fixnum]
|
1435
|
+
attr_accessor :port_redirect
|
1436
|
+
|
1437
|
+
# Indicates that during redirection, the matched prefix (or path) should be
|
1438
|
+
# swapped with this value. This option allows URLs be dynamically created based
|
1439
|
+
# on the request.
|
1440
|
+
# Corresponds to the JSON property `prefixRewrite`
|
1441
|
+
# @return [String]
|
1442
|
+
attr_accessor :prefix_rewrite
|
1443
|
+
|
1444
|
+
# The HTTP Status code to use for the redirect.
|
1445
|
+
# Corresponds to the JSON property `responseCode`
|
1446
|
+
# @return [String]
|
1447
|
+
attr_accessor :response_code
|
1448
|
+
|
1449
|
+
# if set to true, any accompanying query portion of the original URL is removed
|
1450
|
+
# prior to redirecting the request. If set to false, the query portion of the
|
1451
|
+
# original URL is retained. The default is set to false.
|
1452
|
+
# Corresponds to the JSON property `stripQuery`
|
1453
|
+
# @return [Boolean]
|
1454
|
+
attr_accessor :strip_query
|
1455
|
+
alias_method :strip_query?, :strip_query
|
1456
|
+
|
1457
|
+
def initialize(**args)
|
1458
|
+
update!(**args)
|
1459
|
+
end
|
1460
|
+
|
1461
|
+
# Update properties of this object
|
1462
|
+
def update!(**args)
|
1463
|
+
@host_redirect = args[:host_redirect] if args.key?(:host_redirect)
|
1464
|
+
@https_redirect = args[:https_redirect] if args.key?(:https_redirect)
|
1465
|
+
@path_redirect = args[:path_redirect] if args.key?(:path_redirect)
|
1466
|
+
@port_redirect = args[:port_redirect] if args.key?(:port_redirect)
|
1467
|
+
@prefix_rewrite = args[:prefix_rewrite] if args.key?(:prefix_rewrite)
|
1468
|
+
@response_code = args[:response_code] if args.key?(:response_code)
|
1469
|
+
@strip_query = args[:strip_query] if args.key?(:strip_query)
|
1470
|
+
end
|
1471
|
+
end
|
1472
|
+
|
1473
|
+
# Specifies the policy on how requests are shadowed to a separate mirrored
|
1474
|
+
# destination service. The proxy does not wait for responses from the shadow
|
1475
|
+
# service. Prior to sending traffic to the shadow service, the host/authority
|
1476
|
+
# header is suffixed with -shadow.
|
1477
|
+
class HttpRouteRequestMirrorPolicy
|
1478
|
+
include Google::Apis::Core::Hashable
|
1479
|
+
|
1480
|
+
# Specifications of a destination to which the request should be routed to.
|
1481
|
+
# Corresponds to the JSON property `destination`
|
1482
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteDestination]
|
1483
|
+
attr_accessor :destination
|
1484
|
+
|
1485
|
+
def initialize(**args)
|
1486
|
+
update!(**args)
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
# Update properties of this object
|
1490
|
+
def update!(**args)
|
1491
|
+
@destination = args[:destination] if args.key?(:destination)
|
1492
|
+
end
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
# The specifications for retries.
|
1496
|
+
class HttpRouteRetryPolicy
|
1497
|
+
include Google::Apis::Core::Hashable
|
1498
|
+
|
1499
|
+
# Specifies the allowed number of retries. This number must be > 0. If not
|
1500
|
+
# specified, default to 1.
|
1501
|
+
# Corresponds to the JSON property `numRetries`
|
1502
|
+
# @return [Fixnum]
|
1503
|
+
attr_accessor :num_retries
|
1504
|
+
|
1505
|
+
# Specifies a non-zero timeout per retry attempt.
|
1506
|
+
# Corresponds to the JSON property `perTryTimeout`
|
1507
|
+
# @return [String]
|
1508
|
+
attr_accessor :per_try_timeout
|
1509
|
+
|
1510
|
+
# Specifies one or more conditions when this retry policy applies. Valid values
|
1511
|
+
# are: 5xx: Proxy will attempt a retry if the destination service responds with
|
1512
|
+
# any 5xx response code, of if the destination service does not respond at all,
|
1513
|
+
# example: disconnect, reset, read timeout, connection failure and refused
|
1514
|
+
# streams. gateway-error: Similar to 5xx, but only applies to response codes 502,
|
1515
|
+
# 503, 504. reset: Proxy will attempt a retry if the destination service does
|
1516
|
+
# not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will
|
1517
|
+
# retry on failures connecting to destination for example due to connection
|
1518
|
+
# timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes.
|
1519
|
+
# Currently the only retriable error supported is 409. refused-stream: Proxy
|
1520
|
+
# will retry if the destination resets the stream with a REFUSED_STREAM error
|
1521
|
+
# code. This reset type indicates that it is safe to retry.
|
1522
|
+
# Corresponds to the JSON property `retryConditions`
|
1523
|
+
# @return [Array<String>]
|
1524
|
+
attr_accessor :retry_conditions
|
1525
|
+
|
1526
|
+
def initialize(**args)
|
1527
|
+
update!(**args)
|
1528
|
+
end
|
1529
|
+
|
1530
|
+
# Update properties of this object
|
1531
|
+
def update!(**args)
|
1532
|
+
@num_retries = args[:num_retries] if args.key?(:num_retries)
|
1533
|
+
@per_try_timeout = args[:per_try_timeout] if args.key?(:per_try_timeout)
|
1534
|
+
@retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
|
1535
|
+
end
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
# The specifications for routing traffic and applying associated policies.
|
1539
|
+
class HttpRouteRouteAction
|
1540
|
+
include Google::Apis::Core::Hashable
|
1541
|
+
|
1542
|
+
# The Specification for allowing client side cross-origin requests.
|
1543
|
+
# Corresponds to the JSON property `corsPolicy`
|
1544
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteCorsPolicy]
|
1545
|
+
attr_accessor :cors_policy
|
1546
|
+
|
1547
|
+
# The destination to which traffic should be forwarded.
|
1548
|
+
# Corresponds to the JSON property `destinations`
|
1549
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRouteDestination>]
|
1550
|
+
attr_accessor :destinations
|
1551
|
+
|
1552
|
+
# The specification for fault injection introduced into traffic to test the
|
1553
|
+
# resiliency of clients to destination service failure. As part of fault
|
1554
|
+
# injection, when clients send requests to a destination, delays can be
|
1555
|
+
# introduced by client proxy on a percentage of requests before sending those
|
1556
|
+
# requests to the destination service. Similarly requests can be aborted by
|
1557
|
+
# client proxy for a percentage of requests.
|
1558
|
+
# Corresponds to the JSON property `faultInjectionPolicy`
|
1559
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicy]
|
1560
|
+
attr_accessor :fault_injection_policy
|
1561
|
+
|
1562
|
+
# The specification for redirecting traffic.
|
1563
|
+
# Corresponds to the JSON property `redirect`
|
1564
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteRedirect]
|
1565
|
+
attr_accessor :redirect
|
1566
|
+
|
1567
|
+
# The specification for modifying HTTP header in HTTP request and HTTP response.
|
1568
|
+
# Corresponds to the JSON property `requestHeaderModifier`
|
1569
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteHeaderModifier]
|
1570
|
+
attr_accessor :request_header_modifier
|
1571
|
+
|
1572
|
+
# Specifies the policy on how requests are shadowed to a separate mirrored
|
1573
|
+
# destination service. The proxy does not wait for responses from the shadow
|
1574
|
+
# service. Prior to sending traffic to the shadow service, the host/authority
|
1575
|
+
# header is suffixed with -shadow.
|
1576
|
+
# Corresponds to the JSON property `requestMirrorPolicy`
|
1577
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteRequestMirrorPolicy]
|
1578
|
+
attr_accessor :request_mirror_policy
|
1579
|
+
|
1580
|
+
# The specification for modifying HTTP header in HTTP request and HTTP response.
|
1581
|
+
# Corresponds to the JSON property `responseHeaderModifier`
|
1582
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteHeaderModifier]
|
1583
|
+
attr_accessor :response_header_modifier
|
1584
|
+
|
1585
|
+
# The specifications for retries.
|
1586
|
+
# Corresponds to the JSON property `retryPolicy`
|
1587
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteRetryPolicy]
|
1588
|
+
attr_accessor :retry_policy
|
1589
|
+
|
1590
|
+
# Specifies the timeout for selected route. Timeout is computed from the time
|
1591
|
+
# the request has been fully processed (i.e. end of stream) up until the
|
1592
|
+
# response has been completely processed. Timeout includes all retries.
|
1593
|
+
# Corresponds to the JSON property `timeout`
|
1594
|
+
# @return [String]
|
1595
|
+
attr_accessor :timeout
|
1596
|
+
|
1597
|
+
# The specification for modifying the URL of the request, prior to forwarding
|
1598
|
+
# the request to the destination.
|
1599
|
+
# Corresponds to the JSON property `urlRewrite`
|
1600
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteUrlRewrite]
|
1601
|
+
attr_accessor :url_rewrite
|
1602
|
+
|
1603
|
+
def initialize(**args)
|
1604
|
+
update!(**args)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Update properties of this object
|
1608
|
+
def update!(**args)
|
1609
|
+
@cors_policy = args[:cors_policy] if args.key?(:cors_policy)
|
1610
|
+
@destinations = args[:destinations] if args.key?(:destinations)
|
1611
|
+
@fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
|
1612
|
+
@redirect = args[:redirect] if args.key?(:redirect)
|
1613
|
+
@request_header_modifier = args[:request_header_modifier] if args.key?(:request_header_modifier)
|
1614
|
+
@request_mirror_policy = args[:request_mirror_policy] if args.key?(:request_mirror_policy)
|
1615
|
+
@response_header_modifier = args[:response_header_modifier] if args.key?(:response_header_modifier)
|
1616
|
+
@retry_policy = args[:retry_policy] if args.key?(:retry_policy)
|
1617
|
+
@timeout = args[:timeout] if args.key?(:timeout)
|
1618
|
+
@url_rewrite = args[:url_rewrite] if args.key?(:url_rewrite)
|
1619
|
+
end
|
1620
|
+
end
|
1621
|
+
|
1622
|
+
# RouteMatch defines specifications used to match requests. If multiple match
|
1623
|
+
# types are set, this RouteMatch will match if ALL type of matches are matched.
|
1624
|
+
class HttpRouteRouteMatch
|
1625
|
+
include Google::Apis::Core::Hashable
|
1626
|
+
|
1627
|
+
# The HTTP request path value should exactly match this value. Only one of
|
1628
|
+
# full_path_match, prefix_match, or regex_match should be used.
|
1629
|
+
# Corresponds to the JSON property `fullPathMatch`
|
1630
|
+
# @return [String]
|
1631
|
+
attr_accessor :full_path_match
|
1632
|
+
|
1633
|
+
# Specifies a list of HTTP request headers to match against. ALL of the supplied
|
1634
|
+
# headers must be matched.
|
1635
|
+
# Corresponds to the JSON property `headers`
|
1636
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRouteHeaderMatch>]
|
1637
|
+
attr_accessor :headers
|
1638
|
+
|
1639
|
+
# Specifies if prefix_match and full_path_match matches are case sensitive. The
|
1640
|
+
# default value is false.
|
1641
|
+
# Corresponds to the JSON property `ignoreCase`
|
1642
|
+
# @return [Boolean]
|
1643
|
+
attr_accessor :ignore_case
|
1644
|
+
alias_method :ignore_case?, :ignore_case
|
1645
|
+
|
1646
|
+
# The HTTP request path value must begin with specified prefix_match.
|
1647
|
+
# prefix_match must begin with a /. Only one of full_path_match, prefix_match,
|
1648
|
+
# or regex_match should be used.
|
1649
|
+
# Corresponds to the JSON property `prefixMatch`
|
1650
|
+
# @return [String]
|
1651
|
+
attr_accessor :prefix_match
|
1652
|
+
|
1653
|
+
# Specifies a list of query parameters to match against. ALL of the query
|
1654
|
+
# parameters must be matched.
|
1655
|
+
# Corresponds to the JSON property `queryParameters`
|
1656
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRouteQueryParameterMatch>]
|
1657
|
+
attr_accessor :query_parameters
|
1658
|
+
|
1659
|
+
# The HTTP request path value must satisfy the regular expression specified by
|
1660
|
+
# regex_match after removing any query parameters and anchor supplied with the
|
1661
|
+
# original URL. For regular expression grammar, please see https://github.com/
|
1662
|
+
# google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or
|
1663
|
+
# regex_match should be used.
|
1664
|
+
# Corresponds to the JSON property `regexMatch`
|
1665
|
+
# @return [String]
|
1666
|
+
attr_accessor :regex_match
|
1667
|
+
|
1668
|
+
def initialize(**args)
|
1669
|
+
update!(**args)
|
1670
|
+
end
|
1671
|
+
|
1672
|
+
# Update properties of this object
|
1673
|
+
def update!(**args)
|
1674
|
+
@full_path_match = args[:full_path_match] if args.key?(:full_path_match)
|
1675
|
+
@headers = args[:headers] if args.key?(:headers)
|
1676
|
+
@ignore_case = args[:ignore_case] if args.key?(:ignore_case)
|
1677
|
+
@prefix_match = args[:prefix_match] if args.key?(:prefix_match)
|
1678
|
+
@query_parameters = args[:query_parameters] if args.key?(:query_parameters)
|
1679
|
+
@regex_match = args[:regex_match] if args.key?(:regex_match)
|
1680
|
+
end
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
# Specifies how to match traffic and how to route traffic when traffic is
|
1684
|
+
# matched.
|
1685
|
+
class HttpRouteRouteRule
|
1686
|
+
include Google::Apis::Core::Hashable
|
1687
|
+
|
1688
|
+
# The specifications for routing traffic and applying associated policies.
|
1689
|
+
# Corresponds to the JSON property `action`
|
1690
|
+
# @return [Google::Apis::NetworkservicesV1::HttpRouteRouteAction]
|
1691
|
+
attr_accessor :action
|
1692
|
+
|
1693
|
+
# A list of matches define conditions used for matching the rule against
|
1694
|
+
# incoming HTTP requests. Each match is independent, i.e. this rule will be
|
1695
|
+
# matched if ANY one of the matches is satisfied. If no matches field is
|
1696
|
+
# specified, this rule will unconditionally match traffic. If a default rule is
|
1697
|
+
# desired to be configured, add a rule with no matches specified to the end of
|
1698
|
+
# the rules list.
|
1699
|
+
# Corresponds to the JSON property `matches`
|
1700
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRouteRouteMatch>]
|
1701
|
+
attr_accessor :matches
|
1702
|
+
|
1703
|
+
def initialize(**args)
|
1704
|
+
update!(**args)
|
1705
|
+
end
|
1706
|
+
|
1707
|
+
# Update properties of this object
|
1708
|
+
def update!(**args)
|
1709
|
+
@action = args[:action] if args.key?(:action)
|
1710
|
+
@matches = args[:matches] if args.key?(:matches)
|
1711
|
+
end
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
# The specification for modifying the URL of the request, prior to forwarding
|
1715
|
+
# the request to the destination.
|
1716
|
+
class HttpRouteUrlRewrite
|
1717
|
+
include Google::Apis::Core::Hashable
|
1718
|
+
|
1719
|
+
# Prior to forwarding the request to the selected destination, the requests host
|
1720
|
+
# header is replaced by this value.
|
1721
|
+
# Corresponds to the JSON property `hostRewrite`
|
1722
|
+
# @return [String]
|
1723
|
+
attr_accessor :host_rewrite
|
1724
|
+
|
1725
|
+
# Prior to forwarding the request to the selected destination, the matching
|
1726
|
+
# portion of the requests path is replaced by this value.
|
1727
|
+
# Corresponds to the JSON property `pathPrefixRewrite`
|
1728
|
+
# @return [String]
|
1729
|
+
attr_accessor :path_prefix_rewrite
|
1730
|
+
|
1731
|
+
def initialize(**args)
|
1732
|
+
update!(**args)
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
# Update properties of this object
|
1736
|
+
def update!(**args)
|
1737
|
+
@host_rewrite = args[:host_rewrite] if args.key?(:host_rewrite)
|
1738
|
+
@path_prefix_rewrite = args[:path_prefix_rewrite] if args.key?(:path_prefix_rewrite)
|
1739
|
+
end
|
1740
|
+
end
|
1741
|
+
|
432
1742
|
# Response returned by the ListEndpointPolicies method.
|
433
1743
|
class ListEndpointPoliciesResponse
|
434
1744
|
include Google::Apis::Core::Hashable
|
@@ -456,6 +1766,87 @@ module Google
|
|
456
1766
|
end
|
457
1767
|
end
|
458
1768
|
|
1769
|
+
# Response returned by the ListGateways method.
|
1770
|
+
class ListGatewaysResponse
|
1771
|
+
include Google::Apis::Core::Hashable
|
1772
|
+
|
1773
|
+
# List of Gateway resources.
|
1774
|
+
# Corresponds to the JSON property `gateways`
|
1775
|
+
# @return [Array<Google::Apis::NetworkservicesV1::Gateway>]
|
1776
|
+
attr_accessor :gateways
|
1777
|
+
|
1778
|
+
# If there might be more results than those appearing in this response, then `
|
1779
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1780
|
+
# again using the value of `next_page_token` as `page_token`.
|
1781
|
+
# Corresponds to the JSON property `nextPageToken`
|
1782
|
+
# @return [String]
|
1783
|
+
attr_accessor :next_page_token
|
1784
|
+
|
1785
|
+
def initialize(**args)
|
1786
|
+
update!(**args)
|
1787
|
+
end
|
1788
|
+
|
1789
|
+
# Update properties of this object
|
1790
|
+
def update!(**args)
|
1791
|
+
@gateways = args[:gateways] if args.key?(:gateways)
|
1792
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1793
|
+
end
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
# Response returned by the ListGrpcRoutes method.
|
1797
|
+
class ListGrpcRoutesResponse
|
1798
|
+
include Google::Apis::Core::Hashable
|
1799
|
+
|
1800
|
+
# List of GrpcRoute resources.
|
1801
|
+
# Corresponds to the JSON property `grpcRoutes`
|
1802
|
+
# @return [Array<Google::Apis::NetworkservicesV1::GrpcRoute>]
|
1803
|
+
attr_accessor :grpc_routes
|
1804
|
+
|
1805
|
+
# If there might be more results than those appearing in this response, then `
|
1806
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1807
|
+
# again using the value of `next_page_token` as `page_token`.
|
1808
|
+
# Corresponds to the JSON property `nextPageToken`
|
1809
|
+
# @return [String]
|
1810
|
+
attr_accessor :next_page_token
|
1811
|
+
|
1812
|
+
def initialize(**args)
|
1813
|
+
update!(**args)
|
1814
|
+
end
|
1815
|
+
|
1816
|
+
# Update properties of this object
|
1817
|
+
def update!(**args)
|
1818
|
+
@grpc_routes = args[:grpc_routes] if args.key?(:grpc_routes)
|
1819
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1820
|
+
end
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# Response returned by the ListHttpRoutes method.
|
1824
|
+
class ListHttpRoutesResponse
|
1825
|
+
include Google::Apis::Core::Hashable
|
1826
|
+
|
1827
|
+
# List of HttpRoute resources.
|
1828
|
+
# Corresponds to the JSON property `httpRoutes`
|
1829
|
+
# @return [Array<Google::Apis::NetworkservicesV1::HttpRoute>]
|
1830
|
+
attr_accessor :http_routes
|
1831
|
+
|
1832
|
+
# If there might be more results than those appearing in this response, then `
|
1833
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1834
|
+
# again using the value of `next_page_token` as `page_token`.
|
1835
|
+
# Corresponds to the JSON property `nextPageToken`
|
1836
|
+
# @return [String]
|
1837
|
+
attr_accessor :next_page_token
|
1838
|
+
|
1839
|
+
def initialize(**args)
|
1840
|
+
update!(**args)
|
1841
|
+
end
|
1842
|
+
|
1843
|
+
# Update properties of this object
|
1844
|
+
def update!(**args)
|
1845
|
+
@http_routes = args[:http_routes] if args.key?(:http_routes)
|
1846
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1847
|
+
end
|
1848
|
+
end
|
1849
|
+
|
459
1850
|
# The response message for Locations.ListLocations.
|
460
1851
|
class ListLocationsResponse
|
461
1852
|
include Google::Apis::Core::Hashable
|
@@ -481,19 +1872,100 @@ module Google
|
|
481
1872
|
end
|
482
1873
|
end
|
483
1874
|
|
1875
|
+
# Response returned by the ListMeshes method.
|
1876
|
+
class ListMeshesResponse
|
1877
|
+
include Google::Apis::Core::Hashable
|
1878
|
+
|
1879
|
+
# List of Mesh resources.
|
1880
|
+
# Corresponds to the JSON property `meshes`
|
1881
|
+
# @return [Array<Google::Apis::NetworkservicesV1::Mesh>]
|
1882
|
+
attr_accessor :meshes
|
1883
|
+
|
1884
|
+
# If there might be more results than those appearing in this response, then `
|
1885
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1886
|
+
# again using the value of `next_page_token` as `page_token`.
|
1887
|
+
# Corresponds to the JSON property `nextPageToken`
|
1888
|
+
# @return [String]
|
1889
|
+
attr_accessor :next_page_token
|
1890
|
+
|
1891
|
+
def initialize(**args)
|
1892
|
+
update!(**args)
|
1893
|
+
end
|
1894
|
+
|
1895
|
+
# Update properties of this object
|
1896
|
+
def update!(**args)
|
1897
|
+
@meshes = args[:meshes] if args.key?(:meshes)
|
1898
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1899
|
+
end
|
1900
|
+
end
|
1901
|
+
|
484
1902
|
# The response message for Operations.ListOperations.
|
485
1903
|
class ListOperationsResponse
|
486
1904
|
include Google::Apis::Core::Hashable
|
487
1905
|
|
488
|
-
# The standard List next-page token.
|
1906
|
+
# The standard List next-page token.
|
1907
|
+
# Corresponds to the JSON property `nextPageToken`
|
1908
|
+
# @return [String]
|
1909
|
+
attr_accessor :next_page_token
|
1910
|
+
|
1911
|
+
# A list of operations that matches the specified filter in the request.
|
1912
|
+
# Corresponds to the JSON property `operations`
|
1913
|
+
# @return [Array<Google::Apis::NetworkservicesV1::Operation>]
|
1914
|
+
attr_accessor :operations
|
1915
|
+
|
1916
|
+
def initialize(**args)
|
1917
|
+
update!(**args)
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
# Update properties of this object
|
1921
|
+
def update!(**args)
|
1922
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1923
|
+
@operations = args[:operations] if args.key?(:operations)
|
1924
|
+
end
|
1925
|
+
end
|
1926
|
+
|
1927
|
+
# Response returned by the ListServiceBindings method.
|
1928
|
+
class ListServiceBindingsResponse
|
1929
|
+
include Google::Apis::Core::Hashable
|
1930
|
+
|
1931
|
+
# If there might be more results than those appearing in this response, then `
|
1932
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1933
|
+
# again using the value of `next_page_token` as `page_token`.
|
1934
|
+
# Corresponds to the JSON property `nextPageToken`
|
1935
|
+
# @return [String]
|
1936
|
+
attr_accessor :next_page_token
|
1937
|
+
|
1938
|
+
# List of ServiceBinding resources.
|
1939
|
+
# Corresponds to the JSON property `serviceBindings`
|
1940
|
+
# @return [Array<Google::Apis::NetworkservicesV1::ServiceBinding>]
|
1941
|
+
attr_accessor :service_bindings
|
1942
|
+
|
1943
|
+
def initialize(**args)
|
1944
|
+
update!(**args)
|
1945
|
+
end
|
1946
|
+
|
1947
|
+
# Update properties of this object
|
1948
|
+
def update!(**args)
|
1949
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1950
|
+
@service_bindings = args[:service_bindings] if args.key?(:service_bindings)
|
1951
|
+
end
|
1952
|
+
end
|
1953
|
+
|
1954
|
+
# Response returned by the ListTcpRoutes method.
|
1955
|
+
class ListTcpRoutesResponse
|
1956
|
+
include Google::Apis::Core::Hashable
|
1957
|
+
|
1958
|
+
# If there might be more results than those appearing in this response, then `
|
1959
|
+
# next_page_token` is included. To get the next set of results, call this method
|
1960
|
+
# again using the value of `next_page_token` as `page_token`.
|
489
1961
|
# Corresponds to the JSON property `nextPageToken`
|
490
1962
|
# @return [String]
|
491
1963
|
attr_accessor :next_page_token
|
492
1964
|
|
493
|
-
#
|
494
|
-
# Corresponds to the JSON property `
|
495
|
-
# @return [Array<Google::Apis::NetworkservicesV1::
|
496
|
-
attr_accessor :
|
1965
|
+
# List of TcpRoute resources.
|
1966
|
+
# Corresponds to the JSON property `tcpRoutes`
|
1967
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TcpRoute>]
|
1968
|
+
attr_accessor :tcp_routes
|
497
1969
|
|
498
1970
|
def initialize(**args)
|
499
1971
|
update!(**args)
|
@@ -502,12 +1974,12 @@ module Google
|
|
502
1974
|
# Update properties of this object
|
503
1975
|
def update!(**args)
|
504
1976
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
505
|
-
@
|
1977
|
+
@tcp_routes = args[:tcp_routes] if args.key?(:tcp_routes)
|
506
1978
|
end
|
507
1979
|
end
|
508
1980
|
|
509
|
-
# Response returned by the
|
510
|
-
class
|
1981
|
+
# Response returned by the ListTlsRoutes method.
|
1982
|
+
class ListTlsRoutesResponse
|
511
1983
|
include Google::Apis::Core::Hashable
|
512
1984
|
|
513
1985
|
# If there might be more results than those appearing in this response, then `
|
@@ -517,10 +1989,10 @@ module Google
|
|
517
1989
|
# @return [String]
|
518
1990
|
attr_accessor :next_page_token
|
519
1991
|
|
520
|
-
# List of
|
521
|
-
# Corresponds to the JSON property `
|
522
|
-
# @return [Array<Google::Apis::NetworkservicesV1::
|
523
|
-
attr_accessor :
|
1992
|
+
# List of TlsRoute resources.
|
1993
|
+
# Corresponds to the JSON property `tlsRoutes`
|
1994
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TlsRoute>]
|
1995
|
+
attr_accessor :tls_routes
|
524
1996
|
|
525
1997
|
def initialize(**args)
|
526
1998
|
update!(**args)
|
@@ -529,7 +2001,7 @@ module Google
|
|
529
2001
|
# Update properties of this object
|
530
2002
|
def update!(**args)
|
531
2003
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
532
|
-
@
|
2004
|
+
@tls_routes = args[:tls_routes] if args.key?(:tls_routes)
|
533
2005
|
end
|
534
2006
|
end
|
535
2007
|
|
@@ -580,6 +2052,68 @@ module Google
|
|
580
2052
|
end
|
581
2053
|
end
|
582
2054
|
|
2055
|
+
# Mesh represents a logical configuration grouping for workload to workload
|
2056
|
+
# communication within a service mesh. Routes that point to mesh dictate how
|
2057
|
+
# requests are routed within this logical mesh boundary.
|
2058
|
+
class Mesh
|
2059
|
+
include Google::Apis::Core::Hashable
|
2060
|
+
|
2061
|
+
# Output only. The timestamp when the resource was created.
|
2062
|
+
# Corresponds to the JSON property `createTime`
|
2063
|
+
# @return [String]
|
2064
|
+
attr_accessor :create_time
|
2065
|
+
|
2066
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
2067
|
+
# Corresponds to the JSON property `description`
|
2068
|
+
# @return [String]
|
2069
|
+
attr_accessor :description
|
2070
|
+
|
2071
|
+
# Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to
|
2072
|
+
# listen on the specified port of localhost (127.0.0.1) address. The SIDECAR
|
2073
|
+
# proxy will expect all traffic to be redirected to this port regardless of its
|
2074
|
+
# actual ip:port destination. If unset, a port '15001' is used as the
|
2075
|
+
# interception port. This will is applicable only for sidecar proxy deployments.
|
2076
|
+
# Corresponds to the JSON property `interceptionPort`
|
2077
|
+
# @return [Fixnum]
|
2078
|
+
attr_accessor :interception_port
|
2079
|
+
|
2080
|
+
# Optional. Set of label tags associated with the Mesh resource.
|
2081
|
+
# Corresponds to the JSON property `labels`
|
2082
|
+
# @return [Hash<String,String>]
|
2083
|
+
attr_accessor :labels
|
2084
|
+
|
2085
|
+
# Required. Name of the Mesh resource. It matches pattern `projects/*/locations/
|
2086
|
+
# global/meshes/`.
|
2087
|
+
# Corresponds to the JSON property `name`
|
2088
|
+
# @return [String]
|
2089
|
+
attr_accessor :name
|
2090
|
+
|
2091
|
+
# Output only. Server-defined URL of this resource
|
2092
|
+
# Corresponds to the JSON property `selfLink`
|
2093
|
+
# @return [String]
|
2094
|
+
attr_accessor :self_link
|
2095
|
+
|
2096
|
+
# Output only. The timestamp when the resource was updated.
|
2097
|
+
# Corresponds to the JSON property `updateTime`
|
2098
|
+
# @return [String]
|
2099
|
+
attr_accessor :update_time
|
2100
|
+
|
2101
|
+
def initialize(**args)
|
2102
|
+
update!(**args)
|
2103
|
+
end
|
2104
|
+
|
2105
|
+
# Update properties of this object
|
2106
|
+
def update!(**args)
|
2107
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
2108
|
+
@description = args[:description] if args.key?(:description)
|
2109
|
+
@interception_port = args[:interception_port] if args.key?(:interception_port)
|
2110
|
+
@labels = args[:labels] if args.key?(:labels)
|
2111
|
+
@name = args[:name] if args.key?(:name)
|
2112
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
2113
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2114
|
+
end
|
2115
|
+
end
|
2116
|
+
|
583
2117
|
# This resource represents a long-running operation that is the result of a
|
584
2118
|
# network API call.
|
585
2119
|
class Operation
|
@@ -940,6 +2474,204 @@ module Google
|
|
940
2474
|
end
|
941
2475
|
end
|
942
2476
|
|
2477
|
+
# TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/
|
2478
|
+
# Gateway resource.
|
2479
|
+
class TcpRoute
|
2480
|
+
include Google::Apis::Core::Hashable
|
2481
|
+
|
2482
|
+
# Output only. The timestamp when the resource was created.
|
2483
|
+
# Corresponds to the JSON property `createTime`
|
2484
|
+
# @return [String]
|
2485
|
+
attr_accessor :create_time
|
2486
|
+
|
2487
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
2488
|
+
# Corresponds to the JSON property `description`
|
2489
|
+
# @return [String]
|
2490
|
+
attr_accessor :description
|
2491
|
+
|
2492
|
+
# Optional. Gateways defines a list of gateways this TcpRoute is attached to, as
|
2493
|
+
# one of the routing rules to route the requests served by the gateway. Each
|
2494
|
+
# gateway reference should match the pattern: `projects/*/locations/global/
|
2495
|
+
# gateways/`
|
2496
|
+
# Corresponds to the JSON property `gateways`
|
2497
|
+
# @return [Array<String>]
|
2498
|
+
attr_accessor :gateways
|
2499
|
+
|
2500
|
+
# Optional. Set of label tags associated with the TcpRoute resource.
|
2501
|
+
# Corresponds to the JSON property `labels`
|
2502
|
+
# @return [Hash<String,String>]
|
2503
|
+
attr_accessor :labels
|
2504
|
+
|
2505
|
+
# Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one
|
2506
|
+
# of the routing rules to route the requests served by the mesh. Each mesh
|
2507
|
+
# reference should match the pattern: `projects/*/locations/global/meshes/` The
|
2508
|
+
# attached Mesh should be of a type SIDECAR
|
2509
|
+
# Corresponds to the JSON property `meshes`
|
2510
|
+
# @return [Array<String>]
|
2511
|
+
attr_accessor :meshes
|
2512
|
+
|
2513
|
+
# Required. Name of the TcpRoute resource. It matches pattern `projects/*/
|
2514
|
+
# locations/global/tcpRoutes/tcp_route_name>`.
|
2515
|
+
# Corresponds to the JSON property `name`
|
2516
|
+
# @return [String]
|
2517
|
+
attr_accessor :name
|
2518
|
+
|
2519
|
+
# Required. Rules that define how traffic is routed and handled. At least one
|
2520
|
+
# RouteRule must be supplied. If there are multiple rules then the action taken
|
2521
|
+
# will be the first rule to match.
|
2522
|
+
# Corresponds to the JSON property `rules`
|
2523
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TcpRouteRouteRule>]
|
2524
|
+
attr_accessor :rules
|
2525
|
+
|
2526
|
+
# Output only. Server-defined URL of this resource
|
2527
|
+
# Corresponds to the JSON property `selfLink`
|
2528
|
+
# @return [String]
|
2529
|
+
attr_accessor :self_link
|
2530
|
+
|
2531
|
+
# Output only. The timestamp when the resource was updated.
|
2532
|
+
# Corresponds to the JSON property `updateTime`
|
2533
|
+
# @return [String]
|
2534
|
+
attr_accessor :update_time
|
2535
|
+
|
2536
|
+
def initialize(**args)
|
2537
|
+
update!(**args)
|
2538
|
+
end
|
2539
|
+
|
2540
|
+
# Update properties of this object
|
2541
|
+
def update!(**args)
|
2542
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
2543
|
+
@description = args[:description] if args.key?(:description)
|
2544
|
+
@gateways = args[:gateways] if args.key?(:gateways)
|
2545
|
+
@labels = args[:labels] if args.key?(:labels)
|
2546
|
+
@meshes = args[:meshes] if args.key?(:meshes)
|
2547
|
+
@name = args[:name] if args.key?(:name)
|
2548
|
+
@rules = args[:rules] if args.key?(:rules)
|
2549
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
2550
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2551
|
+
end
|
2552
|
+
end
|
2553
|
+
|
2554
|
+
# The specifications for routing traffic and applying associated policies.
|
2555
|
+
class TcpRouteRouteAction
|
2556
|
+
include Google::Apis::Core::Hashable
|
2557
|
+
|
2558
|
+
# Optional. The destination services to which traffic should be forwarded. At
|
2559
|
+
# least one destination service is required.
|
2560
|
+
# Corresponds to the JSON property `destinations`
|
2561
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TcpRouteRouteDestination>]
|
2562
|
+
attr_accessor :destinations
|
2563
|
+
|
2564
|
+
# Optional. If true, Router will use the destination IP and port of the original
|
2565
|
+
# connection as the destination of the request. Default is false.
|
2566
|
+
# Corresponds to the JSON property `originalDestination`
|
2567
|
+
# @return [Boolean]
|
2568
|
+
attr_accessor :original_destination
|
2569
|
+
alias_method :original_destination?, :original_destination
|
2570
|
+
|
2571
|
+
def initialize(**args)
|
2572
|
+
update!(**args)
|
2573
|
+
end
|
2574
|
+
|
2575
|
+
# Update properties of this object
|
2576
|
+
def update!(**args)
|
2577
|
+
@destinations = args[:destinations] if args.key?(:destinations)
|
2578
|
+
@original_destination = args[:original_destination] if args.key?(:original_destination)
|
2579
|
+
end
|
2580
|
+
end
|
2581
|
+
|
2582
|
+
# Describe the destination for traffic to be routed to.
|
2583
|
+
class TcpRouteRouteDestination
|
2584
|
+
include Google::Apis::Core::Hashable
|
2585
|
+
|
2586
|
+
# Required. The URL of a BackendService to route traffic to.
|
2587
|
+
# Corresponds to the JSON property `serviceName`
|
2588
|
+
# @return [String]
|
2589
|
+
attr_accessor :service_name
|
2590
|
+
|
2591
|
+
# Optional. Specifies the proportion of requests forwarded to the backend
|
2592
|
+
# referenced by the serviceName field. This is computed as: weight/Sum(weights
|
2593
|
+
# in this destination list). For non-zero values, there may be some epsilon from
|
2594
|
+
# the exact proportion defined here depending on the precision an implementation
|
2595
|
+
# supports. If only one serviceName is specified and it has a weight greater
|
2596
|
+
# than 0, 100% of the traffic is forwarded to that backend. If weights are
|
2597
|
+
# specified for any one service name, they need to be specified for all of them.
|
2598
|
+
# If weights are unspecified for all services, then, traffic is distributed in
|
2599
|
+
# equal proportions to all of them.
|
2600
|
+
# Corresponds to the JSON property `weight`
|
2601
|
+
# @return [Fixnum]
|
2602
|
+
attr_accessor :weight
|
2603
|
+
|
2604
|
+
def initialize(**args)
|
2605
|
+
update!(**args)
|
2606
|
+
end
|
2607
|
+
|
2608
|
+
# Update properties of this object
|
2609
|
+
def update!(**args)
|
2610
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
2611
|
+
@weight = args[:weight] if args.key?(:weight)
|
2612
|
+
end
|
2613
|
+
end
|
2614
|
+
|
2615
|
+
# RouteMatch defines the predicate used to match requests to a given action.
|
2616
|
+
# Multiple match types are "OR"ed for evaluation. If no routeMatch field is
|
2617
|
+
# specified, this rule will unconditionally match traffic.
|
2618
|
+
class TcpRouteRouteMatch
|
2619
|
+
include Google::Apis::Core::Hashable
|
2620
|
+
|
2621
|
+
# Required. Must be specified in the CIDR range format. A CIDR range consists of
|
2622
|
+
# an IP Address and a prefix length to construct the subnet mask. By default,
|
2623
|
+
# the prefix length is 32 (i.e. matches a single IP address). Only IPV4
|
2624
|
+
# addresses are supported. Examples: "10.0.0.1" - matches against this exact IP
|
2625
|
+
# address. "10.0.0.0/8" - matches against any IP address within the 10.0.0.0
|
2626
|
+
# subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP address'.
|
2627
|
+
# Corresponds to the JSON property `address`
|
2628
|
+
# @return [String]
|
2629
|
+
attr_accessor :address
|
2630
|
+
|
2631
|
+
# Required. Specifies the destination port to match against.
|
2632
|
+
# Corresponds to the JSON property `port`
|
2633
|
+
# @return [String]
|
2634
|
+
attr_accessor :port
|
2635
|
+
|
2636
|
+
def initialize(**args)
|
2637
|
+
update!(**args)
|
2638
|
+
end
|
2639
|
+
|
2640
|
+
# Update properties of this object
|
2641
|
+
def update!(**args)
|
2642
|
+
@address = args[:address] if args.key?(:address)
|
2643
|
+
@port = args[:port] if args.key?(:port)
|
2644
|
+
end
|
2645
|
+
end
|
2646
|
+
|
2647
|
+
# Specifies how to match traffic and how to route traffic when traffic is
|
2648
|
+
# matched.
|
2649
|
+
class TcpRouteRouteRule
|
2650
|
+
include Google::Apis::Core::Hashable
|
2651
|
+
|
2652
|
+
# The specifications for routing traffic and applying associated policies.
|
2653
|
+
# Corresponds to the JSON property `action`
|
2654
|
+
# @return [Google::Apis::NetworkservicesV1::TcpRouteRouteAction]
|
2655
|
+
attr_accessor :action
|
2656
|
+
|
2657
|
+
# Optional. RouteMatch defines the predicate used to match requests to a given
|
2658
|
+
# action. Multiple match types are "OR"ed for evaluation. If no routeMatch field
|
2659
|
+
# is specified, this rule will unconditionally match traffic.
|
2660
|
+
# Corresponds to the JSON property `matches`
|
2661
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TcpRouteRouteMatch>]
|
2662
|
+
attr_accessor :matches
|
2663
|
+
|
2664
|
+
def initialize(**args)
|
2665
|
+
update!(**args)
|
2666
|
+
end
|
2667
|
+
|
2668
|
+
# Update properties of this object
|
2669
|
+
def update!(**args)
|
2670
|
+
@action = args[:action] if args.key?(:action)
|
2671
|
+
@matches = args[:matches] if args.key?(:matches)
|
2672
|
+
end
|
2673
|
+
end
|
2674
|
+
|
943
2675
|
# Request message for `TestIamPermissions` method.
|
944
2676
|
class TestIamPermissionsRequest
|
945
2677
|
include Google::Apis::Core::Hashable
|
@@ -980,6 +2712,184 @@ module Google
|
|
980
2712
|
end
|
981
2713
|
end
|
982
2714
|
|
2715
|
+
# TlsRoute defines how traffic should be routed based on SNI and other matching
|
2716
|
+
# L3 attributes.
|
2717
|
+
class TlsRoute
|
2718
|
+
include Google::Apis::Core::Hashable
|
2719
|
+
|
2720
|
+
# Output only. The timestamp when the resource was created.
|
2721
|
+
# Corresponds to the JSON property `createTime`
|
2722
|
+
# @return [String]
|
2723
|
+
attr_accessor :create_time
|
2724
|
+
|
2725
|
+
# Optional. A free-text description of the resource. Max length 1024 characters.
|
2726
|
+
# Corresponds to the JSON property `description`
|
2727
|
+
# @return [String]
|
2728
|
+
attr_accessor :description
|
2729
|
+
|
2730
|
+
# Optional. Gateways defines a list of gateways this TlsRoute is attached to, as
|
2731
|
+
# one of the routing rules to route the requests served by the gateway. Each
|
2732
|
+
# gateway reference should match the pattern: `projects/*/locations/global/
|
2733
|
+
# gateways/`
|
2734
|
+
# Corresponds to the JSON property `gateways`
|
2735
|
+
# @return [Array<String>]
|
2736
|
+
attr_accessor :gateways
|
2737
|
+
|
2738
|
+
# Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one
|
2739
|
+
# of the routing rules to route the requests served by the mesh. Each mesh
|
2740
|
+
# reference should match the pattern: `projects/*/locations/global/meshes/` The
|
2741
|
+
# attached Mesh should be of a type SIDECAR
|
2742
|
+
# Corresponds to the JSON property `meshes`
|
2743
|
+
# @return [Array<String>]
|
2744
|
+
attr_accessor :meshes
|
2745
|
+
|
2746
|
+
# Required. Name of the TlsRoute resource. It matches pattern `projects/*/
|
2747
|
+
# locations/global/tlsRoutes/tls_route_name>`.
|
2748
|
+
# Corresponds to the JSON property `name`
|
2749
|
+
# @return [String]
|
2750
|
+
attr_accessor :name
|
2751
|
+
|
2752
|
+
# Required. Rules that define how traffic is routed and handled. At least one
|
2753
|
+
# RouteRule must be supplied. If there are multiple rules then the action taken
|
2754
|
+
# will be the first rule to match.
|
2755
|
+
# Corresponds to the JSON property `rules`
|
2756
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TlsRouteRouteRule>]
|
2757
|
+
attr_accessor :rules
|
2758
|
+
|
2759
|
+
# Output only. Server-defined URL of this resource
|
2760
|
+
# Corresponds to the JSON property `selfLink`
|
2761
|
+
# @return [String]
|
2762
|
+
attr_accessor :self_link
|
2763
|
+
|
2764
|
+
# Output only. The timestamp when the resource was updated.
|
2765
|
+
# Corresponds to the JSON property `updateTime`
|
2766
|
+
# @return [String]
|
2767
|
+
attr_accessor :update_time
|
2768
|
+
|
2769
|
+
def initialize(**args)
|
2770
|
+
update!(**args)
|
2771
|
+
end
|
2772
|
+
|
2773
|
+
# Update properties of this object
|
2774
|
+
def update!(**args)
|
2775
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
2776
|
+
@description = args[:description] if args.key?(:description)
|
2777
|
+
@gateways = args[:gateways] if args.key?(:gateways)
|
2778
|
+
@meshes = args[:meshes] if args.key?(:meshes)
|
2779
|
+
@name = args[:name] if args.key?(:name)
|
2780
|
+
@rules = args[:rules] if args.key?(:rules)
|
2781
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
2782
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2783
|
+
end
|
2784
|
+
end
|
2785
|
+
|
2786
|
+
# The specifications for routing traffic and applying associated policies.
|
2787
|
+
class TlsRouteRouteAction
|
2788
|
+
include Google::Apis::Core::Hashable
|
2789
|
+
|
2790
|
+
# Required. The destination services to which traffic should be forwarded. At
|
2791
|
+
# least one destination service is required.
|
2792
|
+
# Corresponds to the JSON property `destinations`
|
2793
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TlsRouteRouteDestination>]
|
2794
|
+
attr_accessor :destinations
|
2795
|
+
|
2796
|
+
def initialize(**args)
|
2797
|
+
update!(**args)
|
2798
|
+
end
|
2799
|
+
|
2800
|
+
# Update properties of this object
|
2801
|
+
def update!(**args)
|
2802
|
+
@destinations = args[:destinations] if args.key?(:destinations)
|
2803
|
+
end
|
2804
|
+
end
|
2805
|
+
|
2806
|
+
# Describe the destination for traffic to be routed to.
|
2807
|
+
class TlsRouteRouteDestination
|
2808
|
+
include Google::Apis::Core::Hashable
|
2809
|
+
|
2810
|
+
# Required. The URL of a BackendService to route traffic to.
|
2811
|
+
# Corresponds to the JSON property `serviceName`
|
2812
|
+
# @return [String]
|
2813
|
+
attr_accessor :service_name
|
2814
|
+
|
2815
|
+
# Optional. Specifies the proportion of requests forwareded to the backend
|
2816
|
+
# referenced by the service_name field. This is computed as: weight/Sum(weights
|
2817
|
+
# in destinations) Weights in all destinations does not need to sum up to 100.
|
2818
|
+
# Corresponds to the JSON property `weight`
|
2819
|
+
# @return [Fixnum]
|
2820
|
+
attr_accessor :weight
|
2821
|
+
|
2822
|
+
def initialize(**args)
|
2823
|
+
update!(**args)
|
2824
|
+
end
|
2825
|
+
|
2826
|
+
# Update properties of this object
|
2827
|
+
def update!(**args)
|
2828
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
2829
|
+
@weight = args[:weight] if args.key?(:weight)
|
2830
|
+
end
|
2831
|
+
end
|
2832
|
+
|
2833
|
+
# RouteMatch defines the predicate used to match requests to a given action.
|
2834
|
+
# Multiple match types are "AND"ed for evaluation. If no routeMatch field is
|
2835
|
+
# specified, this rule will unconditionally match traffic.
|
2836
|
+
class TlsRouteRouteMatch
|
2837
|
+
include Google::Apis::Core::Hashable
|
2838
|
+
|
2839
|
+
# Optional. ALPN (Application-Layer Protocol Negotiation) to match against.
|
2840
|
+
# Examples: "http/1.1", "h2". At least one of sni_host and alpn is required. Up
|
2841
|
+
# to 5 alpns across all matches can be set.
|
2842
|
+
# Corresponds to the JSON property `alpn`
|
2843
|
+
# @return [Array<String>]
|
2844
|
+
attr_accessor :alpn
|
2845
|
+
|
2846
|
+
# Optional. SNI (server name indicator) to match against. SNI will be matched
|
2847
|
+
# against all wildcard domains, i.e. www.example.com will be first matched
|
2848
|
+
# against www.example.com, then *.example.com, then *.com. Partial wildcards are
|
2849
|
+
# not supported, and values like *w.example.com are invalid. At least one of
|
2850
|
+
# sni_host and alpn is required. Up to 5 sni hosts across all matches can be set.
|
2851
|
+
# Corresponds to the JSON property `sniHost`
|
2852
|
+
# @return [Array<String>]
|
2853
|
+
attr_accessor :sni_host
|
2854
|
+
|
2855
|
+
def initialize(**args)
|
2856
|
+
update!(**args)
|
2857
|
+
end
|
2858
|
+
|
2859
|
+
# Update properties of this object
|
2860
|
+
def update!(**args)
|
2861
|
+
@alpn = args[:alpn] if args.key?(:alpn)
|
2862
|
+
@sni_host = args[:sni_host] if args.key?(:sni_host)
|
2863
|
+
end
|
2864
|
+
end
|
2865
|
+
|
2866
|
+
# Specifies how to match traffic and how to route traffic when traffic is
|
2867
|
+
# matched.
|
2868
|
+
class TlsRouteRouteRule
|
2869
|
+
include Google::Apis::Core::Hashable
|
2870
|
+
|
2871
|
+
# The specifications for routing traffic and applying associated policies.
|
2872
|
+
# Corresponds to the JSON property `action`
|
2873
|
+
# @return [Google::Apis::NetworkservicesV1::TlsRouteRouteAction]
|
2874
|
+
attr_accessor :action
|
2875
|
+
|
2876
|
+
# Required. RouteMatch defines the predicate used to match requests to a given
|
2877
|
+
# action. Multiple match types are "OR"ed for evaluation.
|
2878
|
+
# Corresponds to the JSON property `matches`
|
2879
|
+
# @return [Array<Google::Apis::NetworkservicesV1::TlsRouteRouteMatch>]
|
2880
|
+
attr_accessor :matches
|
2881
|
+
|
2882
|
+
def initialize(**args)
|
2883
|
+
update!(**args)
|
2884
|
+
end
|
2885
|
+
|
2886
|
+
# Update properties of this object
|
2887
|
+
def update!(**args)
|
2888
|
+
@action = args[:action] if args.key?(:action)
|
2889
|
+
@matches = args[:matches] if args.key?(:matches)
|
2890
|
+
end
|
2891
|
+
end
|
2892
|
+
|
983
2893
|
# Specification of a port-based selector.
|
984
2894
|
class TrafficPortSelector
|
985
2895
|
include Google::Apis::Core::Hashable
|