ExAws.Ecs.Core

Amazon EC2 Container Service

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.

Source

Summary

create_cluster!(client, input)

Same as create_cluster/2 but raise on error

create_cluster(client, input)

CreateCluster

create_service!(client, input)

Same as create_service/2 but raise on error

create_service(client, input)

CreateService

delete_cluster!(client, input)

Same as delete_cluster/2 but raise on error

delete_cluster(client, input)

DeleteCluster

delete_service!(client, input)

Same as delete_service/2 but raise on error

delete_service(client, input)

DeleteService

deregister_container_instance!(client, input)

Same as deregister_container_instance/2 but raise on error

deregister_container_instance(client, input)

DeregisterContainerInstance

deregister_task_definition!(client, input)

Same as deregister_task_definition/2 but raise on error

deregister_task_definition(client, input)

DeregisterTaskDefinition

describe_clusters!(client, input)

Same as describe_clusters/2 but raise on error

describe_clusters(client, input)

DescribeClusters

describe_container_instances!(client, input)

Same as describe_container_instances/2 but raise on error

describe_container_instances(client, input)

DescribeContainerInstances

describe_services!(client, input)

Same as describe_services/2 but raise on error

describe_services(client, input)

DescribeServices

describe_task_definition!(client, input)

Same as describe_task_definition/2 but raise on error

describe_task_definition(client, input)

DescribeTaskDefinition

describe_tasks!(client, input)

Same as describe_tasks/2 but raise on error

describe_tasks(client, input)

DescribeTasks

discover_poll_endpoint!(client, input)

Same as discover_poll_endpoint/2 but raise on error

discover_poll_endpoint(client, input)

DiscoverPollEndpoint

list_clusters!(client, input)

Same as list_clusters/2 but raise on error

list_clusters(client, input)

ListClusters

list_container_instances!(client, input)

Same as list_container_instances/2 but raise on error

list_container_instances(client, input)

ListContainerInstances

list_services!(client, input)

Same as list_services/2 but raise on error

list_services(client, input)

ListServices

list_task_definition_families!(client, input)

Same as list_task_definition_families/2 but raise on error

list_task_definition_families(client, input)

ListTaskDefinitionFamilies

list_task_definitions!(client, input)

Same as list_task_definitions/2 but raise on error

list_task_definitions(client, input)

ListTaskDefinitions

list_tasks!(client, input)

Same as list_tasks/2 but raise on error

list_tasks(client, input)

ListTasks

register_container_instance!(client, input)

Same as register_container_instance/2 but raise on error

register_container_instance(client, input)

RegisterContainerInstance

register_task_definition!(client, input)

Same as register_task_definition/2 but raise on error

register_task_definition(client, input)

RegisterTaskDefinition

run_task!(client, input)

Same as run_task/2 but raise on error

run_task(client, input)

RunTask

start_task!(client, input)

Same as start_task/2 but raise on error

start_task(client, input)

StartTask

stop_task!(client, input)

Same as stop_task/2 but raise on error

stop_task(client, input)

StopTask

submit_container_state_change!(client, input)

Same as submit_container_state_change/2 but raise on error

submit_container_state_change(client, input)

SubmitContainerStateChange

submit_task_state_change!(client, input)

Same as submit_task_state_change/2 but raise on error

submit_task_state_change(client, input)

SubmitTaskStateChange

update_container_agent!(client, input)

Same as update_container_agent/2 but raise on error

update_container_agent(client, input)

UpdateContainerAgent

update_service!(client, input)

Same as update_service/2 but raise on error

update_service(client, input)

UpdateService

Types

run_task_request :: [cluster: binary, count: boxed_integer, overrides: task_override, started_by: binary, task_definition: binary]

list_task_definitions_response :: [next_token: binary, task_definition_arns: string_list]

client_exception :: [{:message, binary}]

container_override :: [command: string_list, environment: environment_variables, name: binary]

service :: [cluster_arn: binary, deployments: deployments, desired_count: integer, events: service_events, load_balancers: load_balancers, pending_count: integer, role_arn: binary, running_count: integer, service_arn: binary, service_name: binary, status: binary, task_definition: binary]

describe_services_response :: [failures: failures, services: services]

task_definition :: [container_definitions: container_definitions, family: binary, revision: integer, status: task_definition_status, task_definition_arn: binary, volumes: volume_list]

delete_cluster_response :: [{:cluster, cluster}]

