Class: AWSCDK::EC2::CfnSecurityGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnSecurityGroupProps
- Defined in:
- ec2/cfn_security_group_props.rb
Overview
Properties for defining a CfnSecurityGroup.
Instance Attribute Summary collapse
-
#group_description ⇒ String
readonly
A description for the security group.
-
#group_name ⇒ String?
readonly
The name of the security group.
-
#security_group_egress ⇒ AWSCDK::IResolvable, ...
readonly
The outbound rules associated with the security group.
-
#security_group_ingress ⇒ AWSCDK::IResolvable, ...
readonly
The inbound rules associated with the security group.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Any tags assigned to the security group.
-
#vpc_id ⇒ String, ...
readonly
The ID of the VPC for the security group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(group_description:, group_name: nil, security_group_egress: nil, security_group_ingress: nil, tags: nil, vpc_id: nil) ⇒ CfnSecurityGroupProps
constructor
A new instance of CfnSecurityGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(group_description:, group_name: nil, security_group_egress: nil, security_group_ingress: nil, tags: nil, vpc_id: nil) ⇒ CfnSecurityGroupProps
Returns a new instance of CfnSecurityGroupProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'ec2/cfn_security_group_props.rb', line 15 def initialize(group_description:, group_name: nil, security_group_egress: nil, security_group_ingress: nil, tags: nil, vpc_id: nil) @group_description = group_description Jsii::Type.check_type(@group_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupDescription") @group_name = group_name Jsii::Type.check_type(@group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupName") unless @group_name.nil? @security_group_egress = security_group_egress Jsii::Type.check_type(@security_group_egress, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmblNlY3VyaXR5R3JvdXAuRWdyZXNzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "securityGroupEgress") unless @security_group_egress.nil? @security_group_ingress = security_group_ingress Jsii::Type.check_type(@security_group_ingress, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmblNlY3VyaXR5R3JvdXAuSW5ncmVzc1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "securityGroupIngress") unless @security_group_ingress.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @vpc_id = vpc_id Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1JlZiJ9XX19")), "vpcId") unless @vpc_id.nil? end |
Instance Attribute Details
#group_description ⇒ String (readonly)
A description for the security group.
Constraints: Up to 255 characters in length
Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
38 39 40 |
# File 'ec2/cfn_security_group_props.rb', line 38 def group_description @group_description end |
#group_name ⇒ String? (readonly)
The name of the security group. Names are case-insensitive and must be unique within the VPC.
Constraints: Up to 255 characters in length. Can't start with sg- .
Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
47 48 49 |
# File 'ec2/cfn_security_group_props.rb', line 47 def group_name @group_name end |
#security_group_egress ⇒ AWSCDK::IResolvable, ... (readonly)
The outbound rules associated with the security group.
52 53 54 |
# File 'ec2/cfn_security_group_props.rb', line 52 def security_group_egress @security_group_egress end |
#security_group_ingress ⇒ AWSCDK::IResolvable, ... (readonly)
The inbound rules associated with the security group.
57 58 59 |
# File 'ec2/cfn_security_group_props.rb', line 57 def security_group_ingress @security_group_ingress end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Any tags assigned to the security group.
62 63 64 |
# File 'ec2/cfn_security_group_props.rb', line 62 def @tags end |
#vpc_id ⇒ String, ... (readonly)
The ID of the VPC for the security group.
If you do not specify a VPC, the default is to use the default VPC for the Region. If there's no specified VPC and no default VPC, security group creation fails.
69 70 71 |
# File 'ec2/cfn_security_group_props.rb', line 69 def vpc_id @vpc_id end |
Class Method Details
.jsii_properties ⇒ Object
71 72 73 74 75 76 77 78 79 80 |
# File 'ec2/cfn_security_group_props.rb', line 71 def self.jsii_properties { :group_description => "groupDescription", :group_name => "groupName", :security_group_egress => "securityGroupEgress", :security_group_ingress => "securityGroupIngress", :tags => "tags", :vpc_id => "vpcId", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'ec2/cfn_security_group_props.rb', line 82 def to_jsii result = {} result.merge!({ "groupDescription" => @group_description, "groupName" => @group_name, "securityGroupEgress" => @security_group_egress, "securityGroupIngress" => @security_group_ingress, "tags" => @tags, "vpcId" => @vpc_id, }) result.compact end |