Class CreateServiceRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.ecs.model.CreateServiceRequest
-
- All Implemented Interfaces:
ReadLimitInfo,Serializable,Cloneable
public class CreateServiceRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description CreateServiceRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateServiceRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)StringgetClientToken()Unique, case-sensitive identifier you provide to ensure the idempotency of the request.StringgetCluster()The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service.DeploymentConfigurationgetDeploymentConfiguration()Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.IntegergetDesiredCount()The number of instantiations of the specified task definition to place and keep running on your cluster.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.StringgetRole()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.StringgetServiceName()The name of your service.StringgetTaskDefinition()Thefamilyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service.inthashCode()voidsetClientToken(String clientToken)Unique, case-sensitive identifier you provide to ensure the idempotency of the request.voidsetCluster(String cluster)The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service.voidsetDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.voidsetDesiredCount(Integer desiredCount)The number of instantiations of the specified task definition to place and keep running on your cluster.voidsetLoadBalancers(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.voidsetRole(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.voidsetServiceName(String serviceName)The name of your service.voidsetTaskDefinition(String taskDefinition)Thefamilyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service.StringtoString()Returns a string representation of this object; useful for testing and debugging.CreateServiceRequestwithClientToken(String clientToken)Unique, case-sensitive identifier you provide to ensure the idempotency of the request.CreateServiceRequestwithCluster(String cluster)The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service.CreateServiceRequestwithDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.CreateServiceRequestwithDesiredCount(Integer desiredCount)The number of instantiations of the specified task definition to place and keep running on your cluster.CreateServiceRequestwithLoadBalancers(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.CreateServiceRequestwithLoadBalancers(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.CreateServiceRequestwithRole(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.CreateServiceRequestwithServiceName(String serviceName)The name of your service.CreateServiceRequestwithTaskDefinition(String taskDefinition)Thefamilyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
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
-
-
-
-
Method Detail
-
setCluster
public void setCluster(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.
- Parameters:
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.
-
getCluster
public 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.
- Returns:
- 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.
-
withCluster
public CreateServiceRequest withCluster(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setServiceName
public void setServiceName(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.
- Parameters:
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.
-
getServiceName
public 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.
- Returns:
- 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.
-
withServiceName
public CreateServiceRequest withServiceName(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setTaskDefinition
public void setTaskDefinition(String taskDefinition)
The
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.- Parameters:
taskDefinition- Thefamilyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.
-
getTaskDefinition
public String getTaskDefinition()
The
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.- Returns:
- The
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.
-
withTaskDefinition
public CreateServiceRequest withTaskDefinition(String taskDefinition)
The
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.- Parameters:
taskDefinition- Thefamilyandrevision(family:revision) or full Amazon Resource Name (ARN) of the task definition to run in your service. If arevisionis not specified, the latestACTIVErevision is used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getLoadBalancers
public 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.
- Returns:
- 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.
-
setLoadBalancers
public void setLoadBalancers(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.
- Parameters:
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.
-
withLoadBalancers
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)orwithLoadBalancers(java.util.Collection)if you want to override the existing values.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withLoadBalancers
public CreateServiceRequest withLoadBalancers(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDesiredCount
public void setDesiredCount(Integer desiredCount)
The number of instantiations of the specified task definition to place and keep running on your cluster.
- Parameters:
desiredCount- The number of instantiations of the specified task definition to place and keep running on your cluster.
-
getDesiredCount
public Integer getDesiredCount()
The number of instantiations of the specified task definition to place and keep running on your cluster.
- Returns:
- The number of instantiations of the specified task definition to place and keep running on your cluster.
-
withDesiredCount
public CreateServiceRequest withDesiredCount(Integer desiredCount)
The number of instantiations of the specified task definition to place and keep running on your cluster.
- Parameters:
desiredCount- The number of instantiations of the specified task definition to place and keep running on your cluster.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClientToken
public void setClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
- Parameters:
clientToken- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
-
getClientToken
public String getClientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
- Returns:
- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
-
withClientToken
public CreateServiceRequest withClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.
- Parameters:
clientToken- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRole
public void setRole(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
roleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.- Parameters:
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 theroleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
-
getRole
public 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
roleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.- Returns:
- 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
roleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.
-
withRole
public CreateServiceRequest withRole(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
roleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.- Parameters:
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 theroleparameter, you must also specify a load balancer object with theloadBalancersparameter.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 namebarhas a path of/foo/then you would specify/foo/baras the role name. For more information, see Friendly Names and Paths in the IAM User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDeploymentConfiguration
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.
- Parameters:
deploymentConfiguration- Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
-
getDeploymentConfiguration
public DeploymentConfiguration getDeploymentConfiguration()
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
- Returns:
- Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
-
withDeploymentConfiguration
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.
- Parameters:
deploymentConfiguration- Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public CreateServiceRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-