Class: AWSCDK::Lightsail::CfnContainer::PublicEndpointProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_container.rb

Overview

PublicEndpoint is a property of the ContainerServiceDeployment property. It describes describes the settings of the public endpoint of a container on a container service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_name: nil, container_port: nil, health_check_config: nil) ⇒ PublicEndpointProperty

Returns a new instance of PublicEndpointProperty.

Parameters:

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

    The name of the container entry of the deployment that the endpoint configuration applies to.

  • container_port (Numeric, nil) (defaults to: nil)

    The port of the specified container to which traffic is forwarded to.

  • health_check_config (AWSCDK::IResolvable, AWSCDK::Lightsail::CfnContainer::HealthCheckConfigProperty, nil) (defaults to: nil)

    An object that describes the health check configuration of the container.



1070
1071
1072
1073
1074
1075
1076
1077
# File 'lightsail/cfn_container.rb', line 1070

def initialize(container_name: nil, container_port: nil, health_check_config: nil)
  @container_name = container_name
  Jsii::Type.check_type(@container_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerName") unless @container_name.nil?
  @container_port = container_port
  Jsii::Type.check_type(@container_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerPort") unless @container_port.nil?
  @health_check_config = health_check_config.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnContainer::HealthCheckConfigProperty.new(**health_check_config.transform_keys(&:to_sym)) : health_check_config
  Jsii::Type.check_type(@health_check_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuQ29udGFpbmVyLkhlYWx0aENoZWNrQ29uZmlnUHJvcGVydHkifV19fQ==")), "healthCheckConfig") unless @health_check_config.nil?
end

Instance Attribute Details

#container_nameString? (readonly)

The name of the container entry of the deployment that the endpoint configuration applies to.



1083
1084
1085
# File 'lightsail/cfn_container.rb', line 1083

def container_name
  @container_name
end

#container_portNumeric? (readonly)

The port of the specified container to which traffic is forwarded to.



1088
1089
1090
# File 'lightsail/cfn_container.rb', line 1088

def container_port
  @container_port
end

#health_check_configAWSCDK::IResolvable, ... (readonly)

An object that describes the health check configuration of the container.



1093
1094
1095
# File 'lightsail/cfn_container.rb', line 1093

def health_check_config
  @health_check_config
end

Class Method Details

.jsii_propertiesObject



1095
1096
1097
1098
1099
1100
1101
# File 'lightsail/cfn_container.rb', line 1095

def self.jsii_properties
  {
    :container_name => "containerName",
    :container_port => "containerPort",
    :health_check_config => "healthCheckConfig",
  }
end

Instance Method Details

#to_jsiiObject



1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lightsail/cfn_container.rb', line 1103

def to_jsii
  result = {}
  result.merge!({
    "containerName" => @container_name,
    "containerPort" => @container_port,
    "healthCheckConfig" => @health_check_config,
  })
  result.compact
end