Skip to content

Commit a7f3484

Browse files
committed
Returns service and tags, not just the ARN
1 parent 6ccb8ae commit a7f3484

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compose_x_common/aws/ecs/services.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def get_ecs_services_from_tags(
2121
services_list: list = None,
2222
next_token: str = None,
2323
session: Session = None,
24+
arns_only: bool = False,
2425
) -> list:
2526
"""
2627
Retrieves the services based on the tags provided.
@@ -48,4 +49,6 @@ def get_ecs_services_from_tags(
4849
return get_ecs_services_from_tags(
4950
tags, services_list, services_r["PaginationToken"], session
5051
)
51-
return [item["ResourceARN"] for item in services_list]
52+
if arns_only:
53+
return [item["ResourceARN"] for item in services_list]
54+
return services_list

0 commit comments

Comments
 (0)