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.Map |
No description. |
preset |
software.aws.pdk.cdk_graph_plugin_diagram.FilterPreset |
No description. |
theme |
IGraphThemeConfigAlt OR java.lang.String |
No description. |
title
Required
public java.lang.String getTitle();
- Type: java.lang.String
nodePositions
Optional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
- Type: java.util.Map
INodePosition\>
preset
Optional
public FilterPreset getPreset();
- Type: software.aws.pdk.cdk_graph_plugin_diagram.FilterPreset
theme
Optional
public java.lang.Object getTheme();
- Type: IGraphThemeConfigAlt OR java.lang.String
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.Map |
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. |
filterPlan
Optional
public IGraphFilterPlan getFilterPlan();
- Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan
Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.
format
Optional
public java.lang.Object getFormat();
- Type: DiagramFormat OR java.util.List<DiagramFormat>
- Default:
DiagramFormat.PNG
- which will through extension also generateDiagramFormat.SVG
andDiagramFormat.DOT
The output format(s) to generated.
nodePositions
Optional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
- Type: java.util.Map
INodePosition\>
Config for predetermined node positions given their CDK construct id.
theme
Optional
public java.lang.Object getTheme();
- Type: IGraphThemeConfigAlt OR java.lang.String
Config for graph theme.
name
Required
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.
title
Required
public java.lang.String getTitle();
- Type: java.lang.String
The title of the diagram.
ignoreDefaults
Optional
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.Map |
Config for predetermined node positions given their CDK construct id. |
theme |
IGraphThemeConfigAlt OR java.lang.String |
Config for graph theme. |
filterPlan
Optional
public IGraphFilterPlan getFilterPlan();
- Type: software.aws.pdk.cdk_graph_plugin_diagram.IGraphFilterPlan
Graph {@link IGraphFilterPlanFilter Plan} used to generate a unique diagram.
format
Optional
public java.lang.Object getFormat();
- Type: DiagramFormat OR java.util.List<DiagramFormat>
- Default:
DiagramFormat.PNG
- which will through extension also generateDiagramFormat.SVG
andDiagramFormat.DOT
The output format(s) to generated.
nodePositions
Optional
public java.util.Map<java.lang.String, INodePosition> getNodePositions();
- Type: java.util.Map
INodePosition\>
Config for predetermined node positions given their CDK construct id.
theme
Optional
public java.lang.Object getTheme();
- Type: IGraphThemeConfigAlt OR java.lang.String
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. |
defaults
Optional
public IDiagramConfigBase getDefaults();
- Type: IDiagramConfigBase
Default configuration to apply to all diagrams.
diagrams
Optional
public java.util.List<IDiagramConfig> getDiagrams();
- Type: java.util.List<IDiagramConfig>
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. |
defaults
Optional
- Type: IDiagramConfigBase
Default configuration to apply to all diagrams.
diagrams
Optional
- Type: java.util.List<IDiagramConfig>
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.
name
Required
- Type: java.lang.String
format
Required
- Type: DiagramFormat
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.
name
Required
- Type: java.lang.String
format
Required
- Type: DiagramFormat
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.
name
Required
- Type: java.lang.String
format
Required
- Type: DiagramFormat
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. |
config
Required
public IPluginConfig getConfig();
- Type: IPluginConfig
Get diagram plugin config.
id
Required
public java.lang.String getId();
- Type: java.lang.String
Unique identifier for this plugin.
version
Required
public java.lang.String getVersion();
- Type: java.lang.String
Plugin version.
defaultDotArtifact
Optional
public CdkGraphArtifact getDefaultDotArtifact();
- Type: software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact
Get default dot artifact.
defaultPngArtifact
Optional
public CdkGraphArtifact getDefaultPngArtifact();
- Type: software.aws.pdk.cdk_graph_plugin_diagram.CdkGraphArtifact
Get default PNG artifact.
dependencies
Optional
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"]).
bind
Required
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.
report
Optional
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_NS
Required
public java.lang.String getArtifactNs();
- Type: java.lang.String
Namespace for artifacts of the diagram plugin.
ID
Required
public java.lang.String getId();
- Type: java.lang.String
Fixed id of the diagram plugin.
VERSION
Required
public java.lang.String getVersion();
- Type: java.lang.String
Current semantic version of the diagram plugin.
Protocols
IGraphThemeConfigAlt
- Implemented By: IGraphThemeConfigAlt
GraphThemeConfigAlt is simplified definition of theme to apply.
Properties
Name | Type | Description |
---|---|---|
rendering |
IGraphThemeRendering |
No description. |
theme |
java.lang.String |
No description. |
rendering
Optional
public IGraphThemeRendering getRendering();
- Type: IGraphThemeRendering
theme
Optional
public java.lang.String getTheme();
- Type: java.lang.String
IGraphThemeRendering
-
Extends: IGraphThemeRenderingIconProps, IGraphThemeRenderingOptions
-
Implemented By: 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. |
cfnResourceIconMax
Optional
public GraphThemeRenderingIconTarget getCfnResourceIconMax();
Highest Graph.CfnResourceNode icon to render.
cfnResourceIconMin
Optional
public GraphThemeRenderingIconTarget getCfnResourceIconMin();
Lowest Graph.CfnResourceNode icon to render.
resourceIconMax
Optional
public GraphThemeRenderingIconTarget getResourceIconMax();
Highest Graph.ResourceNode icon to render.
resourceIconMin
Optional
public GraphThemeRenderingIconTarget getResourceIconMin();
Lowest Graph.ResourceNode icon to render.
layout
Optional
public java.lang.String getLayout();
- Type: java.lang.String
- Default: horizontal
Layout direction of the graph.
stack
Optional
public java.lang.String getStack();
- Type: java.lang.String
- Default: undefined Will render all stacks
Specify regex pattern to match root stacks to render.
stage
Optional
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.
unconstrainedCrossClusterEdges
Optional
public java.lang.Boolean getUnconstrainedCrossClusterEdges();
- Type: java.lang.Boolean
- Default: false
Prevent cross-cluster edges from ranking nodes in layout.
IGraphThemeRenderingIconProps
- Implemented By: IGraphThemeRendering, 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. |
cfnResourceIconMax
Optional
public GraphThemeRenderingIconTarget getCfnResourceIconMax();
Highest Graph.CfnResourceNode icon to render.
cfnResourceIconMin
Optional
public GraphThemeRenderingIconTarget getCfnResourceIconMin();
Lowest Graph.CfnResourceNode icon to render.
resourceIconMax
Optional
public GraphThemeRenderingIconTarget getResourceIconMax();
Highest Graph.ResourceNode icon to render.
resourceIconMin
Optional
public GraphThemeRenderingIconTarget getResourceIconMin();
Lowest Graph.ResourceNode icon to render.
IGraphThemeRenderingOptions
- Implemented By: IGraphThemeRendering, 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. |
layout
Optional
public java.lang.String getLayout();
- Type: java.lang.String
- Default: horizontal
Layout direction of the graph.
stack
Optional
public java.lang.String getStack();
- Type: java.lang.String
- Default: undefined Will render all stacks
Specify regex pattern to match root stacks to render.
stage
Optional
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.
unconstrainedCrossClusterEdges
Optional
public java.lang.Boolean getUnconstrainedCrossClusterEdges();
- Type: java.lang.Boolean
- Default: false
Prevent cross-cluster edges from ranking nodes in layout.
INodePosition
- Implemented By: INodePosition
Positional coordinates for a node in inches.
Properties
Name | Type | Description |
---|---|---|
x |
java.lang.Number |
No description. |
y |
java.lang.Number |
No description. |
x
Required
public java.lang.Number getX();
- Type: java.lang.Number
y
Required
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