Class: AWSCDK::AppMesh::GrpcRetryPolicy

Inherits:
HttpRetryPolicy
  • Object
show all
Defined in:
app_mesh/grpc_retry_policy.rb

Overview

gRPC retry policy.

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, grpc_retry_events: nil) ⇒ GrpcRetryPolicy

Returns a new instance of GrpcRetryPolicy.

Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app_mesh/grpc_retry_policy.rb', line 12

def initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil, grpc_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?
  @grpc_retry_events = grpc_retry_events
  Jsii::Type.check_type(@grpc_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkdycGNSZXRyeUV2ZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "grpcRetryEvents") unless @grpc_retry_events.nil?
end

Instance Attribute Details

#grpc_retry_eventsArray<AWSCDK::AppMesh::GrpcRetryEvent>? (readonly)

Note:

Default: - no retries for gRPC events

gRPC events on which to retry.

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

Returns:



58
59
60
# File 'app_mesh/grpc_retry_policy.rb', line 58

def grpc_retry_events
  @grpc_retry_events
end

#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:



40
41
42
# File 'app_mesh/grpc_retry_policy.rb', line 40

def http_retry_events
  @http_retry_events
end

#retry_attemptsNumeric (readonly)

The maximum number of retry attempts.

Returns:

  • (Numeric)


28
29
30
# File 'app_mesh/grpc_retry_policy.rb', line 28

def retry_attempts
  @retry_attempts
end

#retry_timeoutAWSCDK::Duration (readonly)

The timeout for each retry attempt.

Returns:



32
33
34
# File 'app_mesh/grpc_retry_policy.rb', line 32

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:



50
51
52
# File 'app_mesh/grpc_retry_policy.rb', line 50

def tcp_retry_events
  @tcp_retry_events
end

Class Method Details

.jsii_propertiesObject



60
61
62
63
64
65
66
67
68
# File 'app_mesh/grpc_retry_policy.rb', line 60

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

Instance Method Details

#to_jsiiObject



70
71
72
73
74
75
76
77
78
79
80
81
# File 'app_mesh/grpc_retry_policy.rb', line 70

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