Reference documentation and code samples for the Google Cloud Network Services V1 Client class TrafficPortSelector.
Specification of a port-based selector.
Generated from protobuf messagegoogle.cloud.networkservices.v1.TrafficPortSelector
Namespace
Google \ Cloud \ NetworkServices \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ ports
array
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.
getPorts
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.
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-09-04 UTC."],[],[],null,["# Google Cloud Network Services V1 Client - Class TrafficPortSelector (0.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.6.1 (latest)](/php/docs/reference/cloud-networkservices/latest/V1.TrafficPortSelector)\n- [0.6.0](/php/docs/reference/cloud-networkservices/0.6.0/V1.TrafficPortSelector)\n- [0.5.0](/php/docs/reference/cloud-networkservices/0.5.0/V1.TrafficPortSelector)\n- [0.4.0](/php/docs/reference/cloud-networkservices/0.4.0/V1.TrafficPortSelector)\n- [0.3.0](/php/docs/reference/cloud-networkservices/0.3.0/V1.TrafficPortSelector)\n- [0.2.3](/php/docs/reference/cloud-networkservices/0.2.3/V1.TrafficPortSelector)\n- [0.1.1](/php/docs/reference/cloud-networkservices/0.1.1/V1.TrafficPortSelector) \nReference documentation and code samples for the Google Cloud Network Services V1 Client class TrafficPortSelector.\n\nSpecification of a port-based selector.\n\nGenerated from protobuf message `google.cloud.networkservices.v1.TrafficPortSelector`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ NetworkServices \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPorts\n\nOptional. A list of ports. Can be port numbers or port range\n(example, \\[80-90\\] specifies all ports from 80 to 90, including\n80 and 90) or named ports or \\* to specify all ports. If the\nlist is empty, all ports are selected.\n\n### setPorts\n\nOptional. A list of ports. Can be port numbers or port range\n(example, \\[80-90\\] specifies all ports from 80 to 90, including\n80 and 90) or named ports or \\* to specify all ports. If the\nlist is empty, all ports are selected."]]