Class: AWSCDK::ECSPatterns::ApplicationLoadBalancedFargateServiceProps
- Inherits:
-
ApplicationLoadBalancedServiceBaseProps
- Object
- ApplicationLoadBalancedServiceBaseProps
- AWSCDK::ECSPatterns::ApplicationLoadBalancedFargateServiceProps
- Defined in:
- ecs_patterns/application_load_balanced_fargate_service_props.rb
Overview
The properties for the ApplicationLoadBalancedFargateService service.
Instance Attribute Summary collapse
-
#assign_public_ip ⇒ Boolean?
readonly
Determines whether the service will be assigned a public IP address.
-
#capacity_provider_strategies ⇒ Array<AWSCDK::ECS::CapacityProviderStrategy>?
readonly
A list of Capacity Provider strategies used to place a service.
-
#certificate ⇒ AWSCDK::CertificateManager::ICertificate?
readonly
Certificate Manager certificate to associate with the load balancer.
-
#circuit_breaker ⇒ AWSCDK::ECS::DeploymentCircuitBreaker?
readonly
Whether to enable the deployment circuit breaker.
-
#cloud_map_options ⇒ AWSCDK::ECS::CloudMapOptions?
readonly
The options for configuring an Amazon ECS service to use service discovery.
-
#cluster ⇒ AWSCDK::ECS::ICluster?
readonly
The name of the cluster that hosts the service.
-
#container_cpu ⇒ Numeric?
readonly
The minimum number of CPU units to reserve for the container.
-
#container_memory_limit_mib ⇒ Numeric?
readonly
The amount (in MiB) of memory to present to the container.
-
#cpu ⇒ Numeric?
readonly
The number of cpu units used by the task.
-
#deployment_controller ⇒ AWSCDK::ECS::DeploymentController?
readonly
Specifies which deployment controller to use for the service.
-
#desired_count ⇒ Numeric?
readonly
The desired number of instantiations of the task definition to keep running on the service.
-
#domain_name ⇒ String?
readonly
The domain name for the service, e.g.
-
#domain_zone ⇒ AWSCDK::Route53::IHostedZone?
readonly
The Route53 hosted zone for the domain, e.g.
-
#enable_ecs_managed_tags ⇒ Boolean?
readonly
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
-
#enable_execute_command ⇒ Boolean?
readonly
Whether ECS Exec should be enabled.
-
#ephemeral_storage_gib ⇒ Numeric?
readonly
The amount (in GiB) of ephemeral storage to be allocated to the task.
-
#health_check ⇒ AWSCDK::ECS::HealthCheck?
readonly
The health check command and associated configuration parameters for the container.
-
#health_check_grace_period ⇒ AWSCDK::Duration?
readonly
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?
readonly
The load balancer idle timeout, in seconds.
-
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::IPAddressType?
readonly
The type of IP address to use.
-
#listener_port ⇒ Numeric?
readonly
Listener port of the application load balancer that will serve traffic to the service.
-
#load_balancer ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancer?
readonly
The application load balancer that will serve traffic to the service.
-
#load_balancer_name ⇒ String?
readonly
Name of the load balancer.
-
#max_healthy_percent ⇒ Numeric?
readonly
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.
-
#memory_limit_mib ⇒ Numeric?
readonly
The amount (in MiB) of memory used by the task.
-
#min_healthy_percent ⇒ Numeric?
readonly
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?
readonly
Determines whether or not the Security Group for the Load Balancer's Listener will be open to all traffic by default.
-
#platform_version ⇒ AWSCDK::ECS::FargatePlatformVersion?
readonly
The platform version on which to run your service.
-
#propagate_tags ⇒ AWSCDK::ECS::PropagatedTagSource?
readonly
Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
-
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol for connections from clients to the load balancer.
-
#protocol_version ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion?
readonly
The protocol version to use.
-
#public_load_balancer ⇒ Boolean?
readonly
Determines whether the Load Balancer will be internet-facing.
-
#record_type ⇒ AWSCDK::ECSPatterns::ApplicationLoadBalancedServiceRecordType?
readonly
Specifies whether the Route53 record should be a CNAME, an A record using the Alias feature or no record at all.
-
#redirect_http ⇒ Boolean?
readonly
Specifies whether the load balancer should redirect traffic on port 80 to the listenerPort to support HTTP->HTTPS redirects.
-
#runtime_platform ⇒ AWSCDK::ECS::RuntimePlatform?
readonly
The runtime platform of the task definition.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The security groups to associate with the service.
-
#service_name ⇒ String?
readonly
The name of the service.
-
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy?
readonly
The security policy that defines which ciphers and protocols are supported by the ALB Listener.
-
#target_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol?
readonly
The protocol for connections from the load balancer to the ECS tasks.
-
#task_definition ⇒ AWSCDK::ECS::FargateTaskDefinition?
readonly
The task definition to use for tasks in the service.
-
#task_image_options ⇒ AWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions?
readonly
The properties required to create a new task definition.
-
#task_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
The subnets to associate with the service.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
Class Method Summary collapse
Instance Method Summary collapse
-
#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, cpu: nil, ephemeral_storage_gib: nil, memory_limit_mib: nil, platform_version: nil, runtime_platform: nil, task_definition: nil, assign_public_ip: nil, container_cpu: nil, container_memory_limit_mib: nil, health_check: nil, security_groups: nil, task_subnets: nil) ⇒ ApplicationLoadBalancedFargateServiceProps
constructor
A new instance of ApplicationLoadBalancedFargateServiceProps.
- #to_jsii ⇒ Object
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, cpu: nil, ephemeral_storage_gib: nil, memory_limit_mib: nil, platform_version: nil, runtime_platform: nil, task_definition: nil, assign_public_ip: nil, container_cpu: nil, container_memory_limit_mib: nil, health_check: nil, security_groups: nil, task_subnets: nil) ⇒ ApplicationLoadBalancedFargateServiceProps
Returns a new instance of ApplicationLoadBalancedFargateServiceProps.
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 51 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, cpu: nil, ephemeral_storage_gib: nil, memory_limit_mib: nil, platform_version: nil, runtime_platform: nil, task_definition: nil, assign_public_ip: nil, container_cpu: nil, container_memory_limit_mib: nil, health_check: nil, security_groups: nil, task_subnets: 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 = .is_a?(Hash) ? ::AWSCDK::ECS::CloudMapOptions.new(**.transform_keys(&:to_sym)) : 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 = 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 = 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 = .is_a?(Hash) ? ::AWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions.new(**.transform_keys(&:to_sym)) : 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? @cpu = cpu Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cpu") unless @cpu.nil? @ephemeral_storage_gib = ephemeral_storage_gib Jsii::Type.check_type(@ephemeral_storage_gib, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ephemeralStorageGiB") unless @ephemeral_storage_gib.nil? @memory_limit_mib = memory_limit_mib Jsii::Type.check_type(@memory_limit_mib, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memoryLimitMiB") unless @memory_limit_mib.nil? @platform_version = platform_version Jsii::Type.check_type(@platform_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZhcmdhdGVQbGF0Zm9ybVZlcnNpb24ifQ==")), "platformVersion") unless @platform_version.nil? @runtime_platform = runtime_platform.is_a?(Hash) ? ::AWSCDK::ECS::RuntimePlatform.new(**runtime_platform.transform_keys(&:to_sym)) : runtime_platform Jsii::Type.check_type(@runtime_platform, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlJ1bnRpbWVQbGF0Zm9ybSJ9")), "runtimePlatform") unless @runtime_platform.nil? @task_definition = task_definition Jsii::Type.check_type(@task_definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZhcmdhdGVUYXNrRGVmaW5pdGlvbiJ9")), "taskDefinition") unless @task_definition.nil? @assign_public_ip = assign_public_ip Jsii::Type.check_type(@assign_public_ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "assignPublicIp") unless @assign_public_ip.nil? @container_cpu = container_cpu Jsii::Type.check_type(@container_cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerCpu") unless @container_cpu.nil? @container_memory_limit_mib = container_memory_limit_mib Jsii::Type.check_type(@container_memory_limit_mib, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerMemoryLimitMiB") unless @container_memory_limit_mib.nil? @health_check = health_check.is_a?(Hash) ? ::AWSCDK::ECS::HealthCheck.new(**health_check.transform_keys(&:to_sym)) : health_check Jsii::Type.check_type(@health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkhlYWx0aENoZWNrIn0=")), "healthCheck") unless @health_check.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @task_subnets = task_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**task_subnets.transform_keys(&:to_sym)) : task_subnets Jsii::Type.check_type(@task_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "taskSubnets") unless @task_subnets.nil? end |
Instance Attribute Details
#assign_public_ip ⇒ Boolean? (readonly)
Default: false
Determines whether the service will be assigned a public IP address.
415 416 417 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 415 def assign_public_ip @assign_public_ip end |
#capacity_provider_strategies ⇒ Array<AWSCDK::ECS::CapacityProviderStrategy>? (readonly)
Default: - undefined
A list of Capacity Provider strategies used to place a service.
144 145 146 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 144 def capacity_provider_strategies @capacity_provider_strategies end |
#certificate ⇒ AWSCDK::CertificateManager::ICertificate? (readonly)
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.
151 152 153 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 151 def certificate @certificate end |
#circuit_breaker ⇒ AWSCDK::ECS::DeploymentCircuitBreaker? (readonly)
Default: - disabled
Whether to enable the deployment circuit breaker.
If this property is defined, circuit breaker will be implicitly enabled.
159 160 161 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 159 def circuit_breaker @circuit_breaker end |
#cloud_map_options ⇒ AWSCDK::ECS::CloudMapOptions? (readonly)
Default: - AWS Cloud Map service discovery is not enabled.
The options for configuring an Amazon ECS service to use service discovery.
164 165 166 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 164 def @cloud_map_options end |
#cluster ⇒ AWSCDK::ECS::ICluster? (readonly)
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.
171 172 173 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 171 def cluster @cluster end |
#container_cpu ⇒ Numeric? (readonly)
Default: - No minimum CPU units reserved.
The minimum number of CPU units to reserve for the container.
420 421 422 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 420 def container_cpu @container_cpu end |
#container_memory_limit_mib ⇒ Numeric? (readonly)
Default: - No memory limit.
The amount (in MiB) of memory to present to the container.
If your container attempts to exceed the allocated memory, the container is terminated.
428 429 430 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 428 def container_memory_limit_mib @container_memory_limit_mib end |
#cpu ⇒ Numeric? (readonly)
Default: 256
The number of cpu units used by the task.
Valid values, which determines your range of valid values for the memory parameter:
256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB
512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB
1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments
4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments
8192 (8 vCPU) - Available memory values: Between 16GB and 60GB in 4GB increments
16384 (16 vCPU) - Available memory values: Between 32GB and 120GB in 8GB increments
This default is set in the underlying FargateTaskDefinition construct.
356 357 358 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 356 def cpu @cpu end |
#deployment_controller ⇒ AWSCDK::ECS::DeploymentController? (readonly)
Default: - Rolling update (ECS)
Specifies which deployment controller to use for the service.
For more information, see Amazon ECS Deployment Types
179 180 181 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 179 def deployment_controller @deployment_controller end |
#desired_count ⇒ Numeric? (readonly)
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
186 187 188 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 186 def desired_count @desired_count end |
#domain_name ⇒ String? (readonly)
Default: - No domain name.
The domain name for the service, e.g. "api.example.com.".
191 192 193 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 191 def domain_name @domain_name end |
#domain_zone ⇒ AWSCDK::Route53::IHostedZone? (readonly)
Default: - No Route53 hosted domain zone.
The Route53 hosted zone for the domain, e.g. "example.com.".
196 197 198 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 196 def domain_zone @domain_zone end |
#enable_ecs_managed_tags ⇒ Boolean? (readonly)
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
204 205 206 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 204 def @enable_ecs_managed_tags end |
#enable_execute_command ⇒ Boolean? (readonly)
Default: - false
Whether ECS Exec should be enabled.
209 210 211 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 209 def enable_execute_command @enable_execute_command end |
#ephemeral_storage_gib ⇒ Numeric? (readonly)
Default: Undefined, in which case, the task will receive 20GiB ephemeral storage.
The amount (in GiB) of ephemeral storage to be allocated to the task.
The minimum supported value is 21 GiB and the maximum supported value is 200 GiB.
Only supported in Fargate platform version 1.4.0 or later.
365 366 367 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 365 def ephemeral_storage_gib @ephemeral_storage_gib end |
#health_check ⇒ AWSCDK::ECS::HealthCheck? (readonly)
Default: - Health check configuration from container.
The health check command and associated configuration parameters for the container.
433 434 435 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 433 def health_check @health_check end |
#health_check_grace_period ⇒ AWSCDK::Duration? (readonly)
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.
214 215 216 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 214 def health_check_grace_period @health_check_grace_period end |
#idle_timeout ⇒ AWSCDK::Duration? (readonly)
Default: - CloudFormation sets idle timeout to 60 seconds
The load balancer idle timeout, in seconds.
Can be between 1 and 4000 seconds
221 222 223 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 221 def idle_timeout @idle_timeout end |
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::IPAddressType? (readonly)
Default: - IpAddressType.IPV4
The type of IP address to use.
226 227 228 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 226 def ip_address_type @ip_address_type end |
#listener_port ⇒ Numeric? (readonly)
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.
231 232 233 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 231 def listener_port @listener_port end |
#load_balancer ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationLoadBalancer? (readonly)
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]
241 242 243 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 241 def load_balancer @load_balancer end |
#load_balancer_name ⇒ String? (readonly)
Default: - Automatically generated name.
Name of the load balancer.
246 247 248 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 246 def load_balancer_name @load_balancer_name end |
#max_healthy_percent ⇒ Numeric? (readonly)
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.
251 252 253 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 251 def max_healthy_percent @max_healthy_percent end |
#memory_limit_mib ⇒ Numeric? (readonly)
Default: 512
The amount (in MiB) of memory used by the task.
This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:
512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)
Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU)
Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU)
This default is set in the underlying FargateTaskDefinition construct.
389 390 391 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 389 def memory_limit_mib @memory_limit_mib end |
#min_healthy_percent ⇒ Numeric? (readonly)
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.
256 257 258 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 256 def min_healthy_percent @min_healthy_percent end |
#open_listener ⇒ Boolean? (readonly)
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.
261 262 263 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 261 def open_listener @open_listener end |
#platform_version ⇒ AWSCDK::ECS::FargatePlatformVersion? (readonly)
Default: Latest
The platform version on which to run your service.
If one is not specified, the LATEST platform version is used by default. For more information, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
398 399 400 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 398 def platform_version @platform_version end |
#propagate_tags ⇒ AWSCDK::ECS::PropagatedTagSource? (readonly)
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.
268 269 270 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 268 def @propagate_tags end |
#protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
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.
277 278 279 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 277 def protocol @protocol end |
#protocol_version ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocolVersion? (readonly)
Default: ApplicationProtocolVersion.HTTP1
The protocol version to use.
282 283 284 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 282 def protocol_version @protocol_version end |
#public_load_balancer ⇒ Boolean? (readonly)
Default: true
Determines whether the Load Balancer will be internet-facing.
287 288 289 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 287 def public_load_balancer @public_load_balancer end |
#record_type ⇒ AWSCDK::ECSPatterns::ApplicationLoadBalancedServiceRecordType? (readonly)
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.
294 295 296 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 294 def record_type @record_type end |
#redirect_http ⇒ Boolean? (readonly)
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.
301 302 303 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 301 def redirect_http @redirect_http end |
#runtime_platform ⇒ AWSCDK::ECS::RuntimePlatform? (readonly)
Default: - If the property is undefined, operatingSystemFamily is LINUX and cpuArchitecture is X86_64
The runtime platform of the task definition.
403 404 405 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 403 def runtime_platform @runtime_platform end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - A new security group is created.
The security groups to associate with the service.
If you do not specify a security group, a new security group is created.
440 441 442 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 440 def security_groups @security_groups end |
#service_name ⇒ String? (readonly)
Default: - CloudFormation-generated name.
The name of the service.
306 307 308 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 306 def service_name @service_name end |
#ssl_policy ⇒ AWSCDK::ElasticLoadBalancingv2::SSLPolicy? (readonly)
Default: - The recommended elastic load balancing security policy
The security policy that defines which ciphers and protocols are supported by the ALB Listener.
311 312 313 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 311 def ssl_policy @ssl_policy end |
#target_protocol ⇒ AWSCDK::ElasticLoadBalancingv2::ApplicationProtocol? (readonly)
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).
319 320 321 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 319 def target_protocol @target_protocol end |
#task_definition ⇒ AWSCDK::ECS::FargateTaskDefinition? (readonly)
Default: - none
The task definition to use for tasks in the service. TaskDefinition or TaskImageOptions must be specified, but not both.
[disable-awslint:ref-via-interface]
410 411 412 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 410 def task_definition @task_definition end |
#task_image_options ⇒ AWSCDK::ECSPatterns::ApplicationLoadBalancedTaskImageOptions? (readonly)
Default: none
The properties required to create a new task definition.
TaskDefinition or TaskImageOptions must be specified, but not both.
326 327 328 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 326 def @task_image_options end |
#task_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - Public subnets if assignPublicIp is set, otherwise the first available one of Private, Isolated, Public, in that order.
The subnets to associate with the service.
445 446 447 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 445 def task_subnets @task_subnets end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
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.
333 334 335 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 333 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 447 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", :cpu => "cpu", :ephemeral_storage_gib => "ephemeralStorageGiB", :memory_limit_mib => "memoryLimitMiB", :platform_version => "platformVersion", :runtime_platform => "runtimePlatform", :task_definition => "taskDefinition", :assign_public_ip => "assignPublicIp", :container_cpu => "containerCpu", :container_memory_limit_mib => "containerMemoryLimitMiB", :health_check => "healthCheck", :security_groups => "securityGroups", :task_subnets => "taskSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'ecs_patterns/application_load_balanced_fargate_service_props.rb', line 495 def to_jsii result = {} result.merge!(super) 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, "cpu" => @cpu, "ephemeralStorageGiB" => @ephemeral_storage_gib, "memoryLimitMiB" => @memory_limit_mib, "platformVersion" => @platform_version, "runtimePlatform" => @runtime_platform, "taskDefinition" => @task_definition, "assignPublicIp" => @assign_public_ip, "containerCpu" => @container_cpu, "containerMemoryLimitMiB" => @container_memory_limit_mib, "healthCheck" => @health_check, "securityGroups" => @security_groups, "taskSubnets" => @task_subnets, }) result.compact end |