Show / Hide Table of Contents

Interface ISecurityGroup

Interface for security group-like objects.

Inherited Members
IResource.Env
IResource.Stack
IConstruct.Node
IPeer.ToEgressRuleConfig()
IPeer.ToIngressRuleConfig()
IPeer.CanInlineRule
IPeer.UniqueId
IConnectable.Connections
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public interface ISecurityGroup : IResource, IConstruct, IConstruct, IDependable, IPeer, IConnectable
Syntax (vb)
Public Interface ISecurityGroup
    Inherits IResource, IConstruct, IConstruct, IDependable, IPeer, IConnectable

Synopsis

Properties

AllowAllOutbound

Whether the SecurityGroup has been configured to allow all outbound traffic.

SecurityGroupId

ID for the current security group.

Methods

AddEgressRule(IPeer, Port, String, Nullable<Boolean>)

Add an egress rule for the current security group.

AddIngressRule(IPeer, Port, String, Nullable<Boolean>)

Add an ingress rule for the current security group.

Properties

AllowAllOutbound

Whether the SecurityGroup has been configured to allow all outbound traffic.

bool AllowAllOutbound { get; }
Property Value

System.Boolean

SecurityGroupId

ID for the current security group.

string SecurityGroupId { get; }
Property Value

System.String

Remarks

Attribute: true

Methods

AddEgressRule(IPeer, Port, String, Nullable<Boolean>)

Add an egress rule for the current security group.

void AddEgressRule(IPeer peer, Port connection, string description = null, Nullable<bool> remoteRule = null)
Parameters
peer IPeer
connection Port
description System.String
remoteRule System.Nullable<System.Boolean>
Remarks

remoteRule controls where the Rule object is created if the peer is also a securityGroup and they are in different stack. If false (default) the rule object is created under the current SecurityGroup object. If true and the peer is also a SecurityGroup, the rule object is created under the remote SecurityGroup object.

AddIngressRule(IPeer, Port, String, Nullable<Boolean>)

Add an ingress rule for the current security group.

void AddIngressRule(IPeer peer, Port connection, string description = null, Nullable<bool> remoteRule = null)
Parameters
peer IPeer
connection Port
description System.String
remoteRule System.Nullable<System.Boolean>
Remarks

remoteRule controls where the Rule object is created if the peer is also a securityGroup and they are in different stack. If false (default) the rule object is created under the current SecurityGroup object. If true and the peer is also a SecurityGroup, the rule object is created under the remote SecurityGroup object.

Back to top Generated by DocFX