update run_task to make it possible to expose ecs task publicly (#2916)
This commit is contained in:
@@ -268,6 +268,7 @@ class AsyncAWSClient:
|
|||||||
task_definition: str,
|
task_definition: str,
|
||||||
subnets: list[str],
|
subnets: list[str],
|
||||||
security_groups: list[str],
|
security_groups: list[str],
|
||||||
|
assign_public_ip: str = "DISABLED",
|
||||||
) -> dict:
|
) -> dict:
|
||||||
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/run_task.html
|
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/run_task.html
|
||||||
async with self._ecs_client() as client:
|
async with self._ecs_client() as client:
|
||||||
@@ -279,7 +280,7 @@ class AsyncAWSClient:
|
|||||||
"awsvpcConfiguration": {
|
"awsvpcConfiguration": {
|
||||||
"subnets": subnets,
|
"subnets": subnets,
|
||||||
"securityGroups": security_groups,
|
"securityGroups": security_groups,
|
||||||
"assignPublicIp": "DISABLED",
|
"assignPublicIp": assign_public_ip,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user