Class AbstractAmazonECSAsync
- All Implemented Interfaces:
AmazonECS, AmazonECSAsync
AmazonECSAsync. Convenient method forms
pass through to the corresponding overload that takes a request object and an
AsyncHandler, which throws an UnsupportedOperationException.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSimplified method form for invoking the CreateCluster operation.createClusterAsync(AsyncHandler<CreateClusterRequest, CreateClusterResult> asyncHandler) Simplified method form for invoking the CreateCluster operation with an AsyncHandler.createClusterAsync(CreateClusterRequest request) Creates a new Amazon ECS cluster.createClusterAsync(CreateClusterRequest request, AsyncHandler<CreateClusterRequest, CreateClusterResult> asyncHandler) Creates a new Amazon ECS cluster.createServiceAsync(CreateServiceRequest request) Runs and maintains a desired number of tasks from a specified task definition.createServiceAsync(CreateServiceRequest request, AsyncHandler<CreateServiceRequest, CreateServiceResult> asyncHandler) Runs and maintains a desired number of tasks from a specified task definition.deleteClusterAsync(DeleteClusterRequest request) Deletes the specified cluster.deleteClusterAsync(DeleteClusterRequest request, AsyncHandler<DeleteClusterRequest, DeleteClusterResult> asyncHandler) Deletes the specified cluster.deleteServiceAsync(DeleteServiceRequest request) Deletes a specified service within a cluster.deleteServiceAsync(DeleteServiceRequest request, AsyncHandler<DeleteServiceRequest, DeleteServiceResult> asyncHandler) Deletes a specified service within a cluster.Deregisters an Amazon ECS container instance from the specified cluster.deregisterContainerInstanceAsync(DeregisterContainerInstanceRequest request, AsyncHandler<DeregisterContainerInstanceRequest, DeregisterContainerInstanceResult> asyncHandler) Deregisters an Amazon ECS container instance from the specified cluster.Deregisters the specified task definition by family and revision.deregisterTaskDefinitionAsync(DeregisterTaskDefinitionRequest request, AsyncHandler<DeregisterTaskDefinitionRequest, DeregisterTaskDefinitionResult> asyncHandler) Deregisters the specified task definition by family and revision.Simplified method form for invoking the DescribeClusters operation.Simplified method form for invoking the DescribeClusters operation with an AsyncHandler.Describes one or more of your clusters.describeClustersAsync(DescribeClustersRequest request, AsyncHandler<DescribeClustersRequest, DescribeClustersResult> asyncHandler) Describes one or more of your clusters.Describes Amazon EC2 Container Service container instances.describeContainerInstancesAsync(DescribeContainerInstancesRequest request, AsyncHandler<DescribeContainerInstancesRequest, DescribeContainerInstancesResult> asyncHandler) Describes Amazon EC2 Container Service container instances.Describes the specified services running in your cluster.describeServicesAsync(DescribeServicesRequest request, AsyncHandler<DescribeServicesRequest, DescribeServicesResult> asyncHandler) Describes the specified services running in your cluster.Describes a task definition.describeTaskDefinitionAsync(DescribeTaskDefinitionRequest request, AsyncHandler<DescribeTaskDefinitionRequest, DescribeTaskDefinitionResult> asyncHandler) Describes a task definition.describeTasksAsync(DescribeTasksRequest request) Describes a specified task or tasks.describeTasksAsync(DescribeTasksRequest request, AsyncHandler<DescribeTasksRequest, DescribeTasksResult> asyncHandler) Describes a specified task or tasks.Simplified method form for invoking the DiscoverPollEndpoint operation.discoverPollEndpointAsync(AsyncHandler<DiscoverPollEndpointRequest, DiscoverPollEndpointResult> asyncHandler) Simplified method form for invoking the DiscoverPollEndpoint operation with an AsyncHandler.discoverPollEndpointAsync(DiscoverPollEndpointRequest request, AsyncHandler<DiscoverPollEndpointRequest, DiscoverPollEndpointResult> asyncHandler) Simplified method form for invoking the ListClusters operation.listClustersAsync(AsyncHandler<ListClustersRequest, ListClustersResult> asyncHandler) Simplified method form for invoking the ListClusters operation with an AsyncHandler.listClustersAsync(ListClustersRequest request) Returns a list of existing clusters.listClustersAsync(ListClustersRequest request, AsyncHandler<ListClustersRequest, ListClustersResult> asyncHandler) Returns a list of existing clusters.Simplified method form for invoking the ListContainerInstances operation.listContainerInstancesAsync(AsyncHandler<ListContainerInstancesRequest, ListContainerInstancesResult> asyncHandler) Simplified method form for invoking the ListContainerInstances operation with an AsyncHandler.Returns a list of container instances in a specified cluster.listContainerInstancesAsync(ListContainerInstancesRequest request, AsyncHandler<ListContainerInstancesRequest, ListContainerInstancesResult> asyncHandler) Returns a list of container instances in a specified cluster.Simplified method form for invoking the ListServices operation.listServicesAsync(AsyncHandler<ListServicesRequest, ListServicesResult> asyncHandler) Simplified method form for invoking the ListServices operation with an AsyncHandler.listServicesAsync(ListServicesRequest request) Lists the services that are running in a specified cluster.listServicesAsync(ListServicesRequest request, AsyncHandler<ListServicesRequest, ListServicesResult> asyncHandler) Lists the services that are running in a specified cluster.Simplified method form for invoking the ListTaskDefinitionFamilies operation.listTaskDefinitionFamiliesAsync(AsyncHandler<ListTaskDefinitionFamiliesRequest, ListTaskDefinitionFamiliesResult> asyncHandler) Simplified method form for invoking the ListTaskDefinitionFamilies operation with an AsyncHandler.Returns a list of task definition families that are registered to your account (which may include task definition families that no longer have anyACTIVEtask definition revisions).listTaskDefinitionFamiliesAsync(ListTaskDefinitionFamiliesRequest request, AsyncHandler<ListTaskDefinitionFamiliesRequest, ListTaskDefinitionFamiliesResult> asyncHandler) Returns a list of task definition families that are registered to your account (which may include task definition families that no longer have anyACTIVEtask definition revisions).Simplified method form for invoking the ListTaskDefinitions operation.listTaskDefinitionsAsync(AsyncHandler<ListTaskDefinitionsRequest, ListTaskDefinitionsResult> asyncHandler) Simplified method form for invoking the ListTaskDefinitions operation with an AsyncHandler.Returns a list of task definitions that are registered to your account.listTaskDefinitionsAsync(ListTaskDefinitionsRequest request, AsyncHandler<ListTaskDefinitionsRequest, ListTaskDefinitionsResult> asyncHandler) Returns a list of task definitions that are registered to your account.Simplified method form for invoking the ListTasks operation.listTasksAsync(AsyncHandler<ListTasksRequest, ListTasksResult> asyncHandler) Simplified method form for invoking the ListTasks operation with an AsyncHandler.listTasksAsync(ListTasksRequest request) Returns a list of tasks for a specified cluster.listTasksAsync(ListTasksRequest request, AsyncHandler<ListTasksRequest, ListTasksResult> asyncHandler) Returns a list of tasks for a specified cluster.registerContainerInstanceAsync(RegisterContainerInstanceRequest request, AsyncHandler<RegisterContainerInstanceRequest, RegisterContainerInstanceResult> asyncHandler) Registers a new task definition from the suppliedfamilyandcontainerDefinitions.registerTaskDefinitionAsync(RegisterTaskDefinitionRequest request, AsyncHandler<RegisterTaskDefinitionRequest, RegisterTaskDefinitionResult> asyncHandler) Registers a new task definition from the suppliedfamilyandcontainerDefinitions.runTaskAsync(RunTaskRequest request) Start a task using random placement and the default Amazon ECS scheduler.runTaskAsync(RunTaskRequest request, AsyncHandler<RunTaskRequest, RunTaskResult> asyncHandler) Start a task using random placement and the default Amazon ECS scheduler.startTaskAsync(StartTaskRequest request) Starts a new task from the specified task definition on the specified container instance or instances.startTaskAsync(StartTaskRequest request, AsyncHandler<StartTaskRequest, StartTaskResult> asyncHandler) Starts a new task from the specified task definition on the specified container instance or instances.stopTaskAsync(StopTaskRequest request) Stops a running task.stopTaskAsync(StopTaskRequest request, AsyncHandler<StopTaskRequest, StopTaskResult> asyncHandler) Stops a running task.Simplified method form for invoking the SubmitContainerStateChange operation.submitContainerStateChangeAsync(AsyncHandler<SubmitContainerStateChangeRequest, SubmitContainerStateChangeResult> asyncHandler) Simplified method form for invoking the SubmitContainerStateChange operation with an AsyncHandler.submitContainerStateChangeAsync(SubmitContainerStateChangeRequest request, AsyncHandler<SubmitContainerStateChangeRequest, SubmitContainerStateChangeResult> asyncHandler) submitTaskStateChangeAsync(SubmitTaskStateChangeRequest request, AsyncHandler<SubmitTaskStateChangeRequest, SubmitTaskStateChangeResult> asyncHandler) Updates the Amazon ECS container agent on a specified container instance.updateContainerAgentAsync(UpdateContainerAgentRequest request, AsyncHandler<UpdateContainerAgentRequest, UpdateContainerAgentResult> asyncHandler) Updates the Amazon ECS container agent on a specified container instance.updateServiceAsync(UpdateServiceRequest request) Modifies the desired count, deployment configuration, or task definition used in a service.updateServiceAsync(UpdateServiceRequest request, AsyncHandler<UpdateServiceRequest, UpdateServiceResult> asyncHandler) Modifies the desired count, deployment configuration, or task definition used in a service.Methods inherited from class AbstractAmazonECS
createCluster, createCluster, createService, deleteCluster, deleteService, deregisterContainerInstance, deregisterTaskDefinition, describeClusters, describeClusters, describeContainerInstances, describeServices, describeTaskDefinition, describeTasks, discoverPollEndpoint, discoverPollEndpoint, getCachedResponseMetadata, listClusters, listClusters, listContainerInstances, listContainerInstances, listServices, listServices, listTaskDefinitionFamilies, listTaskDefinitionFamilies, listTaskDefinitions, listTaskDefinitions, listTasks, listTasks, registerContainerInstance, registerTaskDefinition, runTask, setEndpoint, setRegion, shutdown, startTask, stopTask, submitContainerStateChange, submitContainerStateChange, submitTaskStateChange, updateContainerAgent, updateServiceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AmazonECS
createCluster, createCluster, createService, deleteCluster, deleteService, deregisterContainerInstance, deregisterTaskDefinition, describeClusters, describeClusters, describeContainerInstances, describeServices, describeTaskDefinition, describeTasks, discoverPollEndpoint, discoverPollEndpoint, getCachedResponseMetadata, listClusters, listClusters, listContainerInstances, listContainerInstances, listServices, listServices, listTaskDefinitionFamilies, listTaskDefinitionFamilies, listTaskDefinitions, listTaskDefinitions, listTasks, listTasks, registerContainerInstance, registerTaskDefinition, runTask, setEndpoint, setRegion, shutdown, startTask, stopTask, submitContainerStateChange, submitContainerStateChange, submitTaskStateChange, updateContainerAgent, updateService
-
Constructor Details
-
AbstractAmazonECSAsync
protected AbstractAmazonECSAsync()
-
-
Method Details
-
createClusterAsync
Description copied from interface:AmazonECSAsyncCreates a new Amazon ECS cluster. By default, your account receives a
defaultcluster when you launch your first container instance. However, you can create your own cluster with a unique name with theCreateClusteraction.- Specified by:
createClusterAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the CreateCluster operation returned by the service.
-
createClusterAsync
public Future<CreateClusterResult> createClusterAsync(CreateClusterRequest request, AsyncHandler<CreateClusterRequest, CreateClusterResult> asyncHandler) Description copied from interface:AmazonECSAsyncCreates a new Amazon ECS cluster. By default, your account receives a
defaultcluster when you launch your first container instance. However, you can create your own cluster with a unique name with theCreateClusteraction.- Specified by:
createClusterAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the CreateCluster operation returned by the service.
-
createClusterAsync
Simplified method form for invoking the CreateCluster operation.- Specified by:
createClusterAsyncin interfaceAmazonECSAsync- See Also:
-
createClusterAsync
public Future<CreateClusterResult> createClusterAsync(AsyncHandler<CreateClusterRequest, CreateClusterResult> asyncHandler) Simplified method form for invoking the CreateCluster operation with an AsyncHandler.- Specified by:
createClusterAsyncin interfaceAmazonECSAsync- See Also:
-
createServiceAsync
Description copied from interface:AmazonECSAsyncRuns and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below
desiredCount, Amazon ECS spawns another instantiation of the task in the specified cluster. To update an existing service, see UpdateService.In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind a load balancer. The load balancer distributes traffic across the tasks that are associated with the service.
You can optionally specify a deployment configuration for your service. During a deployment (which is triggered by changing the task definition of a service with an UpdateService operation), the service scheduler uses the
minimumHealthyPercentandmaximumPercentparameters to determine the deployment strategy.If the
minimumHealthyPercentis below 100%, the scheduler can ignore thedesiredCounttemporarily during a deployment. For example, if your service has adesiredCountof four tasks, aminimumHealthyPercentof 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in theRUNNINGstate; tasks for services that do use a load balancer are considered healthy if they are in theRUNNINGstate and the container instance it is hosted on is reported as healthy by the load balancer. The default value forminimumHealthyPercentis 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.The
maximumPercentparameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if your service has adesiredCountof four tasks, amaximumPercentvalue of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value formaximumPercentis 200%.When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
-
Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).
-
Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.
-
Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.
- Specified by:
createServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the CreateService operation returned by the service.
-
-
createServiceAsync
public Future<CreateServiceResult> createServiceAsync(CreateServiceRequest request, AsyncHandler<CreateServiceRequest, CreateServiceResult> asyncHandler) Description copied from interface:AmazonECSAsyncRuns and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below
desiredCount, Amazon ECS spawns another instantiation of the task in the specified cluster. To update an existing service, see UpdateService.In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind a load balancer. The load balancer distributes traffic across the tasks that are associated with the service.
You can optionally specify a deployment configuration for your service. During a deployment (which is triggered by changing the task definition of a service with an UpdateService operation), the service scheduler uses the
minimumHealthyPercentandmaximumPercentparameters to determine the deployment strategy.If the
minimumHealthyPercentis below 100%, the scheduler can ignore thedesiredCounttemporarily during a deployment. For example, if your service has adesiredCountof four tasks, aminimumHealthyPercentof 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in theRUNNINGstate; tasks for services that do use a load balancer are considered healthy if they are in theRUNNINGstate and the container instance it is hosted on is reported as healthy by the load balancer. The default value forminimumHealthyPercentis 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.The
maximumPercentparameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if your service has adesiredCountof four tasks, amaximumPercentvalue of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value formaximumPercentis 200%.When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
-
Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).
-
Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.
-
Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.
- Specified by:
createServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the CreateService operation returned by the service.
-
-
deleteClusterAsync
Description copied from interface:AmazonECSAsyncDeletes the specified cluster. You must deregister all container instances from this cluster before you may delete it. You can list the container instances in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
- Specified by:
deleteClusterAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DeleteCluster operation returned by the service.
-
deleteClusterAsync
public Future<DeleteClusterResult> deleteClusterAsync(DeleteClusterRequest request, AsyncHandler<DeleteClusterRequest, DeleteClusterResult> asyncHandler) Description copied from interface:AmazonECSAsyncDeletes the specified cluster. You must deregister all container instances from this cluster before you may delete it. You can list the container instances in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
- Specified by:
deleteClusterAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DeleteCluster operation returned by the service.
-
deleteServiceAsync
Description copied from interface:AmazonECSAsyncDeletes a specified service within a cluster. You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you cannot delete it, and you must update the service to a desired task count of zero. For more information, see UpdateService.
When you delete a service, if there are still running tasks that require cleanup, the service status moves from
ACTIVEtoDRAINING, and the service is no longer visible in the console or in ListServices API operations. After the tasks have stopped, then the service status moves fromDRAININGtoINACTIVE. Services in theDRAININGorINACTIVEstatus can still be viewed with DescribeServices API operations; however, in the future,INACTIVEservices may be cleaned up and purged from Amazon ECS record keeping, and DescribeServices API operations on those services will return aServiceNotFoundExceptionerror.- Specified by:
deleteServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DeleteService operation returned by the service.
-
deleteServiceAsync
public Future<DeleteServiceResult> deleteServiceAsync(DeleteServiceRequest request, AsyncHandler<DeleteServiceRequest, DeleteServiceResult> asyncHandler) Description copied from interface:AmazonECSAsyncDeletes a specified service within a cluster. You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you cannot delete it, and you must update the service to a desired task count of zero. For more information, see UpdateService.
When you delete a service, if there are still running tasks that require cleanup, the service status moves from
ACTIVEtoDRAINING, and the service is no longer visible in the console or in ListServices API operations. After the tasks have stopped, then the service status moves fromDRAININGtoINACTIVE. Services in theDRAININGorINACTIVEstatus can still be viewed with DescribeServices API operations; however, in the future,INACTIVEservices may be cleaned up and purged from Amazon ECS record keeping, and DescribeServices API operations on those services will return aServiceNotFoundExceptionerror.- Specified by:
deleteServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DeleteService operation returned by the service.
-
deregisterContainerInstanceAsync
public Future<DeregisterContainerInstanceResult> deregisterContainerInstanceAsync(DeregisterContainerInstanceRequest request) Description copied from interface:AmazonECSAsyncDeregisters an Amazon ECS container instance from the specified cluster. This instance is no longer available to run tasks.
If you intend to use the container instance for some other purpose after deregistration, you should stop all of the tasks running on the container instance before deregistration to avoid any orphaned tasks from consuming resources.
Deregistering a container instance removes the instance from a cluster, but it does not terminate the EC2 instance; if you are finished using the instance, be sure to terminate it in the Amazon EC2 console to stop billing.
If you terminate a running container instance with a connected Amazon ECS container agent, the agent automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).
- Specified by:
deregisterContainerInstanceAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DeregisterContainerInstance operation returned by the service.
-
deregisterContainerInstanceAsync
public Future<DeregisterContainerInstanceResult> deregisterContainerInstanceAsync(DeregisterContainerInstanceRequest request, AsyncHandler<DeregisterContainerInstanceRequest, DeregisterContainerInstanceResult> asyncHandler) Description copied from interface:AmazonECSAsyncDeregisters an Amazon ECS container instance from the specified cluster. This instance is no longer available to run tasks.
If you intend to use the container instance for some other purpose after deregistration, you should stop all of the tasks running on the container instance before deregistration to avoid any orphaned tasks from consuming resources.
Deregistering a container instance removes the instance from a cluster, but it does not terminate the EC2 instance; if you are finished using the instance, be sure to terminate it in the Amazon EC2 console to stop billing.
If you terminate a running container instance with a connected Amazon ECS container agent, the agent automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).
- Specified by:
deregisterContainerInstanceAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DeregisterContainerInstance operation returned by the service.
-
deregisterTaskDefinitionAsync
public Future<DeregisterTaskDefinitionResult> deregisterTaskDefinitionAsync(DeregisterTaskDefinitionRequest request) Description copied from interface:AmazonECSAsyncDeregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as
INACTIVE. Existing tasks and services that reference anINACTIVEtask definition continue to run without disruption. Existing services that reference anINACTIVEtask definition can still scale up or down by modifying the service's desired count.You cannot use an
INACTIVEtask definition to run new tasks or create new services, and you cannot update an existing service to reference anINACTIVEtask definition (although there may be up to a 10 minute window following deregistration where these restrictions have not yet taken effect).- Specified by:
deregisterTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DeregisterTaskDefinition operation returned by the service.
-
deregisterTaskDefinitionAsync
public Future<DeregisterTaskDefinitionResult> deregisterTaskDefinitionAsync(DeregisterTaskDefinitionRequest request, AsyncHandler<DeregisterTaskDefinitionRequest, DeregisterTaskDefinitionResult> asyncHandler) Description copied from interface:AmazonECSAsyncDeregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as
INACTIVE. Existing tasks and services that reference anINACTIVEtask definition continue to run without disruption. Existing services that reference anINACTIVEtask definition can still scale up or down by modifying the service's desired count.You cannot use an
INACTIVEtask definition to run new tasks or create new services, and you cannot update an existing service to reference anINACTIVEtask definition (although there may be up to a 10 minute window following deregistration where these restrictions have not yet taken effect).- Specified by:
deregisterTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DeregisterTaskDefinition operation returned by the service.
-
describeClustersAsync
Description copied from interface:AmazonECSAsyncDescribes one or more of your clusters.
- Specified by:
describeClustersAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DescribeClusters operation returned by the service.
-
describeClustersAsync
public Future<DescribeClustersResult> describeClustersAsync(DescribeClustersRequest request, AsyncHandler<DescribeClustersRequest, DescribeClustersResult> asyncHandler) Description copied from interface:AmazonECSAsyncDescribes one or more of your clusters.
- Specified by:
describeClustersAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeClusters operation returned by the service.
-
describeClustersAsync
Simplified method form for invoking the DescribeClusters operation.- Specified by:
describeClustersAsyncin interfaceAmazonECSAsync- See Also:
-
describeClustersAsync
public Future<DescribeClustersResult> describeClustersAsync(AsyncHandler<DescribeClustersRequest, DescribeClustersResult> asyncHandler) Simplified method form for invoking the DescribeClusters operation with an AsyncHandler.- Specified by:
describeClustersAsyncin interfaceAmazonECSAsync- See Also:
-
describeContainerInstancesAsync
public Future<DescribeContainerInstancesResult> describeContainerInstancesAsync(DescribeContainerInstancesRequest request) Description copied from interface:AmazonECSAsyncDescribes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.
- Specified by:
describeContainerInstancesAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DescribeContainerInstances operation returned by the service.
-
describeContainerInstancesAsync
public Future<DescribeContainerInstancesResult> describeContainerInstancesAsync(DescribeContainerInstancesRequest request, AsyncHandler<DescribeContainerInstancesRequest, DescribeContainerInstancesResult> asyncHandler) Description copied from interface:AmazonECSAsyncDescribes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.
- Specified by:
describeContainerInstancesAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeContainerInstances operation returned by the service.
-
describeServicesAsync
Description copied from interface:AmazonECSAsyncDescribes the specified services running in your cluster.
- Specified by:
describeServicesAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DescribeServices operation returned by the service.
-
describeServicesAsync
public Future<DescribeServicesResult> describeServicesAsync(DescribeServicesRequest request, AsyncHandler<DescribeServicesRequest, DescribeServicesResult> asyncHandler) Description copied from interface:AmazonECSAsyncDescribes the specified services running in your cluster.
- Specified by:
describeServicesAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeServices operation returned by the service.
-
describeTaskDefinitionAsync
public Future<DescribeTaskDefinitionResult> describeTaskDefinitionAsync(DescribeTaskDefinitionRequest request) Description copied from interface:AmazonECSAsyncDescribes a task definition. You can specify a
familyandrevisionto find information about a specific task definition, or you can simply specify the family to find the latestACTIVErevision in that family.You can only describe
INACTIVEtask definitions while an active task or service references them.- Specified by:
describeTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DescribeTaskDefinition operation returned by the service.
-
describeTaskDefinitionAsync
public Future<DescribeTaskDefinitionResult> describeTaskDefinitionAsync(DescribeTaskDefinitionRequest request, AsyncHandler<DescribeTaskDefinitionRequest, DescribeTaskDefinitionResult> asyncHandler) Description copied from interface:AmazonECSAsyncDescribes a task definition. You can specify a
familyandrevisionto find information about a specific task definition, or you can simply specify the family to find the latestACTIVErevision in that family.You can only describe
INACTIVEtask definitions while an active task or service references them.- Specified by:
describeTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeTaskDefinition operation returned by the service.
-
describeTasksAsync
Description copied from interface:AmazonECSAsyncDescribes a specified task or tasks.
- Specified by:
describeTasksAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DescribeTasks operation returned by the service.
-
describeTasksAsync
public Future<DescribeTasksResult> describeTasksAsync(DescribeTasksRequest request, AsyncHandler<DescribeTasksRequest, DescribeTasksResult> asyncHandler) Description copied from interface:AmazonECSAsyncDescribes a specified task or tasks.
- Specified by:
describeTasksAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeTasks operation returned by the service.
-
discoverPollEndpointAsync
public Future<DiscoverPollEndpointResult> discoverPollEndpointAsync(DiscoverPollEndpointRequest request) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Returns an endpoint for the Amazon EC2 Container Service agent to poll for updates.
- Specified by:
discoverPollEndpointAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the DiscoverPollEndpoint operation returned by the service.
-
discoverPollEndpointAsync
public Future<DiscoverPollEndpointResult> discoverPollEndpointAsync(DiscoverPollEndpointRequest request, AsyncHandler<DiscoverPollEndpointRequest, DiscoverPollEndpointResult> asyncHandler) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Returns an endpoint for the Amazon EC2 Container Service agent to poll for updates.
- Specified by:
discoverPollEndpointAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DiscoverPollEndpoint operation returned by the service.
-
discoverPollEndpointAsync
Simplified method form for invoking the DiscoverPollEndpoint operation.- Specified by:
discoverPollEndpointAsyncin interfaceAmazonECSAsync- See Also:
-
discoverPollEndpointAsync
public Future<DiscoverPollEndpointResult> discoverPollEndpointAsync(AsyncHandler<DiscoverPollEndpointRequest, DiscoverPollEndpointResult> asyncHandler) Simplified method form for invoking the DiscoverPollEndpoint operation with an AsyncHandler.- Specified by:
discoverPollEndpointAsyncin interfaceAmazonECSAsync- See Also:
-
listClustersAsync
Description copied from interface:AmazonECSAsyncReturns a list of existing clusters.
- Specified by:
listClustersAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListClusters operation returned by the service.
-
listClustersAsync
public Future<ListClustersResult> listClustersAsync(ListClustersRequest request, AsyncHandler<ListClustersRequest, ListClustersResult> asyncHandler) Description copied from interface:AmazonECSAsyncReturns a list of existing clusters.
- Specified by:
listClustersAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListClusters operation returned by the service.
-
listClustersAsync
Simplified method form for invoking the ListClusters operation.- Specified by:
listClustersAsyncin interfaceAmazonECSAsync- See Also:
-
listClustersAsync
public Future<ListClustersResult> listClustersAsync(AsyncHandler<ListClustersRequest, ListClustersResult> asyncHandler) Simplified method form for invoking the ListClusters operation with an AsyncHandler.- Specified by:
listClustersAsyncin interfaceAmazonECSAsync- See Also:
-
listContainerInstancesAsync
public Future<ListContainerInstancesResult> listContainerInstancesAsync(ListContainerInstancesRequest request) Description copied from interface:AmazonECSAsyncReturns a list of container instances in a specified cluster.
- Specified by:
listContainerInstancesAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListContainerInstances operation returned by the service.
-
listContainerInstancesAsync
public Future<ListContainerInstancesResult> listContainerInstancesAsync(ListContainerInstancesRequest request, AsyncHandler<ListContainerInstancesRequest, ListContainerInstancesResult> asyncHandler) Description copied from interface:AmazonECSAsyncReturns a list of container instances in a specified cluster.
- Specified by:
listContainerInstancesAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListContainerInstances operation returned by the service.
-
listContainerInstancesAsync
Simplified method form for invoking the ListContainerInstances operation.- Specified by:
listContainerInstancesAsyncin interfaceAmazonECSAsync- See Also:
-
listContainerInstancesAsync
public Future<ListContainerInstancesResult> listContainerInstancesAsync(AsyncHandler<ListContainerInstancesRequest, ListContainerInstancesResult> asyncHandler) Simplified method form for invoking the ListContainerInstances operation with an AsyncHandler.- Specified by:
listContainerInstancesAsyncin interfaceAmazonECSAsync- See Also:
-
listServicesAsync
Description copied from interface:AmazonECSAsyncLists the services that are running in a specified cluster.
- Specified by:
listServicesAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListServices operation returned by the service.
-
listServicesAsync
public Future<ListServicesResult> listServicesAsync(ListServicesRequest request, AsyncHandler<ListServicesRequest, ListServicesResult> asyncHandler) Description copied from interface:AmazonECSAsyncLists the services that are running in a specified cluster.
- Specified by:
listServicesAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListServices operation returned by the service.
-
listServicesAsync
Simplified method form for invoking the ListServices operation.- Specified by:
listServicesAsyncin interfaceAmazonECSAsync- See Also:
-
listServicesAsync
public Future<ListServicesResult> listServicesAsync(AsyncHandler<ListServicesRequest, ListServicesResult> asyncHandler) Simplified method form for invoking the ListServices operation with an AsyncHandler.- Specified by:
listServicesAsyncin interfaceAmazonECSAsync- See Also:
-
listTaskDefinitionFamiliesAsync
public Future<ListTaskDefinitionFamiliesResult> listTaskDefinitionFamiliesAsync(ListTaskDefinitionFamiliesRequest request) Description copied from interface:AmazonECSAsyncReturns a list of task definition families that are registered to your account (which may include task definition families that no longer have any
ACTIVEtask definition revisions).You can filter out task definition families that do not contain any
ACTIVEtask definition revisions by setting thestatusparameter toACTIVE. You can also filter the results with thefamilyPrefixparameter.- Specified by:
listTaskDefinitionFamiliesAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListTaskDefinitionFamilies operation returned by the service.
-
listTaskDefinitionFamiliesAsync
public Future<ListTaskDefinitionFamiliesResult> listTaskDefinitionFamiliesAsync(ListTaskDefinitionFamiliesRequest request, AsyncHandler<ListTaskDefinitionFamiliesRequest, ListTaskDefinitionFamiliesResult> asyncHandler) Description copied from interface:AmazonECSAsyncReturns a list of task definition families that are registered to your account (which may include task definition families that no longer have any
ACTIVEtask definition revisions).You can filter out task definition families that do not contain any
ACTIVEtask definition revisions by setting thestatusparameter toACTIVE. You can also filter the results with thefamilyPrefixparameter.- Specified by:
listTaskDefinitionFamiliesAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListTaskDefinitionFamilies operation returned by the service.
-
listTaskDefinitionFamiliesAsync
Simplified method form for invoking the ListTaskDefinitionFamilies operation.- Specified by:
listTaskDefinitionFamiliesAsyncin interfaceAmazonECSAsync- See Also:
-
listTaskDefinitionFamiliesAsync
public Future<ListTaskDefinitionFamiliesResult> listTaskDefinitionFamiliesAsync(AsyncHandler<ListTaskDefinitionFamiliesRequest, ListTaskDefinitionFamiliesResult> asyncHandler) Simplified method form for invoking the ListTaskDefinitionFamilies operation with an AsyncHandler.- Specified by:
listTaskDefinitionFamiliesAsyncin interfaceAmazonECSAsync- See Also:
-
listTaskDefinitionsAsync
public Future<ListTaskDefinitionsResult> listTaskDefinitionsAsync(ListTaskDefinitionsRequest request) Description copied from interface:AmazonECSAsyncReturns a list of task definitions that are registered to your account. You can filter the results by family name with the
familyPrefixparameter or by status with thestatusparameter.- Specified by:
listTaskDefinitionsAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListTaskDefinitions operation returned by the service.
-
listTaskDefinitionsAsync
public Future<ListTaskDefinitionsResult> listTaskDefinitionsAsync(ListTaskDefinitionsRequest request, AsyncHandler<ListTaskDefinitionsRequest, ListTaskDefinitionsResult> asyncHandler) Description copied from interface:AmazonECSAsyncReturns a list of task definitions that are registered to your account. You can filter the results by family name with the
familyPrefixparameter or by status with thestatusparameter.- Specified by:
listTaskDefinitionsAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListTaskDefinitions operation returned by the service.
-
listTaskDefinitionsAsync
Simplified method form for invoking the ListTaskDefinitions operation.- Specified by:
listTaskDefinitionsAsyncin interfaceAmazonECSAsync- See Also:
-
listTaskDefinitionsAsync
public Future<ListTaskDefinitionsResult> listTaskDefinitionsAsync(AsyncHandler<ListTaskDefinitionsRequest, ListTaskDefinitionsResult> asyncHandler) Simplified method form for invoking the ListTaskDefinitions operation with an AsyncHandler.- Specified by:
listTaskDefinitionsAsyncin interfaceAmazonECSAsync- See Also:
-
listTasksAsync
Description copied from interface:AmazonECSAsyncReturns a list of tasks for a specified cluster. You can filter the results by family name, by a particular container instance, or by the desired status of the task with the
family,containerInstance, anddesiredStatusparameters.- Specified by:
listTasksAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the ListTasks operation returned by the service.
-
listTasksAsync
public Future<ListTasksResult> listTasksAsync(ListTasksRequest request, AsyncHandler<ListTasksRequest, ListTasksResult> asyncHandler) Description copied from interface:AmazonECSAsyncReturns a list of tasks for a specified cluster. You can filter the results by family name, by a particular container instance, or by the desired status of the task with the
family,containerInstance, anddesiredStatusparameters.- Specified by:
listTasksAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListTasks operation returned by the service.
-
listTasksAsync
Simplified method form for invoking the ListTasks operation.- Specified by:
listTasksAsyncin interfaceAmazonECSAsync- See Also:
-
listTasksAsync
public Future<ListTasksResult> listTasksAsync(AsyncHandler<ListTasksRequest, ListTasksResult> asyncHandler) Simplified method form for invoking the ListTasks operation with an AsyncHandler.- Specified by:
listTasksAsyncin interfaceAmazonECSAsync- See Also:
-
registerContainerInstanceAsync
public Future<RegisterContainerInstanceResult> registerContainerInstanceAsync(RegisterContainerInstanceRequest request) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Registers an EC2 instance into the specified cluster. This instance becomes available to place containers on.
- Specified by:
registerContainerInstanceAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the RegisterContainerInstance operation returned by the service.
-
registerContainerInstanceAsync
public Future<RegisterContainerInstanceResult> registerContainerInstanceAsync(RegisterContainerInstanceRequest request, AsyncHandler<RegisterContainerInstanceRequest, RegisterContainerInstanceResult> asyncHandler) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Registers an EC2 instance into the specified cluster. This instance becomes available to place containers on.
- Specified by:
registerContainerInstanceAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the RegisterContainerInstance operation returned by the service.
-
registerTaskDefinitionAsync
public Future<RegisterTaskDefinitionResult> registerTaskDefinitionAsync(RegisterTaskDefinitionRequest request) Description copied from interface:AmazonECSAsyncRegisters a new task definition from the supplied
familyandcontainerDefinitions. Optionally, you can add data volumes to your containers with thevolumesparameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.- Specified by:
registerTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the RegisterTaskDefinition operation returned by the service.
-
registerTaskDefinitionAsync
public Future<RegisterTaskDefinitionResult> registerTaskDefinitionAsync(RegisterTaskDefinitionRequest request, AsyncHandler<RegisterTaskDefinitionRequest, RegisterTaskDefinitionResult> asyncHandler) Description copied from interface:AmazonECSAsyncRegisters a new task definition from the supplied
familyandcontainerDefinitions. Optionally, you can add data volumes to your containers with thevolumesparameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.- Specified by:
registerTaskDefinitionAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the RegisterTaskDefinition operation returned by the service.
-
runTaskAsync
Description copied from interface:AmazonECSAsyncStart a task using random placement and the default Amazon ECS scheduler. To use your own scheduler or place a task on a specific container instance, use
StartTaskinstead.The
countparameter is limited to 10 tasks per call.- Specified by:
runTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the RunTask operation returned by the service.
-
runTaskAsync
public Future<RunTaskResult> runTaskAsync(RunTaskRequest request, AsyncHandler<RunTaskRequest, RunTaskResult> asyncHandler) Description copied from interface:AmazonECSAsyncStart a task using random placement and the default Amazon ECS scheduler. To use your own scheduler or place a task on a specific container instance, use
StartTaskinstead.The
countparameter is limited to 10 tasks per call.- Specified by:
runTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the RunTask operation returned by the service.
-
startTaskAsync
Description copied from interface:AmazonECSAsyncStarts a new task from the specified task definition on the specified container instance or instances. To use the default Amazon ECS scheduler to place your task, use
RunTaskinstead.The list of container instances to start tasks on is limited to 10.
- Specified by:
startTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the StartTask operation returned by the service.
-
startTaskAsync
public Future<StartTaskResult> startTaskAsync(StartTaskRequest request, AsyncHandler<StartTaskRequest, StartTaskResult> asyncHandler) Description copied from interface:AmazonECSAsyncStarts a new task from the specified task definition on the specified container instance or instances. To use the default Amazon ECS scheduler to place your task, use
RunTaskinstead.The list of container instances to start tasks on is limited to 10.
- Specified by:
startTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the StartTask operation returned by the service.
-
stopTaskAsync
Description copied from interface:AmazonECSAsyncStops a running task.
When StopTask is called on a task, the equivalent of
docker stopis issued to the containers running in the task. This results in aSIGTERMand a 30-second timeout, after whichSIGKILLis sent and the containers are forcibly stopped. If the container handles theSIGTERMgracefully and exits within 30 seconds from receiving it, noSIGKILLis sent.- Specified by:
stopTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the StopTask operation returned by the service.
-
stopTaskAsync
public Future<StopTaskResult> stopTaskAsync(StopTaskRequest request, AsyncHandler<StopTaskRequest, StopTaskResult> asyncHandler) Description copied from interface:AmazonECSAsyncStops a running task.
When StopTask is called on a task, the equivalent of
docker stopis issued to the containers running in the task. This results in aSIGTERMand a 30-second timeout, after whichSIGKILLis sent and the containers are forcibly stopped. If the container handles theSIGTERMgracefully and exits within 30 seconds from receiving it, noSIGKILLis sent.- Specified by:
stopTaskAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the StopTask operation returned by the service.
-
submitContainerStateChangeAsync
public Future<SubmitContainerStateChangeResult> submitContainerStateChangeAsync(SubmitContainerStateChangeRequest request) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a container changed states.
- Specified by:
submitContainerStateChangeAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the SubmitContainerStateChange operation returned by the service.
-
submitContainerStateChangeAsync
public Future<SubmitContainerStateChangeResult> submitContainerStateChangeAsync(SubmitContainerStateChangeRequest request, AsyncHandler<SubmitContainerStateChangeRequest, SubmitContainerStateChangeResult> asyncHandler) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a container changed states.
- Specified by:
submitContainerStateChangeAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the SubmitContainerStateChange operation returned by the service.
-
submitContainerStateChangeAsync
Simplified method form for invoking the SubmitContainerStateChange operation.- Specified by:
submitContainerStateChangeAsyncin interfaceAmazonECSAsync- See Also:
-
submitContainerStateChangeAsync
public Future<SubmitContainerStateChangeResult> submitContainerStateChangeAsync(AsyncHandler<SubmitContainerStateChangeRequest, SubmitContainerStateChangeResult> asyncHandler) Simplified method form for invoking the SubmitContainerStateChange operation with an AsyncHandler.- Specified by:
submitContainerStateChangeAsyncin interfaceAmazonECSAsync- See Also:
-
submitTaskStateChangeAsync
public Future<SubmitTaskStateChangeResult> submitTaskStateChangeAsync(SubmitTaskStateChangeRequest request) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a task changed states.
- Specified by:
submitTaskStateChangeAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the SubmitTaskStateChange operation returned by the service.
-
submitTaskStateChangeAsync
public Future<SubmitTaskStateChangeResult> submitTaskStateChangeAsync(SubmitTaskStateChangeRequest request, AsyncHandler<SubmitTaskStateChangeRequest, SubmitTaskStateChangeResult> asyncHandler) Description copied from interface:AmazonECSAsyncThis action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a task changed states.
- Specified by:
submitTaskStateChangeAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the SubmitTaskStateChange operation returned by the service.
-
updateContainerAgentAsync
public Future<UpdateContainerAgentResult> updateContainerAgentAsync(UpdateContainerAgentRequest request) Description copied from interface:AmazonECSAsyncUpdates the Amazon ECS container agent on a specified container instance. Updating the Amazon ECS container agent does not interrupt running tasks or services on the container instance. The process for updating the agent differs depending on whether your container instance was launched with the Amazon ECS-optimized AMI or another operating system.
UpdateContainerAgentrequires the Amazon ECS-optimized AMI or Amazon Linux with theecs-initservice installed and running. For help updating the Amazon ECS container agent on other operating systems, see Manually Updating the Amazon ECS Container Agent in the Amazon EC2 Container Service Developer Guide.- Specified by:
updateContainerAgentAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the UpdateContainerAgent operation returned by the service.
-
updateContainerAgentAsync
public Future<UpdateContainerAgentResult> updateContainerAgentAsync(UpdateContainerAgentRequest request, AsyncHandler<UpdateContainerAgentRequest, UpdateContainerAgentResult> asyncHandler) Description copied from interface:AmazonECSAsyncUpdates the Amazon ECS container agent on a specified container instance. Updating the Amazon ECS container agent does not interrupt running tasks or services on the container instance. The process for updating the agent differs depending on whether your container instance was launched with the Amazon ECS-optimized AMI or another operating system.
UpdateContainerAgentrequires the Amazon ECS-optimized AMI or Amazon Linux with theecs-initservice installed and running. For help updating the Amazon ECS container agent on other operating systems, see Manually Updating the Amazon ECS Container Agent in the Amazon EC2 Container Service Developer Guide.- Specified by:
updateContainerAgentAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the UpdateContainerAgent operation returned by the service.
-
updateServiceAsync
Description copied from interface:AmazonECSAsyncModifies the desired count, deployment configuration, 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
desiredCountparameter.You can use UpdateService to modify your task definition and deploy a new version of your service.
You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters,
minimumHealthyPercentandmaximumPercent, to determine the deployment strategy.If the
minimumHealthyPercentis below 100%, the scheduler can ignore thedesiredCounttemporarily during a deployment. For example, if your service has adesiredCountof four tasks, aminimumHealthyPercentof 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in theRUNNINGstate; tasks for services that do use a load balancer are considered healthy if they are in theRUNNINGstate and the container instance it is hosted on is reported as healthy by the load balancer.The
maximumPercentparameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if your service has adesiredCountof four tasks, amaximumPercentvalue of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available).When UpdateService stops a task during a deployment, the equivalent of
docker stopis issued to the containers running in the task. This results in aSIGTERMand a 30-second timeout, after whichSIGKILLis sent and the containers are forcibly stopped. If the container handles theSIGTERMgracefully and exits within 30 seconds from receiving it, noSIGKILLis sent.When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
-
Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).
-
Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.
-
Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.
- Specified by:
updateServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-- Returns:
- A Java Future containing the result of the UpdateService operation returned by the service.
-
-
updateServiceAsync
public Future<UpdateServiceResult> updateServiceAsync(UpdateServiceRequest request, AsyncHandler<UpdateServiceRequest, UpdateServiceResult> asyncHandler) Description copied from interface:AmazonECSAsyncModifies the desired count, deployment configuration, 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
desiredCountparameter.You can use UpdateService to modify your task definition and deploy a new version of your service.
You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters,
minimumHealthyPercentandmaximumPercent, to determine the deployment strategy.If the
minimumHealthyPercentis below 100%, the scheduler can ignore thedesiredCounttemporarily during a deployment. For example, if your service has adesiredCountof four tasks, aminimumHealthyPercentof 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in theRUNNINGstate; tasks for services that do use a load balancer are considered healthy if they are in theRUNNINGstate and the container instance it is hosted on is reported as healthy by the load balancer.The
maximumPercentparameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if your service has adesiredCountof four tasks, amaximumPercentvalue of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available).When UpdateService stops a task during a deployment, the equivalent of
docker stopis issued to the containers running in the task. This results in aSIGTERMand a 30-second timeout, after whichSIGKILLis sent and the containers are forcibly stopped. If the container handles theSIGTERMgracefully and exits within 30 seconds from receiving it, noSIGKILLis sent.When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
-
Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).
-
Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.
-
Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.
- Specified by:
updateServiceAsyncin interfaceAmazonECSAsync- Parameters:
request-asyncHandler- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the UpdateService operation returned by the service.
-
-