Class: AWSCDK::AppMesh::CfnRoute::GrpcRetryPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::CfnRoute::GrpcRetryPolicyProperty
- 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
-
#grpc_retry_events ⇒ Array<String>?
readonly
Specify at least one of the valid values.
-
#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:, grpc_retry_events: nil, http_retry_events: nil, tcp_retry_events: nil) ⇒ GrpcRetryPolicyProperty
constructor
A new instance of GrpcRetryPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_retries:, per_retry_timeout:, grpc_retry_events: nil, http_retry_events: nil, tcp_retry_events: nil) ⇒ GrpcRetryPolicyProperty
Returns a new instance of GrpcRetryPolicyProperty.
694 695 696 697 698 699 700 701 702 703 704 705 |
# File 'app_mesh/cfn_route.rb', line 694 def initialize(max_retries:, per_retry_timeout:, grpc_retry_events: nil, 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") @grpc_retry_events = grpc_retry_events Jsii::Type.check_type(@grpc_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "grpcRetryEvents") unless @grpc_retry_events.nil? @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
#grpc_retry_events ⇒ Array<String>? (readonly)
Specify at least one of the valid values.
721 722 723 |
# File 'app_mesh/cfn_route.rb', line 721 def grpc_retry_events @grpc_retry_events end |
#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
731 732 733 |
# File 'app_mesh/cfn_route.rb', line 731 def http_retry_events @http_retry_events end |
#max_retries ⇒ Numeric (readonly)
The maximum number of retry attempts.
711 712 713 |
# File 'app_mesh/cfn_route.rb', line 711 def max_retries @max_retries end |
#per_retry_timeout ⇒ AWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::DurationProperty (readonly)
The timeout for each retry attempt.
716 717 718 |
# File 'app_mesh/cfn_route.rb', line 716 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.
738 739 740 |
# File 'app_mesh/cfn_route.rb', line 738 def tcp_retry_events @tcp_retry_events end |
Class Method Details
.jsii_properties ⇒ Object
740 741 742 743 744 745 746 747 748 |
# File 'app_mesh/cfn_route.rb', line 740 def self.jsii_properties { :max_retries => "maxRetries", :per_retry_timeout => "perRetryTimeout", :grpc_retry_events => "grpcRetryEvents", :http_retry_events => "httpRetryEvents", :tcp_retry_events => "tcpRetryEvents", } end |
Instance Method Details
#to_jsii ⇒ Object
750 751 752 753 754 755 756 757 758 759 760 |
# File 'app_mesh/cfn_route.rb', line 750 def to_jsii result = {} result.merge!({ "maxRetries" => @max_retries, "perRetryTimeout" => @per_retry_timeout, "grpcRetryEvents" => @grpc_retry_events, "httpRetryEvents" => @http_retry_events, "tcpRetryEvents" => @tcp_retry_events, }) result.compact end |