Skip to content
v2.277.0

BaseServiceOptions Struct ​

The properties for the base Ec2Service or FargateService service.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_servicediscovery as servicediscovery } from 'aws-cdk-lib';
import { aws_kms as interfaces_kms } from 'aws-cdk-lib/interfaces';

declare const cluster: ecs.Cluster;
declare const containerDefinition: ecs.ContainerDefinition;
declare const deploymentLifecycleHookTarget: ecs.IDeploymentLifecycleHookTarget;
declare const keyRef: interfaces_kms.IKeyRef;
declare const logDriver: ecs.LogDriver;
declare const namespace: servicediscovery.INamespace;
declare const role: iam.Role;
declare const serviceManagedVolume: ecs.ServiceManagedVolume;
declare const taskDefinitionRevision: ecs.TaskDefinitionRevision;
const baseServiceOptions: ecs.BaseServiceOptions = {
  cluster: cluster,

  // the properties below are optional
  bakeTime: cdk.Duration.minutes(30),
  canaryConfiguration: {
    stepBakeTime: cdk.Duration.minutes(30),
    stepPercent: 123,
  },
  capacityProviderStrategies: [{
    capacityProvider: 'capacityProvider',

    // the properties below are optional
    base: 123,
    weight: 123,
  }],
  circuitBreaker: {
    enable: false,
    rollback: false,
  },
  cloudMapOptions: {
    cloudMapNamespace: namespace,
    container: containerDefinition,
    containerPort: 123,
    dnsRecordType: servicediscovery.DnsRecordType.A,
    dnsTtl: cdk.Duration.minutes(30),
    failureThreshold: 123,
    name: 'name',
  },
  deploymentAlarms: {
    alarmNames: ['alarmNames'],

    // the properties below are optional
    behavior: ecs.AlarmBehavior.ROLLBACK_ON_ALARM,
  },
  deploymentController: {
    type: ecs.DeploymentControllerType.ECS,
  },
  deploymentStrategy: ecs.DeploymentStrategy.ROLLING,
  desiredCount: 123,
  enableECSManagedTags: false,
  enableExecuteCommand: false,
  forceNewDeployment: {
    enabled: false,

    // the properties below are optional
    nonce: 'nonce',
  },
  healthCheckGracePeriod: cdk.Duration.minutes(30),
  lifecycleHooks: [deploymentLifecycleHookTarget],
  linearConfiguration: {
    stepBakeTime: cdk.Duration.minutes(30),
    stepPercent: 123,
  },
  maxHealthyPercent: 123,
  minHealthyPercent: 123,
  propagateTags: ecs.PropagatedTagSource.SERVICE,
  serviceConnectConfiguration: {
    accessLogConfiguration: {
      format: ecs.ServiceConnectAccessLogFormat.TEXT,

      // the properties below are optional
      includeQueryParameters: false,
    },
    logDriver: logDriver,
    namespace: 'namespace',
    services: [{
      portMappingName: 'portMappingName',

      // the properties below are optional
      discoveryName: 'discoveryName',
      dnsName: 'dnsName',
      idleTimeout: cdk.Duration.minutes(30),
      ingressPortOverride: 123,
      perRequestTimeout: cdk.Duration.minutes(30),
      port: 123,
      tls: {
        awsPcaAuthorityArn: 'awsPcaAuthorityArn',
        kmsKey: keyRef,
        role: role,
      },
    }],
  },
  serviceName: 'serviceName',
  taskDefinitionRevision: taskDefinitionRevision,
  volumeConfigurations: [serviceManagedVolume],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ecs as ecs
from aws_cdk import aws_iam as iam
from aws_cdk import aws_servicediscovery as servicediscovery
from aws_cdk.interfaces import aws_kms as interfaces_kms

# cluster: ecs.Cluster
# container_definition: ecs.ContainerDefinition
# deployment_lifecycle_hook_target: ecs.IDeploymentLifecycleHookTarget
# key_ref: interfaces_kms.IKeyRef
# log_driver: ecs.LogDriver
# namespace: servicediscovery.INamespace
# role: iam.Role
# service_managed_volume: ecs.ServiceManagedVolume
# task_definition_revision: ecs.TaskDefinitionRevision

base_service_options = ecs.BaseServiceOptions(
    cluster=cluster,

    # the properties below are optional
    bake_time=cdk.Duration.minutes(30),
    canary_configuration=ecs.TrafficShiftConfig(
        step_bake_time=cdk.Duration.minutes(30),
        step_percent=123
    ),
    capacity_provider_strategies=[ecs.CapacityProviderStrategy(
        capacity_provider="capacityProvider",

        # the properties below are optional
        base=123,
        weight=123
    )],
    circuit_breaker=ecs.DeploymentCircuitBreaker(
        enable=False,
        rollback=False
    ),
    cloud_map_options=ecs.CloudMapOptions(
        cloud_map_namespace=namespace,
        container=container_definition,
        container_port=123,
        dns_record_type=servicediscovery.DnsRecordType.A,
        dns_ttl=cdk.Duration.minutes(30),
        failure_threshold=123,
        name="name"
    ),
    deployment_alarms=ecs.DeploymentAlarmConfig(
        alarm_names=["alarmNames"],

        # the properties below are optional
        behavior=ecs.AlarmBehavior.ROLLBACK_ON_ALARM
    ),
    deployment_controller=ecs.DeploymentController(
        type=ecs.DeploymentControllerType.ECS
    ),
    deployment_strategy=ecs.DeploymentStrategy.ROLLING,
    desired_count=123,
    enable_ecs_managed_tags=False,
    enable_execute_command=False,
    force_new_deployment=ecs.ForceNewDeployment(
        enabled=False,

        # the properties below are optional
        nonce="nonce"
    ),
    health_check_grace_period=cdk.Duration.minutes(30),
    lifecycle_hooks=[deployment_lifecycle_hook_target],
    linear_configuration=ecs.TrafficShiftConfig(
        step_bake_time=cdk.Duration.minutes(30),
        step_percent=123
    ),
    max_healthy_percent=123,
    min_healthy_percent=123,
    propagate_tags=ecs.PropagatedTagSource.SERVICE,
    service_connect_configuration=ecs.ServiceConnectProps(
        access_log_configuration=ecs.ServiceConnectAccessLogConfiguration(
            format=ecs.ServiceConnectAccessLogFormat.TEXT,

            # the properties below are optional
            include_query_parameters=False
        ),
        log_driver=log_driver,
        namespace="namespace",
        services=[ecs.ServiceConnectService(
            port_mapping_name="portMappingName",

            # the properties below are optional
            discovery_name="discoveryName",
            dns_name="dnsName",
            idle_timeout=cdk.Duration.minutes(30),
            ingress_port_override=123,
            per_request_timeout=cdk.Duration.minutes(30),
            port=123,
            tls=ecs.ServiceConnectTlsConfiguration(
                aws_pca_authority_arn="awsPcaAuthorityArn",
                kms_key=key_ref,
                role=role
            )
        )]
    ),
    service_name="serviceName",
    task_definition_revision=task_definition_revision,
    volume_configurations=[service_managed_volume]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.services.servicediscovery.*;
import software.amazon.awscdk.interfaces.kms.*;

Cluster cluster;
ContainerDefinition containerDefinition;
IDeploymentLifecycleHookTarget deploymentLifecycleHookTarget;
IKeyRef keyRef;
LogDriver logDriver;
INamespace namespace;
Role role;
ServiceManagedVolume serviceManagedVolume;
TaskDefinitionRevision taskDefinitionRevision;

BaseServiceOptions baseServiceOptions = BaseServiceOptions.builder()
        .cluster(cluster)

        // the properties below are optional
        .bakeTime(Duration.minutes(30))
        .canaryConfiguration(TrafficShiftConfig.builder()
                .stepBakeTime(Duration.minutes(30))
                .stepPercent(123)
                .build())
        .capacityProviderStrategies(List.of(CapacityProviderStrategy.builder()
                .capacityProvider("capacityProvider")

                // the properties below are optional
                .base(123)
                .weight(123)
                .build()))
        .circuitBreaker(DeploymentCircuitBreaker.builder()
                .enable(false)
                .rollback(false)
                .build())
        .cloudMapOptions(CloudMapOptions.builder()
                .cloudMapNamespace(namespace)
                .container(containerDefinition)
                .containerPort(123)
                .dnsRecordType(DnsRecordType.A)
                .dnsTtl(Duration.minutes(30))
                .failureThreshold(123)
                .name("name")
                .build())
        .deploymentAlarms(DeploymentAlarmConfig.builder()
                .alarmNames(List.of("alarmNames"))

                // the properties below are optional
                .behavior(AlarmBehavior.ROLLBACK_ON_ALARM)
                .build())
        .deploymentController(DeploymentController.builder()
                .type(DeploymentControllerType.ECS)
                .build())
        .deploymentStrategy(DeploymentStrategy.ROLLING)
        .desiredCount(123)
        .enableECSManagedTags(false)
        .enableExecuteCommand(false)
        .forceNewDeployment(ForceNewDeployment.builder()
                .enabled(false)

                // the properties below are optional
                .nonce("nonce")
                .build())
        .healthCheckGracePeriod(Duration.minutes(30))
        .lifecycleHooks(List.of(deploymentLifecycleHookTarget))
        .linearConfiguration(TrafficShiftConfig.builder()
                .stepBakeTime(Duration.minutes(30))
                .stepPercent(123)
                .build())
        .maxHealthyPercent(123)
        .minHealthyPercent(123)
        .propagateTags(PropagatedTagSource.SERVICE)
        .serviceConnectConfiguration(ServiceConnectProps.builder()
                .accessLogConfiguration(ServiceConnectAccessLogConfiguration.builder()
                        .format(ServiceConnectAccessLogFormat.TEXT)

                        // the properties below are optional
                        .includeQueryParameters(false)
                        .build())
                .logDriver(logDriver)
                .namespace("namespace")
                .services(List.of(ServiceConnectService.builder()
                        .portMappingName("portMappingName")

                        // the properties below are optional
                        .discoveryName("discoveryName")
                        .dnsName("dnsName")
                        .idleTimeout(Duration.minutes(30))
                        .ingressPortOverride(123)
                        .perRequestTimeout(Duration.minutes(30))
                        .port(123)
                        .tls(ServiceConnectTlsConfiguration.builder()
                                .awsPcaAuthorityArn("awsPcaAuthorityArn")
                                .kmsKey(keyRef)
                                .role(role)
                                .build())
                        .build()))
                .build())
        .serviceName("serviceName")
        .taskDefinitionRevision(taskDefinitionRevision)
        .volumeConfigurations(List.of(serviceManagedVolume))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.ServiceDiscovery;
using Amazon.CDK.Interfaces.KMS;

Cluster cluster;
ContainerDefinition containerDefinition;
IDeploymentLifecycleHookTarget deploymentLifecycleHookTarget;
IKeyRef keyRef;
LogDriver logDriver;
INamespace namespace;
Role role;
ServiceManagedVolume serviceManagedVolume;
TaskDefinitionRevision taskDefinitionRevision;

var baseServiceOptions = new BaseServiceOptions {
    Cluster = cluster,

    // the properties below are optional
    BakeTime = Duration.Minutes(30),
    CanaryConfiguration = new TrafficShiftConfig {
        StepBakeTime = Duration.Minutes(30),
        StepPercent = 123
    },
    CapacityProviderStrategies = new [] { new CapacityProviderStrategy {
        CapacityProvider = "capacityProvider",

        // the properties below are optional
        Base = 123,
        Weight = 123
    } },
    CircuitBreaker = new DeploymentCircuitBreaker {
        Enable = false,
        Rollback = false
    },
    CloudMapOptions = new CloudMapOptions {
        CloudMapNamespace = namespace,
        Container = containerDefinition,
        ContainerPort = 123,
        DnsRecordType = DnsRecordType.A,
        DnsTtl = Duration.Minutes(30),
        FailureThreshold = 123,
        Name = "name"
    },
    DeploymentAlarms = new DeploymentAlarmConfig {
        AlarmNames = new [] { "alarmNames" },

        // the properties below are optional
        Behavior = AlarmBehavior.ROLLBACK_ON_ALARM
    },
    DeploymentController = new DeploymentController {
        Type = DeploymentControllerType.ECS
    },
    DeploymentStrategy = DeploymentStrategy.ROLLING,
    DesiredCount = 123,
    EnableECSManagedTags = false,
    EnableExecuteCommand = false,
    ForceNewDeployment = new ForceNewDeployment {
        Enabled = false,

        // the properties below are optional
        Nonce = "nonce"
    },
    HealthCheckGracePeriod = Duration.Minutes(30),
    LifecycleHooks = new [] { deploymentLifecycleHookTarget },
    LinearConfiguration = new TrafficShiftConfig {
        StepBakeTime = Duration.Minutes(30),
        StepPercent = 123
    },
    MaxHealthyPercent = 123,
    MinHealthyPercent = 123,
    PropagateTags = PropagatedTagSource.SERVICE,
    ServiceConnectConfiguration = new ServiceConnectProps {
        AccessLogConfiguration = new ServiceConnectAccessLogConfiguration {
            Format = ServiceConnectAccessLogFormat.TEXT,

            // the properties below are optional
            IncludeQueryParameters = false
        },
        LogDriver = logDriver,
        Namespace = "namespace",
        Services = new [] { new ServiceConnectService {
            PortMappingName = "portMappingName",

            // the properties below are optional
            DiscoveryName = "discoveryName",
            DnsName = "dnsName",
            IdleTimeout = Duration.Minutes(30),
            IngressPortOverride = 123,
            PerRequestTimeout = Duration.Minutes(30),
            Port = 123,
            Tls = new ServiceConnectTlsConfiguration {
                AwsPcaAuthorityArn = "awsPcaAuthorityArn",
                KmsKey = keyRef,
                Role = role
            }
        } }
    },
    ServiceName = "serviceName",
    TaskDefinitionRevision = taskDefinitionRevision,
    VolumeConfigurations = new [] { serviceManagedVolume }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var cluster Cluster
var containerDefinition ContainerDefinition
var deploymentLifecycleHookTarget IDeploymentLifecycleHookTarget
var keyRef IKeyRef
var logDriver LogDriver
var namespace INamespace
var role Role
var serviceManagedVolume ServiceManagedVolume
var taskDefinitionRevision TaskDefinitionRevision

baseServiceOptions := &BaseServiceOptions{
	Cluster: cluster,

	// the properties below are optional
	BakeTime: cdk.Duration_Minutes(jsii.Number(30)),
	CanaryConfiguration: &TrafficShiftConfig{
		StepBakeTime: cdk.Duration_*Minutes(jsii.Number(30)),
		StepPercent: jsii.Number(123),
	},
	CapacityProviderStrategies: []CapacityProviderStrategy{
		&CapacityProviderStrategy{
			CapacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			Base: jsii.Number(123),
			Weight: jsii.Number(123),
		},
	},
	CircuitBreaker: &DeploymentCircuitBreaker{
		Enable: jsii.Boolean(false),
		Rollback: jsii.Boolean(false),
	},
	CloudMapOptions: &CloudMapOptions{
		CloudMapNamespace: namespace,
		Container: containerDefinition,
		ContainerPort: jsii.Number(123),
		DnsRecordType: awscdk.Aws_servicediscovery.DnsRecordType_A,
		DnsTtl: cdk.Duration_*Minutes(jsii.Number(30)),
		FailureThreshold: jsii.Number(123),
		Name: jsii.String("name"),
	},
	DeploymentAlarms: &DeploymentAlarmConfig{
		AlarmNames: []*string{
			jsii.String("alarmNames"),
		},

		// the properties below are optional
		Behavior: awscdk.Aws_ecs.AlarmBehavior_ROLLBACK_ON_ALARM,
	},
	DeploymentController: &DeploymentController{
		Type: awscdk.*Aws_ecs.DeploymentControllerType_ECS,
	},
	DeploymentStrategy: awscdk.*Aws_ecs.DeploymentStrategy_ROLLING,
	DesiredCount: jsii.Number(123),
	EnableECSManagedTags: jsii.Boolean(false),
	EnableExecuteCommand: jsii.Boolean(false),
	ForceNewDeployment: &ForceNewDeployment{
		Enabled: jsii.Boolean(false),

		// the properties below are optional
		Nonce: jsii.String("nonce"),
	},
	HealthCheckGracePeriod: cdk.Duration_*Minutes(jsii.Number(30)),
	LifecycleHooks: []IDeploymentLifecycleHookTarget{
		deploymentLifecycleHookTarget,
	},
	LinearConfiguration: &TrafficShiftConfig{
		StepBakeTime: cdk.Duration_*Minutes(jsii.Number(30)),
		StepPercent: jsii.Number(123),
	},
	MaxHealthyPercent: jsii.Number(123),
	MinHealthyPercent: jsii.Number(123),
	PropagateTags: awscdk.*Aws_ecs.PropagatedTagSource_SERVICE,
	ServiceConnectConfiguration: &ServiceConnectProps{
		AccessLogConfiguration: &ServiceConnectAccessLogConfiguration{
			Format: awscdk.*Aws_ecs.ServiceConnectAccessLogFormat_TEXT,

			// the properties below are optional
			IncludeQueryParameters: jsii.Boolean(false),
		},
		LogDriver: logDriver,
		Namespace: jsii.String("namespace"),
		Services: []ServiceConnectService{
			&ServiceConnectService{
				PortMappingName: jsii.String("portMappingName"),

				// the properties below are optional
				DiscoveryName: jsii.String("discoveryName"),
				DnsName: jsii.String("dnsName"),
				IdleTimeout: cdk.Duration_*Minutes(jsii.Number(30)),
				IngressPortOverride: jsii.Number(123),
				PerRequestTimeout: cdk.Duration_*Minutes(jsii.Number(30)),
				Port: jsii.Number(123),
				Tls: &ServiceConnectTlsConfiguration{
					AwsPcaAuthorityArn: jsii.String("awsPcaAuthorityArn"),
					KmsKey: keyRef,
					Role: role,
				},
			},
		},
	},
	ServiceName: jsii.String("serviceName"),
	TaskDefinitionRevision: taskDefinitionRevision,
	VolumeConfigurations: []ServiceManagedVolume{
		serviceManagedVolume,
	},
}

Properties ​

bakeTimeoptionalDurationbake_timeoptionalDurationbakeTimeoptionalDurationBakeTimeoptionalDurationBakeTimeoptionalDuration= none#
bake time minutes for service.
canaryConfigurationoptionalTrafficShiftConfigcanary_configurationoptionalTrafficShiftConfigcanaryConfigurationoptionalTrafficShiftConfigCanaryConfigurationoptionalTrafficShiftConfigCanaryConfigurationoptionalTrafficShiftConfig#
Configuration for canary deployment strategy.

Default: no canary configuration

Only valid when deploymentStrategy is set to CANARY.

capacityProviderStrategiesoptionalCapacityProviderStrategy[]capacity_provider_strategiesoptionaltyping.List[CapacityProviderStrategy]capacityProviderStrategiesoptionalList<CapacityProviderStrategy>CapacityProviderStrategiesoptionalCapacityProviderStrategy[]CapacityProviderStrategiesoptional*[]CapacityProviderStrategy= undefined#
A list of Capacity Provider strategies used to place a service.
circuitBreakeroptionalDeploymentCircuitBreakercircuit_breakeroptionalDeploymentCircuitBreakercircuitBreakeroptionalDeploymentCircuitBreakerCircuitBreakeroptionalDeploymentCircuitBreakerCircuitBreakeroptionalDeploymentCircuitBreaker= disabled#
Whether to enable the deployment circuit breaker.

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

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

Default: AWS Cloud Map service discovery is not enabled.

clusterIClusterclusterIClusterclusterIClusterClusterIClusterClusterIClusterrequired#
The name of the cluster that hosts the service.
deploymentAlarmsoptionalDeploymentAlarmConfigdeployment_alarmsoptionalDeploymentAlarmConfigdeploymentAlarmsoptionalDeploymentAlarmConfigDeploymentAlarmsoptionalDeploymentAlarmConfigDeploymentAlarmsoptionalDeploymentAlarmConfig#
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.

Default: No alarms will be monitored during deployment.

deploymentControlleroptionalDeploymentControllerdeployment_controlleroptionalDeploymentControllerdeploymentControlleroptionalDeploymentControllerDeploymentControlleroptionalDeploymentControllerDeploymentControlleroptionalDeploymentController#
Specifies which deployment controller to use for the service.

Default: Rolling update (ECS)

For more information, see Amazon ECS Deployment Types

deploymentStrategyoptionalDeploymentStrategydeployment_strategyoptionalDeploymentStrategydeploymentStrategyoptionalDeploymentStrategyDeploymentStrategyoptionalDeploymentStrategyDeploymentStrategyoptionalDeploymentStrategy= ROLLING#
The deployment strategy to use for the service.
desiredCountoptionalnumberdesired_countoptionalint | floatdesiredCountoptionalNumberDesiredCountoptionaldoubleDesiredCountoptional*float64#
The desired number of instantiations of the task definition to keep running on the service.

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

enableECSManagedTagsoptionalbooleanenable_ecs_managed_tagsoptionalboolenableECSManagedTagsoptionalBooleanEnableECSManagedTagsoptionalboolEnableECSManagedTagsoptional*bool= false#
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

For more information, see Tagging Your Amazon ECS Resources

enableExecuteCommandoptionalbooleanenable_execute_commandoptionalboolenableExecuteCommandoptionalBooleanEnableExecuteCommandoptionalboolEnableExecuteCommandoptional*bool= undefined#
Whether to enable the ability to execute into a container.
forceNewDeploymentoptionalForceNewDeploymentforce_new_deploymentoptionalForceNewDeploymentforceNewDeploymentoptionalForceNewDeploymentForceNewDeploymentoptionalForceNewDeploymentForceNewDeploymentoptionalForceNewDeployment#
Configuration for forcing a new deployment of the service.

Default: no forced deployment

notes

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 forceNewDeployment() method, but allows you to configure it declaratively at construction time, including the ability to explicitly disable it with enabled: false.

healthCheckGracePeriodoptionalDurationhealth_check_grace_periodoptionalDurationhealthCheckGracePeriodoptionalDurationHealthCheckGracePeriodoptionalDurationHealthCheckGracePeriodoptionalDuration#
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.

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

lifecycleHooksoptionalIDeploymentLifecycleHookTarget[]lifecycle_hooksoptionaltyping.List[IDeploymentLifecycleHookTarget]lifecycleHooksoptionalList<IDeploymentLifecycleHookTarget>LifecycleHooksoptionalIDeploymentLifecycleHookTarget[]LifecycleHooksoptional*[]IDeploymentLifecycleHookTarget= none;#
The lifecycle hooks to execute during deployment stages.
linearConfigurationoptionalTrafficShiftConfiglinear_configurationoptionalTrafficShiftConfiglinearConfigurationoptionalTrafficShiftConfigLinearConfigurationoptionalTrafficShiftConfigLinearConfigurationoptionalTrafficShiftConfig#
Configuration for linear deployment strategy.

Default: no linear configuration

Only valid when deploymentStrategy is set to LINEAR.

maxHealthyPercentoptionalnumbermax_healthy_percentoptionalint | floatmaxHealthyPercentoptionalNumberMaxHealthyPercentoptionaldoubleMaxHealthyPercentoptional*float64#
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.

Default: 100 if daemon, otherwise 200

minHealthyPercentoptionalnumbermin_healthy_percentoptionalint | floatminHealthyPercentoptionalNumberMinHealthyPercentoptionaldoubleMinHealthyPercentoptional*float64#
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.

Default: 0 if daemon, otherwise 50

propagateTagsoptionalPropagatedTagSourcepropagate_tagsoptionalPropagatedTagSourcepropagateTagsoptionalPropagatedTagSourcePropagateTagsoptionalPropagatedTagSourcePropagateTagsoptionalPropagatedTagSource= 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

serviceConnectConfigurationoptionalServiceConnectPropsservice_connect_configurationoptionalServiceConnectPropsserviceConnectConfigurationoptionalServiceConnectPropsServiceConnectConfigurationoptionalServiceConnectPropsServiceConnectConfigurationoptionalServiceConnectProps#
Configuration for Service Connect.

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

serviceNameoptionalstringservice_nameoptionalstrserviceNameoptionalStringServiceNameoptionalstringServiceNameoptional*string#
The name of the service.

Default: CloudFormation-generated name.

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

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

volumeConfigurationsoptionalServiceManagedVolume[]volume_configurationsoptionaltyping.List[ServiceManagedVolume]volumeConfigurationsoptionalList<ServiceManagedVolume>VolumeConfigurationsoptionalServiceManagedVolume[]VolumeConfigurationsoptional*[]ServiceManagedVolume= 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.