BaseServiceOptions

class aws_cdk.aws_ecs.BaseServiceOptions(*, cluster, cloud_map_options=None, desired_count=None, enable_ecs_managed_tags=None, health_check_grace_period=None, max_healthy_percent=None, min_healthy_percent=None, propagate_tags=None, service_name=None)

Bases: object

__init__(*, cluster, cloud_map_options=None, desired_count=None, enable_ecs_managed_tags=None, health_check_grace_period=None, max_healthy_percent=None, min_healthy_percent=None, propagate_tags=None, service_name=None)

The properties for the base Ec2Service or FargateService service.

Parameters
  • cluster (ICluster) – The name of the cluster that hosts the service.

  • cloud_map_options (Optional[CloudMapOptions]) – The options for configuring an Amazon ECS service to use service discovery. Default: - AWS Cloud Map service discovery is not enabled.

  • desired_count (Union[int, float, None]) – The desired number of instantiations of the task definition to keep running on the service. Default: 1

  • enable_ecs_managed_tags (Optional[bool]) – Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see Tagging Your Amazon ECS Resources Default: false

  • health_check_grace_period (Optional[Duration]) – 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

  • max_healthy_percent (Union[int, float, None]) – 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

  • min_healthy_percent (Union[int, float, None]) – 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

  • propagate_tags (Optional[PropagatedTagSource]) – 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 Default: PropagatedTagSource.NONE

  • service_name (Optional[str]) – The name of the service. Default: - CloudFormation-generated name.

Attributes

cloud_map_options

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

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

Return type

Optional[CloudMapOptions]

cluster

The name of the cluster that hosts the service.

Return type

ICluster

desired_count

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

default :default: 1

Return type

Union[int, float, None]

enable_ecs_managed_tags

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

For more information, see Tagging Your Amazon ECS Resources

default :default: false

Return type

Optional[bool]

health_check_grace_period

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 :default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set

Return type

Optional[Duration]

max_healthy_percent

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 :default: - 100 if daemon, otherwise 200

Return type

Union[int, float, None]

min_healthy_percent

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 :default: - 0 if daemon, otherwise 50

Return type

Union[int, float, None]

propagate_tags

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

default :default: PropagatedTagSource.NONE

Return type

Optional[PropagatedTagSource]

service_name

The name of the service.

default :default: - CloudFormation-generated name.

Return type

Optional[str]