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

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

Introduction

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

Prototype


public java.util.Date getStartedAt() 

Source Link

Document

The Unix timestamp for when the task started (the task transitioned from the PENDING state to the RUNNING state).

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;
}