Skip to content

EcsService

Bases: DuploTenantResourceV2

apply

Apply a service.

find

Find a ECS service by name.

Parameters:

Name Type Description Default
name str

The name of the ECS service to find.

required

Returns: The ECS service object. Raises: DuploError: If the ECS service 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_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 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.

update

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