C# Класс Amazon.ECS.AmazonECSClient

Implementation for accessing ECS Amazon EC2 Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster of EC2 instances. Amazon ECS lets you launch and stop container-enabled applications with simple API calls, allows you to get the state of your cluster from a centralized service, and gives you access to many familiar Amazon EC2 features like security groups, Amazon EBS volumes, and IAM roles.

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.

Наследование: AmazonServiceClient, IAmazonECS
Показать файл Открыть проект

Открытые методы

Метод Описание
AmazonECSClient ( ) : System

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>

AmazonECSClient ( AWSCredentials credentials ) : System

Constructs AmazonECSClient with AWS Credentials

AmazonECSClient ( AWSCredentials credentials, AmazonECSConfig clientConfig ) : System

Constructs AmazonECSClient with AWS Credentials and an AmazonECSClient Configuration object.

AmazonECSClient ( AWSCredentials credentials, RegionEndpoint region ) : System

Constructs AmazonECSClient with AWS Credentials

AmazonECSClient ( AmazonECSConfig config ) : System

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>

AmazonECSClient ( RegionEndpoint region ) : System

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey ) : System

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, AmazonECSConfig clientConfig ) : System

Constructs AmazonECSClient with AWS Access Key ID, AWS Secret Key and an AmazonECSClient Configuration object.

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region ) : System

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken ) : System

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonECSConfig clientConfig ) : System

Constructs AmazonECSClient with AWS Access Key ID, AWS Secret Key and an AmazonECSClient Configuration object.

AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region ) : System

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key

