get_diagram_examples
Access ready-to-use code examples for AWS architecture, sequence, flow, class, Kubernetes, on-premises, and custom diagrams to understand syntax and structure before creating your own visualizations.
Instructions
Get example code for different types of diagrams.
This tool provides ready-to-use example code for various diagram types. Use these examples to understand the syntax and capabilities of the diagrams package before creating your own custom diagrams.
USAGE INSTRUCTIONS:
Select the diagram type you're interested in (or 'all' to see all examples)
Study the returned examples to understand the structure and syntax
Use these examples as templates for your own diagrams
When ready, modify an example or write your own code and use generate_diagram
EXAMPLE CATEGORIES:
aws: AWS cloud architecture diagrams (basic services, grouped workers, clustered web services, Bedrock)
sequence: Process and interaction flow diagrams
flow: Decision trees and workflow diagrams
class: Object relationship and inheritance diagrams
k8s: Kubernetes architecture diagrams
onprem: On-premises infrastructure diagrams
custom: Custom diagrams with custom icons
all: All available examples across categories
Each example demonstrates different features of the diagrams package:
Basic connections between components
Grouping with Clusters
Advanced styling with Edge attributes
Different layout directions
Multiple component instances
Custom icons and nodes
Parameters: diagram_type (str): Type of diagram example to return. Options: aws, sequence, flow, class, k8s, onprem, custom, all
Returns: Dictionary with example code for the requested diagram type(s), organized by example name
Input Schema
Name | Required | Description | Default |
---|---|---|---|
diagram_type | No | Type of diagram example to return. Options: aws, sequence, flow, class, k8s, onprem, custom, all | all |