Skip to content
v2.276.0

AnalysisSecurityGroupRuleProperty Struct ​

Describes a security group rule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const analysisSecurityGroupRuleProperty: ec2.CfnNetworkInsightsAnalysis.AnalysisSecurityGroupRuleProperty = {
  cidr: 'cidr',
  direction: 'direction',
  portRange: {
    from: 123,
    to: 123,
  },
  prefixListId: 'prefixListId',
  protocol: 'protocol',
  securityGroupId: 'securityGroupId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

analysis_security_group_rule_property = ec2.CfnNetworkInsightsAnalysis.AnalysisSecurityGroupRuleProperty(
    cidr="cidr",
    direction="direction",
    port_range=ec2.CfnNetworkInsightsAnalysis.PortRangeProperty(
        from=123,
        to=123
    ),
    prefix_list_id="prefixListId",
    protocol="protocol",
    security_group_id="securityGroupId"
)
java
// 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.*;

AnalysisSecurityGroupRuleProperty analysisSecurityGroupRuleProperty = AnalysisSecurityGroupRuleProperty.builder()
        .cidr("cidr")
        .direction("direction")
        .portRange(PortRangeProperty.builder()
                .from(123)
                .to(123)
                .build())
        .prefixListId("prefixListId")
        .protocol("protocol")
        .securityGroupId("securityGroupId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 analysisSecurityGroupRuleProperty = new AnalysisSecurityGroupRuleProperty {
    Cidr = "cidr",
    Direction = "direction",
    PortRange = new PortRangeProperty {
        From = 123,
        To = 123
    },
    PrefixListId = "prefixListId",
    Protocol = "protocol",
    SecurityGroupId = "securityGroupId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

analysisSecurityGroupRuleProperty := &AnalysisSecurityGroupRuleProperty{
	Cidr: jsii.String("cidr"),
	Direction: jsii.String("direction"),
	PortRange: &PortRangeProperty{
		From: jsii.Number(123),
		To: jsii.Number(123),
	},
	PrefixListId: jsii.String("prefixListId"),
	Protocol: jsii.String("protocol"),
	SecurityGroupId: jsii.String("securityGroupId"),
}

Properties ​

cidroptionalstringcidroptionalstrcidroptionalStringCidroptionalstringCidroptional*string#
The IPv4 address range, in CIDR notation.
directionoptionalstringdirectionoptionalstrdirectionoptionalStringDirectionoptionalstringDirectionoptional*string#
The direction. The following are the possible values:.
  • egress
  • ingress
portRangeoptionalIResolvable | CfnNetworkInsightsAnalysis.PortRangePropertyport_rangeoptionaltyping.Union[IResolvable, PortRangeProperty]portRangeoptionalIResolvablePortRangeoptionalIResolvablePortRangeoptionalinterface{}#
The port range.
prefixListIdoptionalstringprefix_list_idoptionalstrprefixListIdoptionalStringPrefixListIdoptionalstringPrefixListIdoptional*string#
The prefix list ID.
protocoloptionalstringprotocoloptionalstrprotocoloptionalStringProtocoloptionalstringProtocoloptional*string#
The protocol name.
securityGroupIdoptionalstringsecurity_group_idoptionalstrsecurityGroupIdoptionalStringSecurityGroupIdoptionalstringSecurityGroupIdoptional*string#
The security group ID.