Created: 2023-08-11 | Updated: 2024-09-21

HTTP server

New (v0.3.3)

Table of contents

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

Node Type: http

Rendering:

lambda

Code Snippet:

# given
mcd = MultiCloudDiagrams()

# when
arn = 'https://somedomain.com'
metadata = {
    "Owner": "organization1",
    "authorizer": "auth0",
    "Throttling": 500
}
mcd.add_vertex(node_id=arn, node_name='mock_data', node_type='http', metadata=metadata)

drawio http vertex:

<mxCell id="vertex:http:https://somedomain.com" parent="1" vertex="1">
    <mxGeometry width="63" height="66" as="geometry"/>
</mxCell>

Advanced for Geeks:

Style:

style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.http_protocol;fillColor=#5294CF;gradientColor=none;"
attributevalue
alignleft
dashed0
fillColor#5294CF
gradientColornone
html1
outlineConnect0
shapemxgraph.aws3.http_protocol
verticalAligntop
verticalLabelPositionbottom

Vertex size:

attributevalue
width63
height66

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:http:https://somedomain.com" value="&lt;b&gt;Name&lt;/b&gt;: mock_data&lt;BR&gt;&lt;b&gt;ID&lt;/b&gt;: https://somedomain.com&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;Owner&lt;/b&gt;: organization1&lt;BR&gt;&lt;b&gt;authorizer&lt;/b&gt;: auth0&lt;BR&gt;&lt;b&gt;Throttling&lt;/b&gt;: 500" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.http_protocol;fillColor=#5294CF;gradientColor=none;" parent="1" vertex="1">
                    <mxGeometry width="63" height="66" as="geometry"/>
                </mxCell>
            </root>
        </mxGraphModel>
    </diagram>
</mxfile>

drawio file:

Download generated http.drawio:

Download