Class: Google::Apis::RunV1::TcpSocketAction

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 TCPSocketAction describes an action based on opening a socket

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) ⇒ TcpSocketAction

Returns a new instance of TcpSocketAction.



3298
3299
3300
# File 'generated/google/apis/run_v1/classes.rb', line 3298

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

Instance Attribute Details

#hostString

(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Optional: Host name to connect to, defaults to the pod IP. Corresponds to the JSON property host

Returns:

  • (String)


3288
3289
3290
# File 'generated/google/apis/run_v1/classes.rb', line 3288

def host
  @host
end

#portGoogle::Apis::RunV1::IntOrString

IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. Corresponds to the JSON property port



3296
3297
3298
# File 'generated/google/apis/run_v1/classes.rb', line 3296

def port
  @port
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3303
3304
3305
3306
# File 'generated/google/apis/run_v1/classes.rb', line 3303

def update!(**args)
  @host = args[:host] if args.key?(:host)
  @port = args[:port] if args.key?(:port)
end