Class: Google::Apis::ReplicapoolV1beta1::HealthCheck

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

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

Returns a new instance of HealthCheck



235
236
237
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 235

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

Instance Attribute Details

#check_interval_secFixnum

How often (in seconds) to make HTTP requests for this healthcheck. The default value is 5 seconds. Corresponds to the JSON property checkIntervalSec

Returns:

  • (Fixnum)


188
189
190
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 188

def check_interval_sec
  @check_interval_sec
end

#descriptionString

The description for this health check. Corresponds to the JSON property description

Returns:

  • (String)


193
194
195
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 193

def description
  @description
end

#healthy_thresholdFixnum

The number of consecutive health check requests that need to succeed before the replica is considered healthy again. The default value is 2. Corresponds to the JSON property healthyThreshold

Returns:

  • (Fixnum)


199
200
201
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 199

def healthy_threshold
  @healthy_threshold
end

#hostString

The value of the host header in the HTTP health check request. If left empty ( default value), the localhost IP 127.0.0.1 will be used. Corresponds to the JSON property host

Returns:

  • (String)


205
206
207
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 205

def host
  @host
end

#nameString

The name of this health check. Corresponds to the JSON property name

Returns:

  • (String)


210
211
212
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 210

def name
  @name
end

#pathString

The localhost request path to send this health check, in the format /path/to/ use. For example, /healthcheck. Corresponds to the JSON property path

Returns:

  • (String)


216
217
218
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 216

def path
  @path
end

#portFixnum

The TCP port for the health check requests. Corresponds to the JSON property port

Returns:

  • (Fixnum)


221
222
223
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 221

def port
  @port
end

#timeout_secFixnum

How long (in seconds) to wait before a timeout failure for this healthcheck. The default value is 5 seconds. Corresponds to the JSON property timeoutSec

Returns:

  • (Fixnum)


227
228
229
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 227

def timeout_sec
  @timeout_sec
end

#unhealthy_thresholdFixnum

The number of consecutive health check requests that need to fail in order to consider the replica unhealthy. The default value is 2. Corresponds to the JSON property unhealthyThreshold

Returns:

  • (Fixnum)


233
234
235
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 233

def unhealthy_threshold
  @unhealthy_threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



240
241
242
243
244
245
246
247
248
249
250
# File 'generated/google/apis/replicapool_v1beta1/classes.rb', line 240

def update!(**args)
  @check_interval_sec = args[:check_interval_sec] if args.key?(:check_interval_sec)
  @description = args[:description] if args.key?(:description)
  @healthy_threshold = args[:healthy_threshold] if args.key?(:healthy_threshold)
  @host = args[:host] if args.key?(:host)
  @name = args[:name] if args.key?(:name)
  @path = args[:path] if args.key?(:path)
  @port = args[:port] if args.key?(:port)
  @timeout_sec = args[:timeout_sec] if args.key?(:timeout_sec)
  @unhealthy_threshold = args[:unhealthy_threshold] if args.key?(:unhealthy_threshold)
end