Skip to content

API Reference

Structs

DiagramOptions

Options for diagrams.

Initializer

import software.aws.pdk.cdk_graph_plugin_diagram.DiagramOptions;

DiagramOptions.builder()
    .title(java.lang.String)
//  .nodePositions(java.util.Map<java.lang.String, INodePosition>)
//  .preset(FilterPreset)
//  .theme(IGraphThemeConfigAlt)
//  .theme(java.lang.String)
    .build();

Properties

Name Type Description
title java.lang.String No description.
nodePositions java.util.MapINodePosition\> No description.
preset software.aws.pdk.cdk_graph_plugin_diagram.FilterPreset No description.
theme IGraphThemeConfigAlt OR java.lang.String No description.

titleRequired
public java.lang.String getTitle();
  • Type: java.lang.String

nodePositionsOptional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
  • Type: java.util.MapINodePosition\>

presetOptional
public FilterPreset getPreset();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.FilterPreset

themeOptional
public java.lang.Object getTheme();

IDiagramConfig

Diagram configuration definition.

Initializer

import software.aws.pdk.cdk_graph_plugin_diagram.IDiagramConfig;

IDiagramConfig.builder()
//  .filterPlan(IGraphFilterPlan)
//  .format(DiagramFormat)
//  .format(java.util.List<DiagramFormat>)
//  .nodePositions(java.util.Map<java.lang.String, INodePosition>)
//  .theme(IGraphThemeConfigAlt)
//  .theme(java.lang.String)
    .name(java.lang.String)
    .title(java.lang.String)
//  .ignoreDefaults(java.lang.Boolean)
    .build();

Properties

Name Type Description
filterPlan software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.
format DiagramFormat OR java.util.List<DiagramFormat> The output format(s) to generated.
nodePositions java.util.MapINodePosition\> Config for predetermined node positions given their CDK construct id.
theme IGraphThemeConfigAlt OR java.lang.String Config for graph theme.
name java.lang.String Name of the diagram.
title java.lang.String The title of the diagram.
ignoreDefaults java.lang.Boolean Indicates if default diagram config is applied as defaults to this config.

filterPlanOptional
public IGraphFilterPlan getFilterPlan();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan

Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.


formatOptional
public java.lang.Object getFormat();
  • Type: DiagramFormat OR java.util.List<DiagramFormat>
  • Default: DiagramFormat.PNG - which will through extension also generate DiagramFormat.SVG and DiagramFormat.DOT

The output format(s) to generated.


nodePositionsOptional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
  • Type: java.util.MapINodePosition\>

Config for predetermined node positions given their CDK construct id.


themeOptional
public java.lang.Object getTheme();

Config for graph theme.


nameRequired
public java.lang.String getName();
  • Type: java.lang.String

Name of the diagram.

Used as the basename of the generated file(s) which gets the extension appended.


titleRequired
public java.lang.String getTitle();
  • Type: java.lang.String

The title of the diagram.


ignoreDefaultsOptional
public java.lang.Boolean getIgnoreDefaults();
  • Type: java.lang.Boolean
  • Default: false

Indicates if default diagram config is applied as defaults to this config.


IDiagramConfigBase

Base config to specific a unique diagram to be generated.

Initializer

import software.aws.pdk.cdk_graph_plugin_diagram.IDiagramConfigBase;

IDiagramConfigBase.builder()
//  .filterPlan(IGraphFilterPlan)
//  .format(DiagramFormat)
//  .format(java.util.List<DiagramFormat>)
//  .nodePositions(java.util.Map<java.lang.String, INodePosition>)
//  .theme(IGraphThemeConfigAlt)
//  .theme(java.lang.String)
    .build();

Properties

Name Type Description
filterPlan software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.
format DiagramFormat OR java.util.List<DiagramFormat> The output format(s) to generated.
nodePositions java.util.MapINodePosition\> Config for predetermined node positions given their CDK construct id.
theme IGraphThemeConfigAlt OR java.lang.String Config for graph theme.

filterPlanOptional
public IGraphFilterPlan getFilterPlan();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan

Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.


