Class: AWSCDK::AppMesh::CfnVirtualGateway::VirtualGatewayHealthCheckPolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_mesh/cfn_virtual_gateway.rb

Overview

An object that represents the health check policy for a virtual gateway's listener.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(healthy_threshold:, interval_millis:, protocol:, timeout_millis:, unhealthy_threshold:, path: nil, port: nil) ⇒ VirtualGatewayHealthCheckPolicyProperty

Returns a new instance of VirtualGatewayHealthCheckPolicyProperty.

Parameters:

  • healthy_threshold (Numeric)

    The number of consecutive successful health checks that must occur before declaring the listener healthy.

  • interval_millis (Numeric)

    The time period in milliseconds between each health check execution.

  • protocol (String)

    The protocol for the health check request.

  • timeout_millis (Numeric)

    The amount of time to wait when receiving a response from the health check, in milliseconds.

  • unhealthy_threshold (Numeric)

    The number of consecutive failed health checks that must occur before declaring a virtual gateway unhealthy.

  • path (String, nil) (defaults to: nil)

    The destination path for the health check request.

  • port (Numeric, nil) (defaults to: nil)

    The destination port for the health check request.



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'app_mesh/cfn_virtual_gateway.rb', line 1128

def initialize(healthy_threshold:, interval_millis:, protocol:, timeout_millis:, unhealthy_threshold:, path: nil, port: nil)
  @healthy_threshold = healthy_threshold
  Jsii::Type.check_type(@healthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthyThreshold")
  @interval_millis = interval_millis
  Jsii::Type.check_type(@interval_millis, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "intervalMillis")
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol")
  @timeout_millis = timeout_millis
  Jsii::Type.check_type(@timeout_millis, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutMillis")
  @unhealthy_threshold = unhealthy_threshold
  Jsii::Type.check_type(@unhealthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unhealthyThreshold")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
end

Instance Attribute Details

#healthy_thresholdNumeric (readonly)

The number of consecutive successful health checks that must occur before declaring the listener healthy.



1149
1150
1151
# File 'app_mesh/cfn_virtual_gateway.rb', line 1149

def healthy_threshold
  @healthy_threshold
end

#interval_millisNumeric (readonly)

The time period in milliseconds between each health check execution.



1154
1155
1156
# File 'app_mesh/cfn_virtual_gateway.rb', line 1154

def interval_millis
  @interval_millis
end

#pathString? (readonly)

The destination path for the health check request.

This value is only used if the specified protocol is HTTP or HTTP/2. For any other protocol, this value is ignored.



1178
1179
1180
# File 'app_mesh/cfn_virtual_gateway.rb', line 1178

def path
  @path
end

#portNumeric? (readonly)

The destination port for the health check request.

This port must match the port defined in the PortMapping for the listener.



1185
1186
1187
# File 'app_mesh/cfn_virtual_gateway.rb', line 1185

def port
  @port
end

#protocolString (readonly)

The protocol for the health check request.

If you specify grpc , then your service must conform to the GRPC Health Checking Protocol .



1161
1162
1163
# File 'app_mesh/cfn_virtual_gateway.rb', line 1161

def protocol
  @protocol
end

#timeout_millisNumeric (readonly)

The amount of time to wait when receiving a response from the health check, in milliseconds.



1166
1167
1168
# File 'app_mesh/cfn_virtual_gateway.rb', line 1166

def timeout_millis
  @timeout_millis
end

#unhealthy_thresholdNumeric (readonly)

The number of consecutive failed health checks that must occur before declaring a virtual gateway unhealthy.



1171
1172
1173
# File 'app_mesh/cfn_virtual_gateway.rb', line 1171

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'app_mesh/cfn_virtual_gateway.rb', line 1187

def self.jsii_properties
  {
    :healthy_threshold => "healthyThreshold",
    :interval_millis => "intervalMillis",
    :protocol => "protocol",
    :timeout_millis => "timeoutMillis",
    :unhealthy_threshold => "unhealthyThreshold",
    :path => "path",
    :port => "port",
  }
end

Instance Method Details

#to_jsiiObject



1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'app_mesh/cfn_virtual_gateway.rb', line 1199

def to_jsii
  result = {}
  result.merge!({
    "healthyThreshold" => @healthy_threshold,
    "intervalMillis" => @interval_millis,
    "protocol" => @protocol,
    "timeoutMillis" => @timeout_millis,
    "unhealthyThreshold" => @unhealthy_threshold,
    "path" => @path,
    "port" => @port,
  })
  result.compact
end