EC2ServiceArgs class
The set of arguments for EC2Service. The set of arguments for EC2Service.
Constructors
-
EC2ServiceArgs({Input<
ServiceAlarms?> ? alarms, Input<String?> ? availabilityZoneRebalancing, Input<List< ? capacityProviderStrategies, Input<ServiceCapacityProviderStrategy> ?>String?> ? cluster, Input<bool?> ? continueBeforeSteadyState, Input<ServiceDeploymentCircuitBreaker?> ? deploymentCircuitBreaker, Input<ServiceDeploymentConfiguration?> ? deploymentConfiguration, Input<ServiceDeploymentController?> ? deploymentController, Input<int?> ? deploymentMaximumPercent, Input<int?> ? deploymentMinimumHealthyPercent, Input<int?> ? desiredCount, Input<bool?> ? enableEcsManagedTags, Input<bool?> ? enableExecuteCommand, Input<bool?> ? forceDelete, Input<bool?> ? forceNewDeployment, Input<int?> ? healthCheckGracePeriodSeconds, Input<String?> ? iamRole, Input<List< ? loadBalancers, Input<ServiceLoadBalancer> ?>String?> ? name, Input<ServiceNetworkConfiguration?> ? networkConfiguration, Input<List< ? orderedPlacementStrategies, Input<ServiceOrderedPlacementStrategy> ?>List< ? placementConstraints, Input<ServicePlacementConstraint> ?>String?> ? platformVersion, Input<String?> ? propagateTags, Input<String?> ? region, Input<String?> ? schedulingStrategy, Input<ServiceServiceConnectConfiguration?> ? serviceConnectConfiguration, Input<ServiceServiceRegistries?> ? serviceRegistries, Input<bool?> ? sigintRollback, Input<Map< ? tags, Input<String, String> ?>String?> ? taskDefinition, Input<EC2ServiceTaskDefinition?> ? taskDefinitionArgs, Input<Map< ? triggers, Input<String, String> ?>bool?> ? useClusterDefaultCapacityProviderStrategy, Input<ServiceVolumeConfiguration?> ? volumeConfiguration, Input<List< ? vpcLatticeConfigurations})ServiceVpcLatticeConfiguration> ?> -
Creates a new EC2ServiceArgs.
alarmsInformation about the CloudWatch alarms. See below.availabilityZoneRebalancingECS automatically redistributes tasks within a service across Availability Zones (AZs) to mitigate the risk of impaired application availability due to underlying infrastructure failures and task lifecycle activities. The valid values areENABLEDandDISABLED. When creating a new service, if no value is specified, it defaults toENABLEDif the service is compatible with AvailabilityZoneRebalancing. When updating an existing service, if no value is specified it defaults to the existing service's AvailabilityZoneRebalancing value. If the service never had an AvailabilityZoneRebalancing value set, Amazon ECS treats this asDISABLED.capacityProviderStrategiesCapacity provider strategies to use for the service. Can be one or more. Updating this argument requiresforceNewDeployment = true. See below. Conflicts withlaunchType.clusterARN of an ECS cluster.continueBeforeSteadyStateIftrue, this provider will not wait for the service to reach a steady state (likeaws ecs wait services-stable) before continuing. Defaultfalse.deploymentCircuitBreakerConfiguration block for deployment circuit breaker. See below.deploymentConfigurationConfiguration block for deployment settings. See below.deploymentControllerConfiguration block for deployment controller configuration. See below.deploymentMaximumPercentUpper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using theDAEMONscheduling strategy.deploymentMinimumHealthyPercentLower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.desiredCountNumber of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using theDAEMONscheduling strategy.enableEcsManagedTagsWhether to enable Amazon ECS managed tags for the tasks within the service.enableExecuteCommandWhether to enable Amazon ECS Exec for the tasks within the service.forceDeleteEnable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses theREPLICAscheduling strategy.forceNewDeploymentEnable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g.,myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deployorderedPlacementStrategyandplacementConstraintsupdates.healthCheckGracePeriodSecondsSeconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.iamRoleARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use theawsvpcnetwork mode. If usingawsvpcnetwork mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.loadBalancersConfiguration block for load balancers. See below.nameName of the service (up to 255 letters, numbers, hyphens, and underscores)networkConfigurationNetwork configuration for the service. This parameter is required for task definitions that use theawsvpcnetwork mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.orderedPlacementStrategiesService level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unlessforceNewDeploymentis enabled. The maximum number oforderedPlacementStrategyblocks is5. See below.placementConstraintsRules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unlessforceNewDeploymentis enabled. Maximum number ofplacementConstraintsis10. See below.platformVersionPlatform version on which to run your service. Only applicable forlaunchTypeset toFARGATE. Defaults toLATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.propagateTagsWhether to propagate the tags from the task definition or the service to the tasks. The valid values areSERVICEandTASK_DEFINITION.regionRegion where this resource will be managed. Defaults to the Region set in the provider configuration.schedulingStrategyScheduling strategy to use for the service. The valid values areREPLICAandDAEMON. Defaults toREPLICA. Note that Tasks using the Fargate launch type or theCODE_DEPLOYorEXTERNALdeployment controller types don't support theDAEMONscheduling strategy.serviceConnectConfigurationECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.serviceRegistriesService discovery registries for the service. The maximum number ofserviceRegistriesblocks is1. See below.sigintRollbackWhether to enable graceful termination of deployments using SIGINT signals. When enabled, allows customers to safely cancel an in-progress deployment and automatically trigger a rollback to the previous stable state. Defaults tofalse. Only applicable when usingECSdeployment controller and requireswaitForSteadyState = true.tagsKey-value map of resource tags. If configured with a providerdefaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.taskDefinitionFamily and revision (family:revision) or full ARN of the task definition that you want to run in your service. EithertaskDefinitionortaskDefinitionArgsmust be provided.taskDefinitionArgsThe args of task definition that you want to run in your service. EithertaskDefinitionortaskDefinitionArgsmust be provided.triggersMap of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with"plantimestamp()". When using the triggers property you also need to set the forceNewDeployment property to True.useClusterDefaultCapacityProviderStrategyIftrue, this service will use the cluster's default capacity provider strategy. When enabled, this provider omits bothlaunchTypeandcapacityProviderStrategiesfrom the ECS service. Only one ofuseClusterDefaultCapacityProviderStrategyorcapacityProviderStrategiescan be provided. The cluster must have a default capacity provider strategy configured, or ECS service creation or update will fail.volumeConfigurationConfiguration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.vpcLatticeConfigurationsVPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.const -
EC2ServiceArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
alarms
→ Input<
ServiceAlarms?> ? -
Information about the CloudWatch alarms. See below.
final
-
availabilityZoneRebalancing
→ Input<
String?> ? -
ECS automatically redistributes tasks within a service across Availability Zones (AZs) to mitigate the risk of impaired application availability due to underlying infrastructure failures and task lifecycle activities. The valid values are
ENABLEDandDISABLED. When creating a new service, if no value is specified, it defaults toENABLEDif the service is compatible with AvailabilityZoneRebalancing. When updating an existing service, if no value is specified it defaults to the existing service's AvailabilityZoneRebalancing value. If the service never had an AvailabilityZoneRebalancing value set, Amazon ECS treats this asDISABLED.final -
capacityProviderStrategies
→ Input<
List< ?ServiceCapacityProviderStrategy> ?> -
Capacity provider strategies to use for the service. Can be one or more. Updating this argument requires
forceNewDeployment = true. See below. Conflicts withlaunchType.final -
cluster
→ Input<
String?> ? -
ARN of an ECS cluster.
final
-
continueBeforeSteadyState
→ Input<
bool?> ? -
If
true, this provider will not wait for the service to reach a steady state (likeaws ecs wait services-stable) before continuing. Defaultfalse.final -
deploymentCircuitBreaker
→ Input<
ServiceDeploymentCircuitBreaker?> ? -
Configuration block for deployment circuit breaker. See below.
final
-
deploymentConfiguration
→ Input<
ServiceDeploymentConfiguration?> ? -
Configuration block for deployment settings. See below.
final
-
deploymentController
→ Input<
ServiceDeploymentController?> ? -
Configuration block for deployment controller configuration. See below.
final
-
deploymentMaximumPercent
→ Input<
int?> ? -
Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the
DAEMONscheduling strategy.final -
deploymentMinimumHealthyPercent
→ Input<
int?> ? -
Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
final
-
desiredCount
→ Input<
int?> ? -
Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMONscheduling strategy.final -
enableEcsManagedTags
→ Input<
bool?> ? -
Whether to enable Amazon ECS managed tags for the tasks within the service.
final
-
enableExecuteCommand
→ Input<
bool?> ? -
Whether to enable Amazon ECS Exec for the tasks within the service.
final
-
forceDelete
→ Input<
bool?> ? -
Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICAscheduling strategy.final -
forceNewDeployment
→ Input<
bool?> ? -
Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g.,
myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deployorderedPlacementStrategyandplacementConstraintsupdates. When using the forceNewDeployment property you also need to configure the triggers property.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
healthCheckGracePeriodSeconds
→ Input<
int?> ? -
Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
final
-
iamRole
→ Input<
String?> ? -
ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the
awsvpcnetwork mode. If usingawsvpcnetwork mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.final -
loadBalancers
→ Input<
List< ?ServiceLoadBalancer> ?> -
Configuration block for load balancers. See below.
final
-
name
→ Input<
String?> ? -
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
final
-
networkConfiguration
→ Input<
ServiceNetworkConfiguration?> ? -
Network configuration for the service. This parameter is required for task definitions that use the
awsvpcnetwork mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.final -
orderedPlacementStrategies
→ Input<
List< ?ServiceOrderedPlacementStrategy> ?> -
Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
forceNewDeploymentis enabled. The maximum number oforderedPlacementStrategyblocks is5. See below.final -
placementConstraints
→ Input<
List< ?ServicePlacementConstraint> ?> -
Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
forceNewDeploymentis enabled. Maximum number ofplacementConstraintsis10. See below.final -
platformVersion
→ Input<
String?> ? -
Platform version on which to run your service. Only applicable for
launchTypeset toFARGATE. Defaults toLATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.final -
propagateTags
→ Input<
String?> ? -
Whether to propagate the tags from the task definition or the service to the tasks. The valid values are
SERVICEandTASK_DEFINITION.final -
region
→ Input<
String?> ? -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schedulingStrategy
→ Input<
String?> ? -
Scheduling strategy to use for the service. The valid values are
REPLICAandDAEMON. Defaults toREPLICA. Note that Tasks using the Fargate launch type or theCODE_DEPLOYorEXTERNALdeployment controller types don't support theDAEMONscheduling strategy.final -
serviceConnectConfiguration
→ Input<
ServiceServiceConnectConfiguration?> ? -
ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
final
-
serviceRegistries
→ Input<
ServiceServiceRegistries?> ? -
Service discovery registries for the service. The maximum number of
serviceRegistriesblocks is1. See below.final -
sigintRollback
→ Input<
bool?> ? -
Whether to enable graceful termination of deployments using SIGINT signals. When enabled, allows customers to safely cancel an in-progress deployment and automatically trigger a rollback to the previous stable state. Defaults to
false. Only applicable when usingECSdeployment controller and requireswaitForSteadyState = true.final -
Key-value map of resource tags. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.final -
taskDefinition
→ Input<
String?> ? -
Family and revision (
family:revision) or full ARN of the task definition that you want to run in your service. Either taskDefinition or taskDefinitionArgs must be provided.final -
taskDefinitionArgs
→ Input<
EC2ServiceTaskDefinition?> ? -
The args of task definition that you want to run in your service. Either taskDefinition or taskDefinitionArgs must be provided.
final
-
triggers
→ Input<
Map< ?String, String> ?> -
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
"plantimestamp()". When using the triggers property you also need to set the forceNewDeployment property to True.final -
useClusterDefaultCapacityProviderStrategy
→ Input<
bool?> ? -
If
true, this service will use the cluster's default capacity provider strategy. When enabled, this provider omits bothlaunchTypeandcapacityProviderStrategiesfrom the ECS service. Only one of useClusterDefaultCapacityProviderStrategy or capacityProviderStrategies can be provided. The cluster must have a default capacity provider strategy configured, or ECS service creation or update will fail.final -
volumeConfiguration
→ Input<
ServiceVolumeConfiguration?> ? -
Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
final
-
vpcLatticeConfigurations
→ Input<
List< ?ServiceVpcLatticeConfiguration> ?> -
VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited