Created: 2023-08-11 | Updated: 2024-09-21
S3
New (v0.2.0)
Table of contents
Node Type: s3
Rendering:
Code Snippet:
# given
mcd = MultiCloudDiagrams()
# when
s3_arn = 'arn:aws:s3:::content_bucket'
metadata = {
'x-amz-bucket-region': 'eu-west-1',
'CreationDate': '2023-11-11',
'Transitions': "[{'Days': 60, 'StorageClass': 'GLACIER'}]",
'AbortIncompleteMultipartUpload': "{'DaysAfterInitiation': 5}",
'PublicAccessBlockConfiguration': "{'BlockPublicAcls': True, 'IgnorePublicAcls': True, 'BlockPublicPolicy': True, 'RestrictPublicBuckets': True}",
'Expiration': "{'Days': 90}",
'LifecycleConfiguration': 'NO',
'CORSConfiguration': 'NO',
'LoggingConfiguration': 'NO',
'Versioning': 'Enabled',
'MFADelete': 'Disabled'
}
mcd.add_vertex(node_id=s3_arn, node_name='content_bucket', node_type='s3', metadata=metadata)
drawio s3 vertex:
<mxCell id="vertex:s3:arn:aws:s3:::content_bucket" parent="1" vertex="1">
<mxGeometry width="78" height="78" as="geometry"/>
</mxCell>
Advanced for Geeks:
Style:
style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.bucket_with_objects;fillColor=#E05243;gradientColor=none;"
attribute | value |
---|---|
align | left |
dashed | 0 |
fillColor | #E05243 |
gradientColor | none |
html | 1 |
outlineConnect | 0 |
shape | mxgraph.aws3.bucket_with_objects |
verticalAlign | top |
verticalLabelPosition | bottom |
Vertex size:
attribute | value |
---|---|
width | 78 |
height | 78 |
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:s3:arn:aws:s3:::content_bucket" value="<b>Name</b>: content_bucket<BR><b>ARN</b>: arn:aws:s3:::content_bucket<BR>-----------<BR><b>x-amz-bucket-region</b>: eu-west-1<BR><b>CreationDate</b>: 2023-11-11<BR><b>Transitions</b>: [{'Days': 60, 'StorageClass': 'GLACIER'}]<BR><b>AbortIncompleteMultipartUpload</b>: {'DaysAfterInitiation': 5}<BR><b>PublicAccessBlockConfiguration</b>: {'BlockPublicAcls': True, 'IgnorePublicAcls': True, 'BlockPublicPolicy': True, 'RestrictPublicBuckets': True}<BR><b>Expiration</b>: {'Days': 90}<BR><b>LifecycleConfiguration</b>: NO<BR><b>CORSConfiguration</b>: NO<BR><b>LoggingConfiguration</b>: NO<BR><b>Versioning</b>: Enabled<BR><b>MFADelete</b>: Disabled" style="outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=left;html=1;shape=mxgraph.aws3.bucket_with_objects;fillColor=#E05243;gradientColor=none;" parent="1" vertex="1">
<mxGeometry width="78" height="78" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
drawio file:
Download generated s3.drawio
: