HttpVirtualServiceTrafficRouteRule

class oci.service_mesh.models.HttpVirtualServiceTrafficRouteRule(**kwargs)

Bases: oci.service_mesh.models.virtual_service_traffic_route_rule.VirtualServiceTrafficRouteRule

Rule for routing incoming Virtual Service traffic with HTTP protocol

Attributes

PATH_TYPE_PREFIX A constant which can be used with the path_type property of a HttpVirtualServiceTrafficRouteRule.
TYPE_HTTP str(object=’’) -> str
TYPE_TCP str(object=’’) -> str
TYPE_TLS_PASSTHROUGH str(object=’’) -> str
destinations [Required] Gets the destinations of this VirtualServiceTrafficRouteRule.
is_grpc Gets the is_grpc of this HttpVirtualServiceTrafficRouteRule.
path Gets the path of this HttpVirtualServiceTrafficRouteRule.
path_type Gets the path_type of this HttpVirtualServiceTrafficRouteRule.
request_timeout_in_ms Gets the request_timeout_in_ms of this HttpVirtualServiceTrafficRouteRule.
type [Required] Gets the type of this VirtualServiceTrafficRouteRule.

Methods

__init__(**kwargs) Initializes a new HttpVirtualServiceTrafficRouteRule object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
PATH_TYPE_PREFIX = 'PREFIX'

A constant which can be used with the path_type property of a HttpVirtualServiceTrafficRouteRule. This constant has a value of “PREFIX”

TYPE_HTTP = 'HTTP'
TYPE_TCP = 'TCP'
TYPE_TLS_PASSTHROUGH = 'TLS_PASSTHROUGH'
__init__(**kwargs)

Initializes a new HttpVirtualServiceTrafficRouteRule object with values from keyword arguments. The default value of the type attribute of this class is HTTP and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • type (str) – The value to assign to the type property of this HttpVirtualServiceTrafficRouteRule. Allowed values for this property are: “HTTP”, “TLS_PASSTHROUGH”, “TCP”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • destinations (list[oci.service_mesh.models.VirtualDeploymentTrafficRuleTarget]) – The value to assign to the destinations property of this HttpVirtualServiceTrafficRouteRule.
  • path (str) – The value to assign to the path property of this HttpVirtualServiceTrafficRouteRule.
  • path_type (str) – The value to assign to the path_type property of this HttpVirtualServiceTrafficRouteRule. Allowed values for this property are: “PREFIX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • is_grpc (bool) – The value to assign to the is_grpc property of this HttpVirtualServiceTrafficRouteRule.
  • request_timeout_in_ms (int) – The value to assign to the request_timeout_in_ms property of this HttpVirtualServiceTrafficRouteRule.
destinations

[Required] Gets the destinations of this VirtualServiceTrafficRouteRule. The destination of the request.

Returns:The destinations of this VirtualServiceTrafficRouteRule.
Return type:list[oci.service_mesh.models.VirtualDeploymentTrafficRuleTarget]
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

is_grpc

Gets the is_grpc of this HttpVirtualServiceTrafficRouteRule. If true, the rule will check that the content-type header has a application/grpc or one of the various application/grpc+ values.

Returns:The is_grpc of this HttpVirtualServiceTrafficRouteRule.
Return type:bool
path

Gets the path of this HttpVirtualServiceTrafficRouteRule. Route to match

Returns:The path of this HttpVirtualServiceTrafficRouteRule.
Return type:str
path_type

Gets the path_type of this HttpVirtualServiceTrafficRouteRule. Match type for the route

Allowed values for this property are: “PREFIX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The path_type of this HttpVirtualServiceTrafficRouteRule.
Return type:str
request_timeout_in_ms

Gets the request_timeout_in_ms of this HttpVirtualServiceTrafficRouteRule. The maximum duration in milliseconds for the target service to respond to a request. If provided, the timeout value overrides the default timeout of 15 seconds for the HTTP based route rules, and disabled (no timeout) when ‘isGrpc’ is true. The value 0 (zero) indicates that the timeout is disabled. For streaming responses from the target service, consider either keeping the timeout disabled or set a sufficiently high value.

Returns:The request_timeout_in_ms of this HttpVirtualServiceTrafficRouteRule.
Return type:int
type

[Required] Gets the type of this VirtualServiceTrafficRouteRule. Type of protocol.

Allowed values for this property are: “HTTP”, “TLS_PASSTHROUGH”, “TCP”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The type of this VirtualServiceTrafficRouteRule.
Return type:str