Created: 2024-01-07 | Updated: 2024-05-17

ECS Task

New (v0.3.19)

Table of contents

  1. Node Type: ecs_task
  2. Rendering:
  3. Code Snippet:
  4. drawio ecs_task vertex:
  5. Advanced for Geeks:
    1. Style:
    2. Vertex size:
    3. Full XML dump:
    4. drawio file:

Node Type: ecs_task

Rendering:

lambda

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;"
attributevalue
alignleft
aspectfixed
dashed0
fillColor#D45B07
fontSize12
fontStyle0
gradientColornone
html1
outlineConnect0
pointerEvents1
shapemxgraph.aws4.ecs_task
sketch0
strokeColornone
verticalAligntop
verticalLabelPositionbottom

Vertex size:

attributevalue
width37
height48

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="&lt;b&gt;Name&lt;/b&gt;: arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94&lt;BR&gt;&lt;b&gt;ARN&lt;/b&gt;: arn:aws:ecs:eu-west-1:123456789012:task/fargate-cluster/562320f29dbdc94&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;ecs.cpu-architecture&lt;/b&gt;: x86_64&lt;BR&gt;&lt;b&gt;availabilityZone&lt;/b&gt;: eu-west-1a&lt;BR&gt;&lt;b&gt;connectivity&lt;/b&gt;: CONNECTED&lt;BR&gt;&lt;b&gt;cpu&lt;/b&gt;: 512&lt;BR&gt;&lt;b&gt;memory&lt;/b&gt;: 2048&lt;BR&gt;&lt;b&gt;platformVersion&lt;/b&gt;: 1.4.0&lt;BR&gt;&lt;b&gt;platformFamily&lt;/b&gt;: Linux&lt;BR&gt;&lt;b&gt;version&lt;/b&gt;: 5&lt;BR&gt;&lt;b&gt;ephemeralStorage_sizeInGiB&lt;/b&gt;: 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:

Download