formatOptional
public java.lang.Object getFormat();
  • Type: DiagramFormat OR java.util.List<DiagramFormat>
  • Default: DiagramFormat.PNG - which will through extension also generate DiagramFormat.SVG and DiagramFormat.DOT

The output format(s) to generated.


nodePositionsOptional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
  • Type: java.util.MapINodePosition\>

Config for predetermined node positions given their CDK construct id.


themeOptional
public java.lang.Object getTheme();

Config for graph theme.


IPluginConfig

Plugin configuration for diagram plugin.

Initializer

import software.aws.pdk.cdk_graph_plugin_diagram.IPluginConfig;

IPluginConfig.builder()
//  .defaults(IDiagramConfigBase)
//  .diagrams(java.util.List<IDiagramConfig>)
    .build();

Properties

Name Type Description
defaults IDiagramConfigBase Default configuration to apply to all diagrams.
diagrams java.util.List<IDiagramConfig> List of diagram configurations to generate diagrams.

defaultsOptional
public IDiagramConfigBase getDefaults();

Default configuration to apply to all diagrams.


diagramsOptional
public java.util.List<IDiagramConfig> getDiagrams();

List of diagram configurations to generate diagrams.


Classes

CdkGraphDiagramPlugin

  • Implements: software.aws.pdk.cdk_graph_plugin_diagram.ICdkGraphPlugin

CdkGraphDiagramPlugin is a {@link ICdkGraphPluginCdkGraph Plugin} implementation for generating diagram artifacts from the {@link CdkGraph} framework.

Initializers

import software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphDiagramPlugin;

CdkGraphDiagramPlugin.Builder.create()
//  .defaults(IDiagramConfigBase)
//  .diagrams(java.util.List<IDiagramConfig>)
    .build();
Name Type Description
defaults IDiagramConfigBase Default configuration to apply to all diagrams.
diagrams java.util.List<IDiagramConfig> List of diagram configurations to generate diagrams.

defaultsOptional

Default configuration to apply to all diagrams.


diagramsOptional

List of diagram configurations to generate diagrams.


Methods

Name Description
getDiagramArtifact Get diagram artifact for a given name and format.

getDiagramArtifact
public CdkGraphArtifact getDiagramArtifact(java.lang.String name, DiagramFormat format)

Get diagram artifact for a given name and format.

nameRequired
  • Type: java.lang.String

formatRequired

Static Functions

Name Description
artifactFilename Get standardized artifact file name for diagram artifacts.
artifactId Get standardized artifact id for diagram artifacts.

artifactFilename
import software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphDiagramPlugin;

CdkGraphDiagramPlugin.artifactFilename(java.lang.String name, DiagramFormat format)

Get standardized artifact file name for diagram artifacts.

nameRequired
  • Type: java.lang.String

formatRequired

artifactId
import software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphDiagramPlugin;

CdkGraphDiagramPlugin.artifactId(java.lang.String name, DiagramFormat format)

Get standardized artifact id for diagram artifacts.

nameRequired
  • Type: java.lang.String

formatRequired

Properties

Name Type Description
config IPluginConfig Get diagram plugin config.
id java.lang.String Unique identifier for this plugin.
version java.lang.String Plugin version.
defaultDotArtifact software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact Get default dot artifact.
defaultPngArtifact software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact Get default PNG artifact.
dependencies java.util.List List of plugins this plugin depends on, including optional semver version (eg: ["foo", "bar@1.2"]).
bind software.aws.pdk.cdk_graph_plugin_diagram.IGraphPluginBindCallback Binds the plugin to the CdkGraph instance.
report software.aws.pdk.cdk_graph_plugin_diagram.IGraphReportCallback Generate asynchronous reports based on the graph.

configRequired
public IPluginConfig getConfig();

Get diagram plugin config.


idRequired
public java.lang.String getId();
  • Type: java.lang.String

Unique identifier for this plugin.


versionRequired
public java.lang.String getVersion();
  • Type: java.lang.String

Plugin version.


defaultDotArtifactOptional
public CdkGraphArtifact getDefaultDotArtifact();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact

