Class: AWSCDK::ECSPatterns::ApplicationLoadBalancedServiceBaseProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs_patterns/application_load_balanced_service_base_props.rb

Overview

The properties for the base ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capacity_provider_strategies: nil, certificate: nil, circuit_breaker: nil, cloud_map_options: nil, cluster: nil, deployment_controller: nil, desired_count: nil, domain_name: nil, domain_zone: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, health_check_grace_period: nil, idle_timeout: nil, ip_address_type: nil, listener_port: nil, load_balancer: nil, load_balancer_name: nil, max_healthy_percent: nil, min_healthy_percent: nil, open_listener: nil, propagate_tags: nil, protocol: nil, protocol_version: nil, public_load_balancer: nil, record_type: nil, redirect_http: nil, service_name: nil, ssl_policy: nil, target_protocol: nil, task_image_options: nil, vpc: nil) ⇒ ApplicationLoadBalancedServiceBaseProps

Returns a new instance of ApplicationLoadBalancedServiceBaseProps.

Parameters:

  • capacity_provider_strategies (Array<AWSCDK::ECS::CapacityProviderStrategy>, nil) (defaults to: nil)

    A list of Capacity Provider strategies used to place a service.

  • certificate (AWSCDK::CertificateManager::ICertificate, nil) (defaults to: nil)

    Certificate Manager certificate to associate with the load balancer.

  • circuit_breaker (AWSCDK::ECS::DeploymentCircuitBreaker, nil) (defaults to: nil)

    Whether to enable the deployment circuit breaker.

  • cloud_map_options (AWSCDK::ECS::CloudMapOptions, nil) (defaults to: nil)

    The options for configuring an Amazon ECS service to use service discovery.

  • cluster (AWSCDK::ECS::ICluster, nil) (defaults to: nil)

    The name of the cluster that hosts the service.

  • deployment_controller (AWSCDK::ECS::DeploymentController, nil) (defaults to: nil)

    Specifies which deployment controller to use for the service.

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

    The desired number of instantiations of the task definition to keep running on the service.

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

    The domain name for the service, e.g. "api.example.com.".

  • domain_zone (AWSCDK::Route53::IHostedZone, nil) (defaults to: nil)

    The Route53 hosted zone for the domain, e.g. "example.com.".

  • enable_ecs_managed_tags (Boolean, nil) (defaults to: nil)

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

  • enable_execute_command (Boolean, nil) (defaults to: nil)

    Whether ECS Exec should be enabled.

  • health_check_grace_period (AWSCDK::Duration, nil) (defaults to: nil)

    The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.

  • idle_timeout (AWSCDK::Duration, nil) (defaults to: nil)

    The load balancer idle timeout, in seconds.

  • ip_address_type (AWSCDK::ElasticLoadBalancingv2::IPAddressType, nil) (defaults to: nil)

    The type of IP address to use.

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

    Listener port of the application load balancer that will serve traffic to the service.

  • load_balancer (AWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancer, nil) (defaults to: nil)

    The application load balancer that will serve traffic to the service.

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

    Name of the load balancer.

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

    The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.

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

    The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.

  • open_listener (Boolean, nil) (defaults to: nil)

    Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.

  • propagate_tags (AWSCDK::ECS::PropagatedTagSource, nil) (defaults to: nil)

    Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.

  • protocol (AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol, nil) (defaults to: nil)

    The protocol for connections from clients to the load balancer.

  • protocol_version (AWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion, nil) (defaults to: nil)

    The protocol version to use.

  • public_load_balancer (Boolean, nil) (defaults to: nil)

    Determines whether the Load Balancer will be internet-facing.

  • record_type (AWSCDK::ECSPatterns::ApplicationLoadBalancedServiceRecordType, nil) (defaults to: nil)

    Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.

  • redirect_http (Boolean, nil) (defaults to: nil)

    Specifies whether the load balancer should redirect traffic on port 80 to the listenerPort to support HTTP->HTTPS redirects.

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

    The name of the service.

  • ssl_policy (AWSCDK::ElasticLoadBalancingv2::SSLPolicy, nil) (defaults to: nil)

    The security policy that defines which ciphers and protocols are supported by the ALB Listener.

  • target_protocol (AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol, nil) (defaults to: nil)

    The protocol for connections from the load balancer to the ECS tasks.

  • task_image_options (AWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions, nil) (defaults to: nil)

    The properties required to create a new task definition.

  • vpc (AWSCDK::EC2::IVPC, nil) (defaults to: nil)

    The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 38

