Struct aws_sdk_ecs::types::builders::HealthCheckBuilder
source · #[non_exhaustive]pub struct HealthCheckBuilder { /* private fields */ }
Expand description
A builder for HealthCheck
.
Implementations§
source§impl HealthCheckBuilder
impl HealthCheckBuilder
sourcepub fn command(self, input: impl Into<String>) -> Self
pub fn command(self, input: impl Into<String>) -> Self
Appends an item to command
.
To override the contents of this collection use set_command
.
A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD
to run the command arguments directly, or CMD-SHELL
to run the command with the container's default shell.
When you use the Amazon Web Services Management Console JSON panel, the Command Line Interface, or the APIs, enclose the list of commands in double quotes and brackets.
[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
You don't include the double quotes and brackets when you use the Amazon Web Services Management Console.
CMD-SHELL, curl -f http://localhost/ || exit 1
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck
in the Create a container section of the Docker Remote API.
sourcepub fn set_command(self, input: Option<Vec<String>>) -> Self
pub fn set_command(self, input: Option<Vec<String>>) -> Self
A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD
to run the command arguments directly, or CMD-SHELL
to run the command with the container's default shell.
When you use the Amazon Web Services Management Console JSON panel, the Command Line Interface, or the APIs, enclose the list of commands in double quotes and brackets.
[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
You don't include the double quotes and brackets when you use the Amazon Web Services Management Console.
CMD-SHELL, curl -f http://localhost/ || exit 1
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck
in the Create a container section of the Docker Remote API.
sourcepub fn get_command(&self) -> &Option<Vec<String>>
pub fn get_command(&self) -> &Option<Vec<String>>
A string array representing the command that the container runs to determine if it is healthy. The string array must start with CMD
to run the command arguments directly, or CMD-SHELL
to run the command with the container's default shell.
When you use the Amazon Web Services Management Console JSON panel, the Command Line Interface, or the APIs, enclose the list of commands in double quotes and brackets.
[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
You don't include the double quotes and brackets when you use the Amazon Web Services Management Console.
CMD-SHELL, curl -f http://localhost/ || exit 1
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see HealthCheck
in the Create a container section of the Docker Remote API.
sourcepub fn interval(self, input: i32) -> Self
pub fn interval(self, input: i32) -> Self
The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.
sourcepub fn set_interval(self, input: Option<i32>) -> Self
pub fn set_interval(self, input: Option<i32>) -> Self
The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.
sourcepub fn get_interval(&self) -> &Option<i32>
pub fn get_interval(&self) -> &Option<i32>
The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.
sourcepub fn timeout(self, input: i32) -> Self
pub fn timeout(self, input: i32) -> Self
The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.
sourcepub fn set_timeout(self, input: Option<i32>) -> Self
pub fn set_timeout(self, input: Option<i32>) -> Self
The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.
sourcepub fn get_timeout(&self) -> &Option<i32>
pub fn get_timeout(&self) -> &Option<i32>
The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.
sourcepub fn retries(self, input: i32) -> Self
pub fn retries(self, input: i32) -> Self
The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.
sourcepub fn set_retries(self, input: Option<i32>) -> Self
pub fn set_retries(self, input: Option<i32>) -> Self
The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.
sourcepub fn get_retries(&self) -> &Option<i32>
pub fn get_retries(&self) -> &Option<i32>
The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.
sourcepub fn start_period(self, input: i32) -> Self
pub fn start_period(self, input: i32) -> Self
The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the startPeriod
is off.
If a health check succeeds within the startPeriod
, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
sourcepub fn set_start_period(self, input: Option<i32>) -> Self
pub fn set_start_period(self, input: Option<i32>) -> Self
The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the startPeriod
is off.
If a health check succeeds within the startPeriod
, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
sourcepub fn get_start_period(&self) -> &Option<i32>
pub fn get_start_period(&self) -> &Option<i32>
The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the startPeriod
is off.
If a health check succeeds within the startPeriod
, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
sourcepub fn build(self) -> Result<HealthCheck, BuildError>
pub fn build(self) -> Result<HealthCheck, BuildError>
Consumes the builder and constructs a HealthCheck
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for HealthCheckBuilder
impl Clone for HealthCheckBuilder
source§fn clone(&self) -> HealthCheckBuilder
fn clone(&self) -> HealthCheckBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HealthCheckBuilder
impl Debug for HealthCheckBuilder
source§impl Default for HealthCheckBuilder
impl Default for HealthCheckBuilder
source§fn default() -> HealthCheckBuilder
fn default() -> HealthCheckBuilder
source§impl PartialEq for HealthCheckBuilder
impl PartialEq for HealthCheckBuilder
source§fn eq(&self, other: &HealthCheckBuilder) -> bool
fn eq(&self, other: &HealthCheckBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.