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 when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to 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>This parameter doesn't trigger a new service deployment.</p>
71    pub health_check_grace_period_seconds: ::std::option::Option<i32>,
72    /// <p>The deployment controller to use for the service.</p>
73    pub deployment_controller: ::std::option::Option<crate::types::DeploymentController>,
74    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
75    /// <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>
76    /// <p>This parameter doesn't trigger a new service deployment.</p>
77    pub enable_execute_command: ::std::option::Option<bool>,
78    /// <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>
79    /// <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>
80    /// <p>This parameter doesn't trigger a new service deployment.</p>
81    pub enable_ecs_managed_tags: ::std::option::Option<bool>,
82    /// <note>
83    /// <p>You must have a service-linked role when you update this property</p>
84    /// </note>
85    /// <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>
86    /// <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>
87    /// <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>
88    /// <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>
89    /// <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>
90    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
91    /// <p>This parameter triggers a new service deployment.</p>
92    pub load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
93    /// <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>
94    /// <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>
95    /// <p>This parameter doesn't trigger a new service deployment.</p>
96    pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
97    /// <note>
98    /// <p>You must have a service-linked role when you update this property.</p>
99    /// <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>
100    /// </note>
101    /// <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>
102    /// <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>
103    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
104    /// <p>This parameter triggers a new service deployment.</p>
105    pub service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
106    /// <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>
107    /// <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>
108    /// <p>This parameter triggers a new service deployment.</p>
109    pub service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
110    /// <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>
111    /// <p>This parameter triggers a new service deployment.</p>
112    pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
113    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
114    /// <p>This parameter triggers a new service deployment.</p>
115    pub vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
116}
117impl UpdateServiceInput {
118    /// <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>
119    /// <p>You can't change the cluster name.</p>
120    pub fn cluster(&self) -> ::std::option::Option<&str> {
121        self.cluster.as_deref()
122    }
123    /// <p>The name of the service to update.</p>
124    pub fn service(&self) -> ::std::option::Option<&str> {
125        self.service.as_deref()
126    }
127    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
128    /// <p>This parameter doesn't trigger a new service deployment.</p>
129    pub fn desired_count(&self) -> ::std::option::Option<i32> {
130        self.desired_count
131    }
132    /// <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>
133    /// <p>This parameter triggers a new service deployment.</p>
134    pub fn task_definition(&self) -> ::std::option::Option<&str> {
135        self.task_definition.as_deref()
136    }
137    /// <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>
138    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
139    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
140    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
141    /// <p>The following list provides the valid transitions:</p>
142    /// <ul>
143    /// <li>
144    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
145    /// <li>
146    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
147    /// <li>
148    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
149    /// <li>
150    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
151    /// <li>
152    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
153    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
154    /// </ul>
155    /// <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>
156    /// <p>This parameter doesn't trigger a new service deployment.</p>
157    ///
158    /// 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()`.
159    pub fn capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
160        self.capacity_provider_strategy.as_deref().unwrap_or_default()
161    }
162    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
163    /// <p>This parameter doesn't trigger a new service deployment.</p>
164    pub fn deployment_configuration(&self) -> ::std::option::Option<&crate::types::DeploymentConfiguration> {
165        self.deployment_configuration.as_ref()
166    }
167    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
168    /// <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>
169    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
170    /// <ul>
171    /// <li>
172    /// <p>For create service requests, when when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to to <code>ENABLED</code>.</p></li>
173    /// <li>
174    /// <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>
175    /// </ul>
176    /// <p>This parameter doesn't trigger a new service deployment.</p>
177    pub fn availability_zone_rebalancing(&self) -> ::std::option::Option<&crate::types::AvailabilityZoneRebalancing> {
178        self.availability_zone_rebalancing.as_ref()
179    }
180    /// <p>An object representing the network configuration for the service.</p>
181    /// <p>This parameter triggers a new service deployment.</p>
182    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
183        self.network_configuration.as_ref()
184    }
185    /// <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>
186    /// <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>
187    /// <p>This parameter doesn't trigger a new service deployment.</p>
188    ///
189    /// 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()`.
190    pub fn placement_constraints(&self) -> &[crate::types::PlacementConstraint] {
191        self.placement_constraints.as_deref().unwrap_or_default()
192    }
193    /// <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>
194    /// <p>You can specify a maximum of five strategy rules for each service.</p>
195    /// <p>This parameter doesn't trigger a new service deployment.</p>
196    ///
197    /// 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()`.
198    pub fn placement_strategy(&self) -> &[crate::types::PlacementStrategy] {
199        self.placement_strategy.as_deref().unwrap_or_default()
200    }
201    /// <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>
202    /// <p>This parameter triggers a new service deployment.</p>
203    pub fn platform_version(&self) -> ::std::option::Option<&str> {
204        self.platform_version.as_deref()
205    }
206    /// <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>
207    pub fn force_new_deployment(&self) -> ::std::option::Option<bool> {
208        self.force_new_deployment
209    }
210    /// <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>
211    /// <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>
212    /// <p>This parameter doesn't trigger a new service deployment.</p>
213    pub fn health_check_grace_period_seconds(&self) -> ::std::option::Option<i32> {
214        self.health_check_grace_period_seconds
215    }
216    /// <p>The deployment controller to use for the service.</p>
217    pub fn deployment_controller(&self) -> ::std::option::Option<&crate::types::DeploymentController> {
218        self.deployment_controller.as_ref()
219    }
220    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
221    /// <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>
222    /// <p>This parameter doesn't trigger a new service deployment.</p>
223    pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
224        self.enable_execute_command
225    }
226    /// <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>
227    /// <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>
228    /// <p>This parameter doesn't trigger a new service deployment.</p>
229    pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
230        self.enable_ecs_managed_tags
231    }
232    /// <note>
233    /// <p>You must have a service-linked role when you update this property</p>
234    /// </note>
235    /// <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>
236    /// <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>
237    /// <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>
238    /// <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>
239    /// <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>
240    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
241    /// <p>This parameter triggers a new service deployment.</p>
242    ///
243    /// 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()`.
244    pub fn load_balancers(&self) -> &[crate::types::LoadBalancer] {
245        self.load_balancers.as_deref().unwrap_or_default()
246    }
247    /// <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>
248    /// <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>
249    /// <p>This parameter doesn't trigger a new service deployment.</p>
250    pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
251        self.propagate_tags.as_ref()
252    }
253    /// <note>
254    /// <p>You must have a service-linked role when you update this property.</p>
255    /// <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>
256    /// </note>
257    /// <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>
258    /// <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>
259    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
260    /// <p>This parameter triggers a new service deployment.</p>
261    ///
262    /// 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()`.
263    pub fn service_registries(&self) -> &[crate::types::ServiceRegistry] {
264        self.service_registries.as_deref().unwrap_or_default()
265    }
266    /// <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>
267    /// <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>
268    /// <p>This parameter triggers a new service deployment.</p>
269    pub fn service_connect_configuration(&self) -> ::std::option::Option<&crate::types::ServiceConnectConfiguration> {
270        self.service_connect_configuration.as_ref()
271    }
272    /// <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>
273    /// <p>This parameter triggers a new service deployment.</p>
274    ///
275    /// 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()`.
276    pub fn volume_configurations(&self) -> &[crate::types::ServiceVolumeConfiguration] {
277        self.volume_configurations.as_deref().unwrap_or_default()
278    }
279    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
280    /// <p>This parameter triggers a new service deployment.</p>
281    ///
282    /// 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()`.
283    pub fn vpc_lattice_configurations(&self) -> &[crate::types::VpcLatticeConfiguration] {
284        self.vpc_lattice_configurations.as_deref().unwrap_or_default()
285    }
286}
287impl UpdateServiceInput {
288    /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
289    pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
290        crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
291    }
292}
293
294/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
295#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
296#[non_exhaustive]
297pub struct UpdateServiceInputBuilder {
298    pub(crate) cluster: ::std::option::Option<::std::string::String>,
299    pub(crate) service: ::std::option::Option<::std::string::String>,
300    pub(crate) desired_count: ::std::option::Option<i32>,
301    pub(crate) task_definition: ::std::option::Option<::std::string::String>,
302    pub(crate) capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
303    pub(crate) deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
304    pub(crate) availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
305    pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
306    pub(crate) placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
307    pub(crate) placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
308    pub(crate) platform_version: ::std::option::Option<::std::string::String>,
309    pub(crate) force_new_deployment: ::std::option::Option<bool>,
310    pub(crate) health_check_grace_period_seconds: ::std::option::Option<i32>,
311    pub(crate) deployment_controller: ::std::option::Option<crate::types::DeploymentController>,
312    pub(crate) enable_execute_command: ::std::option::Option<bool>,
313    pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
314    pub(crate) load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
315    pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
316    pub(crate) service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
317    pub(crate) service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
318    pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
319    pub(crate) vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
320}
321impl UpdateServiceInputBuilder {
322    /// <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>
323    /// <p>You can't change the cluster name.</p>
324    pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
325        self.cluster = ::std::option::Option::Some(input.into());
326        self
327    }
328    /// <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>
329    /// <p>You can't change the cluster name.</p>
330    pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331        self.cluster = input;
332        self
333    }
334    /// <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>
335    /// <p>You can't change the cluster name.</p>
336    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
337        &self.cluster
338    }
339    /// <p>The name of the service to update.</p>
340    /// This field is required.
341    pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342        self.service = ::std::option::Option::Some(input.into());
343        self
344    }
345    /// <p>The name of the service to update.</p>
346    pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
347        self.service = input;
348        self
349    }
350    /// <p>The name of the service to update.</p>
351    pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
352        &self.service
353    }
354    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
355    /// <p>This parameter doesn't trigger a new service deployment.</p>
356    pub fn desired_count(mut self, input: i32) -> Self {
357        self.desired_count = ::std::option::Option::Some(input);
358        self
359    }
360    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
361    /// <p>This parameter doesn't trigger a new service deployment.</p>
362    pub fn set_desired_count(mut self, input: ::std::option::Option<i32>) -> Self {
363        self.desired_count = input;
364        self
365    }
366    /// <p>The number of instantiations of the task to place and keep running in your service.</p>
367    /// <p>This parameter doesn't trigger a new service deployment.</p>
368    pub fn get_desired_count(&self) -> &::std::option::Option<i32> {
369        &self.desired_count
370    }
371    /// <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>
372    /// <p>This parameter triggers a new service deployment.</p>
373    pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374        self.task_definition = ::std::option::Option::Some(input.into());
375        self
376    }
377    /// <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>
378    /// <p>This parameter triggers a new service deployment.</p>
379    pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380        self.task_definition = input;
381        self
382    }
383    /// <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>
384    /// <p>This parameter triggers a new service deployment.</p>
385    pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
386        &self.task_definition
387    }
388    /// Appends an item to `capacity_provider_strategy`.
389    ///
390    /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
391    ///
392    /// <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>
393    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
394    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
395    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
396    /// <p>The following list provides the valid transitions:</p>
397    /// <ul>
398    /// <li>
399    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
400    /// <li>
401    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
402    /// <li>
403    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
404    /// <li>
405    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
406    /// <li>
407    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
408    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
409    /// </ul>
410    /// <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>
411    /// <p>This parameter doesn't trigger a new service deployment.</p>
412    pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
413        let mut v = self.capacity_provider_strategy.unwrap_or_default();
414        v.push(input);
415        self.capacity_provider_strategy = ::std::option::Option::Some(v);
416        self
417    }
418    /// <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>
419    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
420    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
421    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
422    /// <p>The following list provides the valid transitions:</p>
423    /// <ul>
424    /// <li>
425    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
426    /// <li>
427    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
428    /// <li>
429    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
430    /// <li>
431    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
432    /// <li>
433    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
434    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
435    /// </ul>
436    /// <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>
437    /// <p>This parameter doesn't trigger a new service deployment.</p>
438    pub fn set_capacity_provider_strategy(
439        mut self,
440        input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
441    ) -> Self {
442        self.capacity_provider_strategy = input;
443        self
444    }
445    /// <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>
446    /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
447    /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
448    /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
449    /// <p>The following list provides the valid transitions:</p>
450    /// <ul>
451    /// <li>
452    /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
453    /// <li>
454    /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
455    /// <li>
456    /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
457    /// <li>
458    /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
459    /// <li>
460    /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
461    /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
462    /// </ul>
463    /// <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>
464    /// <p>This parameter doesn't trigger a new service deployment.</p>
465    pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
466        &self.capacity_provider_strategy
467    }
468    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
469    /// <p>This parameter doesn't trigger a new service deployment.</p>
470    pub fn deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
471        self.deployment_configuration = ::std::option::Option::Some(input);
472        self
473    }
474    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
475    /// <p>This parameter doesn't trigger a new service deployment.</p>
476    pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
477        self.deployment_configuration = input;
478        self
479    }
480    /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
481    /// <p>This parameter doesn't trigger a new service deployment.</p>
482    pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
483        &self.deployment_configuration
484    }
485    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
486    /// <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>
487    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
488    /// <ul>
489    /// <li>
490    /// <p>For create service requests, when when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to to <code>ENABLED</code>.</p></li>
491    /// <li>
492    /// <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>
493    /// </ul>
494    /// <p>This parameter doesn't trigger a new service deployment.</p>
495    pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
496        self.availability_zone_rebalancing = ::std::option::Option::Some(input);
497        self
498    }
499    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
500    /// <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>
501    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
502    /// <ul>
503    /// <li>
504    /// <p>For create service requests, when when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to to <code>ENABLED</code>.</p></li>
505    /// <li>
506    /// <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>
507    /// </ul>
508    /// <p>This parameter doesn't trigger a new service deployment.</p>
509    pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
510        self.availability_zone_rebalancing = input;
511        self
512    }
513    /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
514    /// <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>
515    /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
516    /// <ul>
517    /// <li>
518    /// <p>For create service requests, when when no value is specified for <code>AvailabilityZoneRebalancing</code>, Amazon ECS defaults the value to to <code>ENABLED</code>.</p></li>
519    /// <li>
520    /// <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>
521    /// </ul>
522    /// <p>This parameter doesn't trigger a new service deployment.</p>
523    pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
524        &self.availability_zone_rebalancing
525    }
526    /// <p>An object representing the network configuration for the service.</p>
527    /// <p>This parameter triggers a new service deployment.</p>
528    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
529        self.network_configuration = ::std::option::Option::Some(input);
530        self
531    }
532    /// <p>An object representing the network configuration for the service.</p>
533    /// <p>This parameter triggers a new service deployment.</p>
534    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
535        self.network_configuration = input;
536        self
537    }
538    /// <p>An object representing the network configuration for the service.</p>
539    /// <p>This parameter triggers a new service deployment.</p>
540    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
541        &self.network_configuration
542    }
543    /// Appends an item to `placement_constraints`.
544    ///
545    /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
546    ///
547    /// <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>
548    /// <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>
549    /// <p>This parameter doesn't trigger a new service deployment.</p>
550    pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
551        let mut v = self.placement_constraints.unwrap_or_default();
552        v.push(input);
553        self.placement_constraints = ::std::option::Option::Some(v);
554        self
555    }
556    /// <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>
557    /// <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>
558    /// <p>This parameter doesn't trigger a new service deployment.</p>
559    pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
560        self.placement_constraints = input;
561        self
562    }
563    /// <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>
564    /// <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>
565    /// <p>This parameter doesn't trigger a new service deployment.</p>
566    pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
567        &self.placement_constraints
568    }
569    /// Appends an item to `placement_strategy`.
570    ///
571    /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
572    ///
573    /// <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>
574    /// <p>You can specify a maximum of five strategy rules for each service.</p>
575    /// <p>This parameter doesn't trigger a new service deployment.</p>
576    pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
577        let mut v = self.placement_strategy.unwrap_or_default();
578        v.push(input);
579        self.placement_strategy = ::std::option::Option::Some(v);
580        self
581    }
582    /// <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>
583    /// <p>You can specify a maximum of five strategy rules for each service.</p>
584    /// <p>This parameter doesn't trigger a new service deployment.</p>
585    pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
586        self.placement_strategy = input;
587        self
588    }
589    /// <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>
590    /// <p>You can specify a maximum of five strategy rules for each service.</p>
591    /// <p>This parameter doesn't trigger a new service deployment.</p>
592    pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
593        &self.placement_strategy
594    }
595    /// <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>
596    /// <p>This parameter triggers a new service deployment.</p>
597    pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
598        self.platform_version = ::std::option::Option::Some(input.into());
599        self
600    }
601    /// <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>
602    /// <p>This parameter triggers a new service deployment.</p>
603    pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
604        self.platform_version = input;
605        self
606    }
607    /// <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>
608    /// <p>This parameter triggers a new service deployment.</p>
609    pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
610        &self.platform_version
611    }
612    /// <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>
613    pub fn force_new_deployment(mut self, input: bool) -> Self {
614        self.force_new_deployment = ::std::option::Option::Some(input);
615        self
616    }
617    /// <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>
618    pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
619        self.force_new_deployment = input;
620        self
621    }
622    /// <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>
623    pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
624        &self.force_new_deployment
625    }
626    /// <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>
627    /// <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>
628    /// <p>This parameter doesn't trigger a new service deployment.</p>
629    pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
630        self.health_check_grace_period_seconds = ::std::option::Option::Some(input);
631        self
632    }
633    /// <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>
634    /// <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>
635    /// <p>This parameter doesn't trigger a new service deployment.</p>
636    pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
637        self.health_check_grace_period_seconds = input;
638        self
639    }
640    /// <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>
641    /// <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>
642    /// <p>This parameter doesn't trigger a new service deployment.</p>
643    pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
644        &self.health_check_grace_period_seconds
645    }
646    /// <p>The deployment controller to use for the service.</p>
647    pub fn deployment_controller(mut self, input: crate::types::DeploymentController) -> Self {
648        self.deployment_controller = ::std::option::Option::Some(input);
649        self
650    }
651    /// <p>The deployment controller to use for the service.</p>
652    pub fn set_deployment_controller(mut self, input: ::std::option::Option<crate::types::DeploymentController>) -> Self {
653        self.deployment_controller = input;
654        self
655    }
656    /// <p>The deployment controller to use for the service.</p>
657    pub fn get_deployment_controller(&self) -> &::std::option::Option<crate::types::DeploymentController> {
658        &self.deployment_controller
659    }
660    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
661    /// <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>
662    /// <p>This parameter doesn't trigger a new service deployment.</p>
663    pub fn enable_execute_command(mut self, input: bool) -> Self {
664        self.enable_execute_command = ::std::option::Option::Some(input);
665        self
666    }
667    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
668    /// <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>
669    /// <p>This parameter doesn't trigger a new service deployment.</p>
670    pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
671        self.enable_execute_command = input;
672        self
673    }
674    /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
675    /// <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>
676    /// <p>This parameter doesn't trigger a new service deployment.</p>
677    pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
678        &self.enable_execute_command
679    }
680    /// <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>
681    /// <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>
682    /// <p>This parameter doesn't trigger a new service deployment.</p>
683    pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
684        self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
685        self
686    }
687    /// <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>
688    /// <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>
689    /// <p>This parameter doesn't trigger a new service deployment.</p>
690    pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
691        self.enable_ecs_managed_tags = input;
692        self
693    }
694    /// <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>
695    /// <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>
696    /// <p>This parameter doesn't trigger a new service deployment.</p>
697    pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
698        &self.enable_ecs_managed_tags
699    }
700    /// Appends an item to `load_balancers`.
701    ///
702    /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
703    ///
704    /// <note>
705    /// <p>You must have a service-linked role when you update this property</p>
706    /// </note>
707    /// <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>
708    /// <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>
709    /// <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>
710    /// <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>
711    /// <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>
712    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
713    /// <p>This parameter triggers a new service deployment.</p>
714    pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
715        let mut v = self.load_balancers.unwrap_or_default();
716        v.push(input);
717        self.load_balancers = ::std::option::Option::Some(v);
718        self
719    }
720    /// <note>
721    /// <p>You must have a service-linked role when you update this property</p>
722    /// </note>
723    /// <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>
724    /// <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>
725    /// <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>
726    /// <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>
727    /// <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>
728    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
729    /// <p>This parameter triggers a new service deployment.</p>
730    pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
731        self.load_balancers = input;
732        self
733    }
734    /// <note>
735    /// <p>You must have a service-linked role when you update this property</p>
736    /// </note>
737    /// <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>
738    /// <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>
739    /// <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>
740    /// <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>
741    /// <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>
742    /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
743    /// <p>This parameter triggers a new service deployment.</p>
744    pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
745        &self.load_balancers
746    }
747    /// <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>
748    /// <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>
749    /// <p>This parameter doesn't trigger a new service deployment.</p>
750    pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
751        self.propagate_tags = ::std::option::Option::Some(input);
752        self
753    }
754    /// <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>
755    /// <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>
756    /// <p>This parameter doesn't trigger a new service deployment.</p>
757    pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
758        self.propagate_tags = input;
759        self
760    }
761    /// <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>
762    /// <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>
763    /// <p>This parameter doesn't trigger a new service deployment.</p>
764    pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
765        &self.propagate_tags
766    }
767    /// Appends an item to `service_registries`.
768    ///
769    /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
770    ///
771    /// <note>
772    /// <p>You must have a service-linked role when you update this property.</p>
773    /// <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>
774    /// </note>
775    /// <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>
776    /// <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>
777    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
778    /// <p>This parameter triggers a new service deployment.</p>
779    pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
780        let mut v = self.service_registries.unwrap_or_default();
781        v.push(input);
782        self.service_registries = ::std::option::Option::Some(v);
783        self
784    }
785    /// <note>
786    /// <p>You must have a service-linked role when you update this property.</p>
787    /// <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>
788    /// </note>
789    /// <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>
790    /// <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>
791    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
792    /// <p>This parameter triggers a new service deployment.</p>
793    pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
794        self.service_registries = input;
795        self
796    }
797    /// <note>
798    /// <p>You must have a service-linked role when you update this property.</p>
799    /// <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>
800    /// </note>
801    /// <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>
802    /// <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>
803    /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
804    /// <p>This parameter triggers a new service deployment.</p>
805    pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
806        &self.service_registries
807    }
808    /// <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>
809    /// <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>
810    /// <p>This parameter triggers a new service deployment.</p>
811    pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
812        self.service_connect_configuration = ::std::option::Option::Some(input);
813        self
814    }
815    /// <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>
816    /// <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>
817    /// <p>This parameter triggers a new service deployment.</p>
818    pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
819        self.service_connect_configuration = input;
820        self
821    }
822    /// <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>
823    /// <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>
824    /// <p>This parameter triggers a new service deployment.</p>
825    pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
826        &self.service_connect_configuration
827    }
828    /// Appends an item to `volume_configurations`.
829    ///
830    /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
831    ///
832    /// <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>
833    /// <p>This parameter triggers a new service deployment.</p>
834    pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
835        let mut v = self.volume_configurations.unwrap_or_default();
836        v.push(input);
837        self.volume_configurations = ::std::option::Option::Some(v);
838        self
839    }
840    /// <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>
841    /// <p>This parameter triggers a new service deployment.</p>
842    pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
843        self.volume_configurations = input;
844        self
845    }
846    /// <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>
847    /// <p>This parameter triggers a new service deployment.</p>
848    pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
849        &self.volume_configurations
850    }
851    /// Appends an item to `vpc_lattice_configurations`.
852    ///
853    /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
854    ///
855    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
856    /// <p>This parameter triggers a new service deployment.</p>
857    pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
858        let mut v = self.vpc_lattice_configurations.unwrap_or_default();
859        v.push(input);
860        self.vpc_lattice_configurations = ::std::option::Option::Some(v);
861        self
862    }
863    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
864    /// <p>This parameter triggers a new service deployment.</p>
865    pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
866        self.vpc_lattice_configurations = input;
867        self
868    }
869    /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
870    /// <p>This parameter triggers a new service deployment.</p>
871    pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
872        &self.vpc_lattice_configurations
873    }
874    /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
875    pub fn build(
876        self,
877    ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
878        ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
879            cluster: self.cluster,
880            service: self.service,
881            desired_count: self.desired_count,
882            task_definition: self.task_definition,
883            capacity_provider_strategy: self.capacity_provider_strategy,
884            deployment_configuration: self.deployment_configuration,
885            availability_zone_rebalancing: self.availability_zone_rebalancing,
886            network_configuration: self.network_configuration,
887            placement_constraints: self.placement_constraints,
888            placement_strategy: self.placement_strategy,
889            platform_version: self.platform_version,
890            force_new_deployment: self.force_new_deployment,
891            health_check_grace_period_seconds: self.health_check_grace_period_seconds,
892            deployment_controller: self.deployment_controller,
893            enable_execute_command: self.enable_execute_command,
894            enable_ecs_managed_tags: self.enable_ecs_managed_tags,
895            load_balancers: self.load_balancers,
896            propagate_tags: self.propagate_tags,
897            service_registries: self.service_registries,
898            service_connect_configuration: self.service_connect_configuration,
899            volume_configurations: self.volume_configurations,
900            vpc_lattice_configurations: self.vpc_lattice_configurations,
901        })
902    }
903}