/AWS1/CL_ECSCONTAINERRESTRTPLY¶
You can enable a restart policy for each container defined in your task definition, to overcome transient failures faster and maintain task availability. When you enable a restart policy for a container, Amazon ECS can restart the container if it exits, without needing to replace the task. For more information, see Restart individual containers in Amazon ECS tasks with container restart policies in the Amazon Elastic Container Service Developer Guide.
CONSTRUCTOR¶
IMPORTING¶
Required arguments:¶
iv_enabled TYPE /AWS1/ECSBOXEDBOOLEAN /AWS1/ECSBOXEDBOOLEAN¶
Specifies whether a restart policy is enabled for the container.
Optional arguments:¶
it_ignoredexitcodes TYPE /AWS1/CL_ECSINTEGERLIST_W=>TT_INTEGERLIST TT_INTEGERLIST¶
A list of exit codes that Amazon ECS will ignore and not attempt a restart on. You can specify a maximum of 50 container exit codes. By default, Amazon ECS does not ignore any exit codes.
iv_restartattemptperiod TYPE /AWS1/ECSBOXEDINTEGER /AWS1/ECSBOXEDINTEGER¶
A period of time (in seconds) that the container must run for before a restart can be attempted. A container can be restarted only once every
restartAttemptPeriodseconds. If a container isn't able to run for this time period and exits early, it will not be restarted. You can set a minimumrestartAttemptPeriodof 60 seconds and a maximumrestartAttemptPeriodof 1800 seconds. By default, a container must run for 300 seconds before it can be restarted.
Queryable Attributes¶
enabled¶
Specifies whether a restart policy is enabled for the container.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ENABLED() |
Getter for ENABLED, with configurable default |
ASK_ENABLED() |
Getter for ENABLED w/ exceptions if field has no value |
HAS_ENABLED() |
Determine if ENABLED has a value |
ignoredExitCodes¶
A list of exit codes that Amazon ECS will ignore and not attempt a restart on. You can specify a maximum of 50 container exit codes. By default, Amazon ECS does not ignore any exit codes.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_IGNOREDEXITCODES() |
Getter for IGNOREDEXITCODES, with configurable default |
ASK_IGNOREDEXITCODES() |
Getter for IGNOREDEXITCODES w/ exceptions if field has no va |
HAS_IGNOREDEXITCODES() |
Determine if IGNOREDEXITCODES has a value |
restartAttemptPeriod¶
A period of time (in seconds) that the container must run for before a restart can be attempted. A container can be restarted only once every
restartAttemptPeriodseconds. If a container isn't able to run for this time period and exits early, it will not be restarted. You can set a minimumrestartAttemptPeriodof 60 seconds and a maximumrestartAttemptPeriodof 1800 seconds. By default, a container must run for 300 seconds before it can be restarted.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_RESTARTATTEMPTPERIOD() |
Getter for RESTARTATTEMPTPERIOD, with configurable default |
ASK_RESTARTATTEMPTPERIOD() |
Getter for RESTARTATTEMPTPERIOD w/ exceptions if field has n |
HAS_RESTARTATTEMPTPERIOD() |
Determine if RESTARTATTEMPTPERIOD has a value |