pub struct DeleteServiceFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to DeleteService
.
Deletes a specified service within a cluster. You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you can't delete it, and you must update the service to a desired task count of zero. For more information, see UpdateService
.
When you delete a service, if there are still running tasks that require cleanup, the service status moves from ACTIVE
to DRAINING
, and the service is no longer visible in the console or in the ListServices
API operation. After all tasks have transitioned to either STOPPING
or STOPPED
status, the service status moves from DRAINING
to INACTIVE
. Services in the DRAINING
or INACTIVE
status can still be viewed with the DescribeServices
API operation. However, in the future, INACTIVE
services may be cleaned up and purged from Amazon ECS record keeping, and DescribeServices
calls on those services return a ServiceNotFoundException
error.
If you attempt to create a new service with the same name as an existing service in either ACTIVE
or DRAINING
status, you receive an error.
Implementations§
source§impl DeleteServiceFluentBuilder
impl DeleteServiceFluentBuilder
sourcepub fn as_input(&self) -> &DeleteServiceInputBuilder
pub fn as_input(&self) -> &DeleteServiceInputBuilder
Access the DeleteService as a reference.
sourcepub async fn send(
self
) -> Result<DeleteServiceOutput, SdkError<DeleteServiceError, HttpResponse>>
pub async fn send( self ) -> Result<DeleteServiceOutput, SdkError<DeleteServiceError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<DeleteServiceOutput, DeleteServiceError>, SdkError<DeleteServiceError>>
pub async fn customize( self ) -> Result<CustomizableOperation<DeleteServiceOutput, DeleteServiceError>, SdkError<DeleteServiceError>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn cluster(self, input: impl Into<String>) -> Self
pub fn cluster(self, input: impl Into<String>) -> Self
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
sourcepub fn set_cluster(self, input: Option<String>) -> Self
pub fn set_cluster(self, input: Option<String>) -> Self
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
sourcepub fn get_cluster(&self) -> &Option<String>
pub fn get_cluster(&self) -> &Option<String>
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.
sourcepub fn set_service(self, input: Option<String>) -> Self
pub fn set_service(self, input: Option<String>) -> Self
The name of the service to delete.
sourcepub fn get_service(&self) -> &Option<String>
pub fn get_service(&self) -> &Option<String>
The name of the service to delete.
sourcepub fn force(self, input: bool) -> Self
pub fn force(self, input: bool) -> Self
If true
, allows you to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the REPLICA
scheduling strategy.
Trait Implementations§
source§impl Clone for DeleteServiceFluentBuilder
impl Clone for DeleteServiceFluentBuilder
source§fn clone(&self) -> DeleteServiceFluentBuilder
fn clone(&self) -> DeleteServiceFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more