Created: 2024-01-07 | Updated: 2024-09-21

ECS Service

New (v0.3.19)

Table of contents

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

Node Type: ecs_service

Rendering:

lambda

Code Snippet:

# given
mcd = MultiCloudDiagrams()

# when
ecs_service_arn = 'arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc'
ecs_service_name = 'Nginx_Service'
metadata = {
    "serviceName": "service-fg-svc",
    "clusterArn": "arn:aws:ecs:eu-west-1:123456789012:cluster/rules-dev-fargate-cluster",
    "serviceRegistries": "arn:aws:servicediscovery:eu-west-1:123456789012:service/srv-t",
    "status": "ACTIVE",
    "desiredCount": 1,
    "runningCount": 1,
    "pendingCount": 0,
    "launchType": "FARGATE",
    "platformVersion": "LATEST",
    "platformFamily": "Linux",
    "taskDefinition": "arn:aws:ecs:eu-west-1:123456789012:task-definition/service-fg-task:15",
}
mcd.add_vertex(node_id=ecs_service_arn, node_name=ecs_service_name, node_type='ecs_service', metadata=metadata)

drawio ecs_service vertex:

<mxCell id="vertex:ecs_service:arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc" parent="1" vertex="1">
    <mxGeometry width="39" 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_service;"
attributevalue
alignleft
aspectfixed
dashed0
fillColor#D45B07
fontSize12
fontStyle0
gradientColornone
html1
outlineConnect0
pointerEvents1
shapemxgraph.aws4.ecs_service
sketch0
strokeColornone
verticalAligntop
verticalLabelPositionbottom

Vertex size:

attributevalue
width39
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_service:arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc" value="&lt;b&gt;Name&lt;/b&gt;: Nginx_Service&lt;BR&gt;&lt;b&gt;ARN&lt;/b&gt;: arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;serviceName&lt;/b&gt;: service-fg-svc&lt;BR&gt;&lt;b&gt;clusterArn&lt;/b&gt;: arn:aws:ecs:eu-west-1:123456789012:cluster/rules-dev-fargate-cluster&lt;BR&gt;&lt;b&gt;serviceRegistries&lt;/b&gt;: arn:aws:servicediscovery:eu-west-1:123456789012:service/srv-t&lt;BR&gt;&lt;b&gt;status&lt;/b&gt;: ACTIVE&lt;BR&gt;&lt;b&gt;desiredCount&lt;/b&gt;: 1&lt;BR&gt;&lt;b&gt;runningCount&lt;/b&gt;: 1&lt;BR&gt;&lt;b&gt;pendingCount&lt;/b&gt;: 0&lt;BR&gt;&lt;b&gt;launchType&lt;/b&gt;: FARGATE&lt;BR&gt;&lt;b&gt;platformVersion&lt;/b&gt;: LATEST&lt;BR&gt;&lt;b&gt;platformFamily&lt;/b&gt;: Linux&lt;BR&gt;&lt;b&gt;taskDefinition&lt;/b&gt;: arn:aws:ecs:eu-west-1:123456789012:task-definition/service-fg-task:15" 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_service;" parent="1" vertex="1">
                    <mxGeometry width="39" height="48" as="geometry"/>
                </mxCell>
            </root>
        </mxGraphModel>
    </diagram>
</mxfile>

drawio file:

Download generated ecs_service.drawio:

Download