Class: Google::Apis::NetworkservicesV1::HttpRouteRouteAction

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

Overview

The specifications for routing traffic and applying associated policies.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteRouteAction

Returns a new instance of HttpRouteRouteAction.



1603
1604
1605
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1603

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

Instance Attribute Details

#cors_policyGoogle::Apis::NetworkservicesV1::HttpRouteCorsPolicy

The Specification for allowing client side cross-origin requests. Corresponds to the JSON property corsPolicy



1545
1546
1547
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1545

def cors_policy
  @cors_policy
end

#destinationsArray<Google::Apis::NetworkservicesV1::HttpRouteDestination>

The destination to which traffic should be forwarded. Corresponds to the JSON property destinations



1550
1551
1552
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1550

def destinations
  @destinations
end

#fault_injection_policyGoogle::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicy

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



1560
1561
1562
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1560

def fault_injection_policy
  @fault_injection_policy
end

#redirectGoogle::Apis::NetworkservicesV1::HttpRouteRedirect

The specification for redirecting traffic. Corresponds to the JSON property redirect



1565
1566
1567
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1565

def redirect
  @redirect
end

#request_header_modifierGoogle::Apis::NetworkservicesV1::HttpRouteHeaderModifier

The specification for modifying HTTP header in HTTP request and HTTP response. Corresponds to the JSON property requestHeaderModifier



1570
1571
1572
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1570

def request_header_modifier
  @request_header_modifier
end

#request_mirror_policyGoogle::Apis::NetworkservicesV1::HttpRouteRequestMirrorPolicy

Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy 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



1578
1579
1580
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1578

def request_mirror_policy
  @request_mirror_policy
end

#response_header_modifierGoogle::Apis::NetworkservicesV1::HttpRouteHeaderModifier

The specification for modifying HTTP header in HTTP request and HTTP response. Corresponds to the JSON property responseHeaderModifier



1583
1584
1585
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1583

def response_header_modifier
  @response_header_modifier
end

#retry_policyGoogle::Apis::NetworkservicesV1::HttpRouteRetryPolicy

The specifications for retries. Corresponds to the JSON property retryPolicy



1588
1589
1590
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1588

def retry_policy
  @retry_policy
end

#timeoutString

Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries. Corresponds to the JSON property timeout

Returns:

  • (String)


1595
1596
1597
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1595

def timeout
  @timeout
end

#url_rewriteGoogle::Apis::NetworkservicesV1::HttpRouteUrlRewrite

The specification for modifying the URL of the request, prior to forwarding the request to the destination. Corresponds to the JSON property urlRewrite



1601
1602
1603
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1601

def url_rewrite
  @url_rewrite
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1608

def update!(**args)
  @cors_policy = args[:cors_policy] if args.key?(:cors_policy)
  @destinations = args[:destinations] if args.key?(:destinations)
  @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
  @redirect = args[:redirect] if args.key?(:redirect)
  @request_header_modifier = args[:request_header_modifier] if args.key?(:request_header_modifier)
  @request_mirror_policy = args[:request_mirror_policy] if args.key?(:request_mirror_policy)
  @response_header_modifier = args[:response_header_modifier] if args.key?(:response_header_modifier)
  @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)
end