aws_sdk_ecs/operation/update_service/
_update_service_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateServiceInput {
6    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
7    /// <p>You can't change the cluster name.</p>
8    pub cluster: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the service to update.</p>
10    pub service: ::std::option::Option<::std::string::String>,
11    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
12    /// <p>This parameter doesn't trigger a new service deployment.</p>
13    pub desired_count: ::std::option::Option<i32>,
14    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p>
15    /// <p>This parameter triggers a new service deployment.</p>
16    pub task_definition: ::std::option::Option<::std::string::String>,
17    /// <p>The details of a capacity provider strategy. You can set a capacity provider when you create a cluster, run a task, or update a service.</p>
18    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
19    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
20    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
21    /// <p>The following list provides the valid transitions:</p>
22    /// <ul>
23    /// <li>
24    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
25    /// <li>
26    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
27    /// <li>
28    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
29    /// <li>
30    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
31    /// <li>
32    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
33    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
34    /// </ul>
35    /// <p>For information about Amazon Web Services CDK considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service-parameters.html">Amazon Web Services CDK considerations</a>.</p>
36    /// <p>This parameter doesn't trigger a new service deployment.</p>
37    pub capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
38    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
39    /// <p>This parameter doesn't trigger a new service deployment.</p>
40    pub deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
41    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
42    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html">Balancing an Amazon ECS service across Availability Zones</a> in the <i> <i>Amazon Elastic Container Service Developer Guide</i> </i>.</p>
43    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
44    /// <ul>
45    /// <li>
46    /// <p>For create service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to <code>ENABLED</code>.</p></li>
47    /// <li>
48    /// <p>For update service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults to the existing service’s <code>AvailabilityZoneRebalancing</code> value. If the service never had an <code>AvailabilityZoneRebalancing</code> value set, Amazon ECS treats this as <code>DISABLED</code>.</p></li>
49    /// </ul>
50    /// <p>This parameter doesn't trigger a new service deployment.</p>
51    pub availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
52    /// <p>An object representing the network configuration for the service.</p>
53    /// <p>This parameter triggers a new service deployment.</p>
54    pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
55    /// <p>An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.</p>
56    /// <p>You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
57    /// <p>This parameter doesn't trigger a new service deployment.</p>
58    pub placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
59    /// <p>The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.</p>
60    /// <p>You can specify a maximum of five strategy rules for each service.</p>
61    /// <p>This parameter doesn't trigger a new service deployment.</p>
62    pub placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
63    /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
64    /// <p>This parameter triggers a new service deployment.</p>
65    pub platform_version: ::std::option::Option<::std::string::String>,
66    /// <p>Determines whether to force a new deployment of the service. 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 (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p>
67    pub force_new_deployment: ::std::option::Option<bool>,
68    /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of <code>0</code> is used. If you don't use any of the health checks, then <code>healthCheckGracePeriodSeconds</code> is unused.</p>
69    /// <p>If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p>
70    /// <p>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
71    /// <p>This parameter doesn't trigger a new service deployment.</p>
72    pub health_check_grace_period_seconds: ::std::option::Option<i32>,
73    /// <p>The deployment controller to use for the service.</p>
74    pub deployment_controller: ::std::option::Option<crate::types::DeploymentController>,
75    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
76    /// <p>If you do not want to override the value that was set when the service was created, you can set this to <code>null</code> when performing this action.</p>
77    /// <p>This parameter doesn't trigger a new service deployment.</p>
78    pub enable_execute_command: ::std::option::Option<bool>,
79    /// <p>Determines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
80    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
81    /// <p>This parameter doesn't trigger a new service deployment.</p>
82    pub enable_ecs_managed_tags: ::std::option::Option<bool>,
83    /// <note>
84    /// <p>You must have a service-linked role when you update this property</p>
85    /// </note>
86    /// <p>A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.</p>
87    /// <p>When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.</p>
88    /// <p>For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.</p>
89    /// <p>For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code> through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
90    /// <p>For services that use the external deployment controller, you can add, update, or remove load balancers by using <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>. Note that multiple target groups are not supported for external deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
91    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
92    /// <p>This parameter triggers a new service deployment.</p>
93    pub load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
94    /// <p>Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
95    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
96    /// <p>This parameter doesn't trigger a new service deployment.</p>
97    pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
98    /// <note>
99    /// <p>You must have a service-linked role when you update this property.</p>
100    /// <p>For more information about the role see the <code>CreateService</code> request parameter <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-role"> <code>role</code> </a>.</p>
101    /// </note>
102    /// <p>The details for the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p>
103    /// <p>When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.</p>
104    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
105    /// <p>This parameter triggers a new service deployment.</p>
106    pub service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
107    /// <p>The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.</p>
108    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
109    /// <p>This parameter triggers a new service deployment.</p>
110    pub service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
111    /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html">ServiceManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.</p>
112    /// <p>This parameter triggers a new service deployment.</p>
113    pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
114    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
115    /// <p>This parameter triggers a new service deployment.</p>
116    pub vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
117}
118impl UpdateServiceInput {
119    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
120    /// <p>You can't change the cluster name.</p>
121    pub fn cluster(&self) -> ::std::option::Option<&str> {
122        self.cluster.as_deref()
123    }
124    /// <p>The name of the service to update.</p>
125    pub fn service(&self) -> ::std::option::Option<&str> {
126        self.service.as_deref()
127    }
128    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
129    /// <p>This parameter doesn't trigger a new service deployment.</p>
130    pub fn desired_count(&self) -> ::std::option::Option<i32> {
131        self.desired_count
132    }
133    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p>
134    /// <p>This parameter triggers a new service deployment.</p>
135    pub fn task_definition(&self) -> ::std::option::Option<&str> {
136        self.task_definition.as_deref()
137    }
138    /// <p>The details of a capacity provider strategy. You can set a capacity provider when you create a cluster, run a task, or update a service.</p>
139    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
140    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
141    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
142    /// <p>The following list provides the valid transitions:</p>
143    /// <ul>
144    /// <li>
145    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
146    /// <li>
147    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
148    /// <li>
149    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
150    /// <li>
151    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
152    /// <li>
153    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
154    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
155    /// </ul>
156    /// <p>For information about Amazon Web Services CDK considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service-parameters.html">Amazon Web Services CDK considerations</a>.</p>
157    /// <p>This parameter doesn't trigger a new service deployment.</p>
158    ///
159    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capacity_provider_strategy.is_none()`.
160    pub fn capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
161        self.capacity_provider_strategy.as_deref().unwrap_or_default()
162    }
163    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
164    /// <p>This parameter doesn't trigger a new service deployment.</p>
165    pub fn deployment_configuration(&self) -> ::std::option::Option<&crate::types::DeploymentConfiguration> {
166        self.deployment_configuration.as_ref()
167    }
168    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
169    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html">Balancing an Amazon ECS service across Availability Zones</a> in the <i> <i>Amazon Elastic Container Service Developer Guide</i> </i>.</p>
170    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
171    /// <ul>
172    /// <li>
173    /// <p>For create service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to <code>ENABLED</code>.</p></li>
174    /// <li>
175    /// <p>For update service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults to the existing service’s <code>AvailabilityZoneRebalancing</code> value. If the service never had an <code>AvailabilityZoneRebalancing</code> value set, Amazon ECS treats this as <code>DISABLED</code>.</p></li>
176    /// </ul>
177    /// <p>This parameter doesn't trigger a new service deployment.</p>
178    pub fn availability_zone_rebalancing(&self) -> ::std::option::Option<&crate::types::AvailabilityZoneRebalancing> {
179        self.availability_zone_rebalancing.as_ref()
180    }
181    /// <p>An object representing the network configuration for the service.</p>
182    /// <p>This parameter triggers a new service deployment.</p>
183    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
184        self.network_configuration.as_ref()
185    }
186    /// <p>An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.</p>
187    /// <p>You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
188    /// <p>This parameter doesn't trigger a new service deployment.</p>
189    ///
190    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_constraints.is_none()`.
191    pub fn placement_constraints(&self) -> &[crate::types::PlacementConstraint] {
192        self.placement_constraints.as_deref().unwrap_or_default()
193    }
194    /// <p>The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.</p>
195    /// <p>You can specify a maximum of five strategy rules for each service.</p>
196    /// <p>This parameter doesn't trigger a new service deployment.</p>
197    ///
198    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_strategy.is_none()`.
199    pub fn placement_strategy(&self) -> &[crate::types::PlacementStrategy] {
200        self.placement_strategy.as_deref().unwrap_or_default()
201    }
202    /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
203    /// <p>This parameter triggers a new service deployment.</p>
204    pub fn platform_version(&self) -> ::std::option::Option<&str> {
205        self.platform_version.as_deref()
206    }
207    /// <p>Determines whether to force a new deployment of the service. 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 (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p>
208    pub fn force_new_deployment(&self) -> ::std::option::Option<bool> {
209        self.force_new_deployment
210    }
211    /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of <code>0</code> is used. If you don't use any of the health checks, then <code>healthCheckGracePeriodSeconds</code> is unused.</p>
212    /// <p>If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p>
213    /// <p>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
214    /// <p>This parameter doesn't trigger a new service deployment.</p>
215    pub fn health_check_grace_period_seconds(&self) -> ::std::option::Option<i32> {
216        self.health_check_grace_period_seconds
217    }
218    /// <p>The deployment controller to use for the service.</p>
219    pub fn deployment_controller(&self) -> ::std::option::Option<&crate::types::DeploymentController> {
220        self.deployment_controller.as_ref()
221    }
222    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
223    /// <p>If you do not want to override the value that was set when the service was created, you can set this to <code>null</code> when performing this action.</p>
224    /// <p>This parameter doesn't trigger a new service deployment.</p>
225    pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
226        self.enable_execute_command
227    }
228    /// <p>Determines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
229    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
230    /// <p>This parameter doesn't trigger a new service deployment.</p>
231    pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
232        self.enable_ecs_managed_tags
233    }
234    /// <note>
235    /// <p>You must have a service-linked role when you update this property</p>
236    /// </note>
237    /// <p>A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.</p>
238    /// <p>When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.</p>
239    /// <p>For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.</p>
240    /// <p>For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code> through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
241    /// <p>For services that use the external deployment controller, you can add, update, or remove load balancers by using <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>. Note that multiple target groups are not supported for external deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
242    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
243    /// <p>This parameter triggers a new service deployment.</p>
244    ///
245    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.load_balancers.is_none()`.
246    pub fn load_balancers(&self) -> &[crate::types::LoadBalancer] {
247        self.load_balancers.as_deref().unwrap_or_default()
248    }
249    /// <p>Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
250    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
251    /// <p>This parameter doesn't trigger a new service deployment.</p>
252    pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
253        self.propagate_tags.as_ref()
254    }
255    /// <note>
256    /// <p>You must have a service-linked role when you update this property.</p>
257    /// <p>For more information about the role see the <code>CreateService</code> request parameter <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-role"> <code>role</code> </a>.</p>
258    /// </note>
259    /// <p>The details for the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p>
260    /// <p>When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.</p>
261    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
262    /// <p>This parameter triggers a new service deployment.</p>
263    ///
264    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.service_registries.is_none()`.
265    pub fn service_registries(&self) -> &[crate::types::ServiceRegistry] {
266        self.service_registries.as_deref().unwrap_or_default()
267    }
268    /// <p>The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.</p>
269    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
270    /// <p>This parameter triggers a new service deployment.</p>
271    pub fn service_connect_configuration(&self) -> ::std::option::Option<&crate::types::ServiceConnectConfiguration> {
272        self.service_connect_configuration.as_ref()
273    }
274    /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html">ServiceManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.</p>
275    /// <p>This parameter triggers a new service deployment.</p>
276    ///
277    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.volume_configurations.is_none()`.
278    pub fn volume_configurations(&self) -> &[crate::types::ServiceVolumeConfiguration] {
279        self.volume_configurations.as_deref().unwrap_or_default()
280    }
281    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
282    /// <p>This parameter triggers a new service deployment.</p>
283    ///
284    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_lattice_configurations.is_none()`.
285    pub fn vpc_lattice_configurations(&self) -> &[crate::types::VpcLatticeConfiguration] {
286        self.vpc_lattice_configurations.as_deref().unwrap_or_default()
287    }
288}
289impl UpdateServiceInput {
290    /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
291    pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
292        crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
293    }
294}
295
296/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
297#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
298#[non_exhaustive]
299pub struct UpdateServiceInputBuilder {
300    pub(crate) cluster: ::std::option::Option<::std::string::String>,
301    pub(crate) service: ::std::option::Option<::std::string::String>,
302    pub(crate) desired_count: ::std::option::Option<i32>,
303    pub(crate) task_definition: ::std::option::Option<::std::string::String>,
304    pub(crate) capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
305    pub(crate) deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
306    pub(crate) availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
307    pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
308    pub(crate) placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
309    pub(crate) placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
310    pub(crate) platform_version: ::std::option::Option<::std::string::String>,
311    pub(crate) force_new_deployment: ::std::option::Option<bool>,
312    pub(crate) health_check_grace_period_seconds: ::std::option::Option<i32>,
313    pub(crate) deployment_controller: ::std::option::Option<crate::types::DeploymentController>,
314    pub(crate) enable_execute_command: ::std::option::Option<bool>,
315    pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
316    pub(crate) load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
317    pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
318    pub(crate) service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
319    pub(crate) service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
320    pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
321    pub(crate) vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
322}
323impl UpdateServiceInputBuilder {
324    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
325    /// <p>You can't change the cluster name.</p>
326    pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
327        self.cluster = ::std::option::Option::Some(input.into());
328        self
329    }
330    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
331    /// <p>You can't change the cluster name.</p>
332    pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
333        self.cluster = input;
334        self
335    }
336    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
337    /// <p>You can't change the cluster name.</p>
338    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
339        &self.cluster
340    }
341    /// <p>The name of the service to update.</p>
342    /// This field is required.
343    pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
344        self.service = ::std::option::Option::Some(input.into());
345        self
346    }
347    /// <p>The name of the service to update.</p>
348    pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349        self.service = input;
350        self
351    }
352    /// <p>The name of the service to update.</p>
353    pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
354        &self.service
355    }
356    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
357    /// <p>This parameter doesn't trigger a new service deployment.</p>
358    pub fn desired_count(mut self, input: i32) -> Self {
359        self.desired_count = ::std::option::Option::Some(input);
360        self
361    }
362    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
363    /// <p>This parameter doesn't trigger a new service deployment.</p>
364    pub fn set_desired_count(mut self, input: ::std::option::Option<i32>) -> Self {
365        self.desired_count = input;
366        self
367    }
368    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
369    /// <p>This parameter doesn't trigger a new service deployment.</p>
370    pub fn get_desired_count(&self) -> &::std::option::Option<i32> {
371        &self.desired_count
372    }
373    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p>
374    /// <p>This parameter triggers a new service deployment.</p>
375    pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
376        self.task_definition = ::std::option::Option::Some(input.into());
377        self
378    }
379    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p>
380    /// <p>This parameter triggers a new service deployment.</p>
381    pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
382        self.task_definition = input;
383        self
384    }
385    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p>
386    /// <p>This parameter triggers a new service deployment.</p>
387    pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
388        &self.task_definition
389    }
390    /// Appends an item to `capacity_provider_strategy`.
391    ///
392    /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
393    ///
394    /// <p>The details of a capacity provider strategy. You can set a capacity provider when you create a cluster, run a task, or update a service.</p>
395    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
396    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
397    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
398    /// <p>The following list provides the valid transitions:</p>
399    /// <ul>
400    /// <li>
401    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
402    /// <li>
403    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
404    /// <li>
405    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
406    /// <li>
407    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
408    /// <li>
409    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
410    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
411    /// </ul>
412    /// <p>For information about Amazon Web Services CDK considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service-parameters.html">Amazon Web Services CDK considerations</a>.</p>
413    /// <p>This parameter doesn't trigger a new service deployment.</p>
414    pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
415        let mut v = self.capacity_provider_strategy.unwrap_or_default();
416        v.push(input);
417        self.capacity_provider_strategy = ::std::option::Option::Some(v);
418        self
419    }
420    /// <p>The details of a capacity provider strategy. You can set a capacity provider when you create a cluster, run a task, or update a service.</p>
421    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
422    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
423    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
424    /// <p>The following list provides the valid transitions:</p>
425    /// <ul>
426    /// <li>
427    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
428    /// <li>
429    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
430    /// <li>
431    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
432    /// <li>
433    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
434    /// <li>
435    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
436    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
437    /// </ul>
438    /// <p>For information about Amazon Web Services CDK considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service-parameters.html">Amazon Web Services CDK considerations</a>.</p>
439    /// <p>This parameter doesn't trigger a new service deployment.</p>
440    pub fn set_capacity_provider_strategy(
441        mut self,
442        input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
443    ) -> Self {
444        self.capacity_provider_strategy = input;
445        self
446    }
447    /// <p>The details of a capacity provider strategy. You can set a capacity provider when you create a cluster, run a task, or update a service.</p>
448    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
449    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
450    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
451    /// <p>The following list provides the valid transitions:</p>
452    /// <ul>
453    /// <li>
454    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
455    /// <li>
456    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
457    /// <li>
458    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
459    /// <li>
460    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
461    /// <li>
462    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
463    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
464    /// </ul>
465    /// <p>For information about Amazon Web Services CDK considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service-parameters.html">Amazon Web Services CDK considerations</a>.</p>
466    /// <p>This parameter doesn't trigger a new service deployment.</p>
467    pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
468        &self.capacity_provider_strategy
469    }
470    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
471    /// <p>This parameter doesn't trigger a new service deployment.</p>
472    pub fn deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
473        self.deployment_configuration = ::std::option::Option::Some(input);
474        self
475    }
476    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
477    /// <p>This parameter doesn't trigger a new service deployment.</p>
478    pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
479        self.deployment_configuration = input;
480        self
481    }
482    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
483    /// <p>This parameter doesn't trigger a new service deployment.</p>
484    pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
485        &self.deployment_configuration
486    }
487    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
488    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html">Balancing an Amazon ECS service across Availability Zones</a> in the <i> <i>Amazon Elastic Container Service Developer Guide</i> </i>.</p>
489    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
490    /// <ul>
491    /// <li>
492    /// <p>For create service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to <code>ENABLED</code>.</p></li>
493    /// <li>
494    /// <p>For update service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults to the existing service’s <code>AvailabilityZoneRebalancing</code> value. If the service never had an <code>AvailabilityZoneRebalancing</code> value set, Amazon ECS treats this as <code>DISABLED</code>.</p></li>
495    /// </ul>
496    /// <p>This parameter doesn't trigger a new service deployment.</p>
497    pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
498        self.availability_zone_rebalancing = ::std::option::Option::Some(input);
499        self
500    }
501    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
502    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html">Balancing an Amazon ECS service across Availability Zones</a> in the <i> <i>Amazon Elastic Container Service Developer Guide</i> </i>.</p>
503    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
504    /// <ul>
505    /// <li>
506    /// <p>For create service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to <code>ENABLED</code>.</p></li>
507    /// <li>
508    /// <p>For update service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults to the existing service’s <code>AvailabilityZoneRebalancing</code> value. If the service never had an <code>AvailabilityZoneRebalancing</code> value set, Amazon ECS treats this as <code>DISABLED</code>.</p></li>
509    /// </ul>
510    /// <p>This parameter doesn't trigger a new service deployment.</p>
511    pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
512        self.availability_zone_rebalancing = input;
513        self
514    }
515    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
516    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html">Balancing an Amazon ECS service across Availability Zones</a> in the <i> <i>Amazon Elastic Container Service Developer Guide</i> </i>.</p>
517    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
518    /// <ul>
519    /// <li>
520    /// <p>For create service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to <code>ENABLED</code>.</p></li>
521    /// <li>
522    /// <p>For update service requests, when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults to the existing service’s <code>AvailabilityZoneRebalancing</code> value. If the service never had an <code>AvailabilityZoneRebalancing</code> value set, Amazon ECS treats this as <code>DISABLED</code>.</p></li>
523    /// </ul>
524    /// <p>This parameter doesn't trigger a new service deployment.</p>
525    pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
526        &self.availability_zone_rebalancing
527    }
528    /// <p>An object representing the network configuration for the service.</p>
529    /// <p>This parameter triggers a new service deployment.</p>
530    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
531        self.network_configuration = ::std::option::Option::Some(input);
532        self
533    }
534    /// <p>An object representing the network configuration for the service.</p>
535    /// <p>This parameter triggers a new service deployment.</p>
536    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
537        self.network_configuration = input;
538        self
539    }
540    /// <p>An object representing the network configuration for the service.</p>
541    /// <p>This parameter triggers a new service deployment.</p>
542    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
543        &self.network_configuration
544    }
545    /// Appends an item to `placement_constraints`.
546    ///
547    /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
548    ///
549    /// <p>An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.</p>
550    /// <p>You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
551    /// <p>This parameter doesn't trigger a new service deployment.</p>
552    pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
553        let mut v = self.placement_constraints.unwrap_or_default();
554        v.push(input);
555        self.placement_constraints = ::std::option::Option::Some(v);
556        self
557    }
558    /// <p>An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.</p>
559    /// <p>You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
560    /// <p>This parameter doesn't trigger a new service deployment.</p>
561    pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
562        self.placement_constraints = input;
563        self
564    }
565    /// <p>An array of task placement constraint objects to update the service to use. If no value is specified, the existing placement constraints for the service will remain unchanged. If this value is specified, it will override any existing placement constraints defined for the service. To remove all existing placement constraints, specify an empty array.</p>
566    /// <p>You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
567    /// <p>This parameter doesn't trigger a new service deployment.</p>
568    pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
569        &self.placement_constraints
570    }
571    /// Appends an item to `placement_strategy`.
572    ///
573    /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
574    ///
575    /// <p>The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.</p>
576    /// <p>You can specify a maximum of five strategy rules for each service.</p>
577    /// <p>This parameter doesn't trigger a new service deployment.</p>
578    pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
579        let mut v = self.placement_strategy.unwrap_or_default();
580        v.push(input);
581        self.placement_strategy = ::std::option::Option::Some(v);
582        self
583    }
584    /// <p>The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.</p>
585    /// <p>You can specify a maximum of five strategy rules for each service.</p>
586    /// <p>This parameter doesn't trigger a new service deployment.</p>
587    pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
588        self.placement_strategy = input;
589        self
590    }
591    /// <p>The task placement strategy objects to update the service to use. If no value is specified, the existing placement strategy for the service will remain unchanged. If this value is specified, it will override the existing placement strategy defined for the service. To remove an existing placement strategy, specify an empty object.</p>
592    /// <p>You can specify a maximum of five strategy rules for each service.</p>
593    /// <p>This parameter doesn't trigger a new service deployment.</p>
594    pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
595        &self.placement_strategy
596    }
597    /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
598    /// <p>This parameter triggers a new service deployment.</p>
599    pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
600        self.platform_version = ::std::option::Option::Some(input.into());
601        self
602    }
603    /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
604    /// <p>This parameter triggers a new service deployment.</p>
605    pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
606        self.platform_version = input;
607        self
608    }
609    /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
610    /// <p>This parameter triggers a new service deployment.</p>
611    pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
612        &self.platform_version
613    }
614    /// <p>Determines whether to force a new deployment of the service. 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 (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p>
615    pub fn force_new_deployment(mut self, input: bool) -> Self {
616        self.force_new_deployment = ::std::option::Option::Some(input);
617        self
618    }
619    /// <p>Determines whether to force a new deployment of the service. 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 (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p>
620    pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
621        self.force_new_deployment = input;
622        self
623    }
624    /// <p>Determines whether to force a new deployment of the service. 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 (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p>
625    pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
626        &self.force_new_deployment
627    }
628    /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of <code>0</code> is used. If you don't use any of the health checks, then <code>healthCheckGracePeriodSeconds</code> is unused.</p>
629    /// <p>If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p>
630    /// <p>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
631    /// <p>This parameter doesn't trigger a new service deployment.</p>
632    pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
633        self.health_check_grace_period_seconds = ::std::option::Option::Some(input);
634        self
635    }
636    /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of <code>0</code> is used. If you don't use any of the health checks, then <code>healthCheckGracePeriodSeconds</code> is unused.</p>
637    /// <p>If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p>
638    /// <p>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
639    /// <p>This parameter doesn't trigger a new service deployment.</p>
640    pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
641        self.health_check_grace_period_seconds = input;
642        self
643    }
644    /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of <code>0</code> is used. If you don't use any of the health checks, then <code>healthCheckGracePeriodSeconds</code> is unused.</p>
645    /// <p>If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p>
646    /// <p>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
647    /// <p>This parameter doesn't trigger a new service deployment.</p>
648    pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
649        &self.health_check_grace_period_seconds
650    }
651    /// <p>The deployment controller to use for the service.</p>
652    pub fn deployment_controller(mut self, input: crate::types::DeploymentController) -> Self {
653        self.deployment_controller = ::std::option::Option::Some(input);
654        self
655    }
656    /// <p>The deployment controller to use for the service.</p>
657    pub fn set_deployment_controller(mut self, input: ::std::option::Option<crate::types::DeploymentController>) -> Self {
658        self.deployment_controller = input;
659        self
660    }
661    /// <p>The deployment controller to use for the service.</p>
662    pub fn get_deployment_controller(&self) -> &::std::option::Option<crate::types::DeploymentController> {
663        &self.deployment_controller
664    }
665    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
666    /// <p>If you do not want to override the value that was set when the service was created, you can set this to <code>null</code> when performing this action.</p>
667    /// <p>This parameter doesn't trigger a new service deployment.</p>
668    pub fn enable_execute_command(mut self, input: bool) -> Self {
669        self.enable_execute_command = ::std::option::Option::Some(input);
670        self
671    }
672    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
673    /// <p>If you do not want to override the value that was set when the service was created, you can set this to <code>null</code> when performing this action.</p>
674    /// <p>This parameter doesn't trigger a new service deployment.</p>
675    pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
676        self.enable_execute_command = input;
677        self
678    }
679    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
680    /// <p>If you do not want to override the value that was set when the service was created, you can set this to <code>null</code> when performing this action.</p>
681    /// <p>This parameter doesn't trigger a new service deployment.</p>
682    pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
683        &self.enable_execute_command
684    }
685    /// <p>Determines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
686    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
687    /// <p>This parameter doesn't trigger a new service deployment.</p>
688    pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
689        self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
690        self
691    }
692    /// <p>Determines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
693    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
694    /// <p>This parameter doesn't trigger a new service deployment.</p>
695    pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
696        self.enable_ecs_managed_tags = input;
697        self
698    }
699    /// <p>Determines whether to turn on Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
700    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
701    /// <p>This parameter doesn't trigger a new service deployment.</p>
702    pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
703        &self.enable_ecs_managed_tags
704    }
705    /// Appends an item to `load_balancers`.
706    ///
707    /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
708    ///
709    /// <note>
710    /// <p>You must have a service-linked role when you update this property</p>
711    /// </note>
712    /// <p>A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.</p>
713    /// <p>When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.</p>
714    /// <p>For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.</p>
715    /// <p>For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code> through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
716    /// <p>For services that use the external deployment controller, you can add, update, or remove load balancers by using <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>. Note that multiple target groups are not supported for external deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
717    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
718    /// <p>This parameter triggers a new service deployment.</p>
719    pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
720        let mut v = self.load_balancers.unwrap_or_default();
721        v.push(input);
722        self.load_balancers = ::std::option::Option::Some(v);
723        self
724    }
725    /// <note>
726    /// <p>You must have a service-linked role when you update this property</p>
727    /// </note>
728    /// <p>A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.</p>
729    /// <p>When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.</p>
730    /// <p>For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.</p>
731    /// <p>For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code> through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
732    /// <p>For services that use the external deployment controller, you can add, update, or remove load balancers by using <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>. Note that multiple target groups are not supported for external deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
733    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
734    /// <p>This parameter triggers a new service deployment.</p>
735    pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
736        self.load_balancers = input;
737        self
738    }
739    /// <note>
740    /// <p>You must have a service-linked role when you update this property</p>
741    /// </note>
742    /// <p>A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.</p>
743    /// <p>When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.</p>
744    /// <p>For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You can update from a single target group to multiple target groups and from multiple target groups to a single target group.</p>
745    /// <p>For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code> through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
746    /// <p>For services that use the external deployment controller, you can add, update, or remove load balancers by using <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>. Note that multiple target groups are not supported for external deployments. For more information see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
747    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
748    /// <p>This parameter triggers a new service deployment.</p>
749    pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
750        &self.load_balancers
751    }
752    /// <p>Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
753    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
754    /// <p>This parameter doesn't trigger a new service deployment.</p>
755    pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
756        self.propagate_tags = ::std::option::Option::Some(input);
757        self
758    }
759    /// <p>Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
760    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
761    /// <p>This parameter doesn't trigger a new service deployment.</p>
762    pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
763        self.propagate_tags = input;
764        self
765    }
766    /// <p>Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
767    /// <p>Only tasks launched after the update will reflect the update. To update the tags on all tasks, set <code>forceNewDeployment</code> to <code>true</code>, so that Amazon ECS starts new tasks with the updated tags.</p>
768    /// <p>This parameter doesn't trigger a new service deployment.</p>
769    pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
770        &self.propagate_tags
771    }
772    /// Appends an item to `service_registries`.
773    ///
774    /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
775    ///
776    /// <note>
777    /// <p>You must have a service-linked role when you update this property.</p>
778    /// <p>For more information about the role see the <code>CreateService</code> request parameter <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-role"> <code>role</code> </a>.</p>
779    /// </note>
780    /// <p>The details for the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p>
781    /// <p>When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.</p>
782    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
783    /// <p>This parameter triggers a new service deployment.</p>
784    pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
785        let mut v = self.service_registries.unwrap_or_default();
786        v.push(input);
787        self.service_registries = ::std::option::Option::Some(v);
788        self
789    }
790    /// <note>
791    /// <p>You must have a service-linked role when you update this property.</p>
792    /// <p>For more information about the role see the <code>CreateService</code> request parameter <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-role"> <code>role</code> </a>.</p>
793    /// </note>
794    /// <p>The details for the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p>
795    /// <p>When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.</p>
796    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
797    /// <p>This parameter triggers a new service deployment.</p>
798    pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
799        self.service_registries = input;
800        self
801    }
802    /// <note>
803    /// <p>You must have a service-linked role when you update this property.</p>
804    /// <p>For more information about the role see the <code>CreateService</code> request parameter <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-role"> <code>role</code> </a>.</p>
805    /// </note>
806    /// <p>The details for the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p>
807    /// <p>When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the updated service registries configuration, and then stops the old tasks when the new tasks are running.</p>
808    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
809    /// <p>This parameter triggers a new service deployment.</p>
810    pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
811        &self.service_registries
812    }
813    /// <p>The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.</p>
814    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
815    /// <p>This parameter triggers a new service deployment.</p>
816    pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
817        self.service_connect_configuration = ::std::option::Option::Some(input);
818        self
819    }
820    /// <p>The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.</p>
821    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
822    /// <p>This parameter triggers a new service deployment.</p>
823    pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
824        self.service_connect_configuration = input;
825        self
826    }
827    /// <p>The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.</p>
828    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
829    /// <p>This parameter triggers a new service deployment.</p>
830    pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
831        &self.service_connect_configuration
832    }
833    /// Appends an item to `volume_configurations`.
834    ///
835    /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
836    ///
837    /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html">ServiceManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.</p>
838    /// <p>This parameter triggers a new service deployment.</p>
839    pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
840        let mut v = self.volume_configurations.unwrap_or_default();
841        v.push(input);
842        self.volume_configurations = ::std::option::Option::Some(v);
843        self
844    }
845    /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html">ServiceManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.</p>
846    /// <p>This parameter triggers a new service deployment.</p>
847    pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
848        self.volume_configurations = input;
849        self
850    }
851    /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ServiceManagedEBSVolumeConfiguration.html">ServiceManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition. If set to null, no new deployment is triggered. Otherwise, if this configuration differs from the existing one, it triggers a new deployment.</p>
852    /// <p>This parameter triggers a new service deployment.</p>
853    pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
854        &self.volume_configurations
855    }
856    /// Appends an item to `vpc_lattice_configurations`.
857    ///
858    /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
859    ///
860    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
861    /// <p>This parameter triggers a new service deployment.</p>
862    pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
863        let mut v = self.vpc_lattice_configurations.unwrap_or_default();
864        v.push(input);
865        self.vpc_lattice_configurations = ::std::option::Option::Some(v);
866        self
867    }
868    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
869    /// <p>This parameter triggers a new service deployment.</p>
870    pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
871        self.vpc_lattice_configurations = input;
872        self
873    }
874    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
875    /// <p>This parameter triggers a new service deployment.</p>
876    pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
877        &self.vpc_lattice_configurations
878    }
879    /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
880    pub fn build(
881        self,
882    ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
883        ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
884            cluster: self.cluster,
885            service: self.service,
886            desired_count: self.desired_count,
887            task_definition: self.task_definition,
888            capacity_provider_strategy: self.capacity_provider_strategy,
889            deployment_configuration: self.deployment_configuration,
890            availability_zone_rebalancing: self.availability_zone_rebalancing,
891            network_configuration: self.network_configuration,
892            placement_constraints: self.placement_constraints,
893            placement_strategy: self.placement_strategy,
894            platform_version: self.platform_version,
895            force_new_deployment: self.force_new_deployment,
896            health_check_grace_period_seconds: self.health_check_grace_period_seconds,
897            deployment_controller: self.deployment_controller,
898            enable_execute_command: self.enable_execute_command,
899            enable_ecs_managed_tags: self.enable_ecs_managed_tags,
900            load_balancers: self.load_balancers,
901            propagate_tags: self.propagate_tags,
902            service_registries: self.service_registries,
903            service_connect_configuration: self.service_connect_configuration,
904            volume_configurations: self.volume_configurations,
905            vpc_lattice_configurations: self.vpc_lattice_configurations,
906        })
907    }
908}