Class: AWSCDK::Scheduler::CfnSchedule::AWSVPCConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Scheduler::CfnSchedule::AWSVPCConfigurationProperty
- Defined in:
- scheduler/cfn_schedule.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.
651 652 653 654 655 656 657 658 |
# File 'scheduler/cfn_schedule.rb', line 651 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 .
673 674 675 |
# File 'scheduler/cfn_schedule.rb', line 673 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.
680 681 682 |
# File 'scheduler/cfn_schedule.rb', line 680 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.
666 667 668 |
# File 'scheduler/cfn_schedule.rb', line 666 def subnets @subnets end |
Class Method Details
.jsii_properties ⇒ Object
682 683 684 685 686 687 688 |
# File 'scheduler/cfn_schedule.rb', line 682 def self.jsii_properties { :subnets => "subnets", :assign_public_ip => "assignPublicIp", :security_groups => "securityGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
690 691 692 693 694 695 696 697 698 |
# File 'scheduler/cfn_schedule.rb', line 690 def to_jsii result = {} result.merge!({ "subnets" => @subnets, "assignPublicIp" => @assign_public_ip, "securityGroups" => @security_groups, }) result.compact end |