Example usage for com.amazonaws.services.ecs.model Task getDesiredStatus

List of usage examples for com.amazonaws.services.ecs.model Task getDesiredStatus

Introduction

In this page you can find the example usage for com.amazonaws.services.ecs.model Task getDesiredStatus.

Prototype


public String getDesiredStatus() 

Source Link

Document

The desired status of the task.

Usage

From source file:com.netflix.spinnaker.clouddriver.ecs.provider.agent.TaskCachingAgent.java

License:Apache License

public static Map<String, Object> convertTaskToAttributes(Task task) {
    String taskId = StringUtils.substringAfterLast(task.getTaskArn(), "/");

    Map<String, Object> attributes = new HashMap<>();
    attributes.put("taskId", taskId);
    attributes.put("taskArn", task.getTaskArn());
    attributes.put("clusterArn", task.getClusterArn());
    attributes.put("containerInstanceArn", task.getContainerInstanceArn());
    attributes.put("group", task.getGroup());
    attributes.put("containers", task.getContainers());
    attributes.put("lastStatus", task.getLastStatus());
    attributes.put("desiredStatus", task.getDesiredStatus());
    attributes.put("startedAt", task.getStartedAt().getTime());

    return attributes;
}