Class: Google::Apis::AppengineV1::HealthCheck

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

Overview

Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HealthCheck

Returns a new instance of HealthCheck.



1240
1241
1242
# File 'lib/google/apis/appengine_v1/classes.rb', line 1240

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

Instance Attribute Details

#check_intervalString

Interval between health checks. Corresponds to the JSON property checkInterval

Returns:

  • (String)


1204
1205
1206
# File 'lib/google/apis/appengine_v1/classes.rb', line 1204

def check_interval
  @check_interval
end

#disable_health_checkBoolean Also known as: disable_health_check?

Whether to explicitly disable health checks for this instance. Corresponds to the JSON property disableHealthCheck

Returns:

  • (Boolean)


1209
1210
1211
# File 'lib/google/apis/appengine_v1/classes.rb', line 1209

def disable_health_check
  @disable_health_check
end

#healthy_thresholdFixnum

Number of consecutive successful health checks required before receiving traffic. Corresponds to the JSON property healthyThreshold

Returns:

  • (Fixnum)


1216
1217
1218
# File 'lib/google/apis/appengine_v1/classes.rb', line 1216

def healthy_threshold
  @healthy_threshold
end

#hostString

Host header to send when performing an HTTP health check. Example: "myapp. appspot.com" Corresponds to the JSON property host

Returns:

  • (String)


1222
1223
1224
# File 'lib/google/apis/appengine_v1/classes.rb', line 1222

def host
  @host
end

#restart_thresholdFixnum

Number of consecutive failed health checks required before an instance is restarted. Corresponds to the JSON property restartThreshold

Returns:

  • (Fixnum)


1228
1229
1230
# File 'lib/google/apis/appengine_v1/classes.rb', line 1228

def restart_threshold
  @restart_threshold
end

#timeoutString

Time before the health check is considered failed. Corresponds to the JSON property timeout

Returns:

  • (String)


1233
1234
1235
# File 'lib/google/apis/appengine_v1/classes.rb', line 1233

def timeout
  @timeout
end

#unhealthy_thresholdFixnum

Number of consecutive failed health checks required before removing traffic. Corresponds to the JSON property unhealthyThreshold

Returns:

  • (Fixnum)


1238
1239
1240
# File 'lib/google/apis/appengine_v1/classes.rb', line 1238

def unhealthy_threshold
  @unhealthy_threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1245
1246
1247
1248
1249
1250
1251
1252
1253
# File 'lib/google/apis/appengine_v1/classes.rb', line 1245

def update!(**args)
  @check_interval = args[:check_interval] if args.key?(:check_interval)
  @disable_health_check = args[:disable_health_check] if args.key?(:disable_health_check)
  @healthy_threshold = args[:healthy_threshold] if args.key?(:healthy_threshold)
  @host = args[:host] if args.key?(:host)
  @restart_threshold = args[:restart_threshold] if args.key?(:restart_threshold)
  @timeout = args[:timeout] if args.key?(:timeout)
  @unhealthy_threshold = args[:unhealthy_threshold] if args.key?(:unhealthy_threshold)
end