Class: Google::Apis::ComputeBeta::RequestMirrorPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb

Overview

A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RequestMirrorPolicy

Returns a new instance of RequestMirrorPolicy.



36329
36330
36331
# File 'lib/google/apis/compute_beta/classes.rb', line 36329

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backend_serviceString

The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. Corresponds to the JSON property backendService

Returns:

  • (String)


36322
36323
36324
# File 'lib/google/apis/compute_beta/classes.rb', line 36322

def backend_service
  @backend_service
end

#mirror_percentFloat

The percentage of requests to be mirrored to backend_service. Corresponds to the JSON property mirrorPercent

Returns:

  • (Float)


36327
36328
36329
# File 'lib/google/apis/compute_beta/classes.rb', line 36327

def mirror_percent
  @mirror_percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36334
36335
36336
36337
# File 'lib/google/apis/compute_beta/classes.rb', line 36334

def update!(**args)
  @backend_service = args[:backend_service] if args.key?(:backend_service)
  @mirror_percent = args[:mirror_percent] if args.key?(:mirror_percent)
end