Class: AWSCDK::AppMesh::CfnRoute::HttpRetryPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::CfnRoute::HttpRetryPolicyProperty
- Defined in:
- app_mesh/cfn_route.rb
Overview
An object that represents a retry policy.
Specify at least one value for at least one of the types of RetryEvents , a value for max_retries , and a value for per_retry_timeout . Both server-error and gateway-error under http_retry_events include the Envoy reset policy. For more information on the reset policy, see the Envoy documentation .
Instance Attribute Summary collapse
-
#http_retry_events ⇒ Array<String>?
readonly
Specify at least one of the following values.
-
#max_retries ⇒ Numeric
readonly
The maximum number of retry attempts.
-
#per_retry_timeout ⇒ AWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::DurationProperty
readonly
The timeout for each retry attempt.
-
#tcp_retry_events ⇒ Array<String>?
readonly
Specify a valid value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_retries:, per_retry_timeout:, http_retry_events: nil, tcp_retry_events: nil) ⇒ HttpRetryPolicyProperty
constructor
A new instance of HttpRetryPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_retries:, per_retry_timeout:, http_retry_events: nil, tcp_retry_events: nil) ⇒ HttpRetryPolicyProperty
Returns a new instance of HttpRetryPolicyProperty.
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 |
# File 'app_mesh/cfn_route.rb', line 1264 def initialize(max_retries:, per_retry_timeout:, http_retry_events: nil, tcp_retry_events: nil) @max_retries = max_retries Jsii::Type.check_type(@max_retries, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRetries") @per_retry_timeout = per_retry_timeout.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::DurationProperty.new(**per_retry_timeout.transform_keys(&:to_sym)) : per_retry_timeout Jsii::Type.check_type(@per_retry_timeout, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkR1cmF0aW9uUHJvcGVydHkifV19fQ==")), "perRetryTimeout") @http_retry_events = http_retry_events Jsii::Type.check_type(@http_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "httpRetryEvents") unless @http_retry_events.nil? @tcp_retry_events = tcp_retry_events Jsii::Type.check_type(@tcp_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tcpRetryEvents") unless @tcp_retry_events.nil? end |
Instance Attribute Details
#http_retry_events ⇒ Array<String>? (readonly)
Specify at least one of the following values.
- server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
- gateway-error – HTTP status codes 502, 503, and 504
- client-error – HTTP status code 409
- stream-error – Retry on refused stream
1294 1295 1296 |
# File 'app_mesh/cfn_route.rb', line 1294 def http_retry_events @http_retry_events end |
#max_retries ⇒ Numeric (readonly)
The maximum number of retry attempts.
1279 1280 1281 |
# File 'app_mesh/cfn_route.rb', line 1279 def max_retries @max_retries end |
#per_retry_timeout ⇒ AWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::DurationProperty (readonly)
The timeout for each retry attempt.
1284 1285 1286 |
# File 'app_mesh/cfn_route.rb', line 1284 def per_retry_timeout @per_retry_timeout end |
#tcp_retry_events ⇒ Array<String>? (readonly)
Specify a valid value.
The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
1301 1302 1303 |
# File 'app_mesh/cfn_route.rb', line 1301 def tcp_retry_events @tcp_retry_events end |
Class Method Details
.jsii_properties ⇒ Object
1303 1304 1305 1306 1307 1308 1309 1310 |
# File 'app_mesh/cfn_route.rb', line 1303 def self.jsii_properties { :max_retries => "maxRetries", :per_retry_timeout => "perRetryTimeout", :http_retry_events => "httpRetryEvents", :tcp_retry_events => "tcpRetryEvents", } end |
Instance Method Details
#to_jsii ⇒ Object
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 |
# File 'app_mesh/cfn_route.rb', line 1312 def to_jsii result = {} result.merge!({ "maxRetries" => @max_retries, "perRetryTimeout" => @per_retry_timeout, "httpRetryEvents" => @http_retry_events, "tcpRetryEvents" => @tcp_retry_events, }) result.compact end |