AWS::ECS::Service¶
The AWS::ECS::Service resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and...
Generated by cfn-typegen --out cfn_types AWS::ECS::Service into cfn_types/ecs.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::ECS resources."""
from collections.abc import Mapping, Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
_c0=["SERVICE","TASK_DEFINITION"]
CONSTRAINTS:dict[str,Any]={
'AWS::ECS::Service':{'PropagateTags':{'e':_c0},'PlacementStrategies':{'T':{'P':{'Type':{'e':["binpack","random","spread"]}}}},'VolumeConfigurations':{'T':{'P':{'ManagedEBSVolume':{'P':{'TagSpecifications':{'T':{'P':{'PropagateTags':{'e':_c0}}}}}}}}},'LaunchType':{'e':["EC2","FARGATE","EXTERNAL"]},'AvailabilityZoneRebalancing':{'e':["ENABLED","DISABLED"]},'SchedulingStrategy':{'e':["DAEMON","REPLICA"]},'NetworkConfiguration':{'P':{'AwsvpcConfiguration':{'P':{'AssignPublicIp':{'e':["DISABLED","ENABLED"]}}}}},'Monitoring':{'P':{'MetricConfigurations':{'i':1,'I':2,'T':{'P':{'ResolutionSeconds':{'e':[20,60]},'MetricNames':{'i':1,'I':2,'T':{'e':["CPUUtilization","MemoryUtilization"]}}}}}}},'ForceNewDeployment':{'P':{'ForceNewDeploymentNonce':{'l':1,'L':255}}},'PlacementConstraints':{'T':{'P':{'Type':{'e':["distinctInstance","memberOf"]}}}},'ServiceConnectConfiguration':{'P':{'ContainerConfigurations':{'i':0,'I':10,'T':{'P':{'LogLevel':{'e':["debug","info"]}}}},'AccessLogConfiguration':{'P':{'Format':{'e':["TEXT","JSON"]},'IncludeQueryParameters':{'e':["DISABLED","ENABLED"]}}}}},'DeploymentController':{'P':{'Type':{'e':["CODE_DEPLOY","ECS","EXTERNAL"]}}},'DeploymentConfiguration':{'P':{'CanaryConfiguration':{'P':{'CanaryPercent':{'m':0.1,'M':100},'CanaryBakeTimeInMinutes':{'m':0,'M':1440}}},'BakeTimeInMinutes':{'m':0,'M':1440},'LifecycleHooks':{'T':{'P':{'TimeoutConfiguration':{'P':{'Action':{'e':["ROLLBACK","CONTINUE"]},'TimeoutInMinutes':{'m':1,'M':20160}}},'LifecycleStages':{'i':1,'T':{'e':["RECONCILE_SERVICE","PRE_SCALE_UP","POST_SCALE_UP","TEST_TRAFFIC_SHIFT","POST_TEST_TRAFFIC_SHIFT","PRE_PRODUCTION_TRAFFIC_SHIFT","PRODUCTION_TRAFFIC_SHIFT","POST_PRODUCTION_TRAFFIC_SHIFT"]}},'TargetType':{'e':["AWS_LAMBDA","PAUSE"]}}}},'EarlySuccessCriteria':{'P':{'SourceServiceRevisionCleanup':{'e':["BLOCKING","DEFERRED"]},'HealthyPercent':{'m':0,'M':100}}},'Strategy':{'e':["ROLLING","BLUE_GREEN","LINEAR","CANARY"]},'DeploymentCircuitBreaker':{'P':{'ThresholdConfiguration':{'P':{'Type':{'e':["COUNT","BOUNDED_PERCENT","UNBOUNDED_PERCENT"]}}}}},'LinearConfiguration':{'P':{'StepBakeTimeInMinutes':{'m':0,'M':1440},'StepPercent':{'m':3,'M':100}}}}},'GatewayConnectors':{'T':{'P':{'Filters':{'P':{'AccessTypes':{'T':{'e':["PUBLIC","PRIVATE"]}}}},'HealthCheck':{'P':{'HealthCheckProtocol':{'e':["HTTP","HTTPS"]}}}}}}},
}
ATTRIBUTES:dict[str,Any]={"AWS::ECS::Service":["Cluster","Name","ServiceArn"]}
RULES:dict[str,Any]={}
Nested types (46)
These are defined above the properties in the generated module.
class ServicePlacementStrategy(TypedDict, closed=True):
'The task placement strategy for a task or service.'
Field: NotRequired[Expr[str]]
'The field to apply the placement strategy against.'
Type: Expr[str]
'The type of placement strategy.'
class ServiceServiceRegistry(TypedDict, closed=True):
'The details for the service registry.'
ContainerName: NotRequired[Expr[str]]
'The container name value to be used for your service discovery service.'
Port: NotRequired[Expr[int]]
'The port value used if your service discovery service specified an SRV record.'
ContainerPort: NotRequired[Expr[int]]
'The port value to be used for your service discovery service.'
RegistryArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the service registry.'
class ServiceEBSTagSpecification(TypedDict, closed=True):
'The tag specifications of an Amazon EBS volume.'
PropagateTags: NotRequired[Expr[str]]
'Determines whether to propagate the tags from the task definition to the Amazon EBS volume.'
ResourceType: Expr[str]
'The type of volume resource.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'The tags applied to this Amazon EBS volume.'
class ServiceServiceManagedEBSVolumeConfiguration(TypedDict, closed=True):
'The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf.'
SnapshotId: NotRequired[Expr[str]]
'The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service.'
VolumeType: NotRequired[Expr[str]]
'The volume type.'
KmsKeyId: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) identifier of the AWS Key Management Service key to use for Amazon EBS encryption.'
TagSpecifications: NotRequired[Expr[Sequence[Expr[ServiceEBSTagSpecification]]]]
'The tags to apply to the volume.'
FilesystemType: NotRequired[Expr[str]]
'The filesystem type for the volume.'
Encrypted: NotRequired[Expr[bool]]
'Indicates whether the volume should be encrypted.'
Throughput: NotRequired[Expr[int]]
'The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.'
VolumeInitializationRate: NotRequired[Expr[int]]
'The rate, in MiB/s, at which data is fetched from a snapshot of an existing EBS volume to create new volumes for attachment to the tasks maintained by the se...'
Iops: NotRequired[Expr[int]]
'The number of I/O operations per second (IOPS).'
SizeInGiB: NotRequired[Expr[int]]
'The size of the volume in GiB.'
RoleArn: Expr[str]
'The ARN of the IAM role to associate with this volume.'
class ServiceServiceVolumeConfiguration(TypedDict, closed=True):
'The configuration for a volume specified in the task definition as a volume that is configured at launch time.'
ManagedEBSVolume: NotRequired[Expr[ServiceServiceManagedEBSVolumeConfiguration]]
'The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf.'
Name: Expr[str]
'The name of the volume.'
class ServiceCapacityProviderStrategyItem(TypedDict, closed=True):
'The details of a capacity provider strategy.'
CapacityProvider: NotRequired[Expr[str]]
'The short name of the capacity provider.'
Base: NotRequired[Expr[int]]
'The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider for each service.'
Weight: NotRequired[Expr[int]]
'The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.'
class ServiceAwsVpcConfiguration(TypedDict, closed=True):
'An object representing the networking details for a task or service.'
SecurityGroups: NotRequired[Expr[list[Expr[str]]]]
'The IDs of the security groups associated with the task or service.'
Subnets: NotRequired[Expr[list[Expr[str]]]]
'The IDs of the subnets associated with the task or service.'
AssignPublicIp: NotRequired[Expr[str]]
"Whether the task's elastic network interface receives a public IP address."
class ServiceNetworkConfiguration(TypedDict, closed=True):
'The network configuration for a task or service.'
AwsvpcConfiguration: NotRequired[Expr[ServiceAwsVpcConfiguration]]
'The VPC subnets and security groups that are associated with a task.'
class ServiceMetricConfiguration(TypedDict, closed=True):
'The configuration for a specific set of metrics to collect for a service.'
ResolutionSeconds: Expr[int]
'The resolution, in seconds, at which to collect the metrics.'
MetricNames: Expr[list[Expr[str]]]
'The list of metric names to configure.'
class ServiceMonitoringConfiguration(TypedDict, closed=True):
'The optional monitoring configuration for a service, which defines the resolution for the service-level ``CPUUtilization`` and ``MemoryUtilization`` Amazon C...'
MetricConfigurations: Expr[Sequence[Expr[ServiceMetricConfiguration]]]
'The list of metric configurations for the service monitoring.'
class ServiceForceNewDeployment(TypedDict, closed=True):
'Determines whether to force a new deployment of the service.'
EnableForceNewDeployment: Expr[bool]
'Determines whether to force a new deployment of the service.'
ForceNewDeploymentNonce: NotRequired[Expr[str]]
'When you change the``ForceNewDeploymentNonce`` value in your template, it signals ECS to start a new deployment even though no other service parameters have ...'
class ServicePlacementConstraint(TypedDict, closed=True):
'An object representing a constraint on task placement.'
Type: Expr[str]
'The type of constraint.'
Expression: NotRequired[Expr[str]]
'A cluster query language expression to apply to the constraint.'
class ServiceAdvancedConfiguration(TypedDict, closed=True):
'The advanced settings for a load balancer used in blue/green deployments.'
TestListenerRule: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) that identifies ) that identifies the test listener rule (in the case of an Application Load Balancer) or listener (in the cas...'
AlternateTargetGroupArn: Expr[str]
'The Amazon Resource Name (ARN) of the alternate target group for Amazon ECS blue/green deployments.'
ProductionListenerRule: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) that that identifies the production listener rule (in the case of an Application Load Balancer) or listener (in the case for a...'
RoleArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call the Elastic Load Balancing APIs for you.'
class ServiceLoadBalancer(TypedDict, closed=True):
'The ``LoadBalancer`` property specifies details on a load balancer that is used with a service.'
TargetGroupArn: NotRequired[Expr[str]]
'The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.'
LoadBalancerName: NotRequired[Expr[str]]
'The name of the load balancer to associate with the Amazon ECS service or task set.'
ContainerName: NotRequired[Expr[str]]
'The name of the container (as it appears in a container definition) to associate with the load balancer.'
ContainerPort: NotRequired[Expr[int]]
'The port on the container to associate with the load balancer.'
AdvancedConfiguration: NotRequired[Expr[ServiceAdvancedConfiguration]]
'The advanced settings for the load balancer used in blue/green deployments.'
class ServiceTimeoutConfiguration(TypedDict, closed=True):
'An object that represents the timeout configurations for Service Connect.'
PerRequestTimeoutSeconds: NotRequired[Expr[int]]
'The amount of time waiting for the upstream to respond with a complete response per request.'
IdleTimeoutSeconds: NotRequired[Expr[int]]
'The amount of time in seconds a connection will stay active while idle.'
class ServiceServiceConnectTestTrafficRulesHeaderValue(TypedDict, closed=True):
Exact: Expr[str]
class ServiceServiceConnectTestTrafficRulesHeader(TypedDict, closed=True):
Value: NotRequired[Expr[ServiceServiceConnectTestTrafficRulesHeaderValue]]
Name: Expr[str]
class ServiceServiceConnectTestTrafficRules(TypedDict, closed=True):
'The test traffic routing configuration for Amazon ECS blue/green deployments.'
Header: Expr[ServiceServiceConnectTestTrafficRulesHeader]
'The HTTP header-based routing rules that determine which requests should be routed to the new service version during blue/green deployment testing.'
class ServiceServiceConnectClientAlias(TypedDict, closed=True):
'Each alias ("endpoint") is a fully-qualified name and port number that other tasks ("clients") can use to connect to this service.'
DnsName: NotRequired[Expr[str]]
'The ``dnsName`` is the name that you use in the applications of client tasks to connect to this service.'
TestTrafficRules: NotRequired[Expr[ServiceServiceConnectTestTrafficRules]]
'The configuration for test traffic routing rules used during blue/green deployments with Amazon ECS Service Connect.'
Port: Expr[int]
'The listening port number for the Service Connect proxy.'
class ServiceServiceConnectTlsCertificateAuthority(TypedDict, closed=True):
'The certificate root authority that secures your service.'
AwsPcaAuthorityArn: NotRequired[Expr[str]]
'The ARN of the AWS Private Certificate Authority certificate.'
class ServiceServiceConnectTlsConfiguration(TypedDict, closed=True):
'The key that encrypts and decrypts your resources for Service Connect TLS.'
IssuerCertificateAuthority: Expr[ServiceServiceConnectTlsCertificateAuthority]
'The signer certificate authority.'
KmsKey: NotRequired[Expr[str]]
'The AWS Key Management Service key.'
RoleArn: NotRequired[Expr[str]]
"The Amazon Resource Name (ARN) of the IAM role that's associated with the Service Connect TLS."
class ServiceServiceConnectService(TypedDict, closed=True):
'The Service Connect service object configuration.'
Timeout: NotRequired[Expr[ServiceTimeoutConfiguration]]
'A reference to an object that represents the configured timeouts for Service Connect.'
IngressPortOverride: NotRequired[Expr[int]]
'The port number for the Service Connect proxy to listen on.'
ClientAliases: NotRequired[Expr[Sequence[Expr[ServiceServiceConnectClientAlias]]]]
'The list of client aliases for this Service Connect service.'
Tls: NotRequired[Expr[ServiceServiceConnectTlsConfiguration]]
'A reference to an object that represents a Transport Layer Security (TLS) configuration.'
DiscoveryName: NotRequired[Expr[str]]
'The ``discoveryName`` is the name of the new CMAP service that Amazon ECS creates for this Amazon ECS service.'
PortName: Expr[str]
'The ``portName`` must match the name of one of the ``portMappings`` from all the containers in the task definition of this Amazon ECS service.'
class ServiceServiceConnectContainerConfiguration(TypedDict, closed=True):
LogLevel: NotRequired[Expr[str]]
class ServiceServiceConnectAccessLogConfiguration(TypedDict, closed=True):
'Configuration for Service Connect access logging.'
Format: Expr[str]
'The format for Service Connect access log output.'
IncludeQueryParameters: NotRequired[Expr[str]]
'Specifies whether to include query parameters in Service Connect access logs.'
class ServiceSecret(TypedDict, closed=True):
'An object representing the secret to expose to your container.'
ValueFrom: Expr[str]
'The secret to expose to the container.'
Name: Expr[str]
'The name of the secret.'
class ServiceLogConfiguration(TypedDict, closed=True):
'The log configuration for the container.'
SecretOptions: NotRequired[Expr[Sequence[Expr[ServiceSecret]]]]
'The secrets to pass to the log configuration.'
Options: NotRequired[Expr[Mapping[str, Expr[str]]]]
'The configuration options to send to the log driver.'
LogDriver: NotRequired[Expr[str]]
'The log driver to use for the container.'
class ServiceServiceConnectConfiguration(TypedDict, closed=True):
'The Service Connect configuration of your Amazon ECS service.'
Services: NotRequired[Expr[Sequence[Expr[ServiceServiceConnectService]]]]
'The list of Service Connect service objects.'
ContainerConfigurations: NotRequired[Expr[Sequence[Expr[ServiceServiceConnectContainerConfiguration]]]]
AccessLogConfiguration: NotRequired[Expr[ServiceServiceConnectAccessLogConfiguration]]
'The configuration for Service Connect access logging.'
Enabled: Expr[bool]
'Specifies whether to use Service Connect with this service.'
LogConfiguration: NotRequired[Expr[ServiceLogConfiguration]]
'The log configuration for the container.'
Namespace: NotRequired[Expr[str]]
'The namespace name or full Amazon Resource Name (ARN) of the CMAPlong namespace for use with Service Connect.'
class ServiceVpcLatticeAdvancedConfiguration(TypedDict, closed=True):
'The advanced settings for VPC Lattice used in blue/green deployments.'
TestListenerRule: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) that identifies the test listener rule or listener for routing test traffic.'
AlternateTargetGroupArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the alternate target group associated with the VPC Lattice Configuration for Amazon ECS blue/green deployments.'
ProductionListenerRule: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) that identifies the production listener rule or listener for routing production traffic.'
class ServiceVpcLatticeConfiguration(TypedDict, closed=True):
'The VPC Lattice configuration for your service that holds the information for the target group(s) Amazon ECS tasks will be registered to.'
TargetGroupArn: Expr[str]
'The full Amazon Resource Name (ARN) of the target group or groups associated with the VPC Lattice configuration that the Amazon ECS tasks will be registered to.'
PortName: Expr[str]
'The name of the port mapping to register in the VPC Lattice target group.'
RoleArn: Expr[str]
'The ARN of the IAM role to associate with this VPC Lattice configuration.'
AdvancedConfiguration: NotRequired[Expr[ServiceVpcLatticeAdvancedConfiguration]]
class ServiceDeploymentController(TypedDict, closed=True):
'The deployment controller to use for the service.'
Type: NotRequired[Expr[str]]
'The deployment controller type to use.'
class ServiceCanaryConfiguration(TypedDict, closed=True):
'Configuration for a canary deployment strategy that shifts a fixed percentage of traffic to the new service revision, waits for a specified bake time, then s...'
CanaryPercent: NotRequired[Expr[float]]
'The percentage of production traffic to shift to the new service revision during the canary phase.'
CanaryBakeTimeInMinutes: NotRequired[Expr[int]]
'The amount of time in minutes to wait during the canary phase before shifting the remaining production traffic to the new service revision.'
class ServiceHookTimeoutConfig(TypedDict, closed=True):
Action: NotRequired[Expr[str]]
TimeoutInMinutes: NotRequired[Expr[int]]
class ServiceDeploymentLifecycleHook(TypedDict, closed=True):
'A deployment lifecycle hook runs custom logic or pauses the deployment at specific stages of the deployment process.'
TimeoutConfiguration: NotRequired[Expr[ServiceHookTimeoutConfig]]
'The timeout configuration for the lifecycle hook.'
LifecycleStages: Expr[list[Expr[str]]]
'The lifecycle stages at which to run the hook.'
TargetType: NotRequired[Expr[str]]
'The type of action the lifecycle hook performs.'
HookTargetArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the hook target.'
HookDetails: NotRequired[Expr[str] | Expr[Mapping[str, Any]]]
'Use this field to specify custom parameters that ECS passes to your hook target invocations (such as a Lambda function).'
RoleArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf.'
class ServiceDeploymentEarlySuccessCriteria(TypedDict, closed=True):
'You can use early success criteria only with rolling deployment strategy.'
SourceServiceRevisionCleanup: NotRequired[Expr[str]]
"The time when Amazon ECS removes the source revisions' tasks relative to deployment completion."
HealthyPercent: NotRequired[Expr[int]]
'The percentage of healthy tasks that the target service revision must reach before Amazon ECS considers the deployment successful.'
Enable: NotRequired[Expr[bool]]
'Specifies whether to use the early success criteria for the service deployment.'
class ServiceDeploymentAlarms(TypedDict, closed=True):
'One of the methods which provide a way for you to quickly identify when a deployment has failed, and then to optionally roll back the failure to the last wor...'
AlarmNames: Expr[list[Expr[str]]]
'One or more CloudWatch alarm names.'
Enable: Expr[bool]
'Determines whether to use the CloudWatch alarm option in the service deployment process.'
Rollback: Expr[bool]
'Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.'
class ServiceThresholdConfiguration(TypedDict, closed=True):
'Defines the failure threshold that the deployment circuit breaker uses to monitor a deployment.'
Type: Expr[str]
'Determines how Amazon ECS uses ``value`` to calculate the failure threshold.'
Value: Expr[int]
'Specifies the integer that Amazon ECS uses to calculate the failure threshold.'
class ServiceDeploymentCircuitBreaker(TypedDict, closed=True):
'The deployment circuit breaker can only be used for services using the rolling update (``ECS``) deployment type.'
ThresholdConfiguration: NotRequired[Expr[ServiceThresholdConfiguration]]
'The threshold configuration that controls when the deployment circuit breaker triggers.'
Enable: Expr[bool]
'Determines whether to use the deployment circuit breaker logic for the service.'
ResetOnHealthyTask: NotRequired[Expr[bool]]
'Specifies whether the deployment circuit breaker resets its failure count when a task reaches a healthy state.'
Rollback: Expr[bool]
'Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.'
class ServiceLinearConfiguration(TypedDict, closed=True):
'Configuration for a linear deployment strategy that shifts production traffic in equal percentage increments with configurable wait times between each step u...'
StepBakeTimeInMinutes: NotRequired[Expr[int]]
'The amount of time in minutes to wait between each traffic shifting step during a linear deployment.'
StepPercent: NotRequired[Expr[float]]
'The percentage of production traffic to shift in each step during a linear deployment.'
class ServiceDeploymentConfiguration(TypedDict, closed=True):
'Optional deployment parameters that control how many tasks run during a deployment and the ordering of stopping and starting tasks.'
CanaryConfiguration: NotRequired[Expr[ServiceCanaryConfiguration]]
'Configuration for canary deployment strategy.'
BakeTimeInMinutes: NotRequired[Expr[int]]
'The duration waiting before terminating the previous service revision and marking a deployment complete.'
LifecycleHooks: NotRequired[Expr[Sequence[Expr[ServiceDeploymentLifecycleHook]]]]
'An array of deployment lifecycle hook objects to run custom logic or pause the deployment at specific stages of the deployment lifecycle.'
EarlySuccessCriteria: NotRequired[Expr[ServiceDeploymentEarlySuccessCriteria]]
'The early success criteria configuration for a rolling deployment.'
Alarms: NotRequired[Expr[ServiceDeploymentAlarms]]
'Information about the CloudWatch alarms.'
Strategy: NotRequired[Expr[str]]
'The deployment strategy for the service.'
DeploymentCircuitBreaker: NotRequired[Expr[ServiceDeploymentCircuitBreaker]]
'The deployment circuit breaker can only be used for services using the rolling update (``ECS``) deployment type.'
MaximumPercent: NotRequired[Expr[int]]
"If a service is using the rolling update (``ECS``) deployment type, the ``maximumPercent`` parameter represents an upper limit on the number of your service'..."
MinimumHealthyPercent: NotRequired[Expr[int]]
"If a service is using the rolling update (``ECS``) deployment type, the ``minimumHealthyPercent`` represents a lower limit on the number of your service's ta..."
LinearConfiguration: NotRequired[Expr[ServiceLinearConfiguration]]
'Configuration for linear deployment strategy.'
class ServiceGatewayConnectorFilters(TypedDict, closed=True):
AccessTypes: NotRequired[Expr[list[Expr[str]]]]
class ServiceGatewayConnectorHealthCheckMatcher(TypedDict, closed=True):
GrpcCode: NotRequired[Expr[str]]
HttpCode: NotRequired[Expr[str]]
class ServiceGatewayConnectorHealthCheck(TypedDict, closed=True):
HealthCheckIntervalSeconds: NotRequired[Expr[int]]
Matcher: NotRequired[Expr[ServiceGatewayConnectorHealthCheckMatcher]]
HealthyThresholdCount: NotRequired[Expr[int]]
HealthCheckPath: NotRequired[Expr[str]]
HealthCheckProtocol: NotRequired[Expr[str]]
HealthCheckPort: NotRequired[Expr[int]]
UnhealthyThresholdCount: NotRequired[Expr[int]]
HealthCheckTimeoutSeconds: NotRequired[Expr[int]]
class ServiceGatewayConnector(TypedDict, closed=True):
Filters: NotRequired[Expr[ServiceGatewayConnectorFilters]]
HealthCheck: NotRequired[Expr[ServiceGatewayConnectorHealthCheck]]
PortName: Expr[str]
class ServiceProps(TypedDict, closed=True):
'The ``AWS::ECS::Service`` resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and...'
PlatformVersion: NotRequired[Expr[str]]
'The platform version that your tasks in the service are running on.'
PropagateTags: NotRequired[Expr[str]]
'Specifies whether to propagate the tags from the task definition to the task.'
PlacementStrategies: NotRequired[Expr[Sequence[Expr[ServicePlacementStrategy]]]]
'The placement strategy objects to use for tasks in your service.'
ServiceRegistries: NotRequired[Expr[Sequence[Expr[ServiceServiceRegistry]]]]
'The details of the service discovery registry to associate with this service.'
VolumeConfigurations: NotRequired[Expr[Sequence[Expr[ServiceServiceVolumeConfiguration]]]]
'The configuration for a volume specified in the task definition as a volume that is configured at launch time.'
CapacityProviderStrategy: NotRequired[Expr[Sequence[Expr[ServiceCapacityProviderStrategyItem]]]]
'The capacity provider strategy to use for the service.'
LaunchType: NotRequired[Expr[str]]
'The launch type on which to run your service.'
AvailabilityZoneRebalancing: NotRequired[Expr[str]]
'Indicates whether to use Availability Zone rebalancing for the service.'
SchedulingStrategy: NotRequired[Expr[str]]
'The scheduling strategy to use for the service.'
NetworkConfiguration: NotRequired[Expr[ServiceNetworkConfiguration]]
'The network configuration for the service.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'The metadata that you apply to the service to help you categorize and organize them.'
Monitoring: NotRequired[Expr[ServiceMonitoringConfiguration]]
'The optional monitoring configuration for the service, which defines the resolution for the service-level ``CPUUtilization`` and ``MemoryUtilization`` Amazon...'
ForceNewDeployment: NotRequired[Expr[ServiceForceNewDeployment]]
'Determines whether to force a new deployment of the service.'
HealthCheckGracePeriodSeconds: NotRequired[Expr[int]]
'The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks afte...'
EnableECSManagedTags: NotRequired[Expr[bool]]
'Specifies whether to turn on Amazon ECS managed tags for the tasks within the service.'
EnableExecuteCommand: NotRequired[Expr[bool]]
'Determines whether the execute command functionality is turned on for the service.'
PlacementConstraints: NotRequired[Expr[Sequence[Expr[ServicePlacementConstraint]]]]
'An array of placement constraint objects to use for tasks in your service.'
Cluster: NotRequired[Expr[str]]
'The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on.'
LoadBalancers: NotRequired[Expr[Sequence[Expr[ServiceLoadBalancer]]]]
'A list of load balancer objects to associate with the service.'
ServiceConnectConfiguration: NotRequired[Expr[ServiceServiceConnectConfiguration]]
'The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.'
DesiredCount: NotRequired[Expr[int]]
'The number of instantiations of the specified task definition to place and keep running in your service.'
VpcLatticeConfigurations: NotRequired[Expr[Sequence[Expr[ServiceVpcLatticeConfiguration]]]]
'The VPC Lattice configuration for the service being created.'
DeploymentController: NotRequired[Expr[ServiceDeploymentController]]
'The deployment controller to use for the service.'
Role: NotRequired[Expr[str]]
'The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf.'
TaskDefinition: NotRequired[Expr[str]]
'The ``family`` and ``revision`` (``family:revision``) or full ARN of the task definition to run in your service.'
ServiceName: NotRequired[Expr[str]]
'The name of your service.'
DeploymentConfiguration: NotRequired[Expr[ServiceDeploymentConfiguration]]
'Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.'
GatewayConnectors: NotRequired[Expr[Sequence[Expr[ServiceGatewayConnector]]]]
class Service(ResourceAttrs):
'The ``AWS::ECS::Service`` resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and...'
Type: Literal['AWS::ECS::Service']
Properties: NotRequired[ServiceProps]
def service(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[ServiceProps],
) -> Service:
return build('AWS::ECS::Service', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
NameServiceArn