Get default dot artifact.


defaultPngArtifactOptional
public CdkGraphArtifact getDefaultPngArtifact();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact

Get default PNG artifact.


dependenciesOptional
public java.util.List<java.lang.String> getDependencies();
  • Type: java.util.List

List of plugins this plugin depends on, including optional semver version (eg: ["foo", "bar@1.2"]).


bindRequired
public IGraphPluginBindCallback getBind();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphPluginBindCallback

Binds the plugin to the CdkGraph instance.

Enables plugins to receive base configs.


reportOptional
public IGraphReportCallback getReport();
  • Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphReportCallback

Generate asynchronous reports based on the graph.

This is not automatically called when synthesizing CDK. Developer must explicitly add await graphInstance.report() to the CDK bin or invoke this outside of the CDK synth. In either case, the plugin receives the in-memory graph interface when invoked, as the CdkGraph will deserialize the graph prior to invoking the plugin report.


Constants

Name Type Description
ARTIFACT_NS java.lang.String Namespace for artifacts of the diagram plugin.
ID java.lang.String Fixed id of the diagram plugin.
VERSION java.lang.String Current semantic version of the diagram plugin.

ARTIFACT_NSRequired
public java.lang.String getArtifactNs();
  • Type: java.lang.String

Namespace for artifacts of the diagram plugin.


IDRequired
public java.lang.String getId();
  • Type: java.lang.String

Fixed id of the diagram plugin.


VERSIONRequired
public java.lang.String getVersion();
  • Type: java.lang.String

Current semantic version of the diagram plugin.


Protocols

IGraphThemeConfigAlt

GraphThemeConfigAlt is simplified definition of theme to apply.

Properties

Name Type Description
rendering IGraphThemeRendering No description.
theme java.lang.String No description.

renderingOptional
public IGraphThemeRendering getRendering();

themeOptional
public java.lang.String getTheme();
  • Type: java.lang.String

IGraphThemeRendering

Properties for defining the rendering options for the graph theme.

Properties

Name Type Description
cfnResourceIconMax GraphThemeRenderingIconTarget Highest Graph.CfnResourceNode icon to render.
cfnResourceIconMin GraphThemeRenderingIconTarget Lowest Graph.CfnResourceNode icon to render.
resourceIconMax GraphThemeRenderingIconTarget Highest Graph.ResourceNode icon to render.
resourceIconMin GraphThemeRenderingIconTarget Lowest Graph.ResourceNode icon to render.
layout java.lang.String Layout direction of the graph.
stack java.lang.String Specify regex pattern to match root stacks to render.
stage java.lang.String Specify which stage to render when multiple stages are available.
unconstrainedCrossClusterEdges java.lang.Boolean Prevent cross-cluster edges from ranking nodes in layout.

cfnResourceIconMaxOptional
public GraphThemeRenderingIconTarget getCfnResourceIconMax();

Highest Graph.CfnResourceNode icon to render.


cfnResourceIconMinOptional
public GraphThemeRenderingIconTarget getCfnResourceIconMin();

Lowest Graph.CfnResourceNode icon to render.


resourceIconMaxOptional
public GraphThemeRenderingIconTarget getResourceIconMax();

Highest Graph.ResourceNode icon to render.


resourceIconMinOptional
public GraphThemeRenderingIconTarget getResourceIconMin();

Lowest Graph.ResourceNode icon to render.


layoutOptional
public java.lang.String getLayout();
  • Type: java.lang.String
  • Default: horizontal

Layout direction of the graph.


stackOptional
public java.lang.String getStack();
  • Type: java.lang.String
  • Default: undefined Will render all stacks

Specify regex pattern to match root stacks to render.


stageOptional
public java.lang.String getStage();
  • Type: java.lang.String
  • Default: last

Specify which stage to render when multiple stages are available.

Can be a preset value of "first", "last", and "all", or regex string of the stage(s) to render.


unconstrainedCrossClusterEdgesOptional
public java.lang.Boolean getUnconstrainedCrossClusterEdges();
  • Type: java.lang.Boolean
  • Default: false

Prevent cross-cluster edges from ranking nodes in layout.

