Class: AWSCDK::ECS::FargateServiceProps

Inherits:
BaseServiceOptions
  • Object
show all
Defined in:
ecs/fargate_service_props.rb

Overview

The properties for defining a service using the Fargate launch type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster:, bake_time: nil, canary_configuration: nil, capacity_provider_strategies: nil, circuit_breaker: nil, cloud_map_options: nil, deployment_alarms: nil, deployment_controller: nil, deployment_strategy: nil, desired_count: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, force_new_deployment: nil, health_check_grace_period: nil, lifecycle_hooks: nil, linear_configuration: nil, max_healthy_percent: nil, min_healthy_percent: nil, propagate_tags: nil, service_connect_configuration: nil, service_name: nil, task_definition_revision: nil, volume_configurations: nil, task_definition:, assign_public_ip: nil, availability_zone_rebalancing: nil, platform_version: nil, security_groups: nil, vpc_subnets: nil) ⇒ FargateServiceProps

Returns a new instance of FargateServiceProps.

Parameters:

  • cluster (AWSCDK::ECS::ICluster)

    The name of the cluster that hosts the service.

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

    bake time minutes for service.

  • canary_configuration (AWSCDK::ECS::TrafficShiftConfig, nil) (defaults to: nil)

    Configuration for canary deployment strategy.

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

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

  • 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.

  • deployment_alarms (AWSCDK::ECS::DeploymentAlarmConfig, nil) (defaults to: nil)

    The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time.

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

    Specifies which deployment controller to use for the service.

  • deployment_strategy (AWSCDK::ECS::DeploymentStrategy, nil) (defaults to: nil)

    The deployment strategy 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.

  • 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 to enable the ability to execute into a container.

  • force_new_deployment (AWSCDK::ECS::ForceNewDeployment, nil) (defaults to: nil)

    Configuration for forcing a new deployment of the service.

  • 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.

  • lifecycle_hooks (Array<AWSCDK::ECS::IDeploymentLifecycleHookTarget>, nil) (defaults to: nil)

    The lifecycle hooks to execute during deployment stages.

  • linear_configuration (AWSCDK::ECS::TrafficShiftConfig, nil) (defaults to: nil)

    Configuration for linear deployment strategy.

  • 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.

  • 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.

  • service_connect_configuration (AWSCDK::ECS::ServiceConnectProps, nil) (defaults to: nil)

    Configuration for Service Connect.

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

    The name of the service.

  • task_definition_revision (AWSCDK::ECS::TaskDefinitionRevision, nil) (defaults to: nil)

    Revision number for the task definition or latest to use the latest active task revision.

  • volume_configurations (Array<AWSCDK::ECS::ServiceManagedVolume>, nil) (defaults to: nil)

    Configuration details for a volume used by the service.

  • task_definition (AWSCDK::ECS::TaskDefinition)

    The task definition to use for tasks in the service.

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

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

  • availability_zone_rebalancing (AWSCDK::ECS::AvailabilityZoneRebalancing, nil) (defaults to: nil)

    Whether to use Availability Zone rebalancing for the service.

  • platform_version (AWSCDK::ECS::FargatePlatformVersion, nil) (defaults to: nil)

    The platform version on which to run your service.

  • security_groups (Array<AWSCDK::EC2::ISecurityGroup>, nil) (defaults to: nil)

    The security groups to associate with the service.

  • vpc_subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    The subnets to associate with the service.



36
37
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
# File 'ecs/fargate_service_props.rb', line 36

