Class: AWSCDK::ECS::CfnTaskSet::AWSVPCConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskSet::AWSVPCConfigurationProperty
- Defined in:
- ecs/cfn_task_set.rb
Overview
An object representing the networking details for a task or service.
For example awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]} .
Instance Attribute Summary collapse
-
#assign_public_ip ⇒ String?
readonly
Whether the task's elastic network interface receives a public IP address.
-
#security_groups ⇒ Array<String>?
readonly
The IDs of the security groups associated with the task or service.
-
#subnets ⇒ Array<String>
readonly
The IDs of the subnets associated with the task or service.
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.
665 666 667 668 669 670 671 672 |
# File 'ecs/cfn_task_set.rb', line 665 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)
Whether the task's elastic network interface receives a public IP address.
Consider the following when you set this value:
- When you use
create-serviceorupdate-service, the default isDISABLED. - When the service
deployment_controllerisECS, the value must beDISABLED.
692 693 694 |
# File 'ecs/cfn_task_set.rb', line 692 def assign_public_ip @assign_public_ip end |
#security_groups ⇒ Array<String>? (readonly)
The IDs of the security groups associated with the task or service.
If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.
All specified security groups must be from the same VPC.
701 702 703 |
# File 'ecs/cfn_task_set.rb', line 701 def security_groups @security_groups end |
#subnets ⇒ Array<String> (readonly)
The IDs of the subnets associated with the task or service.
There's a limit of 16 subnets that can be specified.
All specified subnets must be from the same VPC.
682 683 684 |
# File 'ecs/cfn_task_set.rb', line 682 def subnets @subnets end |
Class Method Details
.jsii_properties ⇒ Object
703 704 705 706 707 708 709 |
# File 'ecs/cfn_task_set.rb', line 703 def self.jsii_properties { :subnets => "subnets", :assign_public_ip => "assignPublicIp", :security_groups => "securityGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
711 712 713 714 715 716 717 718 719 |
# File 'ecs/cfn_task_set.rb', line 711 def to_jsii result = {} result.merge!({ "subnets" => @subnets, "assignPublicIp" => @assign_public_ip, "securityGroups" => @security_groups, }) result.compact end |