Skip to content

EcsService

Bases: DuploTenantResourceV2

apply

Apply a service.

delete_service

Delete an ECS service.

Parameters:

Name Type Description Default
name NAME

The name of the ECS service to delete.

required

Returns: message: A message indicating the service has been deleted.

find

Find a EcsService by name.

cli usage
duploctl ecsservice find <name>

Parameters:

Name Type Description Default
name NAME

The name of the EcsService to find.

required

Returns:

Name Type Description
resource dict

The EcsService object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

find_def

Find a ECS task definition by name.

Parameters:

Name Type Description Default
name str

The name of the ECS task definition to find.

required

Returns: The ECS task definition object. Raises: DuploError: If the ECS task definition could not be found.

find_def_by_arn

Find a ECS task definition by ARN.

Parameters:

Name Type Description Default
arn str

The ARN of the ECS task definition to find.

required

Returns: The ECS task definition object. Raises: DuploError: If the ECS task definition could not be found.

find_service_family

Find an ECS Services task definition family by name.

Parameters:

Name Type Description Default
name str

The name of the ECS task definition to find.

required

Returns: The ECS task definition object. Raises: DuploError: If the ECS task definition could not be found.

find_task_def_family

Find a ECS task definition by name.

Parameters:

Name Type Description Default
name str

The name of the ECS task definition to find.

required

Returns: The ECS task definition object. Raises: DuploError: If the ECS task definition could not be found.

list

Retrieve a List of EcsService

cli usage
duploctl ecsservice list

Returns:

Name Type Description
list list

A list of EcsService.

list_services

Retrieve a list of all ECS services in a tenant.

list_task_def_family

List ECS Task Definitions

Retrieve a list of all ECS task definitions in a tenant.

Example

CLI usage

duploctl ecs list_definitions

Returns:

Name Type Description
task_def_family dict

A list of ECS task definitions.

list_tasks

List tasks for an ECS service.

prefixed_name

Make sure name is prefixed

run_task

Run a task for an ECS service."

Execute a task based on some definition.

Parameters:

Name Type Description Default
name NAME

The name of the ECS service to run the task for.

required
replicas REPLICAS

The number of replicas to run.

required
wait WAIT

Whether to wait for the task to complete.

required

Returns: message: A message indicating the task has been run.

update_image

Update the image for an ECS service.

Example

CLI usage

duploctl ecs update_image my-service my-image

Parameters:

Name Type Description Default
name NAME

The name of the ECS service to update.

required
image IMAGE

The new image to use.

required

Returns: ecs: The updated ECS object. Raises: DuploError: If the ECS service could not be updated.

update_service

Update an ECS service.

Parameters:

Name Type Description Default
body dict

The updated ECS service object.

required

Returns: The updated ECS object. Raises: DuploError: If the ECS service could not be updated.

update_taskdef

Update an ECS task definition.

Parameters:

Name Type Description Default
body dict

The updated ECS task definition object.

required

Returns: The updated ECS object. Raises: DuploError: If the ECS task definition could not be updated.

wait_on_task

Wait for an ECS task to complete.