Table of Contents

Class DeploymentNode

Namespace
C4.Net
Assembly
C4.Net.Core.dll

Represents a deployment node, which is something like:

  • Physical infrastructure (e.g. a physical server or device)
  • Virtualised infrastructure (e.g. IaaS, PaaS, a virtual machine)
  • Containerised infrastructure (e.g. a Docker container)
  • Database server
  • Java EE web/application server
  • Microsoft IIS
  • etc
[DataContract]
public sealed class DeploymentNode : DeploymentElement
Inheritance
DeploymentNode
Inherited Members

Properties

CanonicalName

Gets the canonical name for this deployment node.

public override string CanonicalName { get; }

Property Value

string

Children

The set of child deployment nodes.

[DataMember(Name = "children", EmitDefaultValue = false)]
public ISet<DeploymentNode> Children { get; }

Property Value

ISet<DeploymentNode>

ContainerInstances

The set of container instances associated with this deployment node.

[DataMember(Name = "containerInstances", EmitDefaultValue = false)]
public ISet<ContainerInstance> ContainerInstances { get; }

Property Value

ISet<ContainerInstance>

InfrastructureNodes

The set of infrastructure nodes associated with this deployment node.

[DataMember(Name = "infrastructureNodes", EmitDefaultValue = false)]
public ISet<InfrastructureNode> InfrastructureNodes { get; }

Property Value

ISet<InfrastructureNode>

Instances

The number of identical instances represented by this deployment node.

[DataMember(Name = "instances", EmitDefaultValue = false)]
public int Instances { get; set; }

Property Value

int

Parent

The parent DeploymentNode, or null if there is no parent.

public override Element Parent { get; set; }

Property Value

Element

SoftwareSystemInstances

The set of software system instances associated with this deployment node.

[DataMember(Name = "softwareSystemInstances", EmitDefaultValue = false)]
public ISet<SoftwareSystemInstance> SoftwareSystemInstances { get; }

Property Value

ISet<SoftwareSystemInstance>

Technology

The technology or product represented by this deployment node.

[DataMember(Name = "technology", EmitDefaultValue = false)]
public string Technology { get; set; }

Property Value

string

Methods

Add(Container)

Adds a container instance to this deployment node, replicating relationships.

public ContainerInstance Add(Container container)

Parameters

container Container

the Container to add an instance of

Returns

ContainerInstance

a ContainerInstance object

Exceptions

ArgumentException

Thrown when container is null.

Add(Container, string)

Adds a container instance to this deployment node.

public ContainerInstance Add(Container container, string deploymentGroup)

Parameters

container Container

the Container to add an instance of

deploymentGroup string

the deployment group

Returns

ContainerInstance

a ContainerInstance object

Exceptions

ArgumentException

Thrown when container is null.

Add(SoftwareSystem)

Adds a software system instance to this deployment node, replicating relationships.

public SoftwareSystemInstance Add(SoftwareSystem softwareSystem)

Parameters

softwareSystem SoftwareSystem

the SoftwareSystem to add an instance of

Returns

SoftwareSystemInstance

a SoftwareSystemInstance object

Exceptions

ArgumentException

Thrown when softwareSystem is null.

Add(SoftwareSystem, string)

Adds a software system instance to this deployment node, optionally replicating relationships.

public SoftwareSystemInstance Add(SoftwareSystem softwareSystem, string deploymentGroup)

Parameters

softwareSystem SoftwareSystem

the SoftwareSystem to add an instance of

deploymentGroup string

the deployment group

Returns

SoftwareSystemInstance

a SoftwareSystemInstance object

Exceptions

ArgumentException

Thrown when softwareSystem is null.

AddDeploymentNode(string)

Adds a child deployment node.

public DeploymentNode AddDeploymentNode(string name)

Parameters

name string

the name of the deployment node

Returns

DeploymentNode

The created child deployment node.

AddDeploymentNode(string, string, string)

Adds a child deployment node.

public DeploymentNode AddDeploymentNode(string name, string description, string technology)

Parameters

name string

the name of the deployment node

description string

a short description

technology string

the technology

Returns

DeploymentNode

The created child deployment node.

AddDeploymentNode(string, string, string, int)

Adds a child deployment node.

public DeploymentNode AddDeploymentNode(string name, string description, string technology, int instances)

Parameters

name string

the name of the deployment node

description string

a short description

technology string

the technology

instances int

the number of instances

Returns

DeploymentNode

The created child deployment node.

AddDeploymentNode(string, string, string, int, Dictionary<string, string>)

Adds a child deployment node.

public DeploymentNode AddDeploymentNode(string name, string description, string technology, int instances, Dictionary<string, string> properties)

Parameters

name string

the name of the deployment node

description string

a short description

technology string

the technology

instances int

the number of instances

properties Dictionary<string, string>

a Dictionary (string,string) describing name=value properties

Returns

DeploymentNode

The created child deployment node.

Exceptions

ArgumentException

Thrown when name is blank or when a deployment or infrastructure node with the same name already exists.

AddInfrastructureNode(string)

Adds a child infrastructure node.

public InfrastructureNode AddInfrastructureNode(string name)

Parameters

name string

the name of the infrastructure node

Returns

InfrastructureNode

an InfrastructureNode object

AddInfrastructureNode(string, string, string)

Adds a child infrastructure node.

public InfrastructureNode AddInfrastructureNode(string name, string description, string technology)

Parameters

name string

the name of the infrastructure node

description string

a short description

technology string

the technology

Returns

InfrastructureNode

an InfrastructureNode object

AddInfrastructureNode(string, string, string, Dictionary<string, string>)

Adds a child infrastructure node.

public InfrastructureNode AddInfrastructureNode(string name, string description, string technology, Dictionary<string, string> properties)

Parameters

name string

the name of the infrastructure node

description string

a short description

technology string

the technology

properties Dictionary<string, string>

a Dictionary (string,string) describing name=value properties

Returns

InfrastructureNode

an InfrastructureNode object

Exceptions

ArgumentException

Thrown when name is blank or when a deployment or infrastructure node with the same name already exists.

GetDeploymentNodeWithName(string)

Gets the DeploymentNode with the specified name.

public DeploymentNode GetDeploymentNodeWithName(string name)

Parameters

name string

the name of the deployment node

Returns

DeploymentNode

the DeploymentNode instance with the specified name (or null if it doesn't exist)

Exceptions

ArgumentException

Thrown when name is null or empty.

GetInfrastructureNodeWithName(string)

Gets the InfrastructureNode with the specified name.

public InfrastructureNode GetInfrastructureNodeWithName(string name)

Parameters

name string

the name of the infrastructure node

Returns

InfrastructureNode

the InfrastructureNode instance with the specified name (or null if it doesn't exist)

Exceptions

ArgumentException

Thrown when name is null or empty.

GetRequiredTags()

Returns the tags that are always applied to deployment nodes.

public override List<string> GetRequiredTags()

Returns

List<string>

The required deployment node tags.

Uses(DeploymentNode, string, string)

Adds a relationship between this and another deployment node.

public Relationship Uses(DeploymentNode destination, string description, string technology)

Parameters

destination DeploymentNode

the destination DeploymentNode

description string

a short description of the relationship

technology string

the technology

Returns

Relationship

a Relationship object

Remarks

Deployment node relationships are created directly and do not use implied-relationship strategies.