Show / Hide Table of Contents

Class Connections_

Manage the allowed network connections for constructs with Security Groups.

Inheritance
object
Connections_
Implements
IConnectable
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.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?)

Manage the allowed network connections for constructs with Security Groups.

Properties

Connections

The network connections associated with this resource.

DefaultPort

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

SecurityGroups

Manage the allowed network connections for constructs with Security Groups.

Methods

AddSecurityGroup(params 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?)

Manage the allowed network connections for constructs with Security Groups.

public Connections_(IConnectionsProps? props = null)
Parameters
props IConnectionsProps
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 }
             });

Properties

Connections

The network connections associated with this resource.

public virtual Connections_ Connections { get; }
Property Value

Connections_

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

DefaultPort

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

public virtual Port? DefaultPort { get; }
Property Value

Port

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

SecurityGroups

Manage the allowed network connections for constructs with Security Groups.

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

ISecurityGroup[]

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 }
             });

Methods

AddSecurityGroup(params 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[]
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

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 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 string
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

AllowDefaultPortInternally(string?)

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

public virtual void AllowDefaultPortInternally(string? description = null)
Parameters
description string
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

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 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 string
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

AllowFromAnyIpv4(Port, string?)

Allow from any IPv4 ranges.

public virtual void AllowFromAnyIpv4(Port portRange, string? description = null)
Parameters
portRange Port
description string
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

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 string
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

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 string
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

AllowToAnyIpv4(Port, string?)

Allow to all IPv4 ranges.

public virtual void AllowToAnyIpv4(Port portRange, string? description = null)
Parameters
portRange Port
description string
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

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 string
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

Implements

IConnectable
Back to top Generated by DocFX