list_tasks_request :: [cluster: binary, container_instance: binary, desired_status: desired_status, family: binary, max_results: boxed_integer, next_token: binary, service_name: binary, started_by: binary]

list_task_definition_families_response :: [families: string_list, next_token: binary]

list_services_response :: [next_token: binary, service_arns: string_list]

service_event :: [created_at: timestamp, id: binary, message: binary]

port_mapping :: [container_port: integer, host_port: integer, protocol: transport_protocol]

boxed_boolean :: boolean

delete_cluster_request :: [{:cluster, binary}]

sort_order :: binary

container_definition :: [command: string_list, cpu: integer, entry_point: string_list, environment: environment_variables, essential: boxed_boolean, image: binary, links: string_list, memory: integer, mount_points: mount_point_list, name: binary, port_mappings: port_mapping_list, volumes_from: volume_from_list]

container_instance :: [agent_connected: boolean, agent_update_status: agent_update_status, container_instance_arn: binary, ec2_instance_id: binary, pending_tasks_count: integer, registered_resources: resources, remaining_resources: resources, running_tasks_count: integer, status: binary, version_info: version_info]

load_balancer :: [container_name: binary, container_port: boxed_integer, load_balancer_name: binary]

discover_poll_endpoint_request :: [cluster: binary, container_instance: binary]

describe_task_definition_request :: [{:task_definition, binary}]

string_list :: [binary]

failure :: [arn: binary, reason: binary]

resource :: [double_value: double, integer_value: integer, long_value: long, name: binary, string_set_value: string_list, type: binary]

task_override :: [{:container_overrides, container_overrides}]

version_info :: [agent_hash: binary, agent_version: binary, docker_version: binary]

describe_tasks_response :: [failures: failures, tasks: tasks]

list_task_definitions_request :: [family_prefix: binary, max_results: boxed_integer, next_token: binary, sort: sort_order, status: task_definition_status]

register_task_definition_request :: [container_definitions: container_definitions, family: binary, volumes: volume_list]

submit_task_state_change_request :: [cluster: binary, reason: binary, status: binary, task: binary]

describe_container_instances_request :: [cluster: binary, container_instances: string_list]

discover_poll_endpoint_response :: [endpoint: binary, telemetry_endpoint: binary]

create_cluster_request :: [{:cluster_name, binary}]

deployment :: [created_at: timestamp, desired_count: integer, id: binary, pending_count: integer, running_count: integer, status: binary, task_definition: binary, updated_at: timestamp]

stop_task_response :: [{:task, task}]

list_tasks_response :: [next_token: binary, task_arns: string_list]

timestamp :: integer

list_services_request :: [cluster: binary, max_results: boxed_integer, next_token: binary]

update_service_request :: [cluster: binary, desired_count: boxed_integer, service: binary, task_definition: binary]

mount_point :: [container_path: binary, read_only: boxed_boolean, source_volume: binary]

run_task_response :: [failures: failures, tasks: tasks]

create_cluster_response :: [{:cluster, cluster}]

update_container_agent_request :: [cluster: binary, container_instance: binary]

delete_service_response :: [{:service, service}]

describe_services_request :: [cluster: binary, services: string_list]

submit_container_state_change_request :: [cluster: binary, container_name: binary, exit_code: boxed_integer, network_bindings: network_bindings, reason: binary, status: binary, task: binary]

stop_task_request :: [cluster: binary, task: binary]

list_container_instances_request :: [cluster: binary, max_results: boxed_integer, next_token: binary]

task :: [cluster_arn: binary, container_instance_arn: binary, containers: containers, desired_status: binary, last_status: binary, overrides: task_override, started_by: binary, task_arn: binary, task_definition_arn: binary]

list_clusters_request :: [max_results: boxed_integer, next_token: binary]

double :: float

deregister_task_definition_request :: [{:task_definition, binary}]

transport_protocol :: binary

key_value_pair :: [name: binary, value: binary]

list_task_definition_families_request :: [family_prefix: binary, max_results: boxed_integer, next_token: binary]

long :: integer

start_task_response :: [failures: failures, tasks: tasks]

boxed_integer :: integer

start_task_request :: [cluster: binary, container_instances: string_list, overrides: task_override, started_by: binary, task_definition: binary]

volume_from :: [read_only: boxed_boolean, source_container: binary]

cluster :: [active_services_count: integer, cluster_arn: binary, cluster_name: binary, pending_tasks_count: integer, registered_container_instances_count: integer, running_tasks_count: integer, status: binary]

