Struct aws_sdk_ecs::model::health_check::Builder
source · [−]#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for HealthCheck
Implementations
sourceimpl Builder
impl Builder
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 execute 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 brackets.
[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
You don't need to include the 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 execute 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 brackets.
[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
You don't need to include the 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 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 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 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 disabled.
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 disabled.
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) -> HealthCheck
pub fn build(self) -> HealthCheck
Consumes the builder and constructs a HealthCheck
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more