Class: AWSCDK::ECS::CfnTaskSet::AWSVPCConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnets:, assign_public_ip: nil, security_groups: nil) ⇒ AWSVPCConfigurationProperty

Returns a new instance of AWSVPCConfigurationProperty.

Parameters:

  • subnets (Array<String>)

    The IDs of the subnets associated with the task or service.

  • assign_public_ip (String, nil) (defaults to: nil)

    Whether the task's elastic network interface receives a public IP address.

  • security_groups (Array<String>, nil) (defaults to: nil)

    The IDs of the security groups associated with the task or service.



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_ipString? (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-service or update-service , the default is DISABLED .
  • When the service deployment_controller is ECS , the value must be DISABLED .


692
693
694
# File 'ecs/cfn_task_set.rb', line 692

def assign_public_ip
  @assign_public_ip
end

#security_groupsArray<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

#subnetsArray<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_propertiesObject



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_jsiiObject



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