Interface ISecurityGroup
- All Superinterfaces:
IConnectable,software.constructs.IConstruct,software.constructs.IDependable,IEnvironmentAware,IPeer,IResource,ISecurityGroupRef,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ISecurityGroup.Jsii$Default
- All Known Implementing Classes:
ISecurityGroup.Jsii$Proxy,SecurityGroup
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forISecurityGroup.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEgressRule(IPeer peer, Port connection) Add an egress rule for the current security group.voidaddEgressRule(IPeer peer, Port connection, String description) Add an egress rule for the current security group.voidaddEgressRule(IPeer peer, Port connection, String description, Boolean remoteRule) Add an egress rule for the current security group.voidaddIngressRule(IPeer peer, Port connection) Add an ingress rule for the current security group.voidaddIngressRule(IPeer peer, Port connection, String description) Add an ingress rule for the current security group.voidaddIngressRule(IPeer peer, Port connection, String description, Boolean remoteRule) Add an ingress rule for the current security group.Whether the SecurityGroup has been configured to allow all outbound traffic.getEnv()The environment this resource belongs to.software.constructs.NodegetNode()The tree node.ID for the current security group.Methods inherited from interface software.amazon.awscdk.services.ec2.IConnectable
getConnectionsMethods inherited from interface software.amazon.awscdk.services.ec2.IPeer
getCanInlineRule, getUniqueId, toEgressRuleConfig, toIngressRuleConfigMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.ec2.ISecurityGroupRef
getSecurityGroupRefMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowAllOutbound
Whether the SecurityGroup has been configured to allow all outbound traffic. -
getSecurityGroupId
ID for the current security group. -
addEgressRule
@Stability(Stable) void addEgressRule(@NotNull IPeer peer, @NotNull Port connection, @Nullable String description, @Nullable Boolean remoteRule) Add an egress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.description-remoteRule-
-
addEgressRule
@Stability(Stable) void addEgressRule(@NotNull IPeer peer, @NotNull Port connection, @Nullable String description) Add an egress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.description-
-
addEgressRule
Add an egress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.
-
addIngressRule
@Stability(Stable) void addIngressRule(@NotNull IPeer peer, @NotNull Port connection, @Nullable String description, @Nullable Boolean remoteRule) Add an ingress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.description-remoteRule-
-
addIngressRule
@Stability(Stable) void addIngressRule(@NotNull IPeer peer, @NotNull Port connection, @Nullable String description) Add an ingress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.description-
-
addIngressRule
Add an ingress rule for the current security group.remoteRulecontrols 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.- Parameters:
peer- This parameter is required.connection- This parameter is required.
-
getNode
@Stability(Stable) @NotNull software.constructs.Node getNode()The tree node.- Specified by:
getNodein interfacesoftware.constructs.IConstruct
-
getEnv
The environment this resource belongs to.For resources that are created and managed in a Stack (those created by creating new class instances like
new Role(),new Bucket(), etc.), this is always the same as the environment of the stack they belong to.For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(),Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.- Specified by:
getEnvin interfaceIEnvironmentAware
-