Class CfnSecurityGroupEgress
- All Implemented Interfaces:
IInspectable,ISecurityGroupEgressRef,IEnvironmentAware,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 address range, the IP addresses that are specified by a prefix list, or the instances that are associated with a destination security group. For more information, see Security group rules .
You must specify exactly one of the following destinations: an IPv4 address range, an IPv6 address range, a prefix list, or a security group.
You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP/ICMPv6 type and code. To specify all types or all codes, use -1.
Rule changes are propagated to instances associated with the security group as quickly as possible. However, a small delay might occur.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnSecurityGroupEgress cfnSecurityGroupEgress = CfnSecurityGroupEgress.Builder.create(this, "MyCfnSecurityGroupEgress")
.groupId("groupId")
.ipProtocol("ipProtocol")
// the properties below are optional
.cidrIp("cidrIp")
.cidrIpv6("cidrIpv6")
.description("description")
.destinationPrefixListId("destinationPrefixListId")
.destinationSecurityGroupId("destinationSecurityGroupId")
.fromPort(123)
.toPort(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.ec2.ISecurityGroupEgressRef
ISecurityGroupEgressRef.Jsii$Default, ISecurityGroupEgressRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnSecurityGroupEgress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnSecurityGroupEgress(software.amazon.jsii.JsiiObjectRef objRef) CfnSecurityGroupEgress(software.constructs.Construct scope, String id, CfnSecurityGroupEgressProps props) Create a newAWS::EC2::SecurityGroupEgress. -
Method Summary
Modifier and TypeMethodDescriptionThe IPv4 address range, in CIDR format.The IPv6 address range, in CIDR format.The description of an egress (outbound) security group rule.The prefix list IDs for an AWS service.The ID of the security group.If the protocol is TCP or UDP, this is the start of the port range.The ID of the security group.A reference to a SecurityGroupEgress resource.If the protocol is TCP or UDP, this is the end of the port range.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnSecurityGroupEgress.renderProperties(Map<String, Object> props) voidThe IPv4 address range, in CIDR format.voidsetCidrIpv6(String value) The IPv6 address range, in CIDR format.voidsetDescription(String value) The description of an egress (outbound) security group rule.voidsetDestinationPrefixListId(String value) The prefix list IDs for an AWS service.voidThe ID of the security group.voidsetFromPort(Number value) If the protocol is TCP or UDP, this is the start of the port range.voidsetGroupId(String value) The ID of the security group.voidsetIpProtocol(String value) voidIf the protocol is TCP or UDP, this is the end of the port range.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSecurityGroupEgress
protected CfnSecurityGroupEgress(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSecurityGroupEgress
protected CfnSecurityGroupEgress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSecurityGroupEgress
@Stability(Stable) public CfnSecurityGroupEgress(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSecurityGroupEgressProps props) Create a newAWS::EC2::SecurityGroupEgress.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
isCfnSecurityGroupEgress
Checks whether the given object is a CfnSecurityGroupEgress.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getSecurityGroupEgressRef
A reference to a SecurityGroupEgress resource.- Specified by:
getSecurityGroupEgressRefin interfaceISecurityGroupEgressRef
-
getGroupId
The ID of the security group. -
setGroupId
The ID of the security group. -
getIpProtocol
-
setIpProtocol
-
getCidrIp
The IPv4 address range, in CIDR format. -
setCidrIp
The IPv4 address range, in CIDR format. -
getCidrIpv6
The IPv6 address range, in CIDR format. -
setCidrIpv6
The IPv6 address range, in CIDR format. -
getDescription
The description of an egress (outbound) security group rule. -
setDescription
The description of an egress (outbound) security group rule. -
getDestinationPrefixListId
The prefix list IDs for an AWS service. -
setDestinationPrefixListId
The prefix list IDs for an AWS service. -
getDestinationSecurityGroupId
The ID of the security group. -
setDestinationSecurityGroupId
The ID of the security group. -
getFromPort
If the protocol is TCP or UDP, this is the start of the port range. -
setFromPort
If the protocol is TCP or UDP, this is the start of the port range. -
getToPort
If the protocol is TCP or UDP, this is the end of the port range. -
setToPort
If the protocol is TCP or UDP, this is the end of the port range.
-