Interface ContainerRestartPolicy.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ContainerRestartPolicy.Builder,ContainerRestartPolicy>,SdkBuilder<ContainerRestartPolicy.Builder,ContainerRestartPolicy>,SdkPojo
- Enclosing class:
- ContainerRestartPolicy
public static interface ContainerRestartPolicy.Builder extends SdkPojo, CopyableBuilder<ContainerRestartPolicy.Builder,ContainerRestartPolicy>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContainerRestartPolicy.Builderenabled(Boolean enabled)Specifies whether a restart policy is enabled for the container.ContainerRestartPolicy.BuilderignoredExitCodes(Integer... ignoredExitCodes)A list of exit codes that Amazon ECS will ignore and not attempt a restart on.ContainerRestartPolicy.BuilderignoredExitCodes(Collection<Integer> ignoredExitCodes)A list of exit codes that Amazon ECS will ignore and not attempt a restart on.ContainerRestartPolicy.BuilderrestartAttemptPeriod(Integer restartAttemptPeriod)A period of time (in seconds) that the container must run for before a restart can be attempted.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
enabled
ContainerRestartPolicy.Builder enabled(Boolean enabled)
Specifies whether a restart policy is enabled for the container.
- Parameters:
enabled- Specifies whether a restart policy is enabled for the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ignoredExitCodes
ContainerRestartPolicy.Builder ignoredExitCodes(Collection<Integer> 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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ignoredExitCodes
ContainerRestartPolicy.Builder ignoredExitCodes(Integer... 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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
restartAttemptPeriod
ContainerRestartPolicy.Builder restartAttemptPeriod(Integer 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.- Parameters:
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 everyrestartAttemptPeriodseconds. 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-