https://graphviz.org/docs/attrs/constraint/


IGraphThemeRenderingIconProps

Icon specific properties for configuring graph rendering of resource icons.

Properties

Name Type Description
cfnResourceIconMax GraphThemeRenderingIconTarget Highest Graph.CfnResourceNode icon to render.
cfnResourceIconMin GraphThemeRenderingIconTarget Lowest Graph.CfnResourceNode icon to render.
resourceIconMax GraphThemeRenderingIconTarget Highest Graph.ResourceNode icon to render.
resourceIconMin GraphThemeRenderingIconTarget Lowest Graph.ResourceNode icon to render.

cfnResourceIconMaxOptional
public GraphThemeRenderingIconTarget getCfnResourceIconMax();

Highest Graph.CfnResourceNode icon to render.


cfnResourceIconMinOptional
public GraphThemeRenderingIconTarget getCfnResourceIconMin();

Lowest Graph.CfnResourceNode icon to render.


resourceIconMaxOptional
public GraphThemeRenderingIconTarget getResourceIconMax();

Highest Graph.ResourceNode icon to render.


resourceIconMinOptional
public GraphThemeRenderingIconTarget getResourceIconMin();

Lowest Graph.ResourceNode icon to render.


IGraphThemeRenderingOptions

Additional graph rendering options.

Properties

Name Type Description
layout java.lang.String Layout direction of the graph.
stack java.lang.String Specify regex pattern to match root stacks to render.
stage java.lang.String Specify which stage to render when multiple stages are available.
unconstrainedCrossClusterEdges java.lang.Boolean Prevent cross-cluster edges from ranking nodes in layout.

layoutOptional
public java.lang.String getLayout();
  • Type: java.lang.String
  • Default: horizontal

Layout direction of the graph.


stackOptional
public java.lang.String getStack();
  • Type: java.lang.String
  • Default: undefined Will render all stacks

Specify regex pattern to match root stacks to render.


stageOptional
public java.lang.String getStage();
  • Type: java.lang.String
  • Default: last

Specify which stage to render when multiple stages are available.

Can be a preset value of "first", "last", and "all", or regex string of the stage(s) to render.


unconstrainedCrossClusterEdgesOptional
public java.lang.Boolean getUnconstrainedCrossClusterEdges();
  • Type: java.lang.Boolean
  • Default: false

Prevent cross-cluster edges from ranking nodes in layout.

https://graphviz.org/docs/attrs/constraint/


INodePosition

Positional coordinates for a node in inches.

Properties

Name Type Description
x java.lang.Number No description.
y java.lang.Number No description.

xRequired
public java.lang.Number getX();
  • Type: java.lang.Number

yRequired
public java.lang.Number getY();
  • Type: java.lang.Number

Enums

DiagramFormat

Supported diagram formats that can be generated.

Extended formats are automatically generated, for example if you generate "png" which extends "svg" which extends "dot", the resulting generated files will be all aforementioned.

Members

Name Description
DOT Graphviz DOT Language.
SVG SVG generated using dot-wasm from {@link DiagramFormat.DOT} file.
PNG PNG generated using sharp from {@link DiagramFormat.SVG} file.

DOT

Graphviz DOT Language.


SVG

SVG generated using dot-wasm from {@link DiagramFormat.DOT} file.


PNG

PNG generated using sharp from {@link DiagramFormat.SVG} file.


GraphThemeRenderingIconTarget

Icon rendering target options for GraphTheme.

Members

Name Description
DATA Data icon (eg: EC2 instance type icon, T2).
RESOURCE Resource icon.
GENERAL General icon.
SERVICE Service icon.
CATEGORY Category icon.

DATA

Data icon (eg: EC2 instance type icon, T2).

Resolution precedence: data => resource => general => service => category


RESOURCE

Resource icon.

Resolution precedence: resource => general => service => category


GENERAL

General icon.

Resolution precedence: resource => general => service => category


SERVICE

Service icon.

Resolution precedence: service => category


CATEGORY

Category icon.

Resolution precedence: category



Last update: 2024-11-17