Created: 2024-01-07 | Updated: 2024-09-21
ECS Task
New (v0.3.19)
Table of contents
Node Type: ecs_task
Rendering:
Code Snippet:
# given
mcd = MultiCloudDiagrams()
# when
ecs_task_arn = 'arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94'
ecs_task_name = 'arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94'
metadata = {
"ecs.cpu-architecture": "x86_64",
"availabilityZone": "eu-west-1a",
"connectivity": "CONNECTED",
"cpu": "512",
"memory": "2048",
"platformVersion": '1.4.0',
"platformFamily": 'Linux',
"version": 5,
"ephemeralStorage_sizeInGiB": 20,
}
mcd.add_vertex(node_id=ecs_task_arn, node_name=ecs_task_name, node_type='ecs_task', metadata=metadata)
drawio ecs_task vertex:
<mxCell id="vertex:ecs_task:arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94" parent="1" vertex="1">
<mxGeometry width="37" height="48" as="geometry"/>
</mxCell>
Advanced for Geeks:
Style:
style="sketch=0;outlineConnect=0;gradientColor=none;fillColor=#D45B07;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.ecs_task;"
attribute | value |
---|---|
align | left |
aspect | fixed |
dashed | 0 |
fillColor | #D45B07 |
fontSize | 12 |
fontStyle | 0 |
gradientColor | none |
html | 1 |
outlineConnect | 0 |
pointerEvents | 1 |
shape | mxgraph.aws4.ecs_task |
sketch | 0 |
strokeColor | none |
verticalAlign | top |
verticalLabelPosition | bottom |
Vertex size:
attribute | value |
---|---|
width | 37 |
height | 48 |
Full XML dump:
<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud">
<diagram id="diagram_1" name="AWS components">
<mxGraphModel dx="1015" dy="661" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="vertex:ecs_task:arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94" value="<b>Name</b>: arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94<BR><b>ARN</b>: arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94<BR>-----------<BR><b>ecs.cpu-architecture</b>: x86_64<BR><b>availabilityZone</b>: eu-west-1a<BR><b>connectivity</b>: CONNECTED<BR><b>cpu</b>: 512<BR><b>memory</b>: 2048<BR><b>platformVersion</b>: 1.4.0<BR><b>platformFamily</b>: Linux<BR><b>version</b>: 5<BR><b>ephemeralStorage_sizeInGiB</b>: 20" style="sketch=0;outlineConnect=0;gradientColor=none;fillColor=#D45B07;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.ecs_task;" parent="1" vertex="1">
<mxGeometry width="37" height="48" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
drawio file:
Download generated ecs_task.drawio
: