Class: AWSCDK::Pipes::CfnPipe::AWSVPCConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipes::CfnPipe::AWSVPCConfigurationProperty
- Defined in:
- pipes/cfn_pipe.rb
Overview
This structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used.
This structure is relevant only for ECS tasks that use the awsvpc network mode.
Instance Attribute Summary collapse
-
#assign_public_ip ⇒ String?
readonly
Specifies whether the task's elastic network interface receives a public IP address.
-
#security_groups ⇒ Array<String>?
readonly
Specifies the security groups associated with the task.
-
#subnets ⇒ Array<String>
readonly
Specifies the subnets associated with the task.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(subnets:, assign_public_ip: nil, security_groups: nil) ⇒ AWSVPCConfigurationProperty
constructor
A new instance of AWSVPCConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(subnets:, assign_public_ip: nil, security_groups: nil) ⇒ AWSVPCConfigurationProperty
Returns a new instance of AWSVPCConfigurationProperty.
716 717 718 719 720 721 722 723 |
# File 'pipes/cfn_pipe.rb', line 716 def initialize(subnets:, assign_public_ip: nil, security_groups: nil) @subnets = subnets Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnets") @assign_public_ip = assign_public_ip Jsii::Type.check_type(@assign_public_ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assignPublicIp") unless @assign_public_ip.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroups") unless @security_groups.nil? end |
Instance Attribute Details
#assign_public_ip ⇒ String? (readonly)
Specifies whether the task's elastic network interface receives a public IP address.
You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE .
738 739 740 |
# File 'pipes/cfn_pipe.rb', line 738 def assign_public_ip @assign_public_ip end |
#security_groups ⇒ Array<String>? (readonly)
Specifies the security groups associated with the task.
These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
745 746 747 |
# File 'pipes/cfn_pipe.rb', line 745 def security_groups @security_groups end |
#subnets ⇒ Array<String> (readonly)
Specifies the subnets associated with the task.
These subnets must all be in the same VPC. You can specify as many as 16 subnets.
731 732 733 |
# File 'pipes/cfn_pipe.rb', line 731 def subnets @subnets end |
Class Method Details
.jsii_properties ⇒ Object
747 748 749 750 751 752 753 |
# File 'pipes/cfn_pipe.rb', line 747 def self.jsii_properties { :subnets => "subnets", :assign_public_ip => "assignPublicIp", :security_groups => "securityGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
755 756 757 758 759 760 761 762 763 |
# File 'pipes/cfn_pipe.rb', line 755 def to_jsii result = {} result.merge!({ "subnets" => @subnets, "assignPublicIp" => @assign_public_ip, "securityGroups" => @security_groups, }) result.compact end |