@Stability(value=Stable) public static final class SecurityGroup.Builder extends Object implements software.amazon.jsii.Builder<SecurityGroup>
SecurityGroup.| Modifier and Type | Method and Description |
|---|---|
SecurityGroup.Builder |
allowAllOutbound(Boolean allowAllOutbound)
Whether to allow all outbound traffic by default.
|
SecurityGroup |
build() |
static SecurityGroup.Builder |
create(software.constructs.Construct scope,
String id) |
SecurityGroup.Builder |
description(String description)
A description of the security group.
|
SecurityGroup.Builder |
disableInlineRules(Boolean disableInlineRules)
Whether to disable inline ingress and egress rule optimization.
|
SecurityGroup.Builder |
securityGroupName(String securityGroupName)
The name of the security group.
|
SecurityGroup.Builder |
vpc(IVpc vpc)
The VPC in which to create the security group.
|
@Stability(value=Stable) public static SecurityGroup.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.SecurityGroup.Builder.@Stability(value=Stable) public SecurityGroup.Builder vpc(IVpc vpc)
vpc - The VPC in which to create the security group. This parameter is required.this@Stability(value=Stable) public SecurityGroup.Builder allowAllOutbound(Boolean allowAllOutbound)
If this is set to true, there will only be a single egress rule which allows all outbound traffic. If this is set to false, no outbound traffic will be allowed by default and all egress traffic must be explicitly authorized.
Default: true
allowAllOutbound - Whether to allow all outbound traffic by default. This parameter is required.this@Stability(value=Stable) public SecurityGroup.Builder description(String description)
Default: The default name will be the construct's CDK path.
description - A description of the security group. This parameter is required.this@Stability(value=Stable) public SecurityGroup.Builder disableInlineRules(Boolean disableInlineRules)
If this is set to true, ingress and egress rules will not be declared under the SecurityGroup in cloudformation, but will be separate elements.
Inlining rules is an optimization for producing smaller stack templates. Sometimes this is not desirable, for example when security group access is managed via tags.
The default value can be overriden globally by setting the context variable '@aws-cdk/aws-ec2.securityGroupDisableInlineRules'.
Default: false
disableInlineRules - Whether to disable inline ingress and egress rule optimization. This parameter is required.this@Stability(value=Stable) public SecurityGroup.Builder securityGroupName(String securityGroupName)
For valid values, see the GroupName parameter of the CreateSecurityGroup action in the Amazon EC2 API Reference.
It is not recommended to use an explicit group name.
Default: If you don't specify a GroupName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.
securityGroupName - The name of the security group. This parameter is required.this@Stability(value=Stable) public SecurityGroup build()
build in interface software.amazon.jsii.Builder<SecurityGroup>Copyright © 2022. All rights reserved.