Class: Google::Apis::RunV1alpha1::ContainerPort
- Inherits:
-
Object
- Object
- Google::Apis::RunV1alpha1::ContainerPort
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/run_v1alpha1/classes.rb,
generated/google/apis/run_v1alpha1/representations.rb,
generated/google/apis/run_v1alpha1/representations.rb
Overview
ContainerPort represents a network port in a single container.
Instance Attribute Summary collapse
-
#container_port ⇒ Fixnum
Number of port to expose on the pod's IP address.
-
#host_ip ⇒ String
What host IP to bind the external port to.
-
#host_port ⇒ Fixnum
Number of port to expose on the host.
-
#name ⇒ String
If specified, this must be an IANA_SVC_NAME and unique within the pod.
-
#protocol ⇒ String
Protocol for port.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ContainerPort
constructor
A new instance of ContainerPort.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ContainerPort
Returns a new instance of ContainerPort
856 857 858 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 856 def initialize(**args) update!(**args) end |
Instance Attribute Details
#container_port ⇒ Fixnum
Number of port to expose on the pod's IP address.
This must be a valid port number, 0 < x < 65536.
Corresponds to the JSON property containerPort
824 825 826 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 824 def container_port @container_port end |
#host_ip ⇒ String
What host IP to bind the external port to.
+optional
Corresponds to the JSON property hostIP
830 831 832 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 830 def host_ip @host_ip end |
#host_port ⇒ Fixnum
Number of port to expose on the host.
If specified, this must be a valid port number, 0 < x < 65536.
If HostNetwork is specified, this must match ContainerPort.
Most containers do not need this.
+optional
Corresponds to the JSON property hostPort
839 840 841 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 839 def host_port @host_port end |
#name ⇒ String
If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
named port in a pod must have a unique name. Name for the port that can be
referred to by services.
+optional
Corresponds to the JSON property name
847 848 849 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 847 def name @name end |
#protocol ⇒ String
Protocol for port. Must be UDP or TCP.
Defaults to "TCP".
+optional
Corresponds to the JSON property protocol
854 855 856 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 854 def protocol @protocol end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
861 862 863 864 865 866 867 |
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 861 def update!(**args) @container_port = args[:container_port] if args.key?(:container_port) @host_ip = args[:host_ip] if args.key?(:host_ip) @host_port = args[:host_port] if args.key?(:host_port) @name = args[:name] if args.key?(:name) @protocol = args[:protocol] if args.key?(:protocol) end |