host_volume_properties :: [{:source_path, binary}]

network_binding :: [bind_ip: binary, container_port: boxed_integer, host_port: boxed_integer, protocol: transport_protocol]

tasks :: [task]

register_container_instance_request :: [cluster: binary, container_instance_arn: binary, instance_identity_document: binary, instance_identity_document_signature: binary, total_resources: resources, version_info: version_info]

delete_service_request :: [cluster: binary, service: binary]

container :: [container_arn: binary, exit_code: boxed_integer, last_status: binary, name: binary, network_bindings: network_bindings, reason: binary, task_arn: binary]

list_container_instances_response :: [container_instance_arns: string_list, next_token: binary]

describe_tasks_request :: [cluster: binary, tasks: string_list]

list_clusters_response :: [cluster_arns: string_list, next_token: binary]

submit_task_state_change_response :: [{:acknowledgment, binary}]

create_service_response :: [{:service, service}]

volume :: [host: host_volume_properties, name: binary]

server_exception :: [{:message, binary}]

describe_clusters_response :: [clusters: clusters, failures: failures]

desired_status :: binary

create_service_request :: [client_token: binary, cluster: binary, desired_count: boxed_integer, load_balancers: load_balancers, role: binary, service_name: binary, task_definition: binary]

deregister_container_instance_request :: [cluster: binary, container_instance: binary, force: boxed_boolean]

update_service_response :: [{:service, service}]

submit_container_state_change_response :: [{:acknowledgment, binary}]

Functions

create_cluster(client, input)

Specs:

CreateCluster

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.

Source
create_cluster!(client, input)

Specs:

  • create_cluster!(client :: ExAws.Ecs.t, input :: create_cluster_request) :: ExAws.Request.JSON.success_t | no_return

Same as create_cluster/2 but raise on error.

Source
create_service(client, input)

Specs:

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 will spawn another instantiation of the task in the specified cluster.

Source
create_service!(client, input)

Specs:

  • create_service!(client :: ExAws.Ecs.t, input :: create_service_request) :: ExAws.Request.JSON.success_t | no_return

Same as create_service/2 but raise on error.

Source
delete_cluster(client, input)

Specs:

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.

Source
delete_cluster!(client, input)

Specs:

  • delete_cluster!(client :: ExAws.Ecs.t, input :: delete_cluster_request) :: ExAws.Request.JSON.success_t | no_return

Same as delete_cluster/2 but raise on error.

Source
delete_service(client, input)

Specs:

DeleteService

Deletes a specified service within a cluster.

Source
delete_service!(client, input)

Specs:

  • delete_service!(client :: ExAws.Ecs.t, input :: delete_service_request) :: ExAws.Request.JSON.success_t | no_return

Same as delete_service/2 but raise on error.

Source
deregister_container_instance(client, input)

Specs:

DeregisterContainerInstance

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.

Source
deregister_container_instance!(client, input)

Specs:

Same as deregister_container_instance/2 but raise on error.

Source
deregister_task_definition(client, input)

Specs:

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

Source
deregister_task_definition!(client, input)

Specs:

Same as deregister_task_definition/2 but raise on error.

Source
describe_clusters(client, input)

Specs:

DescribeClusters

Describes one or more of your clusters.

Source
describe_clusters!(client, input)

Specs:

Same as describe_clusters/2 but raise on error.

Source
describe_container_instances(client, input)

Specs:

DescribeContainerInstances

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

Source
describe_container_instances!(client, input)

Specs:

Same as describe_container_instances/2 but raise on error.

Source
describe_services(client, input)

Specs:

DescribeServices

Describes the specified services running in your cluster.

Source
describe_services!(client, input)

Specs:

Same as describe_services/2 but raise on error.

Source
describe_task_definition(client, input)

Specs:

DescribeTaskDefinition

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.

Source
describe_task_definition!(client, input)

Specs:

Same as describe_task_definition/2 but raise on error.

Source
describe_tasks(client, input)

Specs:

DescribeTasks

Describes a specified task or tasks.

Source
describe_tasks!(client, input)

Specs:

  • describe_tasks!(client :: ExAws.Ecs.t, input :: describe_tasks_request) :: ExAws.Request.JSON.success_t | no_return

Same as describe_tasks/2 but raise on error.

Source
discover_poll_endpoint(client, input)

Specs:

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.

