Class CfnSecurityGroupEgress
Adds the specified outbound (egress) rule to a security group.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSecurityGroupEgress : CfnResource, IInspectable
Syntax (vb)
Public Class CfnSecurityGroupEgress
Inherits CfnResource
Implements IInspectable
Remarks
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.
CloudformationResource: AWS::EC2::SecurityGroupEgress
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnSecurityGroupEgress = new CfnSecurityGroupEgress(this, "MyCfnSecurityGroupEgress", new CfnSecurityGroupEgressProps {
GroupId = "groupId",
IpProtocol = "ipProtocol",
// the properties below are optional
CidrIp = "cidrIp",
CidrIpv6 = "cidrIpv6",
Description = "description",
DestinationPrefixListId = "destinationPrefixListId",
DestinationSecurityGroupId = "destinationSecurityGroupId",
FromPort = 123,
ToPort = 123
});
Synopsis
Constructors
CfnSecurityGroupEgress(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSecurityGroupEgress(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnSecurityGroupEgress(Construct, String, ICfnSecurityGroupEgressProps) |
Properties
AttrId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CidrIp | The IPv4 address range, in CIDR format. |
CidrIpv6 | The IPv6 address range, in CIDR format. |
Description | The description of an egress (outbound) security group rule. |
DestinationPrefixListId | The prefix list IDs for an AWS service. |
DestinationSecurityGroupId | The ID of the security group. |
FromPort | If the protocol is TCP or UDP, this is the start of the port range. |
GroupId | The ID of the security group. |
IpProtocol | The IP protocol name ( |
ToPort | If the protocol is TCP or UDP, this is the end of the port range. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSecurityGroupEgress(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSecurityGroupEgress(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSecurityGroupEgress(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSecurityGroupEgress(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnSecurityGroupEgress(Construct, String, ICfnSecurityGroupEgressProps)
public CfnSecurityGroupEgress(Construct scope, string id, ICfnSecurityGroupEgressProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnSecurityGroupEgressProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CidrIp
The IPv4 address range, in CIDR format.
public virtual string CidrIp { get; set; }
Property Value
System.String
CidrIpv6
The IPv6 address range, in CIDR format.
public virtual string CidrIpv6 { get; set; }
Property Value
System.String
Description
The description of an egress (outbound) security group rule.
public virtual string Description { get; set; }
Property Value
System.String
DestinationPrefixListId
The prefix list IDs for an AWS service.
public virtual string DestinationPrefixListId { get; set; }
Property Value
System.String
DestinationSecurityGroupId
The ID of the security group.
public virtual string DestinationSecurityGroupId { get; set; }
Property Value
System.String
FromPort
If the protocol is TCP or UDP, this is the start of the port range.
public virtual Nullable<double> FromPort { get; set; }
Property Value
System.Nullable<System.Double>
GroupId
The ID of the security group.
public virtual string GroupId { get; set; }
Property Value
System.String
IpProtocol
The IP protocol name ( tcp
, udp
, icmp
, icmpv6
) or number (see Protocol Numbers ).
public virtual string IpProtocol { get; set; }
Property Value
System.String
ToPort
If the protocol is TCP or UDP, this is the end of the port range.
public virtual Nullable<double> ToPort { get; set; }
Property Value
System.Nullable<System.Double>
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>