public interface AmazonECS
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 Amazon 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.
Modifier and Type | Method and Description |
---|---|
CreateClusterResult |
createCluster()
Creates a new Amazon ECS cluster.
|
CreateClusterResult |
createCluster(CreateClusterRequest createClusterRequest)
Creates a new Amazon ECS cluster.
|
CreateServiceResult |
createService(CreateServiceRequest createServiceRequest)
Runs and maintains a desired number of tasks from a specified task
definition.
|
DeleteClusterResult |
deleteCluster(DeleteClusterRequest deleteClusterRequest)
Deletes the specified cluster.
|
DeleteServiceResult |
deleteService(DeleteServiceRequest deleteServiceRequest)
Deletes a specified service within a cluster.
|
DeregisterContainerInstanceResult |
deregisterContainerInstance(DeregisterContainerInstanceRequest deregisterContainerInstanceRequest)
Deregisters an Amazon ECS container instance from the specified
cluster.
|
DeregisterTaskDefinitionResult |
deregisterTaskDefinition(DeregisterTaskDefinitionRequest deregisterTaskDefinitionRequest)
Deregisters the specified task definition by family and revision.
|
DescribeClustersResult |
describeClusters()
Describes one or more of your clusters.
|
DescribeClustersResult |
describeClusters(DescribeClustersRequest describeClustersRequest)
Describes one or more of your clusters.
|
DescribeContainerInstancesResult |
describeContainerInstances(DescribeContainerInstancesRequest describeContainerInstancesRequest)
Describes Amazon EC2 Container Service container instances.
|
DescribeServicesResult |
describeServices(DescribeServicesRequest describeServicesRequest)
Describes the specified services running in your cluster.
|
DescribeTaskDefinitionResult |
describeTaskDefinition(DescribeTaskDefinitionRequest describeTaskDefinitionRequest)
Describes a task definition.
|
DescribeTasksResult |
describeTasks(DescribeTasksRequest describeTasksRequest)
Describes a specified task or tasks.
|
DiscoverPollEndpointResult |
discoverPollEndpoint()
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
DiscoverPollEndpointResult |
discoverPollEndpoint(DiscoverPollEndpointRequest discoverPollEndpointRequest)
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request, typically used for
debugging issues where a service isn't acting as expected.
|
ListClustersResult |
listClusters()
Returns a list of existing clusters.
|
ListClustersResult |
listClusters(ListClustersRequest listClustersRequest)
Returns a list of existing clusters.
|
ListContainerInstancesResult |
listContainerInstances()
Returns a list of container instances in a specified cluster.
|
ListContainerInstancesResult |
listContainerInstances(ListContainerInstancesRequest listContainerInstancesRequest)
Returns a list of container instances in a specified cluster.
|
ListServicesResult |
listServices()
Lists the services that are running in a specified cluster.
|
ListServicesResult |
listServices(ListServicesRequest listServicesRequest)
Lists the services that are running in a specified cluster.
|
ListTaskDefinitionFamiliesResult |
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 definitions). |
ListTaskDefinitionFamiliesResult |
listTaskDefinitionFamilies(ListTaskDefinitionFamiliesRequest listTaskDefinitionFamiliesRequest)
Returns a list of task definition families that are registered to
your account (which may include task definition families that no
longer have any
ACTIVE task definitions). |
ListTaskDefinitionsResult |
listTaskDefinitions()
Returns a list of task definitions that are registered to your
account.
|
ListTaskDefinitionsResult |
listTaskDefinitions(ListTaskDefinitionsRequest listTaskDefinitionsRequest)
Returns a list of task definitions that are registered to your
account.
|
ListTasksResult |
listTasks()
Returns a list of tasks for a specified cluster.
|
ListTasksResult |
listTasks(ListTasksRequest listTasksRequest)
Returns a list of tasks for a specified cluster.
|
RegisterContainerInstanceResult |
registerContainerInstance(RegisterContainerInstanceRequest registerContainerInstanceRequest)
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
RegisterTaskDefinitionResult |
registerTaskDefinition(RegisterTaskDefinitionRequest registerTaskDefinitionRequest)
Registers a new task definition from the supplied
family
and containerDefinitions . |
RunTaskResult |
runTask(RunTaskRequest runTaskRequest)
Start a task using random placement and the default Amazon ECS
scheduler.
|
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client ("https://ecs.us-east-1.amazonaws.com").
|
void |
setRegion(Region region)
An alternative to
setEndpoint(String) , sets the
regional endpoint for this client's service calls. |
void |
shutdown()
Shuts down this client object, releasing any resources that might be held
open.
|
StartTaskResult |
startTask(StartTaskRequest startTaskRequest)
Starts a new task from the specified task definition on the specified
container instance or instances.
|
StopTaskResult |
stopTask(StopTaskRequest stopTaskRequest)
Stops a running task.
|
SubmitContainerStateChangeResult |
submitContainerStateChange()
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
SubmitContainerStateChangeResult |
submitContainerStateChange(SubmitContainerStateChangeRequest submitContainerStateChangeRequest)
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
SubmitTaskStateChangeResult |
submitTaskStateChange(SubmitTaskStateChangeRequest submitTaskStateChangeRequest)
NOTE: This action is only used by the Amazon EC2 Container
Service agent, and it is not intended for use outside of the agent.
|
UpdateContainerAgentResult |
updateContainerAgent(UpdateContainerAgentRequest updateContainerAgentRequest)
Updates the Amazon ECS container agent on a specified container
instance.
|
UpdateServiceResult |
updateService(UpdateServiceRequest updateServiceRequest)
Modify the desired count or task definition used in a service.
|
void setEndpoint(String endpoint) throws IllegalArgumentException
Callers can pass in just the endpoint (ex: "ecs.us-east-1.amazonaws.com") or a full
URL, including the protocol (ex: "https://ecs.us-east-1.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
endpoint
- The endpoint (ex: "ecs.us-east-1.amazonaws.com") or a full URL,
including the protocol (ex: "https://ecs.us-east-1.amazonaws.com") of
the region specific AWS endpoint this client will communicate
with.IllegalArgumentException
- If any problems are detected with the specified endpoint.void setRegion(Region region) throws IllegalArgumentException
setEndpoint(String)
, sets the
regional endpoint for this client's service calls. Callers can use this
method to control which AWS region they want to work with.
By default, all service endpoints in all regions use the https protocol.
To use http instead, specify it in the ClientConfiguration
supplied at construction.
This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
region
- The region this client will communicate with. See
Region.getRegion(com.amazonaws.regions.Regions)
for
accessing a given region.IllegalArgumentException
- If the given region is null, or if this service isn't
available in the given region. See
Region.isServiceSupported(String)
Region.getRegion(com.amazonaws.regions.Regions)
,
Region.createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
DeleteClusterResult deleteCluster(DeleteClusterRequest deleteClusterRequest) throws AmazonServiceException, AmazonClientException
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.
deleteClusterRequest
- Container for the necessary parameters to
execute the DeleteCluster service method on AmazonECS.InvalidParameterException
ClusterContainsContainerInstancesException
ClusterNotFoundException
ServerException
ClientException
ClusterContainsServicesException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.SubmitContainerStateChangeResult submitContainerStateChange(SubmitContainerStateChangeRequest submitContainerStateChangeRequest) throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a container changed states.
submitContainerStateChangeRequest
- Container for the necessary
parameters to execute the SubmitContainerStateChange service method on
AmazonECS.ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DeleteServiceResult deleteService(DeleteServiceRequest deleteServiceRequest) throws AmazonServiceException, AmazonClientException
Deletes a specified service within a cluster.
deleteServiceRequest
- Container for the necessary parameters to
execute the DeleteService service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
ServiceNotFoundException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTaskDefinitionsResult listTaskDefinitions(ListTaskDefinitionsRequest listTaskDefinitionsRequest) throws AmazonServiceException, AmazonClientException
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.
listTaskDefinitionsRequest
- Container for the necessary
parameters to execute the ListTaskDefinitions service method on
AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.RunTaskResult runTask(RunTaskRequest runTaskRequest) throws AmazonServiceException, AmazonClientException
Start a task using random placement and the default Amazon ECS
scheduler. If you want to use your own scheduler or place a task on a
specific container instance, use StartTask
instead.
IMPORTANT: The count parameter is limited to 10 tasks per call.
runTaskRequest
- Container for the necessary parameters to
execute the RunTask service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListClustersResult listClusters(ListClustersRequest listClustersRequest) throws AmazonServiceException, AmazonClientException
Returns a list of existing clusters.
listClustersRequest
- Container for the necessary parameters to
execute the ListClusters service method on AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.CreateClusterResult createCluster(CreateClusterRequest createClusterRequest) throws AmazonServiceException, AmazonClientException
Creates a new Amazon ECS cluster. By default, your account will
receive 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.
createClusterRequest
- Container for the necessary parameters to
execute the CreateCluster service method on AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeClustersResult describeClusters(DescribeClustersRequest describeClustersRequest) throws AmazonServiceException, AmazonClientException
Describes one or more of your clusters.
describeClustersRequest
- Container for the necessary parameters
to execute the DescribeClusters service method on AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DeregisterTaskDefinitionResult deregisterTaskDefinition(DeregisterTaskDefinitionRequest deregisterTaskDefinitionRequest) throws AmazonServiceException, AmazonClientException
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).
deregisterTaskDefinitionRequest
- Container for the necessary
parameters to execute the DeregisterTaskDefinition service method on
AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DeregisterContainerInstanceResult deregisterContainerInstance(DeregisterContainerInstanceRequest deregisterContainerInstanceRequest) throws AmazonServiceException, AmazonClientException
Deregisters an Amazon ECS container instance from the specified cluster. This instance will no longer be 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.
NOTE: When you terminate a container instance, it is automatically deregistered from your cluster.
deregisterContainerInstanceRequest
- Container for the necessary
parameters to execute the DeregisterContainerInstance service method
on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListContainerInstancesResult listContainerInstances(ListContainerInstancesRequest listContainerInstancesRequest) throws AmazonServiceException, AmazonClientException
Returns a list of container instances in a specified cluster.
listContainerInstancesRequest
- Container for the necessary
parameters to execute the ListContainerInstances service method on
AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.UpdateContainerAgentResult updateContainerAgent(UpdateContainerAgentRequest updateContainerAgentRequest) throws AmazonServiceException, AmazonClientException
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 .
updateContainerAgentRequest
- Container for the necessary
parameters to execute the UpdateContainerAgent service method on
AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
NoUpdateAvailableException
ClientException
MissingVersionException
UpdateInProgressException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeTaskDefinitionResult describeTaskDefinition(DescribeTaskDefinitionRequest describeTaskDefinitionRequest) throws AmazonServiceException, AmazonClientException
Describes a task definition. You can specify a family
and revision
to find information on a specific task
definition, or you can simply specify the family to find the latest
ACTIVE
revision in that family.
NOTE: You can only describe INACTIVE task definitions while an active task or service references them.
describeTaskDefinitionRequest
- Container for the necessary
parameters to execute the DescribeTaskDefinition service method on
AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.RegisterTaskDefinitionResult registerTaskDefinition(RegisterTaskDefinitionRequest registerTaskDefinitionRequest) throws AmazonServiceException, AmazonClientException
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 on task definition parameters and defaults, see
Amazon ECS Task Definitions
in the Amazon EC2 Container Service Developer Guide .
registerTaskDefinitionRequest
- Container for the necessary
parameters to execute the RegisterTaskDefinition service method on
AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.SubmitTaskStateChangeResult submitTaskStateChange(SubmitTaskStateChangeRequest submitTaskStateChangeRequest) throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a task changed states.
submitTaskStateChangeRequest
- Container for the necessary
parameters to execute the SubmitTaskStateChange service method on
AmazonECS.ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.CreateServiceResult createService(CreateServiceRequest createServiceRequest) throws AmazonServiceException, AmazonClientException
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 will spawn another
instantiation of the task in the specified cluster.
createServiceRequest
- Container for the necessary parameters to
execute the CreateService service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeContainerInstancesResult describeContainerInstances(DescribeContainerInstancesRequest describeContainerInstancesRequest) throws AmazonServiceException, AmazonClientException
Describes Amazon EC2 Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.
describeContainerInstancesRequest
- Container for the necessary
parameters to execute the DescribeContainerInstances service method on
AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.RegisterContainerInstanceResult registerContainerInstance(RegisterContainerInstanceRequest registerContainerInstanceRequest) throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Registers an Amazon EC2 instance into the specified cluster. This instance will become available to place containers on.
registerContainerInstanceRequest
- Container for the necessary
parameters to execute the RegisterContainerInstance service method on
AmazonECS.ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeServicesResult describeServices(DescribeServicesRequest describeServicesRequest) throws AmazonServiceException, AmazonClientException
Describes the specified services running in your cluster.
describeServicesRequest
- Container for the necessary parameters
to execute the DescribeServices service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListServicesResult listServices(ListServicesRequest listServicesRequest) throws AmazonServiceException, AmazonClientException
Lists the services that are running in a specified cluster.
listServicesRequest
- Container for the necessary parameters to
execute the ListServices service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.UpdateServiceResult updateService(UpdateServiceRequest updateServiceRequest) throws AmazonServiceException, AmazonClientException
Modify the desired count 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, one task at a time. If you
modify the task definition with UpdateService
, Amazon
ECS spawns a task with the new version of the task definition and then
stops an old task after the new version is running. Because
UpdateService
starts a new version of the task before
stopping an old version, your cluster must have capacity to support
one more instantiation of the task when UpdateService
is
run. If your cluster cannot support another instantiation of the task
used in your service, you can reduce the desired count of your service
by one before modifying the task definition.
updateServiceRequest
- Container for the necessary parameters to
execute the UpdateService service method on AmazonECS.InvalidParameterException
ServiceNotActiveException
ClusterNotFoundException
ServerException
ClientException
ServiceNotFoundException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTaskDefinitionFamiliesResult listTaskDefinitionFamilies(ListTaskDefinitionFamiliesRequest listTaskDefinitionFamiliesRequest) throws AmazonServiceException, AmazonClientException
Returns a list of task definition families that are registered to
your account (which may include task definition families that no
longer have any ACTIVE
task definitions). You can filter
the results with the familyPrefix
parameter.
listTaskDefinitionFamiliesRequest
- Container for the necessary
parameters to execute the ListTaskDefinitionFamilies service method on
AmazonECS.InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeTasksResult describeTasks(DescribeTasksRequest describeTasksRequest) throws AmazonServiceException, AmazonClientException
Describes a specified task or tasks.
describeTasksRequest
- Container for the necessary parameters to
execute the DescribeTasks service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DiscoverPollEndpointResult discoverPollEndpoint(DiscoverPollEndpointRequest discoverPollEndpointRequest) throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Returns an endpoint for the Amazon EC2 Container Service agent to poll for updates.
discoverPollEndpointRequest
- Container for the necessary
parameters to execute the DiscoverPollEndpoint service method on
AmazonECS.ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.StartTaskResult startTask(StartTaskRequest startTaskRequest) throws AmazonServiceException, AmazonClientException
Starts a new task from the specified task definition on the specified
container instance or instances. If you want to use the default Amazon
ECS scheduler to place your task, use RunTask
instead.
IMPORTANT: The list of container instances to start tasks on is limited to 10.
startTaskRequest
- Container for the necessary parameters to
execute the StartTask service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTasksResult listTasks(ListTasksRequest listTasksRequest) throws AmazonServiceException, AmazonClientException
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.
listTasksRequest
- Container for the necessary parameters to
execute the ListTasks service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.StopTaskResult stopTask(StopTaskRequest stopTaskRequest) throws AmazonServiceException, AmazonClientException
Stops a running task.
stopTaskRequest
- Container for the necessary parameters to
execute the StopTask service method on AmazonECS.InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.SubmitContainerStateChangeResult submitContainerStateChange() throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a container changed states.
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTaskDefinitionsResult listTaskDefinitions() throws AmazonServiceException, AmazonClientException
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.
InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListClustersResult listClusters() throws AmazonServiceException, AmazonClientException
Returns a list of existing clusters.
InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.CreateClusterResult createCluster() throws AmazonServiceException, AmazonClientException
Creates a new Amazon ECS cluster. By default, your account will
receive 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.
InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DescribeClustersResult describeClusters() throws AmazonServiceException, AmazonClientException
Describes one or more of your clusters.
InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListContainerInstancesResult listContainerInstances() throws AmazonServiceException, AmazonClientException
Returns a list of container instances in a specified cluster.
InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListServicesResult listServices() throws AmazonServiceException, AmazonClientException
Lists the services that are running in a specified cluster.
InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTaskDefinitionFamiliesResult listTaskDefinitionFamilies() throws AmazonServiceException, AmazonClientException
Returns a list of task definition families that are registered to
your account (which may include task definition families that no
longer have any ACTIVE
task definitions). You can filter
the results with the familyPrefix
parameter.
InvalidParameterException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.DiscoverPollEndpointResult discoverPollEndpoint() throws AmazonServiceException, AmazonClientException
NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.
Returns an endpoint for the Amazon EC2 Container Service agent to poll for updates.
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.ListTasksResult listTasks() throws AmazonServiceException, AmazonClientException
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.
InvalidParameterException
ClusterNotFoundException
ServerException
ClientException
AmazonClientException
- If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonECS indicating
either a problem with the data in the request, or a server side issue.void shutdown()
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
request
- The originally executed request.Copyright © 2015. All rights reserved.