Returns an endpoint for the Amazon EC2 Container Service agent to poll for updates.

Source
discover_poll_endpoint!(client, input)

Specs:

Same as discover_poll_endpoint/2 but raise on error.

Source
list_clusters(client, input)

Specs:

ListClusters

Returns a list of existing clusters.

Source
list_clusters!(client, input)

Specs:

  • list_clusters!(client :: ExAws.Ecs.t, input :: list_clusters_request) :: ExAws.Request.JSON.success_t | no_return

Same as list_clusters/2 but raise on error.

Source
list_container_instances(client, input)

Specs:

ListContainerInstances

Returns a list of container instances in a specified cluster.

Source
list_container_instances!(client, input)

Specs:

Same as list_container_instances/2 but raise on error.

Source
list_services(client, input)

Specs:

ListServices

Lists the services that are running in a specified cluster.

Source
list_services!(client, input)

Specs:

  • list_services!(client :: ExAws.Ecs.t, input :: list_services_request) :: ExAws.Request.JSON.success_t | no_return

Same as list_services/2 but raise on error.

Source
list_task_definition_families(client, input)

Specs:

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). You can filter the results with the familyPrefix parameter.

Source
list_task_definition_families!(client, input)

Specs:

Same as list_task_definition_families/2 but raise on error.

Source
list_task_definitions(client, input)

Specs:

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.

Source
list_task_definitions!(client, input)

Specs:

Same as list_task_definitions/2 but raise on error.

Source
list_tasks(client, input)

Specs:

  • list_tasks(client :: ExAws.Ecs.t, input :: list_tasks_request) :: ExAws.Request.JSON.response_t

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.

Source
list_tasks!(client, input)

Specs:

  • list_tasks!(client :: ExAws.Ecs.t, input :: list_tasks_request) :: ExAws.Request.JSON.success_t | no_return

Same as list_tasks/2 but raise on error.

Source
register_container_instance(client, input)

Specs:

RegisterContainerInstance

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.

Source
register_container_instance!(client, input)

Specs:

Same as register_container_instance/2 but raise on error.

Source
register_task_definition(client, input)

Specs:

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 on task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.

Source
register_task_definition!(client, input)

Specs:

Same as register_task_definition/2 but raise on error.

Source
run_task(client, input)

Specs:

  • run_task(client :: ExAws.Ecs.t, input :: run_task_request) :: ExAws.Request.JSON.response_t

RunTask

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.

** The count parameter is limited to 10 tasks per call.

**

Source
run_task!(client, input)

Specs:

  • run_task!(client :: ExAws.Ecs.t, input :: run_task_request) :: ExAws.Request.JSON.success_t | no_return

Same as run_task/2 but raise on error.

Source
start_task(client, input)

Specs:

  • start_task(client :: ExAws.Ecs.t, input :: start_task_request) :: ExAws.Request.JSON.response_t

StartTask

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.

** The list of container instances to start tasks on is limited to 10.

**

Source
start_task!(client, input)

Specs:

  • start_task!(client :: ExAws.Ecs.t, input :: start_task_request) :: ExAws.Request.JSON.success_t | no_return

Same as start_task/2 but raise on error.

Source
stop_task(client, input)

Specs:

  • stop_task(client :: ExAws.Ecs.t, input :: stop_task_request) :: ExAws.Request.JSON.response_t

StopTask

Stops a running task.

Source
stop_task!(client, input)

Specs:

  • stop_task!(client :: ExAws.Ecs.t, input :: stop_task_request) :: ExAws.Request.JSON.success_t | no_return

Same as stop_task/2 but raise on error.

Source
submit_container_state_change(client, input)

Specs:

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.

Sent to acknowledge that a container changed states.

Source
submit_container_state_change!(client, input)

Specs:

Same as submit_container_state_change/2 but raise on error.

Source
submit_task_state_change(client, input)

Specs:

SubmitTaskStateChange

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.

Source
submit_task_state_change!(client, input)

Specs:

Same as submit_task_state_change/2 but raise on error.

Source
update_container_agent(client, input)

Specs:

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.

Source
update_container_agent!(client, input)

Specs:

Same as update_container_agent/2 but raise on error.

Source
update_service(client, input)

Specs:

UpdateService

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.

Source
update_service!(client, input)

Specs:

  • update_service!(client :: ExAws.Ecs.t, input :: update_service_request) :: ExAws.Request.JSON.success_t | no_return

Same as update_service/2 but raise on error.

Source