Class: Google::Apis::ComputeAlpha::TcpHealthCheck

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TcpHealthCheck

Returns a new instance of TcpHealthCheck.



43951
43952
43953
# File 'lib/google/apis/compute_alpha/classes.rb', line 43951

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

Instance Attribute Details

#portFixnum

The TCP port number for the health check request. The default value is 80. Valid values are 1 through 65535. Corresponds to the JSON property port

Returns:

  • (Fixnum)


43911
43912
43913
# File 'lib/google/apis/compute_alpha/classes.rb', line 43911

def port
  @port
end

#port_nameString

Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence. Corresponds to the JSON property portName

Returns:

  • (String)


43917
43918
43919
# File 'lib/google/apis/compute_alpha/classes.rb', line 43917

def port_name
  @port_name
end

#port_specificationString

Specifies how port is selected for health checking, can be one of following values: USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in port and portName fields. Corresponds to the JSON property portSpecification

Returns:

  • (String)


43928
43929
43930
# File 'lib/google/apis/compute_alpha/classes.rb', line 43928

def port_specification
  @port_specification
end

#proxy_headerString

Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. Corresponds to the JSON property proxyHeader

Returns:

  • (String)


43934
43935
43936
# File 'lib/google/apis/compute_alpha/classes.rb', line 43934

def proxy_header
  @proxy_header
end

#requestString

The application data to send once the TCP connection has been established ( default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. Corresponds to the JSON property request

Returns:

  • (String)


43942
43943
43944
# File 'lib/google/apis/compute_alpha/classes.rb', line 43942

def request
  @request
end

#responseString

The bytes to match against the beginning of the response data. If left empty ( the default value), any response will indicate health. The response data can only be ASCII. Corresponds to the JSON property response

Returns:

  • (String)


43949
43950
43951
# File 'lib/google/apis/compute_alpha/classes.rb', line 43949

def response
  @response
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



43956
43957
43958
43959
43960
43961
43962
43963
# File 'lib/google/apis/compute_alpha/classes.rb', line 43956

def update!(**args)
  @port = args[:port] if args.key?(:port)
  @port_name = args[:port_name] if args.key?(:port_name)
  @port_specification = args[:port_specification] if args.key?(:port_specification)
  @proxy_header = args[:proxy_header] if args.key?(:proxy_header)
  @request = args[:request] if args.key?(:request)
  @response = args[:response] if args.key?(:response)
end