Class: Google::Apis::ComputeV1::WeightedBackendService
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::WeightedBackendService
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb
Overview
In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService
Instance Attribute Summary collapse
-
#backend_service ⇒ String
The full or partial URL to the default BackendService resource.
-
#header_action ⇒ Google::Apis::ComputeV1::HttpHeaderAction
The request and response header transformations that take effect before the request is passed along to the selected backendService.
-
#weight ⇒ Fixnum
Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .
Instance Method Summary collapse
-
#initialize(**args) ⇒ WeightedBackendService
constructor
A new instance of WeightedBackendService.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ WeightedBackendService
Returns a new instance of WeightedBackendService.
34990 34991 34992 |
# File 'generated/google/apis/compute_v1/classes.rb', line 34990 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backend_service ⇒ String
The full or partial URL to the default BackendService resource. Before
forwarding the request to backendService, the loadbalancer applies any
relevant headerActions specified as part of this backendServiceWeight.
Corresponds to the JSON property backendService
34971 34972 34973 |
# File 'generated/google/apis/compute_v1/classes.rb', line 34971 def backend_service @backend_service end |
#header_action ⇒ Google::Apis::ComputeV1::HttpHeaderAction
The request and response header transformations that take effect before the
request is passed along to the selected backendService.
Corresponds to the JSON property headerAction
34977 34978 34979 |
# File 'generated/google/apis/compute_v1/classes.rb', line 34977 def header_action @header_action end |
#weight ⇒ Fixnum
Specifies the fraction of traffic sent to backendService, computed as weight /
(sum of all weightedBackendService weights in routeAction) .
The selection of a backend service is determined only for new traffic. Once a
user's request has been directed to a backendService, subsequent requests will
be sent to the same backendService as determined by the BackendService's
session affinity policy.
The value must be between 0 and 1000
Corresponds to the JSON property weight
34988 34989 34990 |
# File 'generated/google/apis/compute_v1/classes.rb', line 34988 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
34995 34996 34997 34998 34999 |
# File 'generated/google/apis/compute_v1/classes.rb', line 34995 def update!(**args) @backend_service = args[:backend_service] if args.key?(:backend_service) @header_action = args[:header_action] if args.key?(:header_action) @weight = args[:weight] if args.key?(:weight) end |