Class: Google::Apis::ComputeV1::HttpRouteAction

Inherits:
Object
  • Object
show all
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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ HttpRouteAction

Returns a new instance of HttpRouteAction.



8872
8873
8874
# File 'generated/google/apis/compute_v1/classes.rb', line 8872

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

Instance Attribute Details

#cors_policyGoogle::Apis::ComputeV1::CorsPolicy

The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Corresponds to the JSON property corsPolicy



8820
8821
8822
# File 'generated/google/apis/compute_v1/classes.rb', line 8820

def cors_policy
  @cors_policy
end

#fault_injection_policyGoogle::Apis::ComputeV1::HttpFaultInjection

The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. Corresponds to the JSON property faultInjectionPolicy



8830
8831
8832
# File 'generated/google/apis/compute_v1/classes.rb', line 8830

def fault_injection_policy
  @fault_injection_policy
end

#request_mirror_policyGoogle::Apis::ComputeV1::RequestMirrorPolicy

A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Corresponds to the JSON property requestMirrorPolicy



8838
8839
8840
# File 'generated/google/apis/compute_v1/classes.rb', line 8838

def request_mirror_policy
  @request_mirror_policy
end

#retry_policyGoogle::Apis::ComputeV1::HttpRetryPolicy

The retry policy associates with HttpRouteRule Corresponds to the JSON property retryPolicy



8843
8844
8845
# File 'generated/google/apis/compute_v1/classes.rb', line 8843

def retry_policy
  @retry_policy
end

#timeoutGoogle::Apis::ComputeV1::Duration

A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10, 000 years. Corresponds to the JSON property timeout



8851
8852
8853
# File 'generated/google/apis/compute_v1/classes.rb', line 8851

def timeout
  @timeout
end

#url_rewriteGoogle::Apis::ComputeV1::UrlRewrite

The spec for modifying the path before sending the request to the matched backend service. Corresponds to the JSON property urlRewrite



8857
8858
8859
# File 'generated/google/apis/compute_v1/classes.rb', line 8857

def url_rewrite
  @url_rewrite
end

#weighted_backend_servicesArray<Google::Apis::ComputeV1::WeightedBackendService>

A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Corresponds to the JSON property weightedBackendServices



8870
8871
8872
# File 'generated/google/apis/compute_v1/classes.rb', line 8870

def weighted_backend_services
  @weighted_backend_services
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8877
8878
8879
8880
8881
8882
8883
8884
8885
# File 'generated/google/apis/compute_v1/classes.rb', line 8877

def update!(**args)
  @cors_policy = args[:cors_policy] if args.key?(:cors_policy)
  @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
  @request_mirror_policy = args[:request_mirror_policy] if args.key?(:request_mirror_policy)
  @retry_policy = args[:retry_policy] if args.key?(:retry_policy)
  @timeout = args[:timeout] if args.key?(:timeout)
  @url_rewrite = args[:url_rewrite] if args.key?(:url_rewrite)
  @weighted_backend_services = args[:weighted_backend_services] if args.key?(:weighted_backend_services)
end