BeginCreateCluster ( Amazon.ECS.Model.CreateClusterRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the CreateCluster operation.

BeginCreateService ( CreateServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the CreateService operation.

BeginDeleteCluster ( Amazon.ECS.Model.DeleteClusterRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeleteCluster operation.

BeginDeleteService ( Amazon.ECS.Model.DeleteServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeleteService operation.

BeginDeregisterContainerInstance ( DeregisterContainerInstanceRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeregisterContainerInstance operation.

BeginDeregisterTaskDefinition ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeregisterTaskDefinition operation.

BeginDescribeClusters ( DescribeClustersRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DescribeClusters operation.

BeginDescribeContainerInstances ( Amazon.ECS.Model.DescribeContainerInstancesRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DescribeContainerInstances operation.

BeginDescribeServices ( DescribeServicesRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DescribeServices operation.

BeginDescribeTaskDefinition ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DescribeTaskDefinition operation.

BeginDescribeTasks ( Amazon.ECS.Model.DescribeTasksRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DescribeTasks operation.

BeginListClusters ( ListClustersRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListClusters operation.

BeginListContainerInstances ( ListContainerInstancesRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListContainerInstances operation.

BeginListServices ( ListServicesRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListServices operation.

BeginListTaskDefinitionFamilies ( ListTaskDefinitionFamiliesRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListTaskDefinitionFamilies operation.

BeginListTaskDefinitions ( ListTaskDefinitionsRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListTaskDefinitions operation.

BeginListTasks ( ListTasksRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListTasks operation.

BeginRegisterTaskDefinition ( RegisterTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the RegisterTaskDefinition operation.

BeginRunTask ( RunTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the RunTask operation.

BeginStartTask ( StartTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the StartTask operation.

BeginStopTask ( StopTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the StopTask operation.

BeginUpdateContainerAgent ( UpdateContainerAgentRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the UpdateContainerAgent operation.

BeginUpdateService ( UpdateServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the UpdateService operation.

CreateCluster ( Amazon.ECS.Model.CreateClusterRequest request ) : CreateClusterResponse

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.

CreateClusterAsync ( Amazon.ECS.Model.CreateClusterRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the CreateCluster operation.

CreateService ( CreateServiceRequest request ) : CreateServiceResponse

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 copy 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. For more information, see Service Load Balancing in the Amazon EC2 Container Service Developer Guide.

You can optionally specify a deployment configuration for your service. During a deployment (which is triggered by changing the task definition or the desired count of a service with an UpdateService operation), the service scheduler uses the minimumHealthyPercent and maximumPercent parameters to determine the deployment strategy.

The minimumHealthyPercent represents a lower limit on the number of your service's tasks that must remain in the RUNNING state during a deployment, as a percentage of the desiredCount (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent of 50%, the scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in the RUNNING state; tasks for services that do use a load balancer are considered healthy if they are in the RUNNING state and the container instance it is hosted on is reported as healthy by the load balancer. The default value for minimumHealthyPercent is 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.

The maximumPercent parameter represents an upper limit on the number of your service's tasks that are allowed in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service has a desiredCount of four tasks and a maximumPercent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value for maximumPercent is 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.

CreateServiceAsync ( CreateServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the CreateService operation.

DeleteCluster ( Amazon.ECS.Model.DeleteClusterRequest request ) : DeleteClusterResponse

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.

DeleteClusterAsync ( Amazon.ECS.Model.DeleteClusterRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DeleteCluster operation.

DeleteService ( Amazon.ECS.Model.DeleteServiceRequest request ) : DeleteServiceResponse

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 ACTIVE to DRAINING, 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 from DRAINING to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed with DescribeServices API operations; however, in the future, INACTIVE services may be cleaned up and purged from Amazon ECS record keeping, and DescribeServices API operations on those services will return a ServiceNotFoundException error.

DeleteServiceAsync ( Amazon.ECS.Model.DeleteServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DeleteService operation.

DeregisterContainerInstance ( DeregisterContainerInstanceRequest request ) : DeregisterContainerInstanceResponse

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.

If you terminate a running container instance, Amazon ECS automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).

DeregisterContainerInstanceAsync ( DeregisterContainerInstanceRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DeregisterContainerInstance operation.

DeregisterTaskDefinition ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request ) : DeregisterTaskDefinitionResponse

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 INACTIVE task definition to run new tasks or create new services, and you cannot update an existing service to reference an INACTIVE task definition (although there may be up to a 10 minute window following deregistration where these restrictions have not yet taken effect).

DeregisterTaskDefinitionAsync ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DeregisterTaskDefinition operation.

DescribeClusters ( DescribeClustersRequest request ) : DescribeClustersResponse

Describes one or more of your clusters.

DescribeClustersAsync ( DescribeClustersRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DescribeClusters operation.

DescribeContainerInstances ( Amazon.ECS.Model.DescribeContainerInstancesRequest request ) : Amazon.ECS.Model.DescribeContainerInstancesResponse

Describes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.

DescribeContainerInstancesAsync ( Amazon.ECS.Model.DescribeContainerInstancesRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DescribeContainerInstances operation.

DescribeServices ( DescribeServicesRequest request ) : DescribeServicesResponse

Describes the specified services running in your cluster.

DescribeServicesAsync ( DescribeServicesRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DescribeServices operation.

DescribeTaskDefinition ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request ) : DescribeTaskDefinitionResponse

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 INACTIVE task definitions while an active task or service references them.

DescribeTaskDefinitionAsync ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DescribeTaskDefinition operation.

DescribeTasks ( Amazon.ECS.Model.DescribeTasksRequest request ) : DescribeTasksResponse

Describes a specified task or tasks.

DescribeTasksAsync ( Amazon.ECS.Model.DescribeTasksRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the DescribeTasks operation.

EndCreateCluster ( IAsyncResult asyncResult ) : CreateClusterResponse

Finishes the asynchronous execution of the CreateCluster operation.

EndCreateService ( IAsyncResult asyncResult ) : CreateServiceResponse

Finishes the asynchronous execution of the CreateService operation.

EndDeleteCluster ( IAsyncResult asyncResult ) : DeleteClusterResponse

Finishes the asynchronous execution of the DeleteCluster operation.

EndDeleteService ( IAsyncResult asyncResult ) : DeleteServiceResponse

Finishes the asynchronous execution of the DeleteService operation.

EndDeregisterContainerInstance ( IAsyncResult asyncResult ) : DeregisterContainerInstanceResponse

Finishes the asynchronous execution of the DeregisterContainerInstance operation.

EndDeregisterTaskDefinition ( IAsyncResult asyncResult ) : DeregisterTaskDefinitionResponse

Finishes the asynchronous execution of the DeregisterTaskDefinition operation.

EndDescribeClusters ( IAsyncResult asyncResult ) : DescribeClustersResponse

Finishes the asynchronous execution of the DescribeClusters operation.

EndDescribeContainerInstances ( IAsyncResult asyncResult ) : Amazon.ECS.Model.DescribeContainerInstancesResponse

Finishes the asynchronous execution of the DescribeContainerInstances operation.

EndDescribeServices ( IAsyncResult asyncResult ) : DescribeServicesResponse

Finishes the asynchronous execution of the DescribeServices operation.

EndDescribeTaskDefinition ( IAsyncResult asyncResult ) : DescribeTaskDefinitionResponse

Finishes the asynchronous execution of the DescribeTaskDefinition operation.

EndDescribeTasks ( IAsyncResult asyncResult ) : DescribeTasksResponse

Finishes the asynchronous execution of the DescribeTasks operation.

EndListClusters ( IAsyncResult asyncResult ) : ListClustersResponse

Finishes the asynchronous execution of the ListClusters operation.

EndListContainerInstances ( IAsyncResult asyncResult ) : ListContainerInstancesResponse

Finishes the asynchronous execution of the ListContainerInstances operation.

EndListServices ( IAsyncResult asyncResult ) : ListServicesResponse

Finishes the asynchronous execution of the ListServices operation.

EndListTaskDefinitionFamilies ( IAsyncResult asyncResult ) : ListTaskDefinitionFamiliesResponse

Finishes the asynchronous execution of the ListTaskDefinitionFamilies operation.

EndListTaskDefinitions ( IAsyncResult asyncResult ) : ListTaskDefinitionsResponse

Finishes the asynchronous execution of the ListTaskDefinitions operation.

EndListTasks ( IAsyncResult asyncResult ) : ListTasksResponse

Finishes the asynchronous execution of the ListTasks operation.

EndRegisterTaskDefinition ( IAsyncResult asyncResult ) : RegisterTaskDefinitionResponse

Finishes the asynchronous execution of the RegisterTaskDefinition operation.

EndRunTask ( IAsyncResult asyncResult ) : RunTaskResponse

Finishes the asynchronous execution of the RunTask operation.

EndStartTask ( IAsyncResult asyncResult ) : StartTaskResponse

Finishes the asynchronous execution of the StartTask operation.

EndStopTask ( IAsyncResult asyncResult ) : StopTaskResponse

Finishes the asynchronous execution of the StopTask operation.

EndUpdateContainerAgent ( IAsyncResult asyncResult ) : UpdateContainerAgentResponse

Finishes the asynchronous execution of the UpdateContainerAgent operation.

EndUpdateService ( IAsyncResult asyncResult ) : UpdateServiceResponse

Finishes the asynchronous execution of the UpdateService operation.

ListClusters ( ListClustersRequest request ) : ListClustersResponse

Returns a list of existing clusters.

ListClustersAsync ( ListClustersRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListClusters operation.

ListContainerInstances ( ListContainerInstancesRequest request ) : ListContainerInstancesResponse

Returns a list of container instances in a specified cluster.

ListContainerInstancesAsync ( ListContainerInstancesRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListContainerInstances operation.

ListServices ( ListServicesRequest request ) : ListServicesResponse

Lists the services that are running in a specified cluster.

ListServicesAsync ( ListServicesRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListServices operation.

ListTaskDefinitionFamilies ( ListTaskDefinitionFamiliesRequest request ) : ListTaskDefinitionFamiliesResponse

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 definition revisions).

You can filter out task definition families that do not contain any ACTIVE task definition revisions by setting the status parameter to ACTIVE. You can also filter the results with the familyPrefix parameter.

ListTaskDefinitionFamiliesAsync ( ListTaskDefinitionFamiliesRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListTaskDefinitionFamilies operation.

ListTaskDefinitions ( ListTaskDefinitionsRequest request ) : ListTaskDefinitionsResponse

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.

ListTaskDefinitionsAsync ( ListTaskDefinitionsRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListTaskDefinitions operation.

ListTasks ( ListTasksRequest request ) : ListTasksResponse

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.

Recently-stopped tasks might appear in the returned results. Currently, stopped tasks appear in the returned results for at least one hour.

ListTasksAsync ( ListTasksRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the ListTasks operation.

RegisterTaskDefinition ( RegisterTaskDefinitionRequest request ) : RegisterTaskDefinitionResponse

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.

You can specify an IAM role for your task with the taskRoleArn parameter. When you specify an IAM role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the IAM policy associated with the role. For more information, see IAM Roles for Tasks in the Amazon EC2 Container Service Developer Guide.

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. The available network modes correspond to those described in Network settings in the Docker run reference.

RegisterTaskDefinitionAsync ( RegisterTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the RegisterTaskDefinition operation.

RunTask ( RunTaskRequest request ) : RunTaskResponse

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 count parameter is limited to 10 tasks per call.

RunTaskAsync ( RunTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the RunTask operation.

StartTask ( StartTaskRequest request ) : StartTaskResponse

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.

StartTaskAsync ( StartTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the StartTask operation.

StopTask ( StopTaskRequest request ) : StopTaskResponse

Stops a running task.

When StopTask is called on a task, the equivalent of docker stop is 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.

StopTaskAsync ( StopTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the StopTask operation.

UpdateContainerAgent ( UpdateContainerAgentRequest request ) : UpdateContainerAgentResponse

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.

UpdateContainerAgent requires the Amazon ECS-optimized AMI or Amazon Linux with the ecs-init service 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.

UpdateContainerAgentAsync ( UpdateContainerAgentRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the UpdateContainerAgent operation.

UpdateService ( UpdateServiceRequest request ) : UpdateServiceResponse

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 desiredCount parameter.

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, minimumHealthyPercent and maximumPercent, to determine the deployment strategy.

If the minimumHealthyPercent is below 100%, the scheduler can ignore the desiredCount temporarily during a deployment. For example, if your service has a desiredCount of four tasks, a minimumHealthyPercent of 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 the RUNNING state; tasks for services that do use a load balancer are considered healthy if they are in the RUNNING state and the container instance it is hosted on is reported as healthy by the load balancer.

The maximumPercent parameter 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 a desiredCount of four tasks, a maximumPercent value 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 stop is 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:

  • 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.

UpdateServiceAsync ( UpdateServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task

Initiates the asynchronous execution of the UpdateService operation.

Защищенные методы

Метод Описание
CreateSigner ( ) : AbstractAWSSigner

Creates the signer for the service.

Dispose ( bool disposing ) : void

Disposes the service client.

Описание методов

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>
public AmazonECSClient ( ) : System
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Credentials
public AmazonECSClient ( AWSCredentials credentials ) : System
credentials Amazon.Runtime.AWSCredentials AWS Credentials
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Credentials and an AmazonECSClient Configuration object.
public AmazonECSClient ( AWSCredentials credentials, AmazonECSConfig clientConfig ) : System
credentials Amazon.Runtime.AWSCredentials AWS Credentials
clientConfig AmazonECSConfig The AmazonECSClient Configuration Object
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Credentials
public AmazonECSClient ( AWSCredentials credentials, RegionEndpoint region ) : System
credentials Amazon.Runtime.AWSCredentials AWS Credentials
region RegionEndpoint The region to connect.
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>
public AmazonECSClient ( AmazonECSConfig config ) : System
config AmazonECSConfig The AmazonECSClient Configuration Object
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration>
public AmazonECSClient ( RegionEndpoint region ) : System
region RegionEndpoint The region to connect.
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID, AWS Secret Key and an AmazonECSClient Configuration object.
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, AmazonECSConfig clientConfig ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
clientConfig AmazonECSConfig The AmazonECSClient Configuration Object
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
region RegionEndpoint The region to connect.
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID, AWS Secret Key and an AmazonECSClient Configuration object.
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonECSConfig clientConfig ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
clientConfig AmazonECSConfig The AmazonECSClient Configuration Object
Результат System

AmazonECSClient() публичный Метод

Constructs AmazonECSClient with AWS Access Key ID and AWS Secret Key
public AmazonECSClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region ) : System
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
region RegionEndpoint The region to connect.
Результат System

BeginCreateCluster() публичный Метод

Initiates the asynchronous execution of the CreateCluster operation.
public BeginCreateCluster ( Amazon.ECS.Model.CreateClusterRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.CreateClusterRequest Container for the necessary parameters to execute the CreateCluster operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginCreateService() публичный Метод

Initiates the asynchronous execution of the CreateService operation.
public BeginCreateService ( CreateServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.CreateServiceRequest Container for the necessary parameters to execute the CreateService operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDeleteCluster() публичный Метод

Initiates the asynchronous execution of the DeleteCluster operation.
public BeginDeleteCluster ( Amazon.ECS.Model.DeleteClusterRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DeleteClusterRequest Container for the necessary parameters to execute the DeleteCluster operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDeleteService() публичный Метод

Initiates the asynchronous execution of the DeleteService operation.
public BeginDeleteService ( Amazon.ECS.Model.DeleteServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DeleteServiceRequest Container for the necessary parameters to execute the DeleteService operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDeregisterContainerInstance() публичный Метод

Initiates the asynchronous execution of the DeregisterContainerInstance operation.
public BeginDeregisterContainerInstance ( DeregisterContainerInstanceRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DeregisterContainerInstanceRequest Container for the necessary parameters to execute the DeregisterContainerInstance operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDeregisterTaskDefinition() публичный Метод

Initiates the asynchronous execution of the DeregisterTaskDefinition operation.
public BeginDeregisterTaskDefinition ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DeregisterTaskDefinitionRequest Container for the necessary parameters to execute the DeregisterTaskDefinition operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDescribeClusters() публичный Метод

Initiates the asynchronous execution of the DescribeClusters operation.
public BeginDescribeClusters ( DescribeClustersRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DescribeClustersRequest Container for the necessary parameters to execute the DescribeClusters operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDescribeContainerInstances() публичный Метод

Initiates the asynchronous execution of the DescribeContainerInstances operation.
public BeginDescribeContainerInstances ( Amazon.ECS.Model.DescribeContainerInstancesRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DescribeContainerInstancesRequest Container for the necessary parameters to execute the DescribeContainerInstances operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDescribeServices() публичный Метод

Initiates the asynchronous execution of the DescribeServices operation.
public BeginDescribeServices ( DescribeServicesRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DescribeServicesRequest Container for the necessary parameters to execute the DescribeServices operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDescribeTaskDefinition() публичный Метод

Initiates the asynchronous execution of the DescribeTaskDefinition operation.
public BeginDescribeTaskDefinition ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DescribeTaskDefinitionRequest Container for the necessary parameters to execute the DescribeTaskDefinition operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginDescribeTasks() публичный Метод

Initiates the asynchronous execution of the DescribeTasks operation.
public BeginDescribeTasks ( Amazon.ECS.Model.DescribeTasksRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.DescribeTasksRequest Container for the necessary parameters to execute the DescribeTasks operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListClusters() публичный Метод

Initiates the asynchronous execution of the ListClusters operation.
public BeginListClusters ( ListClustersRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListClustersRequest Container for the necessary parameters to execute the ListClusters operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListContainerInstances() публичный Метод

Initiates the asynchronous execution of the ListContainerInstances operation.
public BeginListContainerInstances ( ListContainerInstancesRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListContainerInstancesRequest Container for the necessary parameters to execute the ListContainerInstances operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListServices() публичный Метод

Initiates the asynchronous execution of the ListServices operation.
public BeginListServices ( ListServicesRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListServicesRequest Container for the necessary parameters to execute the ListServices operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListTaskDefinitionFamilies() публичный Метод

Initiates the asynchronous execution of the ListTaskDefinitionFamilies operation.
public BeginListTaskDefinitionFamilies ( ListTaskDefinitionFamiliesRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListTaskDefinitionFamiliesRequest Container for the necessary parameters to execute the ListTaskDefinitionFamilies operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListTaskDefinitions() публичный Метод

Initiates the asynchronous execution of the ListTaskDefinitions operation.
public BeginListTaskDefinitions ( ListTaskDefinitionsRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListTaskDefinitionsRequest Container for the necessary parameters to execute the ListTaskDefinitions operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginListTasks() публичный Метод

Initiates the asynchronous execution of the ListTasks operation.
public BeginListTasks ( ListTasksRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.ListTasksRequest Container for the necessary parameters to execute the ListTasks operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginRegisterTaskDefinition() публичный Метод

Initiates the asynchronous execution of the RegisterTaskDefinition operation.
public BeginRegisterTaskDefinition ( RegisterTaskDefinitionRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.RegisterTaskDefinitionRequest Container for the necessary parameters to execute the RegisterTaskDefinition operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginRunTask() публичный Метод

Initiates the asynchronous execution of the RunTask operation.
public BeginRunTask ( RunTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.RunTaskRequest Container for the necessary parameters to execute the RunTask operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginStartTask() публичный Метод

Initiates the asynchronous execution of the StartTask operation.
public BeginStartTask ( StartTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.StartTaskRequest Container for the necessary parameters to execute the StartTask operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginStopTask() публичный Метод

Initiates the asynchronous execution of the StopTask operation.
public BeginStopTask ( StopTaskRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.StopTaskRequest Container for the necessary parameters to execute the StopTask operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginUpdateContainerAgent() публичный Метод

Initiates the asynchronous execution of the UpdateContainerAgent operation.
public BeginUpdateContainerAgent ( UpdateContainerAgentRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.UpdateContainerAgentRequest Container for the necessary parameters to execute the UpdateContainerAgent operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

BeginUpdateService() публичный Метод

Initiates the asynchronous execution of the UpdateService operation.
public BeginUpdateService ( UpdateServiceRequest request, AsyncCallback callback, object state ) : IAsyncResult
request Amazon.ECS.Model.UpdateServiceRequest Container for the necessary parameters to execute the UpdateService operation on AmazonECSClient.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
Результат IAsyncResult

CreateCluster() публичный Метод

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.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public CreateCluster ( Amazon.ECS.Model.CreateClusterRequest request ) : CreateClusterResponse
request Amazon.ECS.Model.CreateClusterRequest Container for the necessary parameters to execute the CreateCluster service method.
Результат Amazon.ECS.Model.CreateClusterResponse

CreateClusterAsync() публичный Метод

Initiates the asynchronous execution of the CreateCluster operation.
public CreateClusterAsync ( Amazon.ECS.Model.CreateClusterRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.CreateClusterRequest Container for the necessary parameters to execute the CreateCluster operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

CreateService() публичный Метод

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 copy 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. For more information, see Service Load Balancing in the Amazon EC2 Container Service Developer Guide.

You can optionally specify a deployment configuration for your service. During a deployment (which is triggered by changing the task definition or the desired count of a service with an UpdateService operation), the service scheduler uses the minimumHealthyPercent and maximumPercent parameters to determine the deployment strategy.

The minimumHealthyPercent represents a lower limit on the number of your service's tasks that must remain in the RUNNING state during a deployment, as a percentage of the desiredCount (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent of 50%, the scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in the RUNNING state; tasks for services that do use a load balancer are considered healthy if they are in the RUNNING state and the container instance it is hosted on is reported as healthy by the load balancer. The default value for minimumHealthyPercent is 50% in the console and 100% for the AWS CLI, the AWS SDKs, and the APIs.

The maximumPercent parameter represents an upper limit on the number of your service's tasks that are allowed in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service has a desiredCount of four tasks and a maximumPercent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value for maximumPercent is 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.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public CreateService ( CreateServiceRequest request ) : CreateServiceResponse
request Amazon.ECS.Model.CreateServiceRequest Container for the necessary parameters to execute the CreateService service method.
Результат Amazon.ECS.Model.CreateServiceResponse

CreateServiceAsync() публичный Метод

Initiates the asynchronous execution of the CreateService operation.
public CreateServiceAsync ( CreateServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.CreateServiceRequest Container for the necessary parameters to execute the CreateService operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

CreateSigner() защищенный Метод

Creates the signer for the service.
protected CreateSigner ( ) : AbstractAWSSigner
Результат Amazon.Runtime.Internal.Auth.AbstractAWSSigner

DeleteCluster() публичный Метод

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.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// You cannot delete a cluster that has registered container instances. You must first /// deregister the container instances before you can delete the cluster. For more information, /// see DeregisterContainerInstance. /// /// You cannot delete a cluster that contains services. You must first update the service /// to reduce its desired task count to 0 and then delete the service. For more information, /// see UpdateService and DeleteService. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DeleteCluster ( Amazon.ECS.Model.DeleteClusterRequest request ) : DeleteClusterResponse
request Amazon.ECS.Model.DeleteClusterRequest Container for the necessary parameters to execute the DeleteCluster service method.
Результат Amazon.ECS.Model.DeleteClusterResponse

DeleteClusterAsync() публичный Метод

Initiates the asynchronous execution of the DeleteCluster operation.
public DeleteClusterAsync ( Amazon.ECS.Model.DeleteClusterRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DeleteClusterRequest Container for the necessary parameters to execute the DeleteCluster operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DeleteService() публичный Метод

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 ACTIVE to DRAINING, 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 from DRAINING to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed with DescribeServices API operations; however, in the future, INACTIVE services may be cleaned up and purged from Amazon ECS record keeping, and DescribeServices API operations on those services will return a ServiceNotFoundException error.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. /// /// The specified service could not be found. You can view your available services with /// ListServices. Amazon ECS services are cluster-specific and region-specific. ///
public DeleteService ( Amazon.ECS.Model.DeleteServiceRequest request ) : DeleteServiceResponse
request Amazon.ECS.Model.DeleteServiceRequest Container for the necessary parameters to execute the DeleteService service method.
Результат Amazon.ECS.Model.DeleteServiceResponse

DeleteServiceAsync() публичный Метод

Initiates the asynchronous execution of the DeleteService operation.
public DeleteServiceAsync ( Amazon.ECS.Model.DeleteServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DeleteServiceRequest Container for the necessary parameters to execute the DeleteService operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DeregisterContainerInstance() публичный Метод

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.

If you terminate a running container instance, Amazon ECS automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DeregisterContainerInstance ( DeregisterContainerInstanceRequest request ) : DeregisterContainerInstanceResponse
request Amazon.ECS.Model.DeregisterContainerInstanceRequest Container for the necessary parameters to execute the DeregisterContainerInstance service method.
Результат Amazon.ECS.Model.DeregisterContainerInstanceResponse

DeregisterContainerInstanceAsync() публичный Метод

Initiates the asynchronous execution of the DeregisterContainerInstance operation.
public DeregisterContainerInstanceAsync ( DeregisterContainerInstanceRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DeregisterContainerInstanceRequest Container for the necessary parameters to execute the DeregisterContainerInstance operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DeregisterTaskDefinition() публичный Метод

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 INACTIVE task definition to run new tasks or create new services, and you cannot update an existing service to reference an INACTIVE task definition (although there may be up to a 10 minute window following deregistration where these restrictions have not yet taken effect).

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DeregisterTaskDefinition ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request ) : DeregisterTaskDefinitionResponse
request Amazon.ECS.Model.DeregisterTaskDefinitionRequest Container for the necessary parameters to execute the DeregisterTaskDefinition service method.
Результат Amazon.ECS.Model.DeregisterTaskDefinitionResponse

DeregisterTaskDefinitionAsync() публичный Метод

Initiates the asynchronous execution of the DeregisterTaskDefinition operation.
public DeregisterTaskDefinitionAsync ( Amazon.ECS.Model.DeregisterTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DeregisterTaskDefinitionRequest Container for the necessary parameters to execute the DeregisterTaskDefinition operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DescribeClusters() публичный Метод

Describes one or more of your clusters.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DescribeClusters ( DescribeClustersRequest request ) : DescribeClustersResponse
request Amazon.ECS.Model.DescribeClustersRequest Container for the necessary parameters to execute the DescribeClusters service method.
Результат Amazon.ECS.Model.DescribeClustersResponse

DescribeClustersAsync() публичный Метод

Initiates the asynchronous execution of the DescribeClusters operation.
public DescribeClustersAsync ( DescribeClustersRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DescribeClustersRequest Container for the necessary parameters to execute the DescribeClusters operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DescribeContainerInstances() публичный Метод

Describes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DescribeContainerInstances ( Amazon.ECS.Model.DescribeContainerInstancesRequest request ) : Amazon.ECS.Model.DescribeContainerInstancesResponse
request Amazon.ECS.Model.DescribeContainerInstancesRequest Container for the necessary parameters to execute the DescribeContainerInstances service method.
Результат Amazon.ECS.Model.DescribeContainerInstancesResponse

DescribeContainerInstancesAsync() публичный Метод

Initiates the asynchronous execution of the DescribeContainerInstances operation.
public DescribeContainerInstancesAsync ( Amazon.ECS.Model.DescribeContainerInstancesRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DescribeContainerInstancesRequest Container for the necessary parameters to execute the DescribeContainerInstances operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DescribeServices() публичный Метод

Describes the specified services running in your cluster.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DescribeServices ( DescribeServicesRequest request ) : DescribeServicesResponse
request Amazon.ECS.Model.DescribeServicesRequest Container for the necessary parameters to execute the DescribeServices service method.
Результат Amazon.ECS.Model.DescribeServicesResponse

DescribeServicesAsync() публичный Метод

Initiates the asynchronous execution of the DescribeServices operation.
public DescribeServicesAsync ( DescribeServicesRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DescribeServicesRequest Container for the necessary parameters to execute the DescribeServices operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DescribeTaskDefinition() публичный Метод

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 INACTIVE task definitions while an active task or service references them.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DescribeTaskDefinition ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request ) : DescribeTaskDefinitionResponse
request Amazon.ECS.Model.DescribeTaskDefinitionRequest Container for the necessary parameters to execute the DescribeTaskDefinition service method.
Результат Amazon.ECS.Model.DescribeTaskDefinitionResponse

DescribeTaskDefinitionAsync() публичный Метод

Initiates the asynchronous execution of the DescribeTaskDefinition operation.
public DescribeTaskDefinitionAsync ( Amazon.ECS.Model.DescribeTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DescribeTaskDefinitionRequest Container for the necessary parameters to execute the DescribeTaskDefinition operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

DescribeTasks() публичный Метод

Describes a specified task or tasks.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public DescribeTasks ( Amazon.ECS.Model.DescribeTasksRequest request ) : DescribeTasksResponse
request Amazon.ECS.Model.DescribeTasksRequest Container for the necessary parameters to execute the DescribeTasks service method.
Результат Amazon.ECS.Model.DescribeTasksResponse

DescribeTasksAsync() публичный Метод

Initiates the asynchronous execution of the DescribeTasks operation.
public DescribeTasksAsync ( Amazon.ECS.Model.DescribeTasksRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.DescribeTasksRequest Container for the necessary parameters to execute the DescribeTasks operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

Dispose() защищенный Метод

Disposes the service client.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EndCreateCluster() публичный Метод

Finishes the asynchronous execution of the CreateCluster operation.
public EndCreateCluster ( IAsyncResult asyncResult ) : CreateClusterResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginCreateCluster.
Результат Amazon.ECS.Model.CreateClusterResponse

EndCreateService() публичный Метод

Finishes the asynchronous execution of the CreateService operation.
public EndCreateService ( IAsyncResult asyncResult ) : CreateServiceResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginCreateService.
Результат Amazon.ECS.Model.CreateServiceResponse

EndDeleteCluster() публичный Метод

Finishes the asynchronous execution of the DeleteCluster operation.
public EndDeleteCluster ( IAsyncResult asyncResult ) : DeleteClusterResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeleteCluster.
Результат Amazon.ECS.Model.DeleteClusterResponse

EndDeleteService() публичный Метод

Finishes the asynchronous execution of the DeleteService operation.
public EndDeleteService ( IAsyncResult asyncResult ) : DeleteServiceResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeleteService.
Результат Amazon.ECS.Model.DeleteServiceResponse

EndDeregisterContainerInstance() публичный Метод

Finishes the asynchronous execution of the DeregisterContainerInstance operation.
public EndDeregisterContainerInstance ( IAsyncResult asyncResult ) : DeregisterContainerInstanceResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeregisterContainerInstance.
Результат Amazon.ECS.Model.DeregisterContainerInstanceResponse

EndDeregisterTaskDefinition() публичный Метод

Finishes the asynchronous execution of the DeregisterTaskDefinition operation.
public EndDeregisterTaskDefinition ( IAsyncResult asyncResult ) : DeregisterTaskDefinitionResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeregisterTaskDefinition.
Результат Amazon.ECS.Model.DeregisterTaskDefinitionResponse

EndDescribeClusters() публичный Метод

Finishes the asynchronous execution of the DescribeClusters operation.
public EndDescribeClusters ( IAsyncResult asyncResult ) : DescribeClustersResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDescribeClusters.
Результат Amazon.ECS.Model.DescribeClustersResponse

EndDescribeContainerInstances() публичный Метод

Finishes the asynchronous execution of the DescribeContainerInstances operation.
public EndDescribeContainerInstances ( IAsyncResult asyncResult ) : Amazon.ECS.Model.DescribeContainerInstancesResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDescribeContainerInstances.
Результат Amazon.ECS.Model.DescribeContainerInstancesResponse

EndDescribeServices() публичный Метод

Finishes the asynchronous execution of the DescribeServices operation.
public EndDescribeServices ( IAsyncResult asyncResult ) : DescribeServicesResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDescribeServices.
Результат Amazon.ECS.Model.DescribeServicesResponse

EndDescribeTaskDefinition() публичный Метод

Finishes the asynchronous execution of the DescribeTaskDefinition operation.
public EndDescribeTaskDefinition ( IAsyncResult asyncResult ) : DescribeTaskDefinitionResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDescribeTaskDefinition.
Результат Amazon.ECS.Model.DescribeTaskDefinitionResponse

EndDescribeTasks() публичный Метод

Finishes the asynchronous execution of the DescribeTasks operation.
public EndDescribeTasks ( IAsyncResult asyncResult ) : DescribeTasksResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDescribeTasks.
Результат Amazon.ECS.Model.DescribeTasksResponse

EndListClusters() публичный Метод

Finishes the asynchronous execution of the ListClusters operation.
public EndListClusters ( IAsyncResult asyncResult ) : ListClustersResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListClusters.
Результат Amazon.ECS.Model.ListClustersResponse

EndListContainerInstances() публичный Метод

Finishes the asynchronous execution of the ListContainerInstances operation.
public EndListContainerInstances ( IAsyncResult asyncResult ) : ListContainerInstancesResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListContainerInstances.
Результат Amazon.ECS.Model.ListContainerInstancesResponse

EndListServices() публичный Метод

Finishes the asynchronous execution of the ListServices operation.
public EndListServices ( IAsyncResult asyncResult ) : ListServicesResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListServices.
Результат Amazon.ECS.Model.ListServicesResponse

EndListTaskDefinitionFamilies() публичный Метод

Finishes the asynchronous execution of the ListTaskDefinitionFamilies operation.
public EndListTaskDefinitionFamilies ( IAsyncResult asyncResult ) : ListTaskDefinitionFamiliesResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListTaskDefinitionFamilies.
Результат Amazon.ECS.Model.ListTaskDefinitionFamiliesResponse

EndListTaskDefinitions() публичный Метод

Finishes the asynchronous execution of the ListTaskDefinitions operation.
public EndListTaskDefinitions ( IAsyncResult asyncResult ) : ListTaskDefinitionsResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListTaskDefinitions.
Результат Amazon.ECS.Model.ListTaskDefinitionsResponse

EndListTasks() публичный Метод

Finishes the asynchronous execution of the ListTasks operation.
public EndListTasks ( IAsyncResult asyncResult ) : ListTasksResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListTasks.
Результат Amazon.ECS.Model.ListTasksResponse

EndRegisterTaskDefinition() публичный Метод

Finishes the asynchronous execution of the RegisterTaskDefinition operation.
public EndRegisterTaskDefinition ( IAsyncResult asyncResult ) : RegisterTaskDefinitionResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginRegisterTaskDefinition.
Результат Amazon.ECS.Model.RegisterTaskDefinitionResponse

EndRunTask() публичный Метод

Finishes the asynchronous execution of the RunTask operation.
public EndRunTask ( IAsyncResult asyncResult ) : RunTaskResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginRunTask.
Результат Amazon.ECS.Model.RunTaskResponse

EndStartTask() публичный Метод

Finishes the asynchronous execution of the StartTask operation.
public EndStartTask ( IAsyncResult asyncResult ) : StartTaskResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginStartTask.
Результат Amazon.ECS.Model.StartTaskResponse

EndStopTask() публичный Метод

Finishes the asynchronous execution of the StopTask operation.
public EndStopTask ( IAsyncResult asyncResult ) : StopTaskResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginStopTask.
Результат Amazon.ECS.Model.StopTaskResponse

EndUpdateContainerAgent() публичный Метод

Finishes the asynchronous execution of the UpdateContainerAgent operation.
public EndUpdateContainerAgent ( IAsyncResult asyncResult ) : UpdateContainerAgentResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginUpdateContainerAgent.
Результат Amazon.ECS.Model.UpdateContainerAgentResponse

EndUpdateService() публичный Метод

Finishes the asynchronous execution of the UpdateService operation.
public EndUpdateService ( IAsyncResult asyncResult ) : UpdateServiceResponse
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginUpdateService.
Результат Amazon.ECS.Model.UpdateServiceResponse

ListClusters() публичный Метод

Returns a list of existing clusters.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public ListClusters ( ListClustersRequest request ) : ListClustersResponse
request Amazon.ECS.Model.ListClustersRequest Container for the necessary parameters to execute the ListClusters service method.
Результат Amazon.ECS.Model.ListClustersResponse

ListClustersAsync() публичный Метод

Initiates the asynchronous execution of the ListClusters operation.
public ListClustersAsync ( ListClustersRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListClustersRequest Container for the necessary parameters to execute the ListClusters operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListContainerInstances() публичный Метод

Returns a list of container instances in a specified cluster.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public ListContainerInstances ( ListContainerInstancesRequest request ) : ListContainerInstancesResponse
request Amazon.ECS.Model.ListContainerInstancesRequest Container for the necessary parameters to execute the ListContainerInstances service method.
Результат Amazon.ECS.Model.ListContainerInstancesResponse

ListContainerInstancesAsync() публичный Метод

Initiates the asynchronous execution of the ListContainerInstances operation.
public ListContainerInstancesAsync ( ListContainerInstancesRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListContainerInstancesRequest Container for the necessary parameters to execute the ListContainerInstances operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListServices() публичный Метод

Lists the services that are running in a specified cluster.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public ListServices ( ListServicesRequest request ) : ListServicesResponse
request Amazon.ECS.Model.ListServicesRequest Container for the necessary parameters to execute the ListServices service method.
Результат Amazon.ECS.Model.ListServicesResponse

ListServicesAsync() публичный Метод

Initiates the asynchronous execution of the ListServices operation.
public ListServicesAsync ( ListServicesRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListServicesRequest Container for the necessary parameters to execute the ListServices operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListTaskDefinitionFamilies() публичный Метод

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 definition revisions).

You can filter out task definition families that do not contain any ACTIVE task definition revisions by setting the status parameter to ACTIVE. You can also filter the results with the familyPrefix parameter.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public ListTaskDefinitionFamilies ( ListTaskDefinitionFamiliesRequest request ) : ListTaskDefinitionFamiliesResponse
request Amazon.ECS.Model.ListTaskDefinitionFamiliesRequest Container for the necessary parameters to execute the ListTaskDefinitionFamilies service method.
Результат Amazon.ECS.Model.ListTaskDefinitionFamiliesResponse

ListTaskDefinitionFamiliesAsync() публичный Метод

Initiates the asynchronous execution of the ListTaskDefinitionFamilies operation.
public ListTaskDefinitionFamiliesAsync ( ListTaskDefinitionFamiliesRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListTaskDefinitionFamiliesRequest Container for the necessary parameters to execute the ListTaskDefinitionFamilies operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListTaskDefinitions() публичный Метод

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.
/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public ListTaskDefinitions ( ListTaskDefinitionsRequest request ) : ListTaskDefinitionsResponse
request Amazon.ECS.Model.ListTaskDefinitionsRequest Container for the necessary parameters to execute the ListTaskDefinitions service method.
Результат Amazon.ECS.Model.ListTaskDefinitionsResponse

ListTaskDefinitionsAsync() публичный Метод

Initiates the asynchronous execution of the ListTaskDefinitions operation.
public ListTaskDefinitionsAsync ( ListTaskDefinitionsRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListTaskDefinitionsRequest Container for the necessary parameters to execute the ListTaskDefinitions operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

ListTasks() публичный Метод

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.

Recently-stopped tasks might appear in the returned results. Currently, stopped tasks appear in the returned results for at least one hour.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. /// /// The specified service could not be found. You can view your available services with /// ListServices. Amazon ECS services are cluster-specific and region-specific. ///
public ListTasks ( ListTasksRequest request ) : ListTasksResponse
request Amazon.ECS.Model.ListTasksRequest Container for the necessary parameters to execute the ListTasks service method.
Результат Amazon.ECS.Model.ListTasksResponse

ListTasksAsync() публичный Метод

Initiates the asynchronous execution of the ListTasks operation.
public ListTasksAsync ( ListTasksRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.ListTasksRequest Container for the necessary parameters to execute the ListTasks operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

RegisterTaskDefinition() публичный Метод

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.

You can specify an IAM role for your task with the taskRoleArn parameter. When you specify an IAM role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the IAM policy associated with the role. For more information, see IAM Roles for Tasks in the Amazon EC2 Container Service Developer Guide.

You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. The available network modes correspond to those described in Network settings in the Docker run reference.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public RegisterTaskDefinition ( RegisterTaskDefinitionRequest request ) : RegisterTaskDefinitionResponse
request Amazon.ECS.Model.RegisterTaskDefinitionRequest Container for the necessary parameters to execute the RegisterTaskDefinition service method.
Результат Amazon.ECS.Model.RegisterTaskDefinitionResponse

RegisterTaskDefinitionAsync() публичный Метод

Initiates the asynchronous execution of the RegisterTaskDefinition operation.
public RegisterTaskDefinitionAsync ( RegisterTaskDefinitionRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.RegisterTaskDefinitionRequest Container for the necessary parameters to execute the RegisterTaskDefinition operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

RunTask() публичный Метод

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 count parameter is limited to 10 tasks per call.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public RunTask ( RunTaskRequest request ) : RunTaskResponse
request Amazon.ECS.Model.RunTaskRequest Container for the necessary parameters to execute the RunTask service method.
Результат Amazon.ECS.Model.RunTaskResponse

RunTaskAsync() публичный Метод

Initiates the asynchronous execution of the RunTask operation.
public RunTaskAsync ( RunTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.RunTaskRequest Container for the necessary parameters to execute the RunTask operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

StartTask() публичный Метод

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.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public StartTask ( StartTaskRequest request ) : StartTaskResponse
request Amazon.ECS.Model.StartTaskRequest Container for the necessary parameters to execute the StartTask service method.
Результат Amazon.ECS.Model.StartTaskResponse

StartTaskAsync() публичный Метод

Initiates the asynchronous execution of the StartTask operation.
public StartTaskAsync ( StartTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.StartTaskRequest Container for the necessary parameters to execute the StartTask operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

StopTask() публичный Метод

Stops a running task.

When StopTask is called on a task, the equivalent of docker stop is 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.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. ///
public StopTask ( StopTaskRequest request ) : StopTaskResponse
request Amazon.ECS.Model.StopTaskRequest Container for the necessary parameters to execute the StopTask service method.
Результат Amazon.ECS.Model.StopTaskResponse

StopTaskAsync() публичный Метод

Initiates the asynchronous execution of the StopTask operation.
public StopTaskAsync ( StopTaskRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.StopTaskRequest Container for the necessary parameters to execute the StopTask operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

UpdateContainerAgent() публичный Метод

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.

UpdateContainerAgent requires the Amazon ECS-optimized AMI or Amazon Linux with the ecs-init service 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.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// Amazon ECS is unable to determine the current version of the Amazon ECS container /// agent on the container instance and does not have enough information to proceed with /// an update. This could be because the agent running on the container instance is an /// older or custom version that does not use our version information. /// /// There is no update available for this Amazon ECS container agent. This could be because /// the agent is already running the latest version, or it is so old that there is no /// update path to the current version. /// /// These errors are usually caused by a server issue. /// /// There is already a current Amazon ECS container agent update in progress on the specified /// container instance. If the container agent becomes disconnected while it is in a transitional /// stage, such as PENDING or STAGING, the update process can /// get stuck in that state. However, when the agent reconnects, it resumes where it stopped /// previously. ///
public UpdateContainerAgent ( UpdateContainerAgentRequest request ) : UpdateContainerAgentResponse
request Amazon.ECS.Model.UpdateContainerAgentRequest Container for the necessary parameters to execute the UpdateContainerAgent service method.
Результат Amazon.ECS.Model.UpdateContainerAgentResponse

UpdateContainerAgentAsync() публичный Метод

Initiates the asynchronous execution of the UpdateContainerAgent operation.
public UpdateContainerAgentAsync ( UpdateContainerAgentRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.UpdateContainerAgentRequest Container for the necessary parameters to execute the UpdateContainerAgent operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task

UpdateService() публичный Метод

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 desiredCount parameter.

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, minimumHealthyPercent and maximumPercent, to determine the deployment strategy.

If the minimumHealthyPercent is below 100%, the scheduler can ignore the desiredCount temporarily during a deployment. For example, if your service has a desiredCount of four tasks, a minimumHealthyPercent of 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 the RUNNING state; tasks for services that do use a load balancer are considered healthy if they are in the RUNNING state and the container instance it is hosted on is reported as healthy by the load balancer.

The maximumPercent parameter 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 a desiredCount of four tasks, a maximumPercent value 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 stop is 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:

  • 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.

/// These errors are usually caused by a client action, such as using an action or resource /// on behalf of a user that doesn't have permission to use the action or resource, or /// specifying an identifier that is not valid. /// /// The specified cluster could not be found. You can view your available clusters with /// ListClusters. Amazon ECS clusters are region-specific. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// These errors are usually caused by a server issue. /// /// The specified service is not active. You cannot update a service that is not active. /// If you have previously deleted a service, you can re-create it with CreateService. /// /// The specified service could not be found. You can view your available services with /// ListServices. Amazon ECS services are cluster-specific and region-specific. ///
public UpdateService ( UpdateServiceRequest request ) : UpdateServiceResponse
request Amazon.ECS.Model.UpdateServiceRequest Container for the necessary parameters to execute the UpdateService service method.
Результат Amazon.ECS.Model.UpdateServiceResponse

UpdateServiceAsync() публичный Метод

Initiates the asynchronous execution of the UpdateService operation.
public UpdateServiceAsync ( UpdateServiceRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.ECS.Model.UpdateServiceRequest Container for the necessary parameters to execute the UpdateService operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task