### Basic Setup for Azure-PlantUML Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Include AzureCommon.puml and specific service files to initialize the library and use Azure service macros. ```plantuml @startuml Basic Setup !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml actor "Person" as personAlias AzureFunction(functionAlias, "Label", "Technology", "Optional Description") AzureCosmosDb(cosmosDbAlias, "Label", "Technology", "Optional Description") personAlias --> functionAlias functionAlias --> cosmosDbAlias @enduml ``` -------------------------------- ### Install Playwright CLI Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Installs the Playwright Command Line Interface globally using the .NET CLI. Ensure the .NET 6 SDK is installed. ```bash dotnet tool install -g Microsoft.Playwright.CLI ``` -------------------------------- ### Install Playwright Dependencies on Linux Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Installs necessary system dependencies for Playwright on Ubuntu 20.04. This command should be run from the 'scripts' folder. ```bash dotnet build playwright install-deps ``` -------------------------------- ### Basic Azure PlantUML Usage Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Import necessary PlantUML files to use Azure macros for diagramming. This example demonstrates stream processing with Azure Stream Analytics. ```plantuml @startuml Basic usage - Stream processing with Azure Stream Analytics !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml !includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml left to right direction agent "Device Simulator" as devices #fff AzureEventHub(fareDataEventHub, "Fare Data", "PK: Medallion HackLicense VendorId; 3 TUs") AzureEventHub(tripDataEventHub, "Trip Data", "PK: Medallion HackLicense VendorId; 3 TUs") AzureStreamAnalyticsJob(streamAnalytics, "Stream Processing", "6 SUs") AzureCosmosDb(outputCosmosDb, "Output Database", "1,000 RUs") devices --> fareDataEventHub devices --> tripDataEventHub fareDataEventHub --> streamAnalytics tripDataEventHub --> streamAnalytics streamAnalytics --> outputCosmosDb @enduml ``` -------------------------------- ### Raw Azure PlantUML Sprite Usage Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Include Azure sprites directly into your PlantUML diagrams for visual representation. This example shows how to use sprites for Azure Functions and Cosmos DB. ```plantuml @startuml Raw usage - Sprites !pragma revision 1 !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureRaw.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Compute/AzureFunction.puml component "<$AzureFunction>" as myFunction database "<$AzureCosmosDb>" as myCosmosDb AzureFunction(mySecondFunction, "Stream Processing", "Consumption") rectangle "<$AzureCosmosDb>" as mySecondCosmosDb myFunction --> myCosmosDb mySecondFunction --> mySecondCosmosDb @enduml ``` -------------------------------- ### Initialize Azure PlantUML Presentation Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/presentation/app.html Initializes the library by fetching a configuration file and triggering the generation process. Requires the js-yaml library to parse the configuration data. ```javascript var distFolder = '../../dist/'; $(function() { $.get('../Config.yaml', function( data ) { var config = jsyaml.load(data); GeneratePresentation(config); }); }); ``` -------------------------------- ### Hello World Azure PlantUML Diagram Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md A basic PlantUML diagram demonstrating the inclusion of Azure common, databases, and compute services, and the usage of AzureFunction and AzureCosmosDb macros. ```csharp @startuml Hello World !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Databases/all.puml !includeurl AzurePuml/Compute/AzureFunction.puml actor "Person" as personAlias AzureFunction(functionAlias, "Label", "Technology", "Optional Description") AzureCosmosDb(cosmosDbAlias, "Label", "Technology", "Optional Description") personAlias --> functionAlias functionAlias --> cosmosDbAlias @enduml ``` -------------------------------- ### Enable Simplified Presentation Mode Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Use AzureSimplified.puml to remove technical details and descriptions for cleaner diagrams. ```plantuml @startuml Simplified Mode !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml ' Uncomment the line below to enable simplified mode ' !includeurl AzurePuml/AzureSimplified.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Storage/AzureDataLakeStorage.puml !includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml !includeurl AzurePuml/InternetOfThings/AzureTimeSeriesInsights.puml LAYOUT_LEFT_RIGHT AzureEventHub(rawEventsHubAlias, "Raw Event Hub", "PK: Medallion HackLicense VendorId; 3 TUs") AzureDataLakeStorage(datalakeAlias, "Data Lake", "GRS") AzureStreamAnalyticsJob(streamAnalyticsAlias, "Aggregate Events", "6 SUs") AzureFunction(stateFunctionAlias, "State Processor", "C#, Consumption Plan") AzureEventHub(aggregatedEventsHubAlias, "Aggregated Hub", "6 TUs") AzureCosmosDb(stateDBAlias, "State Database", "SQL API, 1000 RUs") AzureTimeSeriesInsights(timeSeriesAlias, "Time Series", "2 Data Processing Units") rawEventsHubAlias ----> datalakeAlias rawEventsHubAlias --> streamAnalyticsAlias rawEventsHubAlias ---> stateFunctionAlias streamAnalyticsAlias --> aggregatedEventsHubAlias aggregatedEventsHubAlias --> timeSeriesAlias stateFunctionAlias --> stateDBAlias @enduml ``` -------------------------------- ### Enable Sketch Mode Styling Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Apply LAYOUT_AS_SKETCH to give diagrams a hand-drawn appearance suitable for drafts. ```plantuml @startuml Sketch Mode !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml ' Enable sketch mode - hand-drawn appearance with warning footer LAYOUT_AS_SKETCH AzureFunction(func, "API Handler", "Python") AzureCosmosDb(db, "Data Store", "MongoDB API") func --> db @enduml ``` -------------------------------- ### Visualize Azure Storage Services Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Defines storage components like blobs, files, and queues. Requires the AzureCommon and Storage/all modules. ```plantuml @startuml Storage Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Storage/all.puml LAYOUT_LEFT_RIGHT AzureBlobStorage(blob, "Blob Storage", "Hot tier, LRS") AzureFileStorage(files, "File Storage", "Premium, 100GB") AzureQueueStorage(queue, "Queue Storage", "Standard") AzureDataLakeStorage(datalake, "Data Lake", "Gen2, ZRS") AzureStorage(storage, "Storage Account", "General Purpose v2") storage --> blob storage --> files storage --> queue blob --> datalake : archive @enduml ``` -------------------------------- ### Local File Include for Offline Usage Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Reference Azure-PlantUML files using local paths after downloading the distribution folder. ```plantuml @startuml Local Include !define AzurePuml path/to/dist !include AzurePuml/AzureCommon.puml !include AzurePuml/Databases/AzureCosmosDb.puml !include AzurePuml/Compute/AzureFunction.puml AzureFunction(myFunc, "My Function", "Node.js") AzureCosmosDb(myDb, "My Database", "SQL API") myFunc --> myDb @enduml ``` -------------------------------- ### IoT Architecture Diagram Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Illustrates an IoT reference architecture combining Azure IoT services with C4-PlantUML elements. Ensure all necessary Azure and C4-PlantUML includes are present. ```plantuml @startuml IoT Architecture !pragma revision 1 !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/AzureC4Integration.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Storage/AzureBlobStorage.puml !includeurl AzurePuml/InternetOfThings/AzureIoTHub.puml LAYOUT_LEFT_RIGHT LAYOUT_WITH_LEGEND() ' Custom element tags for versioning or highlighting AddElementTag("v1.0", $borderColor="red") System(devices, "Devices") AzureIoTHub(iotHub, "IoT Hub", "Standard S1", "Ingress point for all telemetry") AzureEventHub(eventHubTelemetry, "Device Telemetry", "Standard, 5 TUs, 4 Partitions") AzureFunction(telemetryFunction, "Telemetry Processing", "v1, App Service plan P3v2, C#", "Transform telemetry data") AzureCosmosDb(warmStorageCosmos, "Warm Storage", "2,000 RUs", "For consumption on dashboards") AzureStreamAnalyticsJob(streamAnalytics, "Stream Analytics", "6 SUs", "Complex event processing") AzureFunction(alertingFunction, "Alerting", "v2, Consumption plan, JS", $tags="v1.0") AzureBlobStorage(coldBlobStorage, "Cold Storage", "General Purpose v2, Cool, RA-GRS", "Long-term archive") Rel(devices, iotHub, "Send telemetry to") Rel(iotHub, eventHubTelemetry, "Routes all telemetry to") Rel_Back(iotHub, streamAnalytics, "Analyzes each event from") Rel(iotHub, coldBlobStorage, "Routes all telemetry to") Rel_Back(eventHubTelemetry, telemetryFunction, "Processes each event from") Rel(streamAnalytics, alertingFunction, "Triggers for output batches to") Rel(telemetryFunction, warmStorageCosmos, "Writes all transformed events to") @enduml ``` -------------------------------- ### Include AzureCommon.puml from URL Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Include the AzureCommon.puml file from a remote URL for the always up-to-date version. ```csharp !includeurl https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist/AzureCommon.puml ``` -------------------------------- ### Importing Azure Service Categories Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Use the all.puml file within a category folder to import all services from that specific Azure category at once. ```plantuml @startuml Category Import !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Databases/all.puml !includeurl AzurePuml/Analytics/all.puml AzureSqlDatabase(sqlDb, "SQL Database", "Standard S3") AzureCosmosDb(cosmosDb, "Cosmos DB", "SQL API, 1000 RUs") AzureRedisCache(cache, "Redis Cache", "Premium P1") AzureEventHub(eventHub, "Event Hub", "Standard, 4 TUs") AzureStreamAnalyticsJob(stream, "Stream Analytics", "6 SUs") eventHub --> stream stream --> cosmosDb sqlDb --> cache @enduml ``` -------------------------------- ### Visualize Azure Networking Services Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Illustrates virtual networks, subnets, and connectivity components. Requires the AzureCommon and Networking/all modules. ```plantuml @startuml Networking Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Networking/all.puml AzureVirtualNetwork(vnet, "Production VNet", "10.0.0.0/16") AzureSubnet(subnet1, "Web Subnet", "10.0.1.0/24") AzureSubnet(subnet2, "App Subnet", "10.0.2.0/24") AzureLoadBalancer(lb, "Load Balancer", "Standard SKU") AzureApplicationGateway(appGw, "App Gateway", "WAF v2") AzureFirewall(firewall, "Azure Firewall", "Standard") AzureDNS(dns, "DNS Zone", "Public") AzureVPNGateway(vpn, "VPN Gateway", "VpnGw2") vnet --> subnet1 vnet --> subnet2 appGw --> lb firewall --> vnet dns --> appGw vpn --> vnet @enduml ``` -------------------------------- ### Application Settings for Ubuntu Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Configuration for the Azure-PlantUML generator on Ubuntu. Specifies source and distribution folder paths, monochrome color, and the PlantUML JAR path. ```json { "sourceFolderPath": "../source", "targetFolderPath": "../dist", "monochromeColorHex": "#0072C6", "plantUmlPath": "/usr/share/plantuml/plantuml.jar" } ``` -------------------------------- ### Include AzureCommon.puml Locally Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Include the AzureCommon.puml file from a local path to ensure independence from internet connectivity. ```csharp !include path/to/AzureCommon.puml ``` -------------------------------- ### Using Azure Service Macros Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Utilize dedicated macros for each service following the format ServiceName(alias, label, technology, description). ```plantuml @startuml Service Macros !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml !includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml left to right direction agent "Device Simulator" as devices #fff ' Macro signature: ServiceName(alias, label, technology, description) AzureEventHub(fareDataEventHub, "Fare Data", "PK: Medallion HackLicense VendorId; 3 TUs") AzureEventHub(tripDataEventHub, "Trip Data", "PK: Medallion HackLicense VendorId; 3 TUs") AzureStreamAnalyticsJob(streamAnalytics, "Stream Processing", "6 SUs") AzureCosmosDb(outputCosmosDb, "Output Database", "1,000 RUs") devices --> fareDataEventHub devices --> tripDataEventHub fareDataEventHub --> streamAnalytics tripDataEventHub --> streamAnalytics streamAnalytics --> outputCosmosDb @enduml ``` -------------------------------- ### Include Azure Services from URL with Alias Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Define an alias for the AzurePuml URL and include Azure service files from the remote repository. ```csharp !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Databases/all.puml !includeurl AzurePuml/Compute/AzureFunction.puml ``` -------------------------------- ### Visualize Azure DevOps Services Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Shows CI/CD and monitoring infrastructure. Requires the AzureCommon, DevOps/all, and Management/AzureMonitor modules. ```plantuml @startuml DevOps Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/DevOps/all.puml !includeurl AzurePuml/Management/AzureMonitor.puml AzureDevOps(devops, "Azure DevOps", "Organization") AzureRepos(repos, "Git Repos", "5 repositories") AzurePipelines(pipelines, "Pipelines", "10 parallel jobs") AzureArtifacts(artifacts, "Artifacts", "npm, NuGet") AzureBoards(boards, "Boards", "Agile process") AzureApplicationInsights(appInsights, "App Insights", "Standard") AzureMonitor(monitor, "Azure Monitor", "Log Analytics") devops --> repos devops --> pipelines devops --> artifacts devops --> boards pipelines --> artifacts : publish appInsights --> monitor : telemetry @enduml ``` -------------------------------- ### Application Settings for Windows Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Configuration for the Azure-PlantUML generator on Windows. Specifies source and distribution folder paths, monochrome color, and the PlantUML JAR path. ```json { "sourceFolderPath": "..\\source", "targetFolderPath": "..\\dist", "monochromeColorHex": "#0072C6", "plantUmlPath": "C:\\ProgramData\\chocolatey\\lib\\plantuml\\tools\\plantuml.jar" } ``` -------------------------------- ### Include Azure Services Category and Specific Service Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Define a path alias for AzurePuml and include category and specific service .puml files. ```csharp !define AzurePuml path/to !include AzurePuml/AzureCommon.puml !include AzurePuml/Databases/all.puml !include AzurePuml/Compute/AzureFunction.puml ``` -------------------------------- ### Custom Styled Azure Function and Database Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Demonstrates overriding default Azure colors and styling using PlantUML skinparam. Ensure AzureCommon.puml and specific service includes are present. ```plantuml @startuml Custom Styling !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml ' Available color constants: ' AZURE_COLOR = #0072C6 ' AZURE_BG_COLOR = #FFFFFF ' AZURE_BORDER_COLOR = #3C7FC0 ' AZURE_SYMBOL_COLOR = AZURE_COLOR ' Custom skinparam overrides skinparam rectangle { BackgroundColor #F5F5F5 BorderColor #333333 } skinparam Arrow { Color #FF6600 FontColor #FF6600 } AzureFunction(func, "Custom Styled Function", "Python 3.9") AzureCosmosDb(db, "Custom Styled Database", "SQL API") func --> db : writes data @enduml ``` -------------------------------- ### Azure PlantUML Simplified Mode Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Include AzureSimplified.puml to enable a simplified view of your Azure architecture, suitable for management presentations. Ensure the technical diagram is included in the appendix. ```csharp @startuml Two Mode Sample !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml ' !includeurl AzurePuml/AzureSimplified.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Storage/AzureDataLakeStorage.puml !includeurl AzurePuml/Analytics/AzureStreamAnalyticsJob.puml !includeurl AzurePuml/InternetOfThings/AzureTimeSeriesInsights.puml !includeurl AzurePuml/Identity/AzureActiveDirectoryB2C.puml !includeurl AzurePuml/DevOps/AzureApplicationInsights.puml LAYOUT_LEFT_RIGHT AzureEventHub(rawEventsHubAlias, "Raw Event Hub", "PK: Medallion HackLicense VendorId; 3 TUs") AzureDataLakeStorage(datalakeAlias, "Data Lake", "GRS") AzureStreamAnalyticsJob(streamAnalyticsAlias, "Aggregate Events", "6 SUs") AzureFunction(stateFunctionAlias, "State Processor", "C#, Consumption Plan") AzureEventHub(aggregatedEventsHubAlias, "Aggregated Hub", "6 TUs") AzureCosmosDb(stateDBAlias, "State Database", "SQL API, 1000 RUs") AzureTimeSeriesInsights(timeSeriesAlias, "Time Series", "2 Data Processing Units") rawEventsHubAlias ----> datalakeAlias rawEventsHubAlias --> streamAnalyticsAlias rawEventsHubAlias ---> stateFunctionAlias streamAnalyticsAlias --> aggregatedEventsHubAlias aggregatedEventsHubAlias --> timeSeriesAlias stateFunctionAlias --> stateDBAlias @enduml ``` -------------------------------- ### Integrate Azure-PlantUML with C4-PlantUML Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Include AzureC4Integration.puml to combine Azure components with C4 architectural modeling. ```plantuml @startuml C4 Integration !pragma revision 1 !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/AzureC4Integration.puml !includeurl AzurePuml/Databases/AzureRedisCache.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Databases/AzureSqlDatabase.puml !includeurl AzurePuml/Web/AzureWebApp.puml !includeurl AzurePuml/Web/AzureCDN.puml !includeurl AzurePuml/Storage/AzureBlobStorage.puml !includeurl AzurePuml/Storage/AzureQueueStorage.puml LAYOUT_WITH_LEGEND() Person(user, "User") Container(spa, "Single-Page App", "Angular, JS") AzureWebApp(webApp, "Web & API App", "ASP.NET Core MVC 2.1, C#", "Delivers the SPA and provides RESTful web APIs") AzureCDN(cdn, "CDN", "Akamai S2", "Caches publicly available content") AzureBlobStorage(staticBlobStorage, "Static Content", "General Purpose v2, Hot, LRS") AzureQueueStorage(queue, "Queue", "General Purpose v2, LRS") AzureRedisCache(redisCache, "Cache", "Standard C2") AzureCosmosDb(cosmosDb, "Document DB", "SQL API, 400 RUs") AzureSqlDatabase(sqlDb, "SQL DB", "Standard S3") Rel(user, spa, "Uses", "HTTPS") Rel(user, cdn, "Uses", "HTTPS") Rel_Neighbor(spa, webApp, "Uses", "JSON, HTTPS") Rel_Neighbor(cdn, staticBlobStorage, "Reads from") Rel(webApp, queue, "Puts background jobs into") Rel(webApp, sqlDb, "Reads from and writes to", "ADO.NET") Rel(webApp, cosmosDb, "Reads from and writes to", "SQL API") Rel(webApp, redisCache, "Reads from and writes to") @enduml ``` -------------------------------- ### Generate PlantUML Elements Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Executes the Azure-PlantUML generation application from the 'scripts' directory. This command initiates the process of creating PlantUML sprites and files. ```bash dotnet run ``` -------------------------------- ### Application Settings for MacOS Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/scripts/README.md Configuration for the Azure-PlantUML generator on MacOS. Specifies source and distribution folder paths, monochrome color, and the PlantUML JAR path. ```json { "sourceFolderPath": "../source", "targetFolderPath": "../dist", "monochromeColorHex": "#0072C6", "plantUmlPath": "/opt/homebrew/Cellar/plantuml/1.2022.14/libexec/plantuml.jar" } ``` -------------------------------- ### Azure Compute Services Diagram Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Visualizes various Azure compute services including VMs, Functions, App Services, and Kubernetes. Requires AzureCommon.puml and specific compute/container includes. ```plantuml @startuml Compute Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Compute/all.puml !includeurl AzurePuml/Containers/all.puml LAYOUT_LEFT_RIGHT AzureVirtualMachine(vm, "Web Server VM", "Standard D4s v3") AzureFunction(func, "API Functions", "Consumption Plan, Node.js") AzureAppService(appService, "Web App", "Premium P2v2") AzureKubernetesService(aks, "AKS Cluster", "Standard D4s v3, 3 nodes") AzureContainerInstance(aci, "Batch Container", "2 vCPU, 4GB RAM") AzureContainerRegistry(acr, "Container Registry", "Premium SKU") acr --> aks : pull images acr --> aci : pull images vm --> func : trigger appService --> aks : route traffic @enduml ``` -------------------------------- ### Azure Database Services Diagram Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Depicts various Azure database services such as SQL Database, Cosmos DB, Redis Cache, PostgreSQL, and MySQL. Ensure AzureCommon.puml and databases/all.puml are included. ```plantuml @startuml Database Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Databases/all.puml AzureSqlDatabase(sqlDb, "SQL Database", "Standard S3, 100 DTUs") AzureCosmosDb(cosmosDb, "Cosmos DB", "SQL API, Multi-region, 10000 RUs") AzureRedisCache(redis, "Redis Cache", "Premium P1, 6GB") AzureDatabaseForPostgreSQL(postgres, "PostgreSQL", "General Purpose, 4 vCores") AzureDatabaseForMySQL(mysql, "MySQL", "Basic, 2 vCores") sqlDb --> redis : cache queries cosmosDb --> redis : cache documents postgres --> redis : session cache mysql --> redis : session cache @enduml ``` -------------------------------- ### Visualize Azure Security Services Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Models identity and security management components. Requires the AzureCommon, Security/all, and Identity/all modules. ```plantuml @startuml Security Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Security/all.puml !includeurl AzurePuml/Identity/all.puml AzureActiveDirectory(aad, "Azure AD", "Premium P2") AzureKeyVault(keyVault, "Key Vault", "Premium HSM") AzureSecurityCenter(secCenter, "Security Center", "Standard tier") AzureSentinel(sentinel, "Sentinel", "SIEM/SOAR") AzureDefender(defender, "Defender", "All workloads") aad --> keyVault : access policies secCenter --> sentinel : security alerts defender --> secCenter : threat detection sentinel --> aad : identity logs @enduml ``` -------------------------------- ### Azure PlantUML with C4-PlantUML Integration Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/README.md Integrate Azure-PlantUML with C4-PlantUML by including AzureC4Integration.puml. This allows for detailed architectural modeling using the C4 model. ```csharp @startuml !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/AzureC4Integration.puml !includeurl AzurePuml/Databases/AzureRedisCache.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml .... @enduml ``` -------------------------------- ### Include Azure Symbols Locally Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/AzureSymbols.md Use this method to include Azure symbols when you want to be independent of internet connectivity. Ensure the AzurePuml path is correctly set to your local distribution. ```csharp !define AzurePuml path/to !include AzurePuml/AzureCommon.puml !include AzurePuml/Databases/AzureCosmosDb.puml !include AzurePuml/Compute/AzureFunction.puml ``` -------------------------------- ### Control Diagram Layout Direction Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Use layout macros like LAYOUT_LEFT_RIGHT or LAYOUT_TOP_DOWN to define the orientation of the diagram. ```plantuml @startuml Layout Directives !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Compute/AzureFunction.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Storage/AzureBlobStorage.puml ' Layout options: ' LAYOUT_LEFT_RIGHT - horizontal layout ' LAYOUT_TOP_DOWN - vertical layout (default) LAYOUT_LEFT_RIGHT AzureFunction(func, "Process Data", "Node.js") AzureCosmosDb(db, "Store Results", "SQL API") AzureBlobStorage(blob, "Archive Data", "Hot tier") func --> db db --> blob @enduml ``` -------------------------------- ### Visualize Azure Integration Services Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Displays messaging and workflow automation services. Requires the AzureCommon, Integration/all, and Analytics/AzureEventHub modules. ```plantuml @startuml Integration Services !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Integration/all.puml !includeurl AzurePuml/Analytics/AzureEventHub.puml LAYOUT_LEFT_RIGHT AzureServiceBus(serviceBus, "Service Bus", "Premium, 1 MU") AzureServiceBusQueue(sbQueue, "Order Queue", "Sessions enabled") AzureServiceBusTopic(sbTopic, "Notifications", "10 subscriptions") AzureEventGrid(eventGrid, "Event Grid", "Custom topic") AzureLogicApps(logicApp, "Order Workflow", "Standard") AzureEventHub(eventHub, "Telemetry Hub", "Standard, 4 TUs") serviceBus --> sbQueue serviceBus --> sbTopic eventGrid --> logicApp : trigger eventHub --> eventGrid : events logicApp --> sbQueue : enqueue @enduml ``` -------------------------------- ### Accessing Raw Sprites Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Use the $ServiceName syntax to access sprites directly within standard PlantUML elements, optionally including AzureRaw.puml for minimal styling. ```plantuml @startuml Raw Sprites !pragma revision 1 !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureRaw.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Compute/AzureFunction.puml ' Use sprites directly with color customization component "<$AzureFunction>" as myFunction database "<$AzureCosmosDb>" as myCosmosDb ' Mix raw sprites with standard macros AzureFunction(mySecondFunction, "Stream Processing", "Consumption") rectangle "<$AzureCosmosDb>" as mySecondCosmosDb myFunction --> myCosmosDb mySecondFunction --> mySecondCosmosDb @enduml ``` -------------------------------- ### Import Azure Service Categories in PlantUML Source: https://context7.com/plantuml-stdlib/azure-plantuml/llms.txt Use this PlantUML code to import specific Azure service categories by including their respective 'all.puml' files. Ensure the AzurePuml URL is correctly set. ```plantuml @startuml Service Categories !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist !includeurl AzurePuml/AzureCommon.puml ' Category import files: ' AIMachineLearning/all.puml - Bot Service, Cognitive Services, ML ' Analytics/all.puml - Event Hub, Stream Analytics, Databricks, Synapse ' Blockchain/all.puml - Blockchain Service, Token Service ' Compute/all.puml - VMs, Functions, App Service, Batch ' Containers/all.puml - AKS, ACR, Container Instances ' Databases/all.puml - SQL, Cosmos DB, Redis, PostgreSQL, MySQL ' DevOps/all.puml - Azure DevOps, App Insights, DevTest Labs ' General/all.puml - Azure logo, Workbook, Workflow ' Health/all.puml - Health Data Services, FHIR, DICOM ' Identity/all.puml - Azure AD, B2C, Managed Identity ' Integration/all.puml - Service Bus, Event Grid, Logic Apps ' InternetOfThings/all.puml - IoT Hub, IoT Edge, Digital Twins ' Intune/all.puml - Intune device management ' Management/all.puml - Monitor, Policy, Backup, Arc ' Media/all.puml - Media Services ' Migrate/all.puml - Azure Migrate, Data Box Edge ' Mobile/all.puml - Notification Hubs, Mobile Apps ' Networking/all.puml - VNet, Load Balancer, DNS, Firewall ' Security/all.puml - Key Vault, Sentinel, Security Center ' Stack/all.puml - Azure Stack ' Storage/all.puml - Blob, File, Queue, Data Lake ' Web/all.puml - CDN, API Management, Search, SignalR note "Include specific category/all.puml files\nto import all services from that category" as N1 @enduml ``` -------------------------------- ### Include Azure Symbols Remotely Source: https://github.com/plantuml-stdlib/azure-plantuml/blob/master/AzureSymbols.md Use this method to include the always up-to-date version of Azure symbols directly from the GitHub repository. This requires an active internet connection. ```csharp !define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/master/dist !includeurl AzurePuml/AzureCommon.puml !includeurl AzurePuml/Databases/AzureCosmosDb.puml !includeurl AzurePuml/Compute/AzureFunction.puml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.