Class Port
Describes the properties of a specific port of a service.
Namespace: Neon.Kube.Resources.Istio
Assembly: Neon.Kube.Resources.dll
Syntax
public class Port
Constructors
Port()
Initializes a new instance of the Port class.
Declaration
public Port()
Properties
Name
Label assigned to the port.
Declaration
[JsonProperty(PropertyName = "name", Required = Required.Always)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Number
A valid non-negative integer port number.
Declaration
[JsonProperty(PropertyName = "number", Required = Required.Always)]
public int Number { get; set; }
Property Value
Type | Description |
---|---|
int |
Protocol
The protocol exposed on the port.
Declaration
[JsonProperty(PropertyName = "protocol", Required = Required.Always)]
[JsonConverter(typeof(JsonStringEnumMemberConverter))]
public PortProtocol Protocol { get; set; }
Property Value
Type | Description |
---|---|
PortProtocol |
TargetPort
The port number on the endpoint where the traffic will be received. Applicable only when used with ServiceEntries.
Declaration
[JsonProperty(PropertyName = "targetPort", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int? TargetPort { get; set; }
Property Value
Type | Description |
---|---|
int? |
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate()
Exceptions
Type | Condition |
---|---|
ValidationException | Thrown if validation fails. |