HttpRetryPolicyProperty Struct
An object that represents a retry policy.
Specify at least one value for at least one of the types of RetryEvents , a value for maxRetries , and a value for perRetryTimeout . Both server-error and gateway-error under httpRetryEvents include the Envoy reset policy. For more information on the reset policy, see the Envoy documentation .
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const httpRetryPolicyProperty: appmesh.CfnRoute.HttpRetryPolicyProperty = {
maxRetries: 123,
perRetryTimeout: {
unit: 'unit',
value: 123,
},
// the properties below are optional
httpRetryEvents: ['httpRetryEvents'],
tcpRetryEvents: ['tcpRetryEvents'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh
http_retry_policy_property = appmesh.CfnRoute.HttpRetryPolicyProperty(
max_retries=123,
per_retry_timeout=appmesh.CfnRoute.DurationProperty(
unit="unit",
value=123
),
# the properties below are optional
http_retry_events=["httpRetryEvents"],
tcp_retry_events=["tcpRetryEvents"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;
HttpRetryPolicyProperty httpRetryPolicyProperty = HttpRetryPolicyProperty.builder()
.maxRetries(123)
.perRetryTimeout(DurationProperty.builder()
.unit("unit")
.value(123)
.build())
// the properties below are optional
.httpRetryEvents(List.of("httpRetryEvents"))
.tcpRetryEvents(List.of("tcpRetryEvents"))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;
var httpRetryPolicyProperty = new HttpRetryPolicyProperty {
MaxRetries = 123,
PerRetryTimeout = new DurationProperty {
Unit = "unit",
Value = 123
},
// the properties below are optional
HttpRetryEvents = new [] { "httpRetryEvents" },
TcpRetryEvents = new [] { "tcpRetryEvents" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
httpRetryPolicyProperty := &HttpRetryPolicyProperty{
MaxRetries: jsii.Number(123),
PerRetryTimeout: &DurationProperty{
Unit: jsii.String("unit"),
Value: jsii.Number(123),
},
// the properties below are optional
HttpRetryEvents: []*string{
jsii.String("httpRetryEvents"),
},
TcpRetryEvents: []*string{
jsii.String("tcpRetryEvents"),
},
}
Properties
httpRetryEventsoptionalstring[]http_retry_eventsoptionaltyping.List[str]httpRetryEventsoptionalList<String>HttpRetryEventsoptionalstring[]HttpRetryEventsoptional*[]*string #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
The maximum number of retry attempts.
perRetryTimeoutIResolvable | CfnRoute.DurationPropertyper_retry_timeouttyping.Union[IResolvable, DurationProperty]perRetryTimeoutIResolvablePerRetryTimeoutIResolvablePerRetryTimeoutinterface{} required #The timeout for each retry attempt.
tcpRetryEventsoptionalstring[]tcp_retry_eventsoptionaltyping.List[str]tcpRetryEventsoptionalList<String>TcpRetryEventsoptionalstring[]TcpRetryEventsoptional*[]*string #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.