(::String) — Optional. A free-text description of the resource. Max length 1024
characters.
#description=
defdescription=(value)->::String
Parameter
value (::String) — Optional. A free-text description of the resource. Max length 1024
characters.
Returns
(::String) — Optional. A free-text description of the resource. Max length 1024
characters.
#gateways
defgateways()->::Array<::String>
Returns
(::Array<::String>) — Optional. Gateways defines a list of gateways this TcpRoute is attached to,
as one of the routing rules to route the requests served by the gateway.
Each gateway reference should match the pattern:
projects/*/locations/global/gateways/<gateway_name>
#gateways=
defgateways=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Optional. Gateways defines a list of gateways this TcpRoute is attached to,
as one of the routing rules to route the requests served by the gateway.
Each gateway reference should match the pattern:
projects/*/locations/global/gateways/<gateway_name>
Returns
(::Array<::String>) — Optional. Gateways defines a list of gateways this TcpRoute is attached to,
as one of the routing rules to route the requests served by the gateway.
Each gateway reference should match the pattern:
projects/*/locations/global/gateways/<gateway_name>
value (::Google::Protobuf::Map{::String => ::String}) — Optional. Set of label tags associated with the TcpRoute resource.
Returns
(::Google::Protobuf::Map{::String => ::String}) — Optional. Set of label tags associated with the TcpRoute resource.
#meshes
defmeshes()->::Array<::String>
Returns
(::Array<::String>) — Optional. Meshes defines a list of meshes this TcpRoute is attached to, as
one of the routing rules to route the requests served by the mesh.
Each mesh reference should match the pattern:
projects/*/locations/global/meshes/<mesh_name>
The attached Mesh should be of a type SIDECAR
#meshes=
defmeshes=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Optional. Meshes defines a list of meshes this TcpRoute is attached to, as
one of the routing rules to route the requests served by the mesh.
Each mesh reference should match the pattern:
projects/*/locations/global/meshes/<mesh_name>
The attached Mesh should be of a type SIDECAR
Returns
(::Array<::String>) — Optional. Meshes defines a list of meshes this TcpRoute is attached to, as
one of the routing rules to route the requests served by the mesh.
Each mesh reference should match the pattern:
projects/*/locations/global/meshes/<mesh_name>
The attached Mesh should be of a type SIDECAR
#name
defname()->::String
Returns
(::String) — Identifier. Name of the TcpRoute resource. It matches pattern
projects/*/locations/global/tcpRoutes/tcp_route_name>.
#name=
defname=(value)->::String
Parameter
value (::String) — Identifier. Name of the TcpRoute resource. It matches pattern
projects/*/locations/global/tcpRoutes/tcp_route_name>.
Returns
(::String) — Identifier. Name of the TcpRoute resource. It matches pattern
projects/*/locations/global/tcpRoutes/tcp_route_name>.
(::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>) — Required. Rules that define how traffic is routed and handled. At least one
RouteRule must be supplied. If there are multiple rules then the action
taken will be the first rule to match.
value (::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>) — Required. Rules that define how traffic is routed and handled. At least one
RouteRule must be supplied. If there are multiple rules then the action
taken will be the first rule to match.
Returns
(::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>) — Required. Rules that define how traffic is routed and handled. At least one
RouteRule must be supplied. If there are multiple rules then the action
taken will be the first rule to match.
#self_link
defself_link()->::String
Returns
(::String) — Output only. Server-defined URL of this resource
[[["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::TcpRoute (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-TcpRoute)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-TcpRoute)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-TcpRoute) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::TcpRoute.\n\nTcpRoute is the resource defining how TCP traffic should be routed by a\nMesh/Gateway resource. \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### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was created.\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.\n\n### #description=\n\n def description=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. A free-text description of the resource. Max length 1024 characters. \n**Returns**\n\n- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.\n\n### #gateways\n\n def gateways() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway.\n\n Each gateway reference should match the pattern:\n `projects/*/locations/global/gateways/\u003cgateway_name\u003e`\n\n### #gateways=\n\n def gateways=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway.\n\n\n Each gateway reference should match the pattern:\n`projects/*/locations/global/gateways/\u003cgateway_name\u003e` \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway.\n\n Each gateway reference should match the pattern:\n `projects/*/locations/global/gateways/\u003cgateway_name\u003e`\n\n### #labels\n\n def labels() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Set of label tags associated with the TcpRoute resource.\n\n### #labels=\n\n def labels=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Set of label tags associated with the TcpRoute resource. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Optional. Set of label tags associated with the TcpRoute resource.\n\n### #meshes\n\n def meshes() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh.\n\n Each mesh reference should match the pattern:\n `projects/*/locations/global/meshes/\u003cmesh_name\u003e`\n\n The attached Mesh should be of a type SIDECAR\n\n### #meshes=\n\n def meshes=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh.\n\n\n Each mesh reference should match the pattern:\n `projects/*/locations/global/meshes/\u003cmesh_name\u003e`\n\nThe attached Mesh should be of a type SIDECAR \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh.\n\n Each mesh reference should match the pattern:\n `projects/*/locations/global/meshes/\u003cmesh_name\u003e`\n\n The attached Mesh should be of a type SIDECAR\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`. \n**Returns**\n\n- (::String) --- Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name\u003e`.\n\n### #rules\n\n def rules() -\u003e ::Array\u003c::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule](./Google-Cloud-NetworkServices-V1-TcpRoute-RouteRule)\\\u003e) --- Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.\n\n### #rules=\n\n def rules=(value) -\u003e ::Array\u003c::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule](./Google-Cloud-NetworkServices-V1-TcpRoute-RouteRule)\\\u003e) --- Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule](./Google-Cloud-NetworkServices-V1-TcpRoute-RouteRule)\\\u003e) --- Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.\n\n### #self_link\n\n def self_link() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Server-defined URL of this resource\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was updated."]]