Show / Hide Table of Contents

Class Connections_

Manage the allowed network connections for constructs with Security Groups.

Inheritance
System.Object
Connections_
Implements
IConnectable
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class Connections_ : DeputyBase, IConnectable
Syntax (vb)
Public Class Connections_
    Inherits DeputyBase
    Implements IConnectable
Remarks

Security Groups can be thought of as a firewall for network-connected devices. This class makes it easy to allow network connections to and from security groups, and between security groups individually. When establishing connectivity between security groups, it will automatically add rules in both security groups

This object can manage one or more security groups.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

IPeer peer;
Port port;
SecurityGroup securityGroup;

var connections = new Connections(new ConnectionsProps {
    DefaultPort = port,
    Peer = peer,
    SecurityGroups = new [] { securityGroup }
});

Synopsis

Constructors

Connections_(IConnectionsProps)
Connections_(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

Connections_(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Properties

Connections

The network connections associated with this resource.

DefaultPort

The default port configured for this connection peer, if available.

SecurityGroups

Methods

AddSecurityGroup(ISecurityGroup[])

Add a security group to the list of security groups managed by this object.

AllowDefaultPortFrom(IConnectable, String)

Allow connections from the peer on our default port.

AllowDefaultPortFromAnyIpv4(String)

Allow default connections from all IPv4 ranges.

AllowDefaultPortInternally(String)

Allow hosts inside the security group to connect to each other.

AllowDefaultPortTo(IConnectable, String)

Allow connections from the peer on our default port.

AllowFrom(IConnectable, Port, String)

Allow connections from the peer on the given port.

AllowFromAnyIpv4(Port, String)

Allow from any IPv4 ranges.

AllowInternally(Port, String)

Allow hosts inside the security group to connect to each other on the given port.

AllowTo(IConnectable, Port, String)

Allow connections to the peer on the given port.

AllowToAnyIpv4(Port, String)

Allow to all IPv4 ranges.

AllowToDefaultPort(IConnectable, String)

Allow connections to the security group on their default port.

Constructors

Connections_(IConnectionsProps)

public Connections_(IConnectionsProps props = null)
Parameters
props IConnectionsProps

Connections_(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected Connections_(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

Connections_(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected Connections_(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Properties

Connections

The network connections associated with this resource.

public virtual Connections_ Connections { get; }
Property Value

Connections_

DefaultPort

The default port configured for this connection peer, if available.

public virtual Port DefaultPort { get; }
Property Value

Port

SecurityGroups

public virtual ISecurityGroup[] SecurityGroups { get; }
Property Value

ISecurityGroup[]

Methods

AddSecurityGroup(ISecurityGroup[])

Add a security group to the list of security groups managed by this object.

public virtual void AddSecurityGroup(params ISecurityGroup[] securityGroups)
Parameters
securityGroups ISecurityGroup[]

AllowDefaultPortFrom(IConnectable, String)

Allow connections from the peer on our default port.

public virtual void AllowDefaultPortFrom(IConnectable other, string description = null)
Parameters
other IConnectable
description System.String
Remarks

Even if the peer has a default port, we will always use our default port.

AllowDefaultPortFromAnyIpv4(String)

Allow default connections from all IPv4 ranges.

public virtual void AllowDefaultPortFromAnyIpv4(string description = null)
Parameters
description System.String

AllowDefaultPortInternally(String)

Allow hosts inside the security group to connect to each other.

public virtual void AllowDefaultPortInternally(string description = null)
Parameters
description System.String

AllowDefaultPortTo(IConnectable, String)

Allow connections from the peer on our default port.

public virtual void AllowDefaultPortTo(IConnectable other, string description = null)
Parameters
other IConnectable
description System.String
Remarks

Even if the peer has a default port, we will always use our default port.

AllowFrom(IConnectable, Port, String)

Allow connections from the peer on the given port.

public virtual void AllowFrom(IConnectable other, Port portRange, string description = null)
Parameters
other IConnectable
portRange Port
description System.String

AllowFromAnyIpv4(Port, String)

Allow from any IPv4 ranges.

public virtual void AllowFromAnyIpv4(Port portRange, string description = null)
Parameters
portRange Port
description System.String

AllowInternally(Port, String)

Allow hosts inside the security group to connect to each other on the given port.

public virtual void AllowInternally(Port portRange, string description = null)
Parameters
portRange Port
description System.String

AllowTo(IConnectable, Port, String)

Allow connections to the peer on the given port.

public virtual void AllowTo(IConnectable other, Port portRange, string description = null)
Parameters
other IConnectable
portRange Port
description System.String

AllowToAnyIpv4(Port, String)

Allow to all IPv4 ranges.

public virtual void AllowToAnyIpv4(Port portRange, string description = null)
Parameters
portRange Port
description System.String

AllowToDefaultPort(IConnectable, String)

Allow connections to the security group on their default port.

public virtual void AllowToDefaultPort(IConnectable other, string description = null)
Parameters
other IConnectable
description System.String

Implements

IConnectable
Back to top Generated by DocFX