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.
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
list_services
Retrieve a list of all ECS services in a tenant.
list_task_def_family
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_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.