(::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a matching
request prior to delivery of the request to the destination. If
HeaderModifiers are set on both the Destination and the RouteAction, they
will be merged. Conflicts between the two will not be resolved on the
configuration.
value (::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a matching
request prior to delivery of the request to the destination. If
HeaderModifiers are set on both the Destination and the RouteAction, they
will be merged. Conflicts between the two will not be resolved on the
configuration.
Returns
(::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a matching
request prior to delivery of the request to the destination. If
HeaderModifiers are set on both the Destination and the RouteAction, they
will be merged. Conflicts between the two will not be resolved on the
configuration.
(::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a response prior
to sending the response back to the client. If HeaderModifiers are set on
both the Destination and the RouteAction, they will be merged. Conflicts
between the two will not be resolved on the configuration.
value (::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a response prior
to sending the response back to the client. If HeaderModifiers are set on
both the Destination and the RouteAction, they will be merged. Conflicts
between the two will not be resolved on the configuration.
Returns
(::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier) — Optional. The specification for modifying the headers of a response prior
to sending the response back to the client. If HeaderModifiers are set on
both the Destination and the RouteAction, they will be merged. Conflicts
between the two will not be resolved on the configuration.
#service_name
defservice_name()->::String
Returns
(::String) — The URL of a BackendService to route traffic to.
#service_name=
defservice_name=(value)->::String
Parameter
value (::String) — The URL of a BackendService to route traffic to.
Returns
(::String) — The URL of a BackendService to route traffic to.
#weight
defweight()->::Integer
Returns
(::Integer) — Specifies the proportion of requests forwarded to the backend referenced
by the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
#weight=
defweight=(value)->::Integer
Parameter
value (::Integer) — Specifies the proportion of requests forwarded to the backend referenced
by the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
Returns
(::Integer) — Specifies the proportion of requests forwarded to the backend referenced
by the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::HttpRoute::Destination (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-Destination) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::HttpRoute::Destination.\n\nSpecifications of a destination to which the request should be routed to. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #request_header_modifier\n\n def request_header_modifier() -\u003e ::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier\n\n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.\n\n### #request_header_modifier=\n\n def request_header_modifier=(value) -\u003e ::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier\n\n**Parameter**\n\n- **value** ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration. \n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.\n\n### #response_header_modifier\n\n def response_header_modifier() -\u003e ::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier\n\n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.\n\n### #response_header_modifier=\n\n def response_header_modifier=(value) -\u003e ::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier\n\n**Parameter**\n\n- **value** ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration. \n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier](./Google-Cloud-NetworkServices-V1-HttpRoute-HeaderModifier)) --- Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.\n\n### #service_name\n\n def service_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The URL of a BackendService to route traffic to.\n\n### #service_name=\n\n def service_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The URL of a BackendService to route traffic to. \n**Returns**\n\n- (::String) --- The URL of a BackendService to route traffic to.\n\n### #weight\n\n def weight() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as:\n\n - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.\n\n If only one serviceName is specified and it has a weight greater than 0,\n 100% of the traffic is forwarded to that backend.\n\n If weights are specified for any one service name, they need to be\n specified for all of them.\n\n If weights are unspecified for all services, then, traffic is distributed\n in equal proportions to all of them.\n\n### #weight=\n\n def weight=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as:\n\n\n - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.\n\n If only one serviceName is specified and it has a weight greater than 0,\n 100% of the traffic is forwarded to that backend.\n\n If weights are specified for any one service name, they need to be\n specified for all of them.\n\n If weights are unspecified for all services, then, traffic is distributed\nin equal proportions to all of them. \n**Returns**\n\n- (::Integer) --- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as:\n\n - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.\n\n If only one serviceName is specified and it has a weight greater than 0,\n 100% of the traffic is forwarded to that backend.\n\n If weights are specified for any one service name, they need to be\n specified for all of them.\n\n If weights are unspecified for all services, then, traffic is distributed\n in equal proportions to all of them."]]