public class StartTaskRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
StartTask operation
.
Starts a new task from the specified task definition on the specified
container instance or instances. If you want to use the default Amazon
ECS scheduler to place your task, use RunTask
instead.
IMPORTANT: The list of container instances to start tasks on is limited to 10.
NOOP
Constructor and Description |
---|
StartTaskRequest() |
Modifier and Type | Method and Description |
---|---|
StartTaskRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getCluster()
The short name or full Amazon Resource Name (ARN) of the cluster that
you want to start your task on.
|
List<String> |
getContainerInstances()
The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task.
|
TaskOverride |
getOverrides()
A list of container overrides in JSON format that specify the name of
a container in the specified task definition and the command it should
run instead of its default.
|
String |
getStartedBy()
An optional tag specified when a task is started.
|
String |
getTaskDefinition()
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to start. |
int |
hashCode() |
void |
setCluster(String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster that
you want to start your task on.
|
void |
setContainerInstances(Collection<String> containerInstances)
The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task.
|
void |
setOverrides(TaskOverride overrides)
A list of container overrides in JSON format that specify the name of
a container in the specified task definition and the command it should
run instead of its default.
|
void |
setStartedBy(String startedBy)
An optional tag specified when a task is started.
|
void |
setTaskDefinition(String taskDefinition)
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to start. |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
StartTaskRequest |
withCluster(String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster that
you want to start your task on.
|
StartTaskRequest |
withContainerInstances(Collection<String> containerInstances)
The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task.
|
StartTaskRequest |
withContainerInstances(String... containerInstances)
The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task.
|
StartTaskRequest |
withOverrides(TaskOverride overrides)
A list of container overrides in JSON format that specify the name of
a container in the specified task definition and the command it should
run instead of its default.
|
StartTaskRequest |
withStartedBy(String startedBy)
An optional tag specified when a task is started.
|
StartTaskRequest |
withTaskDefinition(String taskDefinition)
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to start. |
copyBaseTo, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getCluster()
public void setCluster(String cluster)
cluster
- The short name or full Amazon Resource Name (ARN) of the cluster that
you want to start your task on. If you do not specify a cluster, the
default cluster is assumed..public StartTaskRequest withCluster(String cluster)
Returns a reference to this object so that method calls can be chained together.
cluster
- The short name or full Amazon Resource Name (ARN) of the cluster that
you want to start your task on. If you do not specify a cluster, the
default cluster is assumed..public String getTaskDefinition()
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.public void setTaskDefinition(String taskDefinition)
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.taskDefinition
- The family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.public StartTaskRequest withTaskDefinition(String taskDefinition)
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.
Returns a reference to this object so that method calls can be chained together.
taskDefinition
- The family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to start.public TaskOverride getOverrides()
public void setOverrides(TaskOverride overrides)
overrides
- A list of container overrides in JSON format that specify the name of
a container in the specified task definition and the command it should
run instead of its default. A total of 8192 characters are allowed for
overrides. This limit includes the JSON formatting characters of the
override structure.public StartTaskRequest withOverrides(TaskOverride overrides)
Returns a reference to this object so that method calls can be chained together.
overrides
- A list of container overrides in JSON format that specify the name of
a container in the specified task definition and the command it should
run instead of its default. A total of 8192 characters are allowed for
overrides. This limit includes the JSON formatting characters of the
override structure.public List<String> getContainerInstances()
The list of container instances to start tasks on is limited to 10.
The list of container instances to start tasks on is limited to 10.
public void setContainerInstances(Collection<String> containerInstances)
The list of container instances to start tasks on is limited to 10.
containerInstances
- The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task. The list of container instances to start tasks on is limited to 10.
public StartTaskRequest withContainerInstances(String... containerInstances)
The list of container instances to start tasks on is limited to 10.
NOTE: This method appends the values to the existing list (if
any). Use setContainerInstances(java.util.Collection)
or
withContainerInstances(java.util.Collection)
if you want to
override the existing values.
Returns a reference to this object so that method calls can be chained together.
containerInstances
- The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task. The list of container instances to start tasks on is limited to 10.
public StartTaskRequest withContainerInstances(Collection<String> containerInstances)
The list of container instances to start tasks on is limited to 10.
Returns a reference to this object so that method calls can be chained together.
containerInstances
- The container instance UUIDs or full Amazon Resource Name (ARN)
entries for the container instances on which you would like to place
your task. The list of container instances to start tasks on is limited to 10.
public String getStartedBy()
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
public void setStartedBy(String startedBy)
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
startedBy
- An optional tag specified when a task is started. For example if you
automatically trigger a task to run a batch process job, you could
apply a unique identifier for that job to your task with the
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
public StartTaskRequest withStartedBy(String startedBy)
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
Returns a reference to this object so that method calls can be chained together.
startedBy
- An optional tag specified when a task is started. For example if you
automatically trigger a task to run a batch process job, you could
apply a unique identifier for that job to your task with the
startedBy
parameter. You can then identify which tasks
belong to that job by filtering the results of a ListTasks call
with the startedBy
value. If a task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
public String toString()
toString
in class Object
Object.toString()
public StartTaskRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.