AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
You can use Amazon ECS to schedule the placement of containers across your cluster based on your resource needs, isolation policies, and availability requirements. Amazon EC2 Container Service eliminates the need for you to operate your own cluster management and configuration management systems or worry about scaling your management infrastructure.
Namespace: Amazon.ECS
Assembly: AWSSDK.dll
Version: (assembly version)
public interface IAmazonECS IDisposable
The IAmazonECS type exposes the following members
Name | Description | |
---|---|---|
BeginCreateCluster(CreateClusterRequest, AsyncCallback, object) | Initiates the asynchronous execution of the CreateCluster operation. | |
BeginCreateService(CreateServiceRequest, AsyncCallback, object) | Initiates the asynchronous execution of the CreateService operation. | |
BeginDeleteCluster(DeleteClusterRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DeleteCluster operation. | |
BeginDeleteService(DeleteServiceRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DeleteService operation. | |
BeginDeregisterContainerInstance(DeregisterContainerInstanceRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DeregisterContainerInstance operation. | |
BeginDeregisterTaskDefinition(DeregisterTaskDefinitionRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DeregisterTaskDefinition operation. | |
BeginDescribeClusters(DescribeClustersRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DescribeClusters operation. | |
BeginDescribeContainerInstances(DescribeContainerInstancesRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DescribeContainerInstances operation. | |
BeginDescribeServices(DescribeServicesRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DescribeServices operation. | |
BeginDescribeTaskDefinition(DescribeTaskDefinitionRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DescribeTaskDefinition operation. | |
BeginDescribeTasks(DescribeTasksRequest, AsyncCallback, object) | Initiates the asynchronous execution of the DescribeTasks operation. | |
BeginListClusters(ListClustersRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListClusters operation. | |
BeginListContainerInstances(ListContainerInstancesRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListContainerInstances operation. | |
BeginListServices(ListServicesRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListServices operation. | |
BeginListTaskDefinitionFamilies(ListTaskDefinitionFamiliesRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListTaskDefinitionFamilies operation. | |
BeginListTaskDefinitions(ListTaskDefinitionsRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListTaskDefinitions operation. | |
BeginListTasks(ListTasksRequest, AsyncCallback, object) | Initiates the asynchronous execution of the ListTasks operation. | |
BeginRegisterTaskDefinition(RegisterTaskDefinitionRequest, AsyncCallback, object) | Initiates the asynchronous execution of the RegisterTaskDefinition operation. | |
BeginRunTask(RunTaskRequest, AsyncCallback, object) | Initiates the asynchronous execution of the RunTask operation. | |
BeginStartTask(StartTaskRequest, AsyncCallback, object) | Initiates the asynchronous execution of the StartTask operation. | |
BeginStopTask(StopTaskRequest, AsyncCallback, object) | Initiates the asynchronous execution of the StopTask operation. | |
BeginUpdateContainerAgent(UpdateContainerAgentRequest, AsyncCallback, object) | Initiates the asynchronous execution of the UpdateContainerAgent operation. | |
BeginUpdateService(UpdateServiceRequest, AsyncCallback, object) | Initiates the asynchronous execution of the UpdateService operation. | |
CreateCluster(CreateClusterRequest) |
Creates a new Amazon ECS cluster. By default, your account receives a default
cluster when you launch your first container instance. However, you can create your
own cluster with a unique name with the CreateCluster action.
|
|
CreateService(CreateServiceRequest) |
Runs 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.
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
If the
The When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
|
|
DeleteCluster(DeleteClusterRequest) | Deletes 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. | |
DeleteService(DeleteServiceRequest) |
Deletes 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 |
|
DeregisterContainerInstance(DeregisterContainerInstanceRequest) |
Deregisters 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. When you terminate a container instance, it is automatically deregistered from your cluster. |
|
DeregisterTaskDefinition(DeregisterTaskDefinitionRequest) |
Deregisters the specified task definition by family and revision. Upon deregistration,
the task definition is marked as INACTIVE . Existing tasks and services
that reference an INACTIVE task definition continue to run without disruption.
Existing services that reference an INACTIVE task definition can still
scale up or down by modifying the service's desired count.
You cannot use an |
|
DescribeClusters(DescribeClustersRequest) | Describes one or more of your clusters. | |
DescribeContainerInstances(DescribeContainerInstancesRequest) | Describes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested. | |
DescribeServices(DescribeServicesRequest) | Describes the specified services running in your cluster. | |
DescribeTaskDefinition(DescribeTaskDefinitionRequest) |
Describes a task definition. You can specify a family and revision
to find information about a specific task definition, or you can simply specify the
family to find the latest ACTIVE revision in that family.
You can only describe |
|
DescribeTasks(DescribeTasksRequest) | Describes a specified task or tasks. | |
EndCreateCluster(IAsyncResult) | Finishes the asynchronous execution of the CreateCluster operation. | |
EndCreateService(IAsyncResult) | Finishes the asynchronous execution of the CreateService operation. | |
EndDeleteCluster(IAsyncResult) | Finishes the asynchronous execution of the DeleteCluster operation. | |
EndDeleteService(IAsyncResult) | Finishes the asynchronous execution of the DeleteService operation. | |
EndDeregisterContainerInstance(IAsyncResult) | Finishes the asynchronous execution of the DeregisterContainerInstance operation. | |
EndDeregisterTaskDefinition(IAsyncResult) | Finishes the asynchronous execution of the DeregisterTaskDefinition operation. | |
EndDescribeClusters(IAsyncResult) | Finishes the asynchronous execution of the DescribeClusters operation. | |
EndDescribeContainerInstances(IAsyncResult) | Finishes the asynchronous execution of the DescribeContainerInstances operation. | |
EndDescribeServices(IAsyncResult) | Finishes the asynchronous execution of the DescribeServices operation. | |
EndDescribeTaskDefinition(IAsyncResult) | Finishes the asynchronous execution of the DescribeTaskDefinition operation. | |
EndDescribeTasks(IAsyncResult) | Finishes the asynchronous execution of the DescribeTasks operation. | |
EndListClusters(IAsyncResult) | Finishes the asynchronous execution of the ListClusters operation. | |
EndListContainerInstances(IAsyncResult) | Finishes the asynchronous execution of the ListContainerInstances operation. | |
EndListServices(IAsyncResult) | Finishes the asynchronous execution of the ListServices operation. | |
EndListTaskDefinitionFamilies(IAsyncResult) | Finishes the asynchronous execution of the ListTaskDefinitionFamilies operation. | |
EndListTaskDefinitions(IAsyncResult) | Finishes the asynchronous execution of the ListTaskDefinitions operation. | |
EndListTasks(IAsyncResult) | Finishes the asynchronous execution of the ListTasks operation. | |
EndRegisterTaskDefinition(IAsyncResult) | Finishes the asynchronous execution of the RegisterTaskDefinition operation. | |
EndRunTask(IAsyncResult) | Finishes the asynchronous execution of the RunTask operation. | |
EndStartTask(IAsyncResult) | Finishes the asynchronous execution of the StartTask operation. | |
EndStopTask(IAsyncResult) | Finishes the asynchronous execution of the StopTask operation. | |
EndUpdateContainerAgent(IAsyncResult) | Finishes the asynchronous execution of the UpdateContainerAgent operation. | |
EndUpdateService(IAsyncResult) | Finishes the asynchronous execution of the UpdateService operation. | |
ListClusters(ListClustersRequest) | Returns a list of existing clusters. | |
ListContainerInstances(ListContainerInstancesRequest) | Returns a list of container instances in a specified cluster. | |
ListServices(ListServicesRequest) | Lists the services that are running in a specified cluster. | |
ListTaskDefinitionFamilies(ListTaskDefinitionFamiliesRequest) |
Returns a list of task definition families that are registered to your account (which
may include task definition families that no longer have any ACTIVE task
definitions). You can filter the results with the familyPrefix parameter.
|
|
ListTaskDefinitions(ListTaskDefinitionsRequest) |
Returns a list of task definitions that are registered to your account. You can filter
the results by family name with the familyPrefix parameter or by status
with the status parameter.
|
|
ListTasks(ListTasksRequest) |
Returns 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 , and desiredStatus
parameters.
|
|
RegisterTaskDefinition(RegisterTaskDefinitionRequest) |
Registers a new task definition from the supplied family and containerDefinitions .
Optionally, you can add data volumes to your containers with the volumes
parameter. For more information about task definition parameters and defaults, see
Amazon
ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.
|
|
RunTask(RunTaskRequest) |
Start 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 StartTask
instead.
The |
|
StartTask(StartTaskRequest) |
Starts 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 RunTask
instead.
The list of container instances to start tasks on is limited to 10. |
|
StopTask(StopTaskRequest) |
Stops a running task.
When StopTask is called on a task, the equivalent of |
|
UpdateContainerAgent(UpdateContainerAgentRequest) |
Updates 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.
|
|
UpdateService(UpdateServiceRequest) |
Modifies 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 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,
If the
The When UpdateService stops a task during a deployment, the equivalent of docker stopis issued to the containers running in the task. This results in a SIGTERM
and a 30-second timeout, after which SIGKILL is sent and the containers
are forcibly stopped. If the container handles the SIGTERM gracefully
and exits within 30 seconds from receiving it, no SIGKILL is sent.
When the service scheduler launches new tasks, it attempts to balance them across the Availability Zones in your cluster with the following logic:
|
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8