Class: Google::Apis::RunV1::ContainerPort

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/run_v1/classes.rb,
generated/google/apis/run_v1/representations.rb,
generated/google/apis/run_v1/representations.rb

Overview

Cloud Run fully managed: not supported Cloud Run for Anthos: supported 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.



774
775
776
# File 'generated/google/apis/run_v1/classes.rb', line 774

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

Instance Attribute Details

#container_portFixnum

(Optional) Cloud Run fully managed: supported Cloud Run for Anthos: supported Port number the container listens on. This must be a valid port number, 0 < x < 65536. Corresponds to the JSON property containerPort

Returns:

  • (Fixnum)


754
755
756
# File 'generated/google/apis/run_v1/classes.rb', line 754

def container_port
  @container_port
end

#nameString

(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c". Corresponds to the JSON property name

Returns:

  • (String)


763
764
765
# File 'generated/google/apis/run_v1/classes.rb', line 763

def name
  @name
end

#protocolString

(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Protocol for port. Must be TCP. Defaults to "TCP". Corresponds to the JSON property protocol

Returns:

  • (String)


772
773
774
# File 'generated/google/apis/run_v1/classes.rb', line 772

def protocol
  @protocol
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



779
780
781
782
783
# File 'generated/google/apis/run_v1/classes.rb', line 779

def update!(**args)
  @container_port = args[:container_port] if args.key?(:container_port)
  @name = args[:name] if args.key?(:name)
  @protocol = args[:protocol] if args.key?(:protocol)
end