EC2ServiceArgs class

The set of arguments for EC2Service. The set of arguments for EC2Service.

Constructors

EC2ServiceArgs({Input<ServiceAlarms?>? alarms, Input<String?>? availabilityZoneRebalancing, Input<List<ServiceCapacityProviderStrategy>?>? capacityProviderStrategies, Input<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<ServiceLoadBalancer>?>? loadBalancers, Input<String?>? name, Input<ServiceNetworkConfiguration?>? networkConfiguration, Input<List<ServiceOrderedPlacementStrategy>?>? orderedPlacementStrategies, Input<List<ServicePlacementConstraint>?>? placementConstraints, Input<String?>? platformVersion, Input<String?>? propagateTags, Input<String?>? region, Input<String?>? schedulingStrategy, Input<ServiceServiceConnectConfiguration?>? serviceConnectConfiguration, Input<ServiceServiceRegistries?>? serviceRegistries, Input<bool?>? sigintRollback, Input<Map<String, String>?>? tags, Input<String?>? taskDefinition, Input<EC2ServiceTaskDefinition?>? taskDefinitionArgs, Input<Map<String, String>?>? triggers, Input<bool?>? useClusterDefaultCapacityProviderStrategy, Input<ServiceVolumeConfiguration?>? volumeConfiguration, Input<List<ServiceVpcLatticeConfiguration>?>? vpcLatticeConfigurations})
Creates a new EC2ServiceArgs. alarms Information about the CloudWatch alarms. See below. availabilityZoneRebalancing 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 ENABLED and DISABLED. When creating a new service, if no value is specified, it defaults to ENABLED if 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 as DISABLED. capacityProviderStrategies Capacity provider strategies to use for the service. Can be one or more. Updating this argument requires forceNewDeployment = true. See below. Conflicts with launchType. cluster ARN of an ECS cluster. continueBeforeSteadyState If true, this provider will not wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false. deploymentCircuitBreaker Configuration block for deployment circuit breaker. See below. deploymentConfiguration Configuration block for deployment settings. See below. deploymentController Configuration block for deployment controller configuration. See below. deploymentMaximumPercent 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 DAEMON scheduling strategy. deploymentMinimumHealthyPercent 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. desiredCount Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy. enableEcsManagedTags Whether to enable Amazon ECS managed tags for the tasks within the service. enableExecuteCommand Whether to enable Amazon ECS Exec for the tasks within the service. forceDelete 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 REPLICA scheduling strategy. forceNewDeployment 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 deploy orderedPlacementStrategy and placementConstraints updates. healthCheckGracePeriodSeconds 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. iamRole 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 awsvpc network mode. If using awsvpc network 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. loadBalancers Configuration block for load balancers. See below. name Name of the service (up to 255 letters, numbers, hyphens, and underscores) networkConfiguration Network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below. orderedPlacementStrategies 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 forceNewDeployment is enabled. The maximum number of orderedPlacementStrategy blocks is 5. See below. placementConstraints Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless forceNewDeployment is enabled. Maximum number of placementConstraints is 10. See below. platformVersion Platform version on which to run your service. Only applicable for launchType set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide. propagateTags Whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION. region Region where this resource will be managed. Defaults to the Region set in the provider configuration. schedulingStrategy Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy. serviceConnectConfiguration 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. serviceRegistries Service discovery registries for the service. The maximum number of serviceRegistries blocks is 1. See below. sigintRollback 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 using ECS deployment controller and requires waitForSteadyState = true. tags Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level. taskDefinition 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. taskDefinitionArgs The args of task definition that you want to run in your service. Either taskDefinition or taskDefinitionArgs must be provided. triggers 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. useClusterDefaultCapacityProviderStrategy If true, this service will use the cluster's default capacity provider strategy. When enabled, this provider omits both launchType and capacityProviderStrategies from 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. volumeConfiguration 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. vpcLatticeConfigurations VPC 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 ENABLED and DISABLED. When creating a new service, if no value is specified, it defaults to ENABLED if 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 as DISABLED.
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 with launchType.
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 (like aws ecs wait services-stable) before continuing. Default false.
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 DAEMON scheduling 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 DAEMON scheduling 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 REPLICA scheduling 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 deploy orderedPlacementStrategy and placementConstraints updates. 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 awsvpc network mode. If using awsvpc network 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 awsvpc network 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 forceNewDeployment is enabled. The maximum number of orderedPlacementStrategy blocks is 5. 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 forceNewDeployment is enabled. Maximum number of placementConstraints is 10. See below.
final
platformVersion → Input<String?>?
Platform version on which to run your service. Only applicable for launchType set to FARGATE. Defaults to LATEST. 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 SERVICE and TASK_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 REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling 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 serviceRegistries blocks is 1. 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 using ECS deployment controller and requires waitForSteadyState = true.
final
tags → Input<Map<String, String>?>?
Key-value map of resource tags. If configured with a provider defaultTags configuration 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 both launchType and capacityProviderStrategies from 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