public class CreateServiceRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clientToken
Unique, case-sensitive identifier you provide to ensure the idempotency
of the request.
|
private java.lang.String |
cluster
The short name or full Amazon Resource Name (ARN) of the cluster on which
to run your service.
|
private DeploymentConfiguration |
deploymentConfiguration
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
private java.lang.Integer |
desiredCount
The number of instantiations of the specified task definition to place
and keep running on your cluster.
|
private SdkInternalList<LoadBalancer> |
loadBalancers
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
private java.lang.String |
role
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf.
|
private java.lang.String |
serviceName
The name of your service.
|
private java.lang.String |
taskDefinition
The
family and revision (
family:revision ) or full Amazon Resource Name (ARN) of the
task definition to run in your service. |
NOOP
Constructor and Description |
---|
CreateServiceRequest() |
Modifier and Type | Method and Description |
---|---|
CreateServiceRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency
of the request.
|
java.lang.String |
getCluster()
The short name or full Amazon Resource Name (ARN) of the cluster on which
to run your service.
|
DeploymentConfiguration |
getDeploymentConfiguration()
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
java.lang.Integer |
getDesiredCount()
The number of instantiations of the specified task definition to place
and keep running on your cluster.
|
java.util.List<LoadBalancer> |
getLoadBalancers()
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
java.lang.String |
getRole()
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf.
|
java.lang.String |
getServiceName()
The name of your service.
|
java.lang.String |
getTaskDefinition()
The
family and revision (
family:revision ) or full Amazon Resource Name (ARN) of the
task definition to run in your service. |
int |
hashCode() |
void |
setClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency
of the request.
|
void |
setCluster(java.lang.String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster on which
to run your service.
|
void |
setDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
void |
setDesiredCount(java.lang.Integer desiredCount)
The number of instantiations of the specified task definition to place
and keep running on your cluster.
|
void |
setLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
void |
setRole(java.lang.String role)
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf.
|
void |
setServiceName(java.lang.String serviceName)
The name of your service.
|
void |
setTaskDefinition(java.lang.String taskDefinition)
The
family and revision (
family:revision ) or full Amazon Resource Name (ARN) of the
task definition to run in your service. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateServiceRequest |
withClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency
of the request.
|
CreateServiceRequest |
withCluster(java.lang.String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster on which
to run your service.
|
CreateServiceRequest |
withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
CreateServiceRequest |
withDesiredCount(java.lang.Integer desiredCount)
The number of instantiations of the specified task definition to place
and keep running on your cluster.
|
CreateServiceRequest |
withLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
CreateServiceRequest |
withLoadBalancers(LoadBalancer... loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
CreateServiceRequest |
withRole(java.lang.String role)
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf.
|
CreateServiceRequest |
withServiceName(java.lang.String serviceName)
The name of your service.
|
CreateServiceRequest |
withTaskDefinition(java.lang.String taskDefinition)
The
family and revision (
family:revision ) or full Amazon Resource Name (ARN) of the
task definition to run in your service. |
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.String cluster
The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service. If you do not specify a cluster, the default cluster is assumed.
private java.lang.String serviceName
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
private java.lang.String taskDefinition
The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN) of the
task definition to run in your service. If a revision
is not
specified, the latest ACTIVE
revision is used.
private SdkInternalList<LoadBalancer> loadBalancers
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
private java.lang.Integer desiredCount
The number of instantiations of the specified task definition to place and keep running on your cluster.
private java.lang.String clientToken
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
private java.lang.String role
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf. This
parameter is required if you are using a load balancer with your service.
If you specify the role
parameter, you must also specify a
load balancer object with the loadBalancers
parameter.
If your specified role has a path other than /
, then you
must either specify the full role ARN (this is recommended) or prefix the
role name with the path. For example, if a role with the name
bar
has a path of /foo/
then you would specify
/foo/bar
as the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
private DeploymentConfiguration deploymentConfiguration
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
public void setCluster(java.lang.String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service. If you do not specify a cluster, the default cluster is assumed.
cluster
- The short name or full Amazon Resource Name (ARN) of the cluster
on which to run your service. If you do not specify a cluster, the
default cluster is assumed.public java.lang.String getCluster()
The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service. If you do not specify a cluster, the default cluster is assumed.
public CreateServiceRequest withCluster(java.lang.String cluster)
The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service. If you do not specify a cluster, the default cluster is assumed.
cluster
- The short name or full Amazon Resource Name (ARN) of the cluster
on which to run your service. If you do not specify a cluster, the
default cluster is assumed.public void setServiceName(java.lang.String serviceName)
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
serviceName
- The name of your service. Up to 255 letters (uppercase and
lowercase), numbers, hyphens, and underscores are allowed. Service
names must be unique within a cluster, but you can have similarly
named services in multiple clusters within a region or across
multiple regions.public java.lang.String getServiceName()
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
public CreateServiceRequest withServiceName(java.lang.String serviceName)
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
serviceName
- The name of your service. Up to 255 letters (uppercase and
lowercase), numbers, hyphens, and underscores are allowed. Service
names must be unique within a cluster, but you can have similarly
named services in multiple clusters within a region or across
multiple regions.public void setTaskDefinition(java.lang.String taskDefinition)
The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN) of the
task definition to run in your service. If a revision
is not
specified, the latest ACTIVE
revision is used.
taskDefinition
- The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN)
of the task definition to run in your service. If a
revision
is not specified, the latest
ACTIVE
revision is used.public java.lang.String getTaskDefinition()
The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN) of the
task definition to run in your service. If a revision
is not
specified, the latest ACTIVE
revision is used.
family
and revision
(
family:revision
) or full Amazon Resource Name (ARN)
of the task definition to run in your service. If a
revision
is not specified, the latest
ACTIVE
revision is used.public CreateServiceRequest withTaskDefinition(java.lang.String taskDefinition)
The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN) of the
task definition to run in your service. If a revision
is not
specified, the latest ACTIVE
revision is used.
taskDefinition
- The family
and revision
(
family:revision
) or full Amazon Resource Name (ARN)
of the task definition to run in your service. If a
revision
is not specified, the latest
ACTIVE
revision is used.public java.util.List<LoadBalancer> getLoadBalancers()
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
public void setLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public CreateServiceRequest withLoadBalancers(LoadBalancer... loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
NOTE: This method appends the values to the existing list (if
any). Use setLoadBalancers(java.util.Collection)
or
withLoadBalancers(java.util.Collection)
if you want to override
the existing values.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public CreateServiceRequest withLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public void setDesiredCount(java.lang.Integer desiredCount)
The number of instantiations of the specified task definition to place and keep running on your cluster.
desiredCount
- The number of instantiations of the specified task definition to
place and keep running on your cluster.public java.lang.Integer getDesiredCount()
The number of instantiations of the specified task definition to place and keep running on your cluster.
public CreateServiceRequest withDesiredCount(java.lang.Integer desiredCount)
The number of instantiations of the specified task definition to place and keep running on your cluster.
desiredCount
- The number of instantiations of the specified task definition to
place and keep running on your cluster.public void setClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
clientToken
- Unique, case-sensitive identifier you provide to ensure the
idempotency of the request. Up to 32 ASCII characters are allowed.public java.lang.String getClientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
public CreateServiceRequest withClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
clientToken
- Unique, case-sensitive identifier you provide to ensure the
idempotency of the request. Up to 32 ASCII characters are allowed.public void setRole(java.lang.String role)
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf. This
parameter is required if you are using a load balancer with your service.
If you specify the role
parameter, you must also specify a
load balancer object with the loadBalancers
parameter.
If your specified role has a path other than /
, then you
must either specify the full role ARN (this is recommended) or prefix the
role name with the path. For example, if a role with the name
bar
has a path of /foo/
then you would specify
/foo/bar
as the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
role
- The name or full Amazon Resource Name (ARN) of the IAM role that
allows Amazon ECS to make calls to your load balancer on your
behalf. This parameter is required if you are using a load
balancer with your service. If you specify the role
parameter, you must also specify a load balancer object with the
loadBalancers
parameter.
If your specified role has a path other than /
, then
you must either specify the full role ARN (this is recommended) or
prefix the role name with the path. For example, if a role with
the name bar
has a path of /foo/
then
you would specify /foo/bar
as the role name. For more
information, see Friendly Names and Paths in the IAM User Guide.
public java.lang.String getRole()
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf. This
parameter is required if you are using a load balancer with your service.
If you specify the role
parameter, you must also specify a
load balancer object with the loadBalancers
parameter.
If your specified role has a path other than /
, then you
must either specify the full role ARN (this is recommended) or prefix the
role name with the path. For example, if a role with the name
bar
has a path of /foo/
then you would specify
/foo/bar
as the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
role
parameter, you must also specify a load balancer object with the
loadBalancers
parameter.
If your specified role has a path other than /
, then
you must either specify the full role ARN (this is recommended)
or prefix the role name with the path. For example, if a role
with the name bar
has a path of /foo/
then you would specify /foo/bar
as the role name.
For more information, see Friendly Names and Paths in the IAM User Guide.
public CreateServiceRequest withRole(java.lang.String role)
The name or full Amazon Resource Name (ARN) of the IAM role that allows
Amazon ECS to make calls to your load balancer on your behalf. This
parameter is required if you are using a load balancer with your service.
If you specify the role
parameter, you must also specify a
load balancer object with the loadBalancers
parameter.
If your specified role has a path other than /
, then you
must either specify the full role ARN (this is recommended) or prefix the
role name with the path. For example, if a role with the name
bar
has a path of /foo/
then you would specify
/foo/bar
as the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
role
- The name or full Amazon Resource Name (ARN) of the IAM role that
allows Amazon ECS to make calls to your load balancer on your
behalf. This parameter is required if you are using a load
balancer with your service. If you specify the role
parameter, you must also specify a load balancer object with the
loadBalancers
parameter.
If your specified role has a path other than /
, then
you must either specify the full role ARN (this is recommended) or
prefix the role name with the path. For example, if a role with
the name bar
has a path of /foo/
then
you would specify /foo/bar
as the role name. For more
information, see Friendly Names and Paths in the IAM User Guide.
public void setDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
deploymentConfiguration
- Optional deployment parameters that control how many tasks run
during the deployment and the ordering of stopping and starting
tasks.public DeploymentConfiguration getDeploymentConfiguration()
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
public CreateServiceRequest withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
deploymentConfiguration
- Optional deployment parameters that control how many tasks run
during the deployment and the ordering of stopping and starting
tasks.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CreateServiceRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()