Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::TrafficPortSelector.
Specification of a port-based selector.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#ports
defports()->::Array<::String>
Returns
(::Array<::String>) — Optional. A list of ports. Can be port numbers or port range
(example, [80-90] specifies all ports from 80 to 90, including
80 and 90) or named ports or * to specify all ports. If the
list is empty, all ports are selected.
#ports=
defports=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Optional. A list of ports. Can be port numbers or port range
(example, [80-90] specifies all ports from 80 to 90, including
80 and 90) or named ports or * to specify all ports. If the
list is empty, all ports are selected.
Returns
(::Array<::String>) — Optional. A list of ports. Can be port numbers or port range
(example, [80-90] specifies all ports from 80 to 90, including
80 and 90) or named ports or * to specify all ports. If the
list is empty, all ports are selected.
[[["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::TrafficPortSelector (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-TrafficPortSelector)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-TrafficPortSelector) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::TrafficPortSelector.\n\nSpecification of a port-based selector. \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### #ports\n\n def ports() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. A list of ports. Can be port numbers or port range (example, \\[80-90\\] specifies all ports from 80 to 90, including 80 and 90) or named ports or \\* to specify all ports. If the list is empty, all ports are selected.\n\n### #ports=\n\n def ports=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Optional. A list of ports. Can be port numbers or port range (example, \\[80-90\\] specifies all ports from 80 to 90, including 80 and 90) or named ports or \\* to specify all ports. If the list is empty, all ports are selected. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. A list of ports. Can be port numbers or port range (example, \\[80-90\\] specifies all ports from 80 to 90, including 80 and 90) or named ports or \\* to specify all ports. If the list is empty, all ports are selected."]]