aws-cdk-lib.aws_ec2.RuleScope

interface RuleScope

LanguageType name
.NETAmazon.CDK.AWS.EC2.RuleScope
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#RuleScope
Javasoftware.amazon.awscdk.services.ec2.RuleScope
Pythonaws_cdk.aws_ec2.RuleScope
TypeScript (source)aws-cdk-lib » aws_ec2 » RuleScope

Obtainable from SecurityGroup.determineRuleScope()

The scope and id in which a given SecurityGroup rule should be defined.

Example

// 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';

declare const securityGroup: ec2.SecurityGroup;
const ruleScope: ec2.RuleScope = {
  id: 'id',
  scope: securityGroup,
};

Properties

NameTypeDescription
idstringThe construct ID to use for the rule.
scopeISecurityGroupThe SecurityGroup in which a rule should be scoped.

id

Type: string

The construct ID to use for the rule.


scope

Type: ISecurityGroup

The SecurityGroup in which a rule should be scoped.