@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.300Z") @Stability(value=Stable) public interface CfnSecurityGroupProps extends software.amazon.jsii.JsiiSerializable
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.*;
CfnSecurityGroupProps cfnSecurityGroupProps = CfnSecurityGroupProps.builder()
.groupDescription("groupDescription")
// the properties below are optional
.groupName("groupName")
.securityGroupEgress(List.of(EgressProperty.builder()
.ipProtocol("ipProtocol")
// the properties below are optional
.cidrIp("cidrIp")
.cidrIpv6("cidrIpv6")
.description("description")
.destinationPrefixListId("destinationPrefixListId")
.destinationSecurityGroupId("destinationSecurityGroupId")
.fromPort(123)
.toPort(123)
.build()))
.securityGroupIngress(List.of(IngressProperty.builder()
.ipProtocol("ipProtocol")
// the properties below are optional
.cidrIp("cidrIp")
.cidrIpv6("cidrIpv6")
.description("description")
.fromPort(123)
.sourcePrefixListId("sourcePrefixListId")
.sourceSecurityGroupId("sourceSecurityGroupId")
.sourceSecurityGroupName("sourceSecurityGroupName")
.sourceSecurityGroupOwnerId("sourceSecurityGroupOwnerId")
.toPort(123)
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcId("vpcId")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnSecurityGroupProps.Builder
A builder for
CfnSecurityGroupProps |
static class |
CfnSecurityGroupProps.Jsii$Proxy
An implementation for
CfnSecurityGroupProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnSecurityGroupProps.Builder |
builder() |
String |
getGroupDescription()
A description for the security group.
|
default String |
getGroupName()
The name of the security group.
|
default Object |
getSecurityGroupEgress()
[VPC only] The outbound rules associated with the security group.
|
default Object |
getSecurityGroupIngress()
The inbound rules associated with the security group.
|
default List<CfnTag> |
getTags()
Any tags assigned to the security group.
|
default String |
getVpcId()
[VPC only] The ID of the VPC for the security group.
|
@Stability(value=Stable) @NotNull String getGroupDescription()
Constraints: Up to 255 characters in length
Constraints for EC2-Classic: ASCII characters
Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
@Stability(value=Stable) @Nullable default String getGroupName()
Constraints: Up to 255 characters in length. Cannot start with sg- .
Constraints for EC2-Classic: ASCII characters
Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
@Stability(value=Stable) @Nullable default Object getSecurityGroupEgress()
There is a short interruption during which you cannot connect to the security group.
@Stability(value=Stable) @Nullable default Object getSecurityGroupIngress()
There is a short interruption during which you cannot connect to the security group.
@Stability(value=Stable) @Nullable default List<CfnTag> getTags()
@Stability(value=Stable) @Nullable default String getVpcId()
@Stability(value=Stable) static CfnSecurityGroupProps.Builder builder()
CfnSecurityGroupProps.Builder of CfnSecurityGroupPropsCopyright © 2022. All rights reserved.