// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`DeregisterContainerInstance`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`cluster(impl Into<String>)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::set_cluster):<br>required: **false**<br><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><br>
/// - [`container_instance(impl Into<String>)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::container_instance) / [`set_container_instance(Option<String>)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::set_container_instance):<br>required: **true**<br><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><br>
/// - [`force(bool)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::force) / [`set_force(Option<bool>)`](crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::set_force):<br>required: **false**<br><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><br>
/// - On success, responds with [`DeregisterContainerInstanceOutput`](crate::operation::deregister_container_instance::DeregisterContainerInstanceOutput) with field(s):
/// - [`container_instance(Option<ContainerInstance>)`](crate::operation::deregister_container_instance::DeregisterContainerInstanceOutput::container_instance): <p>The container instance that was deregistered.</p>
/// - On failure, responds with [`SdkError<DeregisterContainerInstanceError>`](crate::operation::deregister_container_instance::DeregisterContainerInstanceError)
pub fn deregister_container_instance(
&self,
) -> crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder {
crate::operation::deregister_container_instance::builders::DeregisterContainerInstanceFluentBuilder::new(self.handle.clone())
}
}