List of usage examples for com.amazonaws.services.ecs AmazonECSClient stopTask
@Override
public StopTaskResult stopTask(StopTaskRequest request)
Stops a running task.
From source file:com.cloudbees.jenkins.plugins.amazonecs.ECSService.java
License:Open Source License
void deleteTask(String taskArn, String clusterArn) { final AmazonECSClient client = getAmazonECSClient(); LOGGER.log(Level.INFO, "Delete ECS Slave task: {0}", taskArn); try {// w w w . j a va2 s. co m client.stopTask(new StopTaskRequest().withTask(taskArn).withCluster(clusterArn)); } catch (ClientException e) { LOGGER.log(Level.SEVERE, "Couldn't stop task arn " + taskArn + " caught exception: " + e.getMessage(), e); } }