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() |
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() |
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) |
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)
Returns a reference to this object so that method calls can be chained together.
|
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, copyPrivateRequestParameters, 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()
public void setStartedBy(String startedBy)
startedBy
- public StartTaskRequest withStartedBy(String startedBy)
Returns a reference to this object so that method calls can be chained together.
startedBy
- public String toString()
toString
in class Object
Object.toString()
public StartTaskRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.