Class: Google::Apis::RunV1alpha1::ContainerPort

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ContainerPort

Returns a new instance of ContainerPort.



1611
1612
1613
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1611

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#container_portFixnum

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

Returns:

  • (Fixnum)


1579
1580
1581
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1579

def container_port
  @container_port
end

#host_ipString

What host IP to bind the external port to. +optional Corresponds to the JSON property hostIP

Returns:

  • (String)


1585
1586
1587
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1585

def host_ip
  @host_ip
end

#host_portFixnum

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

Returns:

  • (Fixnum)


1594
1595
1596
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1594

def host_port
  @host_port
end

#nameString

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

Returns:

  • (String)


1602
1603
1604
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1602

def name
  @name
end

#protocolString

Protocol for port. Must be UDP or TCP. Defaults to "TCP". +optional Corresponds to the JSON property protocol

Returns:

  • (String)


1609
1610
1611
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1609

def protocol
  @protocol
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1616
1617
1618
1619
1620
1621
1622
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1616

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