Interface ISecurityGroup
Interface for security group-like objects.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISecurityGroup : IResource, IPeer, IConnectable
Syntax (vb)
Public Interface ISecurityGroup
Inherits IResource, 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
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
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.