aws-cdk-lib.aws_appmesh.CfnRoute.HttpRetryPolicyProperty

interface HttpRetryPolicyProperty

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.CfnRoute.HttpRetryPolicyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#CfnRoute_HttpRetryPolicyProperty
Javasoftware.amazon.awscdk.services.appmesh.CfnRoute.HttpRetryPolicyProperty
Pythonaws_cdk.aws_appmesh.CfnRoute.HttpRetryPolicyProperty
TypeScript aws-cdk-lib » aws_appmesh » CfnRoute » HttpRetryPolicyProperty

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 .

Example

// 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'],
};

Properties

NameTypeDescription
maxRetriesnumberThe maximum number of retry attempts.
perRetryTimeoutIResolvable | DurationPropertyThe timeout for each retry attempt.
httpRetryEvents?string[]Specify at least one of the following values.
tcpRetryEvents?string[]Specify a valid value.

maxRetries

Type: number

The maximum number of retry attempts.


perRetryTimeout

Type: IResolvable | DurationProperty

The timeout for each retry attempt.


httpRetryEvents?

Type: string[] (optional)

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

tcpRetryEvents?

Type: string[] (optional)

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.