def initialize(cluster:, bake_time: nil, canary_configuration: nil, capacity_provider_strategies: nil, circuit_breaker: nil, cloud_map_options: nil, deployment_alarms: nil, deployment_controller: nil, deployment_strategy: nil, desired_count: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, force_new_deployment: nil, health_check_grace_period: nil, lifecycle_hooks: nil, linear_configuration: nil, max_healthy_percent: nil, min_healthy_percent: nil, propagate_tags: nil, service_connect_configuration: nil, service_name: nil, task_definition_revision: nil, volume_configurations: nil, task_definition:, assign_public_ip: nil, availability_zone_rebalancing: nil, platform_version: nil, security_groups: nil, vpc_subnets: nil)
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklDbHVzdGVyIn0=")), "cluster")
  @bake_time = bake_time
  Jsii::Type.check_type(@bake_time, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "bakeTime") unless @bake_time.nil?
  @canary_configuration = canary_configuration.is_a?(Hash) ? ::AWSCDK::ECS::TrafficShiftConfig.new(**canary_configuration.transform_keys(&:to_sym)) : canary_configuration
  Jsii::Type.check_type(@canary_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlRyYWZmaWNTaGlmdENvbmZpZyJ9")), "canaryConfiguration") unless @canary_configuration.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?
  @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?
  @deployment_alarms = deployment_alarms.is_a?(Hash) ? ::AWSCDK::ECS::DeploymentAlarmConfig.new(**deployment_alarms.transform_keys(&:to_sym)) : deployment_alarms
  Jsii::Type.check_type(@deployment_alarms, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkRlcGxveW1lbnRBbGFybUNvbmZpZyJ9")), "deploymentAlarms") unless @deployment_alarms.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?
  @deployment_strategy = deployment_strategy
  Jsii::Type.check_type(@deployment_strategy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkRlcGxveW1lbnRTdHJhdGVneSJ9")), "deploymentStrategy") unless @deployment_strategy.nil?
  @desired_count = desired_count
  Jsii::Type.check_type(@desired_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "desiredCount") unless @desired_count.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?
  @force_new_deployment = force_new_deployment.is_a?(Hash) ? ::AWSCDK::ECS::ForceNewDeployment.new(**force_new_deployment.transform_keys(&:to_sym)) : force_new_deployment
  Jsii::Type.check_type(@force_new_deployment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZvcmNlTmV3RGVwbG95bWVudCJ9")), "forceNewDeployment") unless @force_new_deployment.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?
  @lifecycle_hooks = lifecycle_hooks
  Jsii::Type.check_type(@lifecycle_hooks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuSURlcGxveW1lbnRMaWZlY3ljbGVIb29rVGFyZ2V0In0sImtpbmQiOiJhcnJheSJ9fQ==")), "lifecycleHooks") unless @lifecycle_hooks.nil?
  @linear_configuration = linear_configuration.is_a?(Hash) ? ::AWSCDK::ECS::TrafficShiftConfig.new(**linear_configuration.transform_keys(&:to_sym)) : linear_configuration
  Jsii::Type.check_type(@linear_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlRyYWZmaWNTaGlmdENvbmZpZyJ9")), "linearConfiguration") unless @linear_configuration.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?
  @propagate_tags = propagate_tags
  Jsii::Type.check_type(@propagate_tags, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlByb3BhZ2F0ZWRUYWdTb3VyY2UifQ==")), "propagateTags") unless @propagate_tags.nil?
  @service_connect_configuration = service_connect_configuration.is_a?(Hash) ? ::AWSCDK::ECS::ServiceConnectProps.new(**service_connect_configuration.transform_keys(&:to_sym)) : service_connect_configuration
  Jsii::Type.check_type(@service_connect_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlcnZpY2VDb25uZWN0UHJvcHMifQ==")), "serviceConnectConfiguration") unless @service_connect_configuration.nil?
  @service_name = service_name
  Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.nil?
  @task_definition_revision = task_definition_revision
  Jsii::Type.check_type(@task_definition_revision, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlRhc2tEZWZpbml0aW9uUmV2aXNpb24ifQ==")), "taskDefinitionRevision") unless @task_definition_revision.nil?
  @volume_configurations = volume_configurations
  Jsii::Type.check_type(@volume_configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuU2VydmljZU1hbmFnZWRWb2x1bWUifSwia2luZCI6ImFycmF5In19")), "volumeConfigurations") unless @volume_configurations.nil?
  @task_definition = task_definition
  Jsii::Type.check_type(@task_definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlRhc2tEZWZpbml0aW9uIn0=")), "taskDefinition")
  @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?
  @availability_zone_rebalancing = availability_zone_rebalancing
  Jsii::Type.check_type(@availability_zone_rebalancing, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkF2YWlsYWJpbGl0eVpvbmVSZWJhbGFuY2luZyJ9")), "availabilityZoneRebalancing") unless @availability_zone_rebalancing.nil?
  @platform_version = platform_version
  Jsii::Type.check_type(@platform_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkZhcmdhdGVQbGF0Zm9ybVZlcnNpb24ifQ==")), "platformVersion") unless @platform_version.nil?
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil?
  @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil?
end

Instance Attribute Details

#assign_public_ipBoolean? (readonly)

Note:

Default: false

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

If true, each task will receive a public IP address.

Returns:

  • (Boolean, nil)


252
253
254
# File 'ecs/fargate_service_props.rb', line 252

def assign_public_ip
  @assign_public_ip
end

#availability_zone_rebalancingAWSCDK::ECS::AvailabilityZoneRebalancing? (readonly)

Note:

Default: AvailabilityZoneRebalancing.ENABLED

Whether to use Availability Zone rebalancing for the service.

If enabled, max_healthy_percent must be greater than 100, and the service must not be a target of a Classic Load Balancer.



261
262
263
# File 'ecs/fargate_service_props.rb', line 261

def availability_zone_rebalancing
  @availability_zone_rebalancing
end

#bake_timeAWSCDK::Duration? (readonly)

Note:

Default: - none

bake time minutes for service.

Returns:



105
106
107
# File 'ecs/fargate_service_props.rb', line 105

def bake_time
  @bake_time
end

#canary_configurationAWSCDK::ECS::TrafficShiftConfig? (readonly)

Note:

Default: - no canary configuration

Configuration for canary deployment strategy.

Only valid when deploymentStrategy is set to CANARY.



112
113
114
# File 'ecs/fargate_service_props.rb', line 112

def canary_configuration
  @canary_configuration
end

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

Note:

Default: - undefined

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

Returns:



117
118
119
# File 'ecs/fargate_service_props.rb', line 117

def capacity_provider_strategies
  @capacity_provider_strategies
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.



125
126
127
# File 'ecs/fargate_service_props.rb', line 125

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.



130
131
132
# File 'ecs/fargate_service_props.rb', line 130

def cloud_map_options
  @cloud_map_options
end

#clusterAWSCDK::ECS::ICluster (readonly)

The name of the cluster that hosts the service.



100
101
102
# File 'ecs/fargate_service_props.rb', line 100

def cluster
  @cluster
end

#deployment_alarmsAWSCDK::ECS::DeploymentAlarmConfig? (readonly)

Note:

Default: - No alarms will be monitored during deployment.

The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time.



135
136
137
# File 'ecs/fargate_service_props.rb', line 135

def deployment_alarms
  @deployment_alarms
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



143
144
145
# File 'ecs/fargate_service_props.rb', line 143

def deployment_controller
  @deployment_controller
end

#deployment_strategyAWSCDK::ECS::DeploymentStrategy? (readonly)

Note:

Default: ROLLING

The deployment strategy to use for the service.



148
149
150
# File 'ecs/fargate_service_props.rb', line 148

def deployment_strategy
  @deployment_strategy
end

#desired_countNumeric? (readonly)

Note:

Default: - When creating the service, default is 1; when updating the service, default uses the current task number.

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

Returns:

  • (Numeric, nil)


153
154
155
# File 'ecs/fargate_service_props.rb', line 153

def desired_count
  @desired_count
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)


161
162
163
# File 'ecs/fargate_service_props.rb', line 161

def enable_ecs_managed_tags
  @enable_ecs_managed_tags
end

#enable_execute_commandBoolean? (readonly)

Note:

Default: - undefined

Whether to enable the ability to execute into a container.

Returns:

  • (Boolean, nil)


166
167
168
# File 'ecs/fargate_service_props.rb', line 166

def enable_execute_command
  @enable_execute_command
end

#force_new_deploymentAWSCDK::ECS::ForceNewDeployment? (readonly)

Note:

Default: - no forced deployment

Configuration for forcing a new deployment of the service.

By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination (my_image:latest) or to roll Fargate tasks onto a newer platform version.

This is equivalent to calling the force_new_deployment() method, but allows you to configure it declaratively at construction time, including the ability to explicitly disable it with enabled: false.



182
183
184
# File 'ecs/fargate_service_props.rb', line 182

def force_new_deployment
  @force_new_deployment
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:



187
188
189
# File 'ecs/fargate_service_props.rb', line 187

def health_check_grace_period
  @health_check_grace_period
end

#lifecycle_hooksArray<AWSCDK::ECS::IDeploymentLifecycleHookTarget>? (readonly)

Note:

Default: - none;

The lifecycle hooks to execute during deployment stages.



192
193
194
# File 'ecs/fargate_service_props.rb', line 192

def lifecycle_hooks
  @lifecycle_hooks
end

#linear_configurationAWSCDK::ECS::TrafficShiftConfig? (readonly)

Note:

Default: - no linear configuration

Configuration for linear deployment strategy.

Only valid when deploymentStrategy is set to LINEAR.



199
200
201
# File 'ecs/fargate_service_props.rb', line 199

def linear_configuration
  @linear_configuration
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)


204
205
206
# File 'ecs/fargate_service_props.rb', line 204

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)


209
210
211
# File 'ecs/fargate_service_props.rb', line 209

def min_healthy_percent
  @min_healthy_percent
end

#platform_versionAWSCDK::ECS::FargatePlatformVersion? (readonly)

Note:

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.



270
271
272
# File 'ecs/fargate_service_props.rb', line 270

def platform_version
  @platform_version
end

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

Note:

Default: PropagatedTagSource.NONE

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

Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE



216
217
218
# File 'ecs/fargate_service_props.rb', line 216

def propagate_tags
  @propagate_tags
end

#security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

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.

Returns:



277
278
279
# File 'ecs/fargate_service_props.rb', line 277

def security_groups
  @security_groups
end

#service_connect_configurationAWSCDK::ECS::ServiceConnectProps? (readonly)

Note:

Default: No ports are advertised via Service Connect on this service, and the service cannot make requests to other services via Service Connect.

Configuration for Service Connect.



221
222
223
# File 'ecs/fargate_service_props.rb', line 221

def service_connect_configuration
  @service_connect_configuration
end

#service_nameString? (readonly)

Note:

Default: - CloudFormation-generated name.

The name of the service.

Returns:

  • (String, nil)


226
227
228
# File 'ecs/fargate_service_props.rb', line 226

def service_name
  @service_name
end

#task_definitionAWSCDK::ECS::TaskDefinition (readonly)

The task definition to use for tasks in the service.

[disable-awslint:ref-via-interface]



245
246
247
# File 'ecs/fargate_service_props.rb', line 245

def task_definition
  @task_definition
end

#task_definition_revisionAWSCDK::ECS::TaskDefinitionRevision? (readonly)

Note:

Default: - Uses the revision of the passed task definition deployed by CloudFormation

Revision number for the task definition or latest to use the latest active task revision.



231
232
233
# File 'ecs/fargate_service_props.rb', line 231

def task_definition_revision
  @task_definition_revision
end

#volume_configurationsArray<AWSCDK::ECS::ServiceManagedVolume>? (readonly)

Note:

Default: - undefined

Configuration details for a volume used by the service.

This allows you to specify details about the EBS volume that can be attached to ECS tasks.

Returns:



239
240
241
# File 'ecs/fargate_service_props.rb', line 239

def volume_configurations
  @volume_configurations
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

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.



282
283
284
# File 'ecs/fargate_service_props.rb', line 282

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'ecs/fargate_service_props.rb', line 284

def self.jsii_properties
  {
    :cluster => "cluster",
    :bake_time => "bakeTime",
    :canary_configuration => "canaryConfiguration",
    :capacity_provider_strategies => "capacityProviderStrategies",
    :circuit_breaker => "circuitBreaker",
    :cloud_map_options => "cloudMapOptions",
    :deployment_alarms => "deploymentAlarms",
    :deployment_controller => "deploymentController",
    :deployment_strategy => "deploymentStrategy",
    :desired_count => "desiredCount",
    :enable_ecs_managed_tags => "enableECSManagedTags",
    :enable_execute_command => "enableExecuteCommand",
    :force_new_deployment => "forceNewDeployment",
    :health_check_grace_period => "healthCheckGracePeriod",
    :lifecycle_hooks => "lifecycleHooks",
    :linear_configuration => "linearConfiguration",
    :max_healthy_percent => "maxHealthyPercent",
    :min_healthy_percent => "minHealthyPercent",
    :propagate_tags => "propagateTags",
    :service_connect_configuration => "serviceConnectConfiguration",
    :service_name => "serviceName",
    :task_definition_revision => "taskDefinitionRevision",
    :volume_configurations => "volumeConfigurations",
    :task_definition => "taskDefinition",
    :assign_public_ip => "assignPublicIp",
    :availability_zone_rebalancing => "availabilityZoneRebalancing",
    :platform_version => "platformVersion",
    :security_groups => "securityGroups",
    :vpc_subnets => "vpcSubnets",
  }
end

Instance Method Details

#to_jsiiObject



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# File 'ecs/fargate_service_props.rb', line 318

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "cluster" => @cluster,
    "bakeTime" => @bake_time,
    "canaryConfiguration" => @canary_configuration,
    "capacityProviderStrategies" => @capacity_provider_strategies,
    "circuitBreaker" => @circuit_breaker,
    "cloudMapOptions" => @cloud_map_options,
    "deploymentAlarms" => @deployment_alarms,
    "deploymentController" => @deployment_controller,
    "deploymentStrategy" => @deployment_strategy,
    "desiredCount" => @desired_count,
    "enableECSManagedTags" => @enable_ecs_managed_tags,
    "enableExecuteCommand" => @enable_execute_command,
    "forceNewDeployment" => @force_new_deployment,
    "healthCheckGracePeriod" => @health_check_grace_period,
    "lifecycleHooks" => @lifecycle_hooks,
    "linearConfiguration" => @linear_configuration,
    "maxHealthyPercent" => @max_healthy_percent,
    "minHealthyPercent" => @min_healthy_percent,
    "propagateTags" => @propagate_tags,
    "serviceConnectConfiguration" => @service_connect_configuration,
    "serviceName" => @service_name,
    "taskDefinitionRevision" => @task_definition_revision,
    "volumeConfigurations" => @volume_configurations,
    "taskDefinition" => @task_definition,
    "assignPublicIp" => @assign_public_ip,
    "availabilityZoneRebalancing" => @availability_zone_rebalancing,
    "platformVersion" => @platform_version,
    "securityGroups" => @security_groups,
    "vpcSubnets" => @vpc_subnets,
  })
  result.compact
end