Class CfnSecurityGroupEgress
- All Implemented Interfaces:
IInspectable
,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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnSecurityGroupEgress
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnSecurityGroupEgress
(software.amazon.jsii.JsiiObjectRef objRef) CfnSecurityGroupEgress
(software.constructs.Construct scope, String id, CfnSecurityGroupEgressProps props) -
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.If the protocol is TCP or UDP, this is the end of the port range.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The IPv4 address range, in CIDR format.void
setCidrIpv6
(String value) The IPv6 address range, in CIDR format.void
setDescription
(String value) The description of an egress (outbound) security group rule.void
setDestinationPrefixListId
(String value) The prefix list IDs for an AWS service.void
The ID of the security group.void
setFromPort
(Number value) If the protocol is TCP or UDP, this is the start of the port range.void
setGroupId
(String value) The ID of the security group.void
setIpProtocol
(String value) void
If 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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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) - 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
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.
-