stopServiceDeployment
inline suspend fun EcsClient.stopServiceDeployment(crossinline block: StopServiceDeploymentRequest.Builder.() -> Unit): StopServiceDeploymentResponse
Stops an ongoing service deployment.
The following stop types are avaiable:
ROLLBACK - This option rolls back the service deployment to the previous service revision. You can use this option even if you didn't configure the service deployment for the rollback option.
For more information, see Stopping Amazon ECS service deployments in the Amazon Elastic Container Service Developer Guide.
Samples
import aws.sdk.kotlin.services.ecs.model.StopServiceDeploymentStopType
fun main() {
//sampleStart
// This example stops the service deployment using the ROLLBACK option.
val resp = ecsClient.stopServiceDeployment {
serviceDeploymentArn = "arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1r"
stopType = StopServiceDeploymentStopType.fromValue("ROLLBACK")
}
//sampleEnd
}