# RestartPolicyProperty

- Source: Generated at build time
- Type last changed: v2.249.0 · 13 Apr 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const restartPolicyProperty: ecs.CfnDaemonTaskDefinition.RestartPolicyProperty = {
  enabled: false,
  ignoredExitCodes: [123],
  restartAttemptPeriod: 123,
};
```

Python:

```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_ecs as ecs

restart_policy_property = ecs.CfnDaemonTaskDefinition.RestartPolicyProperty(
    enabled=False,
    ignored_exit_codes=[123],
    restart_attempt_period=123
)
```

Java:

```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.ecs.*;

RestartPolicyProperty restartPolicyProperty = RestartPolicyProperty.builder()
        .enabled(false)
        .ignoredExitCodes(List.of(123))
        .restartAttemptPeriod(123)
        .build();
```

C# / .NET:

```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.ECS;

var restartPolicyProperty = new RestartPolicyProperty {
    Enabled = false,
    IgnoredExitCodes = new [] { 123 },
    RestartAttemptPeriod = 123
};
```

Golang:

```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"

restartPolicyProperty := &RestartPolicyProperty{
	Enabled: jsii.Boolean(false),
	IgnoredExitCodes: []interface{}{
		jsii.Number(123),
	},
	RestartAttemptPeriod: jsii.Number(123),
}
```

## Properties

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `ignoredExitCodes`: number[] | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `restartAttemptPeriod`: number
