Class: AWSCDK::AppMesh::HttpRetryPolicy

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

Overview

HTTP retry policy.

Direct Known Subclasses

GrpcRetryPolicy

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil) ⇒ HttpRetryPolicy

Returns a new instance of HttpRetryPolicy.

Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'app_mesh/http_retry_policy.rb', line 11

def initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil)
  @retry_attempts = retry_attempts
  Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts")
  @retry_timeout = retry_timeout
  Jsii::Type.check_type(@retry_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retryTimeout")
  @http_retry_events = http_retry_events
  Jsii::Type.check_type(@http_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkh0dHBSZXRyeUV2ZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "httpRetryEvents") unless @http_retry_events.nil?
  @tcp_retry_events = tcp_retry_events
  Jsii::Type.check_type(@tcp_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLlRjcFJldHJ5RXZlbnQifSwia2luZCI6ImFycmF5In19")), "tcpRetryEvents") unless @tcp_retry_events.nil?
end

Instance Attribute Details

#http_retry_eventsArray<AWSCDK::AppMesh::HttpRetryEvent>? (readonly)

Note:

Default: - no retries for http events

Specify HTTP events on which to retry.

You must specify at least one value for at least one types of retry events.

Returns:



37
38
39
# File 'app_mesh/http_retry_policy.rb', line 37

def http_retry_events
  @http_retry_events
end

#retry_attemptsNumeric (readonly)

The maximum number of retry attempts.

Returns:

  • (Numeric)


25
26
27
# File 'app_mesh/http_retry_policy.rb', line 25

def retry_attempts
  @retry_attempts
end

#retry_timeoutAWSCDK::Duration (readonly)

The timeout for each retry attempt.

Returns:



29
30
31
# File 'app_mesh/http_retry_policy.rb', line 29

def retry_timeout
  @retry_timeout
end

#tcp_retry_eventsArray<AWSCDK::AppMesh::TCPRetryEvent>? (readonly)

Note:

Default: - no retries for tcp events

TCP events on which to retry.

The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable. You must specify at least one value for at least one types of retry events.

Returns:



47
48
49
# File 'app_mesh/http_retry_policy.rb', line 47

def tcp_retry_events
  @tcp_retry_events
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
# File 'app_mesh/http_retry_policy.rb', line 49

def self.jsii_properties
  {
    :retry_attempts => "retryAttempts",
    :retry_timeout => "retryTimeout",
    :http_retry_events => "httpRetryEvents",
    :tcp_retry_events => "tcpRetryEvents",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
# File 'app_mesh/http_retry_policy.rb', line 58

def to_jsii
  result = {}
  result.merge!({
    "retryAttempts" => @retry_attempts,
    "retryTimeout" => @retry_timeout,
    "httpRetryEvents" => @http_retry_events,
    "tcpRetryEvents" => @tcp_retry_events,
  })
  result.compact
end