def initialize(capacity_provider_strategies: nil, certificate: nil, circuit_breaker: nil, cloud_map_options: nil, cluster: nil, deployment_controller: nil, desired_count: nil, domain_name: nil, domain_zone: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, health_check_grace_period: nil, idle_timeout: nil, ip_address_type: nil, listener_port: nil, load_balancer: nil, load_balancer_name: nil, max_healthy_percent: nil, min_healthy_percent: nil, open_listener: nil, propagate_tags: nil, protocol: nil, protocol_version: nil, public_load_balancer: nil, record_type: nil, redirect_http: nil, service_name: nil, ssl_policy: nil, target_protocol: nil, task_image_options: nil, vpc: nil)
  @capacity_provider_strategies = capacity_provider_strategies.is_a?(Array) ? capacity_provider_strategies.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECS::CapacityProviderStrategy.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : capacity_provider_strategies
  Jsii::Type.check_type(@capacity_provider_strategies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2FwYWNpdHlQcm92aWRlclN0cmF0ZWd5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "capacityProviderStrategies") unless @capacity_provider_strategies.nil?
  @certificate = certificate
  Jsii::Type.check_type(@certificate, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2VydGlmaWNhdGVtYW5hZ2VyLklDZXJ0aWZpY2F0ZSJ9")), "certificate") unless @certificate.nil?
  @circuit_breaker = circuit_breaker.is_a?(Hash) ? ::AWSCDK::ECS::DeploymentCircuitBreaker.new(**circuit_breaker.transform_keys(&:to_sym)) : circuit_breaker
  Jsii::Type.check_type(@circuit_breaker, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkRlcGxveW1lbnRDaXJjdWl0QnJlYWtlciJ9")), "circuitBreaker") unless @circuit_breaker.nil?
  @cloud_map_options = cloud_map_options.is_a?(Hash) ? ::AWSCDK::ECS::CloudMapOptions.new(**cloud_map_options.transform_keys(&:to_sym)) : cloud_map_options
  Jsii::Type.check_type(@cloud_map_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNsb3VkTWFwT3B0aW9ucyJ9")), "cloudMapOptions") unless @cloud_map_options.nil?
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklDbHVzdGVyIn0=")), "cluster") unless @cluster.nil?
  @deployment_controller = deployment_controller.is_a?(Hash) ? ::AWSCDK::ECS::DeploymentController.new(**deployment_controller.transform_keys(&:to_sym)) : deployment_controller
  Jsii::Type.check_type(@deployment_controller, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkRlcGxveW1lbnRDb250cm9sbGVyIn0=")), "deploymentController") unless @deployment_controller.nil?
  @desired_count = desired_count
  Jsii::Type.check_type(@desired_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "desiredCount") unless @desired_count.nil?
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") unless @domain_name.nil?
  @domain_zone = domain_zone
  Jsii::Type.check_type(@domain_zone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JSG9zdGVkWm9uZSJ9")), "domainZone") unless @domain_zone.nil?
  @enable_ecs_managed_tags = enable_ecs_managed_tags
  Jsii::Type.check_type(@enable_ecs_managed_tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableECSManagedTags") unless @enable_ecs_managed_tags.nil?
  @enable_execute_command = enable_execute_command
  Jsii::Type.check_type(@enable_execute_command, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableExecuteCommand") unless @enable_execute_command.nil?
  @health_check_grace_period = health_check_grace_period
  Jsii::Type.check_type(@health_check_grace_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "healthCheckGracePeriod") unless @health_check_grace_period.nil?
  @idle_timeout = idle_timeout
  Jsii::Type.check_type(@idle_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "idleTimeout") unless @idle_timeout.nil?
  @ip_address_type = ip_address_type
  Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JcEFkZHJlc3NUeXBlIn0=")), "ipAddressType") unless @ip_address_type.nil?
  @listener_port = listener_port
  Jsii::Type.check_type(@listener_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "listenerPort") unless @listener_port.nil?
  @load_balancer = load_balancer
  Jsii::Type.check_type(@load_balancer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25Mb2FkQmFsYW5jZXIifQ==")), "loadBalancer") unless @load_balancer.nil?
  @load_balancer_name = load_balancer_name
  Jsii::Type.check_type(@load_balancer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "loadBalancerName") unless @load_balancer_name.nil?
  @max_healthy_percent = max_healthy_percent
  Jsii::Type.check_type(@max_healthy_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxHealthyPercent") unless @max_healthy_percent.nil?
  @min_healthy_percent = min_healthy_percent
  Jsii::Type.check_type(@min_healthy_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minHealthyPercent") unless @min_healthy_percent.nil?
  @open_listener = open_listener
  Jsii::Type.check_type(@open_listener, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "openListener") unless @open_listener.nil?
  @propagate_tags = propagate_tags
  Jsii::Type.check_type(@propagate_tags, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlByb3BhZ2F0ZWRUYWdTb3VyY2UifQ==")), "propagateTags") unless @propagate_tags.nil?
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "protocol") unless @protocol.nil?
  @protocol_version = protocol_version
  Jsii::Type.check_type(@protocol_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sVmVyc2lvbiJ9")), "protocolVersion") unless @protocol_version.nil?
  @public_load_balancer = public_load_balancer
  Jsii::Type.check_type(@public_load_balancer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "publicLoadBalancer") unless @public_load_balancer.nil?
  @record_type = record_type
  Jsii::Type.check_type(@record_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzX3BhdHRlcm5zLkFwcGxpY2F0aW9uTG9hZEJhbGFuY2VkU2VydmljZVJlY29yZFR5cGUifQ==")), "recordType") unless @record_type.nil?
  @redirect_http = redirect_http
  Jsii::Type.check_type(@redirect_http, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "redirectHTTP") unless @redirect_http.nil?
  @service_name = service_name
  Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.nil?
  @ssl_policy = ssl_policy
  Jsii::Type.check_type(@ssl_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5Tc2xQb2xpY3kifQ==")), "sslPolicy") unless @ssl_policy.nil?
  @target_protocol = target_protocol
  Jsii::Type.check_type(@target_protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5BcHBsaWNhdGlvblByb3RvY29sIn0=")), "targetProtocol") unless @target_protocol.nil?
  @task_image_options = task_image_options.is_a?(Hash) ? ::AWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions.new(**task_image_options.transform_keys(&:to_sym)) : task_image_options
  Jsii::Type.check_type(@task_image_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzX3BhdHRlcm5zLkFwcGxpY2F0aW9uTG9hZEJhbGFuY2VkVGFza0ltYWdlT3B0aW9ucyJ9")), "taskImageOptions") unless @task_image_options.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil?
end

Instance Attribute Details

#capacity_provider_strategiesArray<AWSCDK::ECS::CapacityProviderStrategy>? (readonly)

Note:

Default: - undefined

A list of Capacity Provider strategies used to place a service.

Returns:



107
108
109
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 107

def capacity_provider_strategies
  @capacity_provider_strategies
end

#certificateAWSCDK::CertificateManager::ICertificate? (readonly)

Note:

Default: - No certificate associated with the load balancer, if using the HTTP protocol. For HTTPS, a DNS-validated certificate will be created for the load balancer's specified domain name if a domain name and domain zone are specified.

Certificate Manager certificate to associate with the load balancer.

Setting this option will set the load balancer protocol to HTTPS.



114
115
116
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 114

def certificate
  @certificate
end

#circuit_breakerAWSCDK::ECS::DeploymentCircuitBreaker? (readonly)

Note:

Default: - disabled

Whether to enable the deployment circuit breaker.

If this property is defined, circuit breaker will be implicitly enabled.



122
123
124
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 122

def circuit_breaker
  @circuit_breaker
end

#cloud_map_optionsAWSCDK::ECS::CloudMapOptions? (readonly)

Note:

Default: - AWS Cloud Map service discovery is not enabled.

The options for configuring an Amazon ECS service to use service discovery.



127
128
129
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 127

def cloud_map_options
  @cloud_map_options
end

#clusterAWSCDK::ECS::ICluster? (readonly)

Note:

Default: - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.

The name of the cluster that hosts the service.

If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.

Returns:



134
135
136
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 134

def cluster
  @cluster
end

#deployment_controllerAWSCDK::ECS::DeploymentController? (readonly)

Note:

Default: - Rolling update (ECS)

Specifies which deployment controller to use for the service.

For more information, see Amazon ECS Deployment Types



142
143
144
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 142

def deployment_controller
  @deployment_controller
end

#desired_countNumeric? (readonly)

Note:

Default: - The default is 1 for all new services and uses the existing service's desired count when updating an existing service.

The desired number of instantiations of the task definition to keep running on the service.

The minimum value is 1

Returns:

  • (Numeric, nil)


149
150
151
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 149

def desired_count
  @desired_count
end

#domain_nameString? (readonly)

Note:

Default: - No domain name.

The domain name for the service, e.g. "api.example.com.".

Returns:

  • (String, nil)


154
155
156
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 154

def domain_name
  @domain_name
end

#domain_zoneAWSCDK::Route53::IHostedZone? (readonly)

Note:

Default: - No Route53 hosted domain zone.

The Route53 hosted zone for the domain, e.g. "example.com.".



159
160
161
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 159

def domain_zone
  @domain_zone
end

#enable_ecs_managed_tagsBoolean? (readonly)

Note:

Default: false

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

For more information, see Tagging Your Amazon ECS Resources

Returns:

  • (Boolean, nil)


167
168
169
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 167

def enable_ecs_managed_tags
  @enable_ecs_managed_tags
end

#enable_execute_commandBoolean? (readonly)

Note:

Default: - false

Whether ECS Exec should be enabled.

Returns:

  • (Boolean, nil)


172
173
174
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 172

def enable_execute_command
  @enable_execute_command
end

#health_check_grace_periodAWSCDK::Duration? (readonly)

Note:

Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set

The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.

Returns:



177
178
179
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 177

def health_check_grace_period
  @health_check_grace_period
end

#idle_timeoutAWSCDK::Duration? (readonly)

Note:

Default: - CloudFormation sets idle timeout to 60 seconds

The load balancer idle timeout, in seconds.

Can be between 1 and 4000 seconds

Returns:



184
185
186
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 184

def idle_timeout
  @idle_timeout
end

#ip_address_typeAWSCDK::ElasticLoadBalancingv2::IPAddressType? (readonly)

Note:

Default: - IpAddressType.IPV4

The type of IP address to use.



189
190
191
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 189

def ip_address_type
  @ip_address_type
end

#listener_portNumeric? (readonly)

Note:

Default: - The default listener port is determined from the protocol (port 80 for HTTP, port 443 for HTTPS). A domain name and zone must be also be specified if using HTTPS.

Listener port of the application load balancer that will serve traffic to the service.

Returns:

  • (Numeric, nil)


194
195
196
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 194

def listener_port
  @listener_port
end

#load_balancerAWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancer? (readonly)

Note:

Default: - a new load balancer will be created.

The application load balancer that will serve traffic to the service.

The VPC attribute of a load balancer must be specified for it to be used to create a new service with this pattern.

[disable-awslint:ref-via-interface]



204
205
206
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 204

def load_balancer
  @load_balancer
end

#load_balancer_nameString? (readonly)

Note:

Default: - Automatically generated name.

Name of the load balancer.

Returns:

  • (String, nil)


209
210
211
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 209

def load_balancer_name
  @load_balancer_name
end

#max_healthy_percentNumeric? (readonly)

Note:

Default: - 100 if daemon, otherwise 200

The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.

Returns:

  • (Numeric, nil)


214
215
216
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 214

def max_healthy_percent
  @max_healthy_percent
end

#min_healthy_percentNumeric? (readonly)

Note:

Default: - 0 if daemon, otherwise 50

The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.

Returns:

  • (Numeric, nil)


219
220
221
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 219

def min_healthy_percent
  @min_healthy_percent
end

#open_listenerBoolean? (readonly)

Note:

Default: true -- The security group allows ingress from all IP addresses.

Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.

Returns:

  • (Boolean, nil)


224
225
226
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 224

def open_listener
  @open_listener
end

#propagate_tagsAWSCDK::ECS::PropagatedTagSource? (readonly)

Note:

Default: - none

Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.

Tags can only be propagated to the tasks within the service during service creation.



231
232
233
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 231

def propagate_tags
  @propagate_tags
end

#protocolAWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)

Note:

Default: HTTP. If a certificate is specified, the protocol will be set by default to HTTPS.

The protocol for connections from clients to the load balancer.

The load balancer port is determined from the protocol (port 80 for HTTP, port 443 for HTTPS). If HTTPS, either a certificate or domain name and domain zone must also be specified.



240
241
242
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 240

def protocol
  @protocol
end

#protocol_versionAWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion? (readonly)

Note:

Default: ApplicationProtocolVersion.HTTP1

The protocol version to use.



245
246
247
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 245

def protocol_version
  @protocol_version
end

#public_load_balancerBoolean? (readonly)

Note:

Default: true

Determines whether the Load Balancer will be internet-facing.

Returns:

  • (Boolean, nil)


250
251
252
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 250

def public_load_balancer
  @public_load_balancer
end

#record_typeAWSCDK::ECSPatterns::ApplicationLoadBalancedServiceRecordType? (readonly)

Note:

Default: ApplicationLoadBalancedServiceRecordType.ALIAS

Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.

This is useful if you need to work with DNS systems that do not support alias records.



257
258
259
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 257

def record_type
  @record_type
end

#redirect_httpBoolean? (readonly)

Note:

Default: false

Specifies whether the load balancer should redirect traffic on port 80 to the listenerPort to support HTTP->HTTPS redirects.

This is only valid if the protocol of the ALB is HTTPS.

Returns:

  • (Boolean, nil)


264
265
266
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 264

def redirect_http
  @redirect_http
end

#service_nameString? (readonly)

Note:

Default: - CloudFormation-generated name.

The name of the service.

Returns:

  • (String, nil)


269
270
271
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 269

def service_name
  @service_name
end

#ssl_policyAWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)

Note:

Default: - The recommended elastic load balancing security policy

The security policy that defines which ciphers and protocols are supported by the ALB Listener.



274
275
276
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 274

def ssl_policy
  @ssl_policy
end

#target_protocolAWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)

Note:

Default: HTTP.

The protocol for connections from the load balancer to the ECS tasks.

The default target port is determined from the protocol (port 80 for HTTP, port 443 for HTTPS).



282
283
284
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 282

def target_protocol
  @target_protocol
end

#task_image_optionsAWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions? (readonly)

Note:

Default: none

The properties required to create a new task definition.

TaskDefinition or TaskImageOptions must be specified, but not both.



289
290
291
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 289

def task_image_options
  @task_image_options
end

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: - uses the VPC defined in the cluster or creates a new VPC.

The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.

If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.

Returns:



296
297
298
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 296

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 298

def self.jsii_properties
  {
    :capacity_provider_strategies => "capacityProviderStrategies",
    :certificate => "certificate",
    :circuit_breaker => "circuitBreaker",
    :cloud_map_options => "cloudMapOptions",
    :cluster => "cluster",
    :deployment_controller => "deploymentController",
    :desired_count => "desiredCount",
    :domain_name => "domainName",
    :domain_zone => "domainZone",
    :enable_ecs_managed_tags => "enableECSManagedTags",
    :enable_execute_command => "enableExecuteCommand",
    :health_check_grace_period => "healthCheckGracePeriod",
    :idle_timeout => "idleTimeout",
    :ip_address_type => "ipAddressType",
    :listener_port => "listenerPort",
    :load_balancer => "loadBalancer",
    :load_balancer_name => "loadBalancerName",
    :max_healthy_percent => "maxHealthyPercent",
    :min_healthy_percent => "minHealthyPercent",
    :open_listener => "openListener",
    :propagate_tags => "propagateTags",
    :protocol => "protocol",
    :protocol_version => "protocolVersion",
    :public_load_balancer => "publicLoadBalancer",
    :record_type => "recordType",
    :redirect_http => "redirectHTTP",
    :service_name => "serviceName",
    :ssl_policy => "sslPolicy",
    :target_protocol => "targetProtocol",
    :task_image_options => "taskImageOptions",
    :vpc => "vpc",
  }
end

Instance Method Details

#to_jsiiObject



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File 'ecs_patterns/application_load_balanced_service_base_props.rb', line 334

def to_jsii
  result = {}
  result.merge!({
    "capacityProviderStrategies" => @capacity_provider_strategies,
    "certificate" => @certificate,
    "circuitBreaker" => @circuit_breaker,
    "cloudMapOptions" => @cloud_map_options,
    "cluster" => @cluster,
    "deploymentController" => @deployment_controller,
    "desiredCount" => @desired_count,
    "domainName" => @domain_name,
    "domainZone" => @domain_zone,
    "enableECSManagedTags" => @enable_ecs_managed_tags,
    "enableExecuteCommand" => @enable_execute_command,
    "healthCheckGracePeriod" => @health_check_grace_period,
    "idleTimeout" => @idle_timeout,
    "ipAddressType" => @ip_address_type,
    "listenerPort" => @listener_port,
    "loadBalancer" => @load_balancer,
    "loadBalancerName" => @load_balancer_name,
    "maxHealthyPercent" => @max_healthy_percent,
    "minHealthyPercent" => @min_healthy_percent,
    "openListener" => @open_listener,
    "propagateTags" => @propagate_tags,
    "protocol" => @protocol,
    "protocolVersion" => @protocol_version,
    "publicLoadBalancer" => @public_load_balancer,
    "recordType" => @record_type,
    "redirectHTTP" => @redirect_http,
    "serviceName" => @service_name,
    "sslPolicy" => @ssl_policy,
    "targetProtocol" => @target_protocol,
    "taskImageOptions" => @task_image_options,
    "vpc" => @vpc,
  })
  result.compact
end