aws_sdk_ecs/operation/update_service/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_service::_update_service_output::UpdateServiceOutputBuilder;
3
4pub use crate::operation::update_service::_update_service_input::UpdateServiceInputBuilder;
5
6impl crate::operation::update_service::builders::UpdateServiceInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_service::UpdateServiceOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_service::UpdateServiceError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_service();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateService`.
24///
25/// <p>Modifies the parameters of a service.</p><note>
26/// <p>On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.</p>
27/// </note>
28/// <p>For services using the rolling update (<code>ECS</code>) you can update the desired count, deployment configuration, network configuration, load balancers, service registries, enable ECS managed tags option, propagate tags option, task placement constraints and strategies, and task definition. When you update any of these parameters, Amazon ECS starts new tasks with the new configuration.</p>
29/// <p>You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types">Amazon EBS volumes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. You can update your volume configurations and trigger a new deployment. <code>volumeConfigurations</code> is only supported for REPLICA service and not DAEMON service. If you leave <code>volumeConfigurations</code> <code>null</code>, it doesn't trigger a new deployment. For more information on volumes, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types">Amazon EBS volumes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
30/// <p>For services using the blue/green (<code>CODE_DEPLOY</code>) deployment controller, only the desired count, deployment configuration, health check grace period, task placement constraints and strategies, enable ECS managed tags option, and propagate tags can be updated using this API. If the network configuration, platform version, task definition, or load balancer need to be updated, create a new CodeDeploy deployment. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> in the <i>CodeDeploy API Reference</i>.</p>
31/// <p>For services using an external deployment controller, you can update only the desired count, task placement constraints and strategies, health check grace period, enable ECS managed tags option, and propagate tags option, using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, create a new task set For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>.</p>
32/// <p>You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new <code>desiredCount</code> parameter.</p>
33/// <p>You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when starting or running a task, or when creating or updating a service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types">Amazon EBS volumes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
34/// <p>If you have updated the container image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy.</p><note>
35/// <p>If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, <code>my_image:latest</code>), you don't need to create a new revision of your task definition. You can update the service using the <code>forceNewDeployment</code> option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start.</p>
36/// </note>
37/// <p>You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, <code>minimumHealthyPercent</code> and <code>maximumPercent</code>, to determine the deployment strategy.</p>
38/// <ul>
39/// <li>
40/// <p>If <code>minimumHealthyPercent</code> is below 100%, the scheduler can ignore <code>desiredCount</code> temporarily during a deployment. For example, if <code>desiredCount</code> is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that don't use a load balancer are considered healthy if they're in the <code>RUNNING</code> state. Tasks for services that use a load balancer are considered healthy if they're in the <code>RUNNING</code> state and are reported as healthy by the load balancer.</p></li>
41/// <li>
42/// <p>The <code>maximumPercent</code> parameter represents an upper limit on the number of running tasks during a deployment. You can use it to define the deployment batch size. For example, if <code>desiredCount</code> is four tasks, a maximum of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available).</p></li>
43/// </ul>
44/// <p>When <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html">UpdateService</a> stops a task during a deployment, the equivalent of <code>docker stop</code> is issued to the containers running in the task. This results in a <code>SIGTERM</code> and a 30-second timeout. After this, <code>SIGKILL</code> is sent and the containers are forcibly stopped. If the container handles the <code>SIGTERM</code> gracefully and exits within 30 seconds from receiving it, no <code>SIGKILL</code> is sent.</p>
45/// <p>When the service scheduler launches new tasks, it determines task placement in your cluster with the following logic.</p>
46/// <ul>
47/// <li>
48/// <p>Determine which of the container instances in your cluster can support your service's task definition. For example, they have the required CPU, memory, ports, and container instance attributes.</p></li>
49/// <li>
50/// <p>By default, the service scheduler attempts to balance tasks across Availability Zones in this manner even though you can choose a different placement strategy.</p>
51/// <ul>
52/// <li>
53/// <p>Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.</p></li>
54/// <li>
55/// <p>Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.</p></li>
56/// </ul></li>
57/// </ul>
58/// <p>When the service scheduler stops running tasks, it attempts to maintain balance across the Availability Zones in your cluster using the following logic:</p>
59/// <ul>
60/// <li>
61/// <p>Sort the container instances by the largest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have two, container instances in either zone B or C are considered optimal for termination.</p></li>
62/// <li>
63/// <p>Stop the task on a container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the largest number of running tasks for this service.</p></li>
64/// </ul>
65#[derive(::std::clone::Clone, ::std::fmt::Debug)]
66pub struct UpdateServiceFluentBuilder {
67 handle: ::std::sync::Arc<crate::client::Handle>,
68 inner: crate::operation::update_service::builders::UpdateServiceInputBuilder,
69 config_override: ::std::option::Option<crate::config::Builder>,
70}
71impl
72 crate::client::customize::internal::CustomizableSend<
73 crate::operation::update_service::UpdateServiceOutput,
74 crate::operation::update_service::UpdateServiceError,
75 > for UpdateServiceFluentBuilder
76{
77 fn send(
78 self,
79 config_override: crate::config::Builder,
80 ) -> crate::client::customize::internal::BoxFuture<
81 crate::client::customize::internal::SendResult<
82 crate::operation::update_service::UpdateServiceOutput,
83 crate::operation::update_service::UpdateServiceError,
84 >,
85 > {
86 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
87 }
88}
89impl UpdateServiceFluentBuilder {
90 /// Creates a new `UpdateServiceFluentBuilder`.
91 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
92 Self {
93 handle,
94 inner: ::std::default::Default::default(),
95 config_override: ::std::option::Option::None,
96 }
97 }
98 /// Access the UpdateService as a reference.
99 pub fn as_input(&self) -> &crate::operation::update_service::builders::UpdateServiceInputBuilder {
100 &self.inner
101 }
102 /// Sends the request and returns the response.
103 ///
104 /// If an error occurs, an `SdkError` will be returned with additional details that
105 /// can be matched against.
106 ///
107 /// By default, any retryable failures will be retried twice. Retry behavior
108 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
109 /// set when configuring the client.
110 pub async fn send(
111 self,
112 ) -> ::std::result::Result<
113 crate::operation::update_service::UpdateServiceOutput,
114 ::aws_smithy_runtime_api::client::result::SdkError<
115 crate::operation::update_service::UpdateServiceError,
116 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
117 >,
118 > {
119 let input = self
120 .inner
121 .build()
122 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
123 let runtime_plugins = crate::operation::update_service::UpdateService::operation_runtime_plugins(
124 self.handle.runtime_plugins.clone(),
125 &self.handle.conf,
126 self.config_override,
127 );
128 crate::operation::update_service::UpdateService::orchestrate(&runtime_plugins, input).await
129 }
130
131 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
132 pub fn customize(
133 self,
134 ) -> crate::client::customize::CustomizableOperation<
135 crate::operation::update_service::UpdateServiceOutput,
136 crate::operation::update_service::UpdateServiceError,
137 Self,
138 > {
139 crate::client::customize::CustomizableOperation::new(self)
140 }
141 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
142 self.set_config_override(::std::option::Option::Some(config_override.into()));
143 self
144 }
145
146 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
147 self.config_override = config_override;
148 self
149 }
150 /// <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>
151 /// <p>You can't change the cluster name.</p>
152 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.inner = self.inner.cluster(input.into());
154 self
155 }
156 /// <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>
157 /// <p>You can't change the cluster name.</p>
158 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.inner = self.inner.set_cluster(input);
160 self
161 }
162 /// <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>
163 /// <p>You can't change the cluster name.</p>
164 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
165 self.inner.get_cluster()
166 }
167 /// <p>The name of the service to update.</p>
168 pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169 self.inner = self.inner.service(input.into());
170 self
171 }
172 /// <p>The name of the service to update.</p>
173 pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174 self.inner = self.inner.set_service(input);
175 self
176 }
177 /// <p>The name of the service to update.</p>
178 pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
179 self.inner.get_service()
180 }
181 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
182 /// <p>This parameter doesn't trigger a new service deployment.</p>
183 pub fn desired_count(mut self, input: i32) -> Self {
184 self.inner = self.inner.desired_count(input);
185 self
186 }
187 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
188 /// <p>This parameter doesn't trigger a new service deployment.</p>
189 pub fn set_desired_count(mut self, input: ::std::option::Option<i32>) -> Self {
190 self.inner = self.inner.set_desired_count(input);
191 self
192 }
193 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
194 /// <p>This parameter doesn't trigger a new service deployment.</p>
195 pub fn get_desired_count(&self) -> &::std::option::Option<i32> {
196 self.inner.get_desired_count()
197 }
198 /// <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>
199 /// <p>This parameter triggers a new service deployment.</p>
200 pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 self.inner = self.inner.task_definition(input.into());
202 self
203 }
204 /// <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>
205 /// <p>This parameter triggers a new service deployment.</p>
206 pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.inner = self.inner.set_task_definition(input);
208 self
209 }
210 /// <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>
211 /// <p>This parameter triggers a new service deployment.</p>
212 pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
213 self.inner.get_task_definition()
214 }
215 ///
216 /// Appends an item to `capacityProviderStrategy`.
217 ///
218 /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
219 ///
220 /// <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>
221 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
222 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
223 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
224 /// <p>The following list provides the valid transitions:</p>
225 /// <ul>
226 /// <li>
227 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
228 /// <li>
229 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
230 /// <li>
231 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
232 /// <li>
233 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
234 /// <li>
235 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
236 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
237 /// </ul>
238 /// <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>
239 /// <p>This parameter doesn't trigger a new service deployment.</p>
240 pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
241 self.inner = self.inner.capacity_provider_strategy(input);
242 self
243 }
244 /// <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>
245 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
246 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
247 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
248 /// <p>The following list provides the valid transitions:</p>
249 /// <ul>
250 /// <li>
251 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
252 /// <li>
253 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
254 /// <li>
255 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
256 /// <li>
257 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
258 /// <li>
259 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
260 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
261 /// </ul>
262 /// <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>
263 /// <p>This parameter doesn't trigger a new service deployment.</p>
264 pub fn set_capacity_provider_strategy(
265 mut self,
266 input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
267 ) -> Self {
268 self.inner = self.inner.set_capacity_provider_strategy(input);
269 self
270 }
271 /// <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>
272 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
273 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
274 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
275 /// <p>The following list provides the valid transitions:</p>
276 /// <ul>
277 /// <li>
278 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
279 /// <li>
280 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
281 /// <li>
282 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
283 /// <li>
284 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
285 /// <li>
286 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
287 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
288 /// </ul>
289 /// <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>
290 /// <p>This parameter doesn't trigger a new service deployment.</p>
291 pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
292 self.inner.get_capacity_provider_strategy()
293 }
294 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
295 /// <p>This parameter doesn't trigger a new service deployment.</p>
296 pub fn deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
297 self.inner = self.inner.deployment_configuration(input);
298 self
299 }
300 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
301 /// <p>This parameter doesn't trigger a new service deployment.</p>
302 pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
303 self.inner = self.inner.set_deployment_configuration(input);
304 self
305 }
306 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
307 /// <p>This parameter doesn't trigger a new service deployment.</p>
308 pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
309 self.inner.get_deployment_configuration()
310 }
311 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
312 /// <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>
313 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
314 /// <ul>
315 /// <li>
316 /// <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>
317 /// <li>
318 /// <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>
319 /// </ul>
320 /// <p>This parameter doesn't trigger a new service deployment.</p>
321 pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
322 self.inner = self.inner.availability_zone_rebalancing(input);
323 self
324 }
325 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
326 /// <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>
327 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
328 /// <ul>
329 /// <li>
330 /// <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>
331 /// <li>
332 /// <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>
333 /// </ul>
334 /// <p>This parameter doesn't trigger a new service deployment.</p>
335 pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
336 self.inner = self.inner.set_availability_zone_rebalancing(input);
337 self
338 }
339 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
340 /// <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>
341 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
342 /// <ul>
343 /// <li>
344 /// <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>
345 /// <li>
346 /// <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>
347 /// </ul>
348 /// <p>This parameter doesn't trigger a new service deployment.</p>
349 pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
350 self.inner.get_availability_zone_rebalancing()
351 }
352 /// <p>An object representing the network configuration for the service.</p>
353 /// <p>This parameter triggers a new service deployment.</p>
354 pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
355 self.inner = self.inner.network_configuration(input);
356 self
357 }
358 /// <p>An object representing the network configuration for the service.</p>
359 /// <p>This parameter triggers a new service deployment.</p>
360 pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
361 self.inner = self.inner.set_network_configuration(input);
362 self
363 }
364 /// <p>An object representing the network configuration for the service.</p>
365 /// <p>This parameter triggers a new service deployment.</p>
366 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
367 self.inner.get_network_configuration()
368 }
369 ///
370 /// Appends an item to `placementConstraints`.
371 ///
372 /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
373 ///
374 /// <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>
375 /// <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>
376 /// <p>This parameter doesn't trigger a new service deployment.</p>
377 pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
378 self.inner = self.inner.placement_constraints(input);
379 self
380 }
381 /// <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>
382 /// <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>
383 /// <p>This parameter doesn't trigger a new service deployment.</p>
384 pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
385 self.inner = self.inner.set_placement_constraints(input);
386 self
387 }
388 /// <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>
389 /// <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>
390 /// <p>This parameter doesn't trigger a new service deployment.</p>
391 pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
392 self.inner.get_placement_constraints()
393 }
394 ///
395 /// Appends an item to `placementStrategy`.
396 ///
397 /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
398 ///
399 /// <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>
400 /// <p>You can specify a maximum of five strategy rules for each service.</p>
401 /// <p>This parameter doesn't trigger a new service deployment.</p>
402 pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
403 self.inner = self.inner.placement_strategy(input);
404 self
405 }
406 /// <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>
407 /// <p>You can specify a maximum of five strategy rules for each service.</p>
408 /// <p>This parameter doesn't trigger a new service deployment.</p>
409 pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
410 self.inner = self.inner.set_placement_strategy(input);
411 self
412 }
413 /// <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>
414 /// <p>You can specify a maximum of five strategy rules for each service.</p>
415 /// <p>This parameter doesn't trigger a new service deployment.</p>
416 pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
417 self.inner.get_placement_strategy()
418 }
419 /// <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>
420 /// <p>This parameter triggers a new service deployment.</p>
421 pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
422 self.inner = self.inner.platform_version(input.into());
423 self
424 }
425 /// <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>
426 /// <p>This parameter triggers a new service deployment.</p>
427 pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
428 self.inner = self.inner.set_platform_version(input);
429 self
430 }
431 /// <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>
432 /// <p>This parameter triggers a new service deployment.</p>
433 pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
434 self.inner.get_platform_version()
435 }
436 /// <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>
437 pub fn force_new_deployment(mut self, input: bool) -> Self {
438 self.inner = self.inner.force_new_deployment(input);
439 self
440 }
441 /// <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>
442 pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
443 self.inner = self.inner.set_force_new_deployment(input);
444 self
445 }
446 /// <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>
447 pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
448 self.inner.get_force_new_deployment()
449 }
450 /// <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>
451 /// <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>
452 /// <p>This parameter doesn't trigger a new service deployment.</p>
453 pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
454 self.inner = self.inner.health_check_grace_period_seconds(input);
455 self
456 }
457 /// <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>
458 /// <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>
459 /// <p>This parameter doesn't trigger a new service deployment.</p>
460 pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
461 self.inner = self.inner.set_health_check_grace_period_seconds(input);
462 self
463 }
464 /// <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>
465 /// <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>
466 /// <p>This parameter doesn't trigger a new service deployment.</p>
467 pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
468 self.inner.get_health_check_grace_period_seconds()
469 }
470 /// <p>The deployment controller to use for the service.</p>
471 pub fn deployment_controller(mut self, input: crate::types::DeploymentController) -> Self {
472 self.inner = self.inner.deployment_controller(input);
473 self
474 }
475 /// <p>The deployment controller to use for the service.</p>
476 pub fn set_deployment_controller(mut self, input: ::std::option::Option<crate::types::DeploymentController>) -> Self {
477 self.inner = self.inner.set_deployment_controller(input);
478 self
479 }
480 /// <p>The deployment controller to use for the service.</p>
481 pub fn get_deployment_controller(&self) -> &::std::option::Option<crate::types::DeploymentController> {
482 self.inner.get_deployment_controller()
483 }
484 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
485 /// <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>
486 /// <p>This parameter doesn't trigger a new service deployment.</p>
487 pub fn enable_execute_command(mut self, input: bool) -> Self {
488 self.inner = self.inner.enable_execute_command(input);
489 self
490 }
491 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
492 /// <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>
493 /// <p>This parameter doesn't trigger a new service deployment.</p>
494 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
495 self.inner = self.inner.set_enable_execute_command(input);
496 self
497 }
498 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
499 /// <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>
500 /// <p>This parameter doesn't trigger a new service deployment.</p>
501 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
502 self.inner.get_enable_execute_command()
503 }
504 /// <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>
505 /// <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>
506 /// <p>This parameter doesn't trigger a new service deployment.</p>
507 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
508 self.inner = self.inner.enable_ecs_managed_tags(input);
509 self
510 }
511 /// <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>
512 /// <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>
513 /// <p>This parameter doesn't trigger a new service deployment.</p>
514 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
515 self.inner = self.inner.set_enable_ecs_managed_tags(input);
516 self
517 }
518 /// <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>
519 /// <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>
520 /// <p>This parameter doesn't trigger a new service deployment.</p>
521 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
522 self.inner.get_enable_ecs_managed_tags()
523 }
524 ///
525 /// Appends an item to `loadBalancers`.
526 ///
527 /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
528 ///
529 /// <note>
530 /// <p>You must have a service-linked role when you update this property</p>
531 /// </note>
532 /// <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>
533 /// <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>
534 /// <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>
535 /// <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>
536 /// <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>
537 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
538 /// <p>This parameter triggers a new service deployment.</p>
539 pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
540 self.inner = self.inner.load_balancers(input);
541 self
542 }
543 /// <note>
544 /// <p>You must have a service-linked role when you update this property</p>
545 /// </note>
546 /// <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>
547 /// <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>
548 /// <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>
549 /// <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>
550 /// <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>
551 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
552 /// <p>This parameter triggers a new service deployment.</p>
553 pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
554 self.inner = self.inner.set_load_balancers(input);
555 self
556 }
557 /// <note>
558 /// <p>You must have a service-linked role when you update this property</p>
559 /// </note>
560 /// <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>
561 /// <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>
562 /// <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>
563 /// <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>
564 /// <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>
565 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
566 /// <p>This parameter triggers a new service deployment.</p>
567 pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
568 self.inner.get_load_balancers()
569 }
570 /// <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>
571 /// <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>
572 /// <p>This parameter doesn't trigger a new service deployment.</p>
573 pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
574 self.inner = self.inner.propagate_tags(input);
575 self
576 }
577 /// <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>
578 /// <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>
579 /// <p>This parameter doesn't trigger a new service deployment.</p>
580 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
581 self.inner = self.inner.set_propagate_tags(input);
582 self
583 }
584 /// <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>
585 /// <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>
586 /// <p>This parameter doesn't trigger a new service deployment.</p>
587 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
588 self.inner.get_propagate_tags()
589 }
590 ///
591 /// Appends an item to `serviceRegistries`.
592 ///
593 /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
594 ///
595 /// <note>
596 /// <p>You must have a service-linked role when you update this property.</p>
597 /// <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>
598 /// </note>
599 /// <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>
600 /// <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>
601 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
602 /// <p>This parameter triggers a new service deployment.</p>
603 pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
604 self.inner = self.inner.service_registries(input);
605 self
606 }
607 /// <note>
608 /// <p>You must have a service-linked role when you update this property.</p>
609 /// <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>
610 /// </note>
611 /// <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>
612 /// <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>
613 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
614 /// <p>This parameter triggers a new service deployment.</p>
615 pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
616 self.inner = self.inner.set_service_registries(input);
617 self
618 }
619 /// <note>
620 /// <p>You must have a service-linked role when you update this property.</p>
621 /// <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>
622 /// </note>
623 /// <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>
624 /// <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>
625 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
626 /// <p>This parameter triggers a new service deployment.</p>
627 pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
628 self.inner.get_service_registries()
629 }
630 /// <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>
631 /// <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>
632 /// <p>This parameter triggers a new service deployment.</p>
633 pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
634 self.inner = self.inner.service_connect_configuration(input);
635 self
636 }
637 /// <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>
638 /// <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>
639 /// <p>This parameter triggers a new service deployment.</p>
640 pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
641 self.inner = self.inner.set_service_connect_configuration(input);
642 self
643 }
644 /// <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>
645 /// <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>
646 /// <p>This parameter triggers a new service deployment.</p>
647 pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
648 self.inner.get_service_connect_configuration()
649 }
650 ///
651 /// Appends an item to `volumeConfigurations`.
652 ///
653 /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
654 ///
655 /// <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>
656 /// <p>This parameter triggers a new service deployment.</p>
657 pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
658 self.inner = self.inner.volume_configurations(input);
659 self
660 }
661 /// <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>
662 /// <p>This parameter triggers a new service deployment.</p>
663 pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
664 self.inner = self.inner.set_volume_configurations(input);
665 self
666 }
667 /// <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>
668 /// <p>This parameter triggers a new service deployment.</p>
669 pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
670 self.inner.get_volume_configurations()
671 }
672 ///
673 /// Appends an item to `vpcLatticeConfigurations`.
674 ///
675 /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
676 ///
677 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
678 /// <p>This parameter triggers a new service deployment.</p>
679 pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
680 self.inner = self.inner.vpc_lattice_configurations(input);
681 self
682 }
683 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
684 /// <p>This parameter triggers a new service deployment.</p>
685 pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
686 self.inner = self.inner.set_vpc_lattice_configurations(input);
687 self
688 }
689 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
690 /// <p>This parameter triggers a new service deployment.</p>
691 pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
692 self.inner.get_vpc_lattice_configurations()
693 }
694}