Created: 2024-01-07 | Updated: 2024-09-21
ECS Service
New (v0.3.19)
Table of contents
Node Type: ecs_service
Rendering:
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;"
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_service |
sketch | 0 |
strokeColor | none |
verticalAlign | top |
verticalLabelPosition | bottom |
Vertex size:
attribute | value |
---|---|
width | 39 |
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_service:arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc" value="<b>Name</b>: Nginx_Service<BR><b>ARN</b>: arn:aws:ecs:us-west-1:123456789012:service/fargate-cluster/service-fg-svc<BR>-----------<BR><b>serviceName</b>: service-fg-svc<BR><b>clusterArn</b>: arn:aws:ecs:eu-west-1:123456789012:cluster/rules-dev-fargate-cluster<BR><b>serviceRegistries</b>: arn:aws:servicediscovery:eu-west-1:123456789012:service/srv-t<BR><b>status</b>: ACTIVE<BR><b>desiredCount</b>: 1<BR><b>runningCount</b>: 1<BR><b>pendingCount</b>: 0<BR><b>launchType</b>: FARGATE<BR><b>platformVersion</b>: LATEST<BR><b>platformFamily</b>: Linux<BR><b>taskDefinition</b>: 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
: