// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeregisterContainerInstanceInput {
/// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p>
pub cluster: ::std::option::Option<::std::string::String>,
/// <p>The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
pub container_instance: ::std::option::Option<::std::string::String>,
/// <p>Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.</p>
/// <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p>
pub force: ::std::option::Option<bool>,
}
impl DeregisterContainerInstanceInput {
/// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p>
pub fn cluster(&self) -> ::std::option::Option<&str> {
self.cluster.as_deref()
}
/// <p>The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
pub fn container_instance(&self) -> ::std::option::Option<&str> {
self.container_instance.as_deref()
}
/// <p>Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.</p>
/// <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl DeregisterContainerInstanceInput {
/// Creates a new builder-style object to manufacture [`DeregisterContainerInstanceInput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceInput).
pub fn builder() -> crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceInputBuilder {
crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceInputBuilder::default()
}
}
/// A builder for [`DeregisterContainerInstanceInput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterContainerInstanceInputBuilder {
pub(crate) cluster: ::std::option::Option<::std::string::String>,
pub(crate) container_instance: ::std::option::Option<::std::string::String>,
pub(crate) force: ::std::option::Option<bool>,
}
impl DeregisterContainerInstanceInputBuilder {
/// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p>
pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster = ::std::option::Option::Some(input.into());
self
}
/// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p>
pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster = input;
self
}
/// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p>
pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster
}
/// <p>The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
/// This field is required.
pub fn container_instance(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.container_instance = ::std::option::Option::Some(input.into());
self
}
/// <p>The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
pub fn set_container_instance(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.container_instance = input;
self
}
/// <p>The container instance ID or full ARN of the container instance to deregister. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
pub fn get_container_instance(&self) -> &::std::option::Option<::std::string::String> {
&self.container_instance
}
/// <p>Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.</p>
/// <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.</p>
/// <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>Forces the container instance to be deregistered. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they're orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible.</p>
/// <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`DeregisterContainerInstanceInput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::deregister_container_instance::DeregisterContainerInstanceInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::deregister_container_instance::DeregisterContainerInstanceInput {
cluster: self.cluster,
container_instance: self.container_instance,
force: self.force,
})
}
}