Class: AWSCDK::ECS::CfnTaskDefinition::HostEntryProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskDefinition::HostEntryProperty
- Defined in:
- ecs/cfn_task_definition.rb
Overview
The HostEntry property specifies a hostname and an IP address that are added to the /etc/hosts file of a container through the extraHosts parameter of its ContainerDefinition resource.
Instance Attribute Summary collapse
-
#hostname ⇒ String?
readonly
The hostname to use in the
/etc/hostsentry. -
#ip_address ⇒ String?
readonly
The IP address to use in the
/etc/hostsentry.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hostname: nil, ip_address: nil) ⇒ HostEntryProperty
constructor
A new instance of HostEntryProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(hostname: nil, ip_address: nil) ⇒ HostEntryProperty
Returns a new instance of HostEntryProperty.
2117 2118 2119 2120 2121 2122 |
# File 'ecs/cfn_task_definition.rb', line 2117 def initialize(hostname: nil, ip_address: nil) @hostname = hostname Jsii::Type.check_type(@hostname, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostname") unless @hostname.nil? @ip_address = ip_address Jsii::Type.check_type(@ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipAddress") unless @ip_address.nil? end |
Instance Attribute Details
#hostname ⇒ String? (readonly)
The hostname to use in the /etc/hosts entry.
2128 2129 2130 |
# File 'ecs/cfn_task_definition.rb', line 2128 def hostname @hostname end |
#ip_address ⇒ String? (readonly)
The IP address to use in the /etc/hosts entry.
2133 2134 2135 |
# File 'ecs/cfn_task_definition.rb', line 2133 def ip_address @ip_address end |
Class Method Details
.jsii_properties ⇒ Object
2135 2136 2137 2138 2139 2140 |
# File 'ecs/cfn_task_definition.rb', line 2135 def self.jsii_properties { :hostname => "hostname", :ip_address => "ipAddress", } end |
Instance Method Details
#to_jsii ⇒ Object
2142 2143 2144 2145 2146 2147 2148 2149 |
# File 'ecs/cfn_task_definition.rb', line 2142 def to_jsii result = {} result.merge!({ "hostname" => @hostname, "ipAddress" => @ip_address, }) result.compact end |