public class UpdateServiceRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
UpdateService operation
.
Modify the desired count or task definition used in a service.
You can add to or subtract from the number of instantiations of a task
definition in a service by specifying the cluster that the service is
running in and a new desiredCount
parameter.
You can use UpdateService
to modify your task definition
and deploy a new version of your service, one task at a time. If you
modify the task definition with UpdateService
, Amazon
ECS spawns a task with the new version of the task definition and then
stops an old task after the new version is running. Because
UpdateService
starts a new version of the task before
stopping an old version, your cluster must have capacity to support
one more instantiation of the task when UpdateService
is
run. If your cluster cannot support another instantiation of the task
used in your service, you can reduce the desired count of your service
by one before modifying the task definition.
NOOP
Constructor and Description |
---|
UpdateServiceRequest() |
Modifier and Type | Method and Description |
---|---|
UpdateServiceRequest |
clone() |
boolean |
equals(Object obj) |
String |
getCluster()
The short name or full Amazon Resource Name (ARN) of the cluster that
your service is running on.
|
Integer |
getDesiredCount()
The number of instantiations of the task that you would like to place
and keep running in your service.
|
String |
getService()
The name of the service that you want to update.
|
String |
getTaskDefinition()
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. |
int |
hashCode() |
void |
setCluster(String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster that
your service is running on.
|
void |
setDesiredCount(Integer desiredCount)
The number of instantiations of the task that you would like to place
and keep running in your service.
|
void |
setService(String service)
The name of the service that you want to update.
|
void |
setTaskDefinition(String taskDefinition)
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UpdateServiceRequest |
withCluster(String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster that
your service is running on.
|
UpdateServiceRequest |
withDesiredCount(Integer desiredCount)
The number of instantiations of the task that you would like to place
and keep running in your service.
|
UpdateServiceRequest |
withService(String service)
The name of the service that you want to update.
|
UpdateServiceRequest |
withTaskDefinition(String taskDefinition)
The
family and revision
(family:revision ) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. |
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, 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
your service is running on. If you do not specify a cluster, the
default cluster is assumed.public UpdateServiceRequest 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
your service is running on. If you do not specify a cluster, the
default cluster is assumed.public String getService()
public void setService(String service)
service
- The name of the service that you want to update.public UpdateServiceRequest withService(String service)
Returns a reference to this object so that method calls can be chained together.
service
- The name of the service that you want to update.public Integer getDesiredCount()
public void setDesiredCount(Integer desiredCount)
desiredCount
- The number of instantiations of the task that you would like to place
and keep running in your service.public UpdateServiceRequest withDesiredCount(Integer desiredCount)
Returns a reference to this object so that method calls can be chained together.
desiredCount
- The number of instantiations of the task that you would like to place
and keep running in your service.public String getTaskDefinition()
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.public void setTaskDefinition(String taskDefinition)
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.taskDefinition
- The family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.public UpdateServiceRequest withTaskDefinition(String taskDefinition)
family
and revision
(family:revision
) or full Amazon Resource Name (ARN) of
the task definition that you want to run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.
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 run in your service. If a
revision
is not specified, the latest ACTIVE
revision is used. If you modify the task definition with
UpdateService
, Amazon ECS spawns a task with the new
version of the task definition and then stops an old task after the
new version is running.public String toString()
toString
in class Object
Object.toString()
public UpdateServiceRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.