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