Table of Contents

Class StaticStructureElementInstance

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

Represents a deployment instance of a SoftwareSystem or a Container, which can be added to a DeploymentNode.

[DataContract]
public abstract class StaticStructureElementInstance : DeploymentElement
Inheritance
StaticStructureElementInstance
Derived
Inherited Members

Properties

DeploymentGroup

The deployment group used to decide which instances have replicated relationships.

[DataMember(Name = "deploymentGroup", EmitDefaultValue = false)]
public string DeploymentGroup { get; }

Property Value

string

HealthChecks

The set of health checks associated with this container instance.

[DataMember(Name = "healthChecks", EmitDefaultValue = false)]
public ISet<HttpHealthCheck> HealthChecks { get; }

Property Value

ISet<HttpHealthCheck>

InstanceId

The one-based instance number for the underlying static element within the deployment environment.

[DataMember(Name = "instanceId", EmitDefaultValue = false)]
public int InstanceId { get; }

Property Value

int

Name

The name of the underlying static structure element.

public override string Name { get; }

Property Value

string

Methods

AddHealthCheck(string, string)

Adds a new health check, with the default interval (60 seconds) and timeout (0 milliseconds).

public HttpHealthCheck AddHealthCheck(string name, string url)

Parameters

name string

The name of the health check.

url string

The URL of the health check.

Returns

HttpHealthCheck

A HttpHealthCheck instance.

Exceptions

ArgumentException

Thrown when the name or URL is blank, or when the URL is not valid.

AddHealthCheck(string, string, int, long)

Adds a new health check.

public HttpHealthCheck AddHealthCheck(string name, string url, int interval, long timeout)

Parameters

name string

The name of the health check.

url string

The URL of the health check.

interval int

The polling interval, in seconds.

timeout long

The timeout, in milliseconds.

Returns

HttpHealthCheck

A HttpHealthCheck instance.

Exceptions

ArgumentException

Thrown when the name or URL is invalid, or when interval or timeout is negative.

GetRequiredTags()

Returns the required tags for this instance type.

public override List<string> GetRequiredTags()

Returns

List<string>

An empty list because instance-specific required tags are supplied by derived types.

RemoveTag(string)

Prevents removal of tags inherited from the underlying static structure element.

public override void RemoveTag(string tag)

Parameters

tag string

The tag to remove.

Uses(InfrastructureNode, string, string)

Adds a relationship between this element instance and an infrastructure node.

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

Parameters

destination InfrastructureNode

the destination InfrastructureNode

description string

a short description of the relationship

technology string

the technology

Returns

Relationship

a Relationship object

Uses(InfrastructureNode, string, string, InteractionStyle?)

Adds a relationship between this element instance and an infrastructure node.

public Relationship Uses(InfrastructureNode destination, string description, string technology, InteractionStyle? interactionStyle)

Parameters

destination InfrastructureNode

the destination InfrastructureNode

description string

a short description of the relationship

technology string

the technology

interactionStyle InteractionStyle?

the interaction style (Synchronous vs Asynchronous)

Returns

Relationship

a Relationship object

getElement()

Returns the static structure element represented by this deployment instance.

public abstract StaticStructureElement getElement()

Returns

StaticStructureElement

The underlying static structure element.