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><note>
221 /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter.</p>
222 /// </note>
223 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
224 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
225 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
226 /// <p>The following list provides the valid transitions:</p>
227 /// <ul>
228 /// <li>
229 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
230 /// <li>
231 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
232 /// <li>
233 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
234 /// <li>
235 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
236 /// <li>
237 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
238 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
239 /// </ul>
240 /// <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>
241 /// <p>This parameter doesn't trigger a new service deployment.</p>
242 pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
243 self.inner = self.inner.capacity_provider_strategy(input);
244 self
245 }
246 /// <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>
247 /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter.</p>
248 /// </note>
249 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
250 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
251 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
252 /// <p>The following list provides the valid transitions:</p>
253 /// <ul>
254 /// <li>
255 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
256 /// <li>
257 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
258 /// <li>
259 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
260 /// <li>
261 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
262 /// <li>
263 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
264 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
265 /// </ul>
266 /// <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>
267 /// <p>This parameter doesn't trigger a new service deployment.</p>
268 pub fn set_capacity_provider_strategy(
269 mut self,
270 input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
271 ) -> Self {
272 self.inner = self.inner.set_capacity_provider_strategy(input);
273 self
274 }
275 /// <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>
276 /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter.</p>
277 /// </note>
278 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
279 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
280 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
281 /// <p>The following list provides the valid transitions:</p>
282 /// <ul>
283 /// <li>
284 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
285 /// <li>
286 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
287 /// <li>
288 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
289 /// <li>
290 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
291 /// <li>
292 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
293 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
294 /// </ul>
295 /// <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>
296 /// <p>This parameter doesn't trigger a new service deployment.</p>
297 pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
298 self.inner.get_capacity_provider_strategy()
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 deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
303 self.inner = self.inner.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 set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
309 self.inner = self.inner.set_deployment_configuration(input);
310 self
311 }
312 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
313 /// <p>This parameter doesn't trigger a new service deployment.</p>
314 pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
315 self.inner.get_deployment_configuration()
316 }
317 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
318 /// <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>
319 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
320 /// <ul>
321 /// <li>
322 /// <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>
323 /// <li>
324 /// <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>
325 /// </ul>
326 /// <p>This parameter doesn't trigger a new service deployment.</p>
327 pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
328 self.inner = self.inner.availability_zone_rebalancing(input);
329 self
330 }
331 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
332 /// <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>
333 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
334 /// <ul>
335 /// <li>
336 /// <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>
337 /// <li>
338 /// <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>
339 /// </ul>
340 /// <p>This parameter doesn't trigger a new service deployment.</p>
341 pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
342 self.inner = self.inner.set_availability_zone_rebalancing(input);
343 self
344 }
345 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
346 /// <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>
347 /// <p>The default behavior of <code>AvailabilityZoneRebalancing</code> differs between create and update requests:</p>
348 /// <ul>
349 /// <li>
350 /// <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>
351 /// <li>
352 /// <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>
353 /// </ul>
354 /// <p>This parameter doesn't trigger a new service deployment.</p>
355 pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
356 self.inner.get_availability_zone_rebalancing()
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 network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
361 self.inner = self.inner.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 set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
367 self.inner = self.inner.set_network_configuration(input);
368 self
369 }
370 /// <p>An object representing the network configuration for the service.</p>
371 /// <p>This parameter triggers a new service deployment.</p>
372 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
373 self.inner.get_network_configuration()
374 }
375 ///
376 /// Appends an item to `placementConstraints`.
377 ///
378 /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
379 ///
380 /// <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>
381 /// <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>
382 /// <p>This parameter doesn't trigger a new service deployment.</p>
383 pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
384 self.inner = self.inner.placement_constraints(input);
385 self
386 }
387 /// <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>
388 /// <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>
389 /// <p>This parameter doesn't trigger a new service deployment.</p>
390 pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
391 self.inner = self.inner.set_placement_constraints(input);
392 self
393 }
394 /// <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>
395 /// <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>
396 /// <p>This parameter doesn't trigger a new service deployment.</p>
397 pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
398 self.inner.get_placement_constraints()
399 }
400 ///
401 /// Appends an item to `placementStrategy`.
402 ///
403 /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
404 ///
405 /// <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>
406 /// <p>You can specify a maximum of five strategy rules for each service.</p>
407 /// <p>This parameter doesn't trigger a new service deployment.</p>
408 pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
409 self.inner = self.inner.placement_strategy(input);
410 self
411 }
412 /// <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>
413 /// <p>You can specify a maximum of five strategy rules for each service.</p>
414 /// <p>This parameter doesn't trigger a new service deployment.</p>
415 pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
416 self.inner = self.inner.set_placement_strategy(input);
417 self
418 }
419 /// <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>
420 /// <p>You can specify a maximum of five strategy rules for each service.</p>
421 /// <p>This parameter doesn't trigger a new service deployment.</p>
422 pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
423 self.inner.get_placement_strategy()
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 platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
428 self.inner = self.inner.platform_version(input.into());
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 set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
434 self.inner = self.inner.set_platform_version(input);
435 self
436 }
437 /// <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>
438 /// <p>This parameter triggers a new service deployment.</p>
439 pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
440 self.inner.get_platform_version()
441 }
442 /// <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>
443 pub fn force_new_deployment(mut self, input: bool) -> Self {
444 self.inner = self.inner.force_new_deployment(input);
445 self
446 }
447 /// <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>
448 pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
449 self.inner = self.inner.set_force_new_deployment(input);
450 self
451 }
452 /// <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>
453 pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
454 self.inner.get_force_new_deployment()
455 }
456 /// <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>
457 /// <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>
458 /// <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>
459 /// <p>This parameter doesn't trigger a new service deployment.</p>
460 pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
461 self.inner = self.inner.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>If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.</p>
467 /// <p>This parameter doesn't trigger a new service deployment.</p>
468 pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
469 self.inner = self.inner.set_health_check_grace_period_seconds(input);
470 self
471 }
472 /// <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>
473 /// <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>
474 /// <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>
475 /// <p>This parameter doesn't trigger a new service deployment.</p>
476 pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
477 self.inner.get_health_check_grace_period_seconds()
478 }
479 /// <p>The deployment controller to use for the service.</p>
480 pub fn deployment_controller(mut self, input: crate::types::DeploymentController) -> Self {
481 self.inner = self.inner.deployment_controller(input);
482 self
483 }
484 /// <p>The deployment controller to use for the service.</p>
485 pub fn set_deployment_controller(mut self, input: ::std::option::Option<crate::types::DeploymentController>) -> Self {
486 self.inner = self.inner.set_deployment_controller(input);
487 self
488 }
489 /// <p>The deployment controller to use for the service.</p>
490 pub fn get_deployment_controller(&self) -> &::std::option::Option<crate::types::DeploymentController> {
491 self.inner.get_deployment_controller()
492 }
493 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
494 /// <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>
495 /// <p>This parameter doesn't trigger a new service deployment.</p>
496 pub fn enable_execute_command(mut self, input: bool) -> Self {
497 self.inner = self.inner.enable_execute_command(input);
498 self
499 }
500 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
501 /// <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>
502 /// <p>This parameter doesn't trigger a new service deployment.</p>
503 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
504 self.inner = self.inner.set_enable_execute_command(input);
505 self
506 }
507 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
508 /// <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>
509 /// <p>This parameter doesn't trigger a new service deployment.</p>
510 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
511 self.inner.get_enable_execute_command()
512 }
513 /// <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>
514 /// <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>
515 /// <p>This parameter doesn't trigger a new service deployment.</p>
516 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
517 self.inner = self.inner.enable_ecs_managed_tags(input);
518 self
519 }
520 /// <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>
521 /// <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>
522 /// <p>This parameter doesn't trigger a new service deployment.</p>
523 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
524 self.inner = self.inner.set_enable_ecs_managed_tags(input);
525 self
526 }
527 /// <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>
528 /// <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>
529 /// <p>This parameter doesn't trigger a new service deployment.</p>
530 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
531 self.inner.get_enable_ecs_managed_tags()
532 }
533 ///
534 /// Appends an item to `loadBalancers`.
535 ///
536 /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
537 ///
538 /// <note>
539 /// <p>You must have a service-linked role when you update this property</p>
540 /// </note>
541 /// <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>
542 /// <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>
543 /// <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>
544 /// <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>
545 /// <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>
546 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
547 /// <p>This parameter triggers a new service deployment.</p>
548 pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
549 self.inner = self.inner.load_balancers(input);
550 self
551 }
552 /// <note>
553 /// <p>You must have a service-linked role when you update this property</p>
554 /// </note>
555 /// <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>
556 /// <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>
557 /// <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>
558 /// <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>
559 /// <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>
560 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
561 /// <p>This parameter triggers a new service deployment.</p>
562 pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
563 self.inner = self.inner.set_load_balancers(input);
564 self
565 }
566 /// <note>
567 /// <p>You must have a service-linked role when you update this property</p>
568 /// </note>
569 /// <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>
570 /// <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>
571 /// <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>
572 /// <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>
573 /// <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>
574 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
575 /// <p>This parameter triggers a new service deployment.</p>
576 pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
577 self.inner.get_load_balancers()
578 }
579 /// <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>
580 /// <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>
581 /// <p>This parameter doesn't trigger a new service deployment.</p>
582 pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
583 self.inner = self.inner.propagate_tags(input);
584 self
585 }
586 /// <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>
587 /// <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>
588 /// <p>This parameter doesn't trigger a new service deployment.</p>
589 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
590 self.inner = self.inner.set_propagate_tags(input);
591 self
592 }
593 /// <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>
594 /// <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>
595 /// <p>This parameter doesn't trigger a new service deployment.</p>
596 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
597 self.inner.get_propagate_tags()
598 }
599 ///
600 /// Appends an item to `serviceRegistries`.
601 ///
602 /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
603 ///
604 /// <note>
605 /// <p>You must have a service-linked role when you update this property.</p>
606 /// <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>
607 /// </note>
608 /// <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>
609 /// <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>
610 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
611 /// <p>This parameter triggers a new service deployment.</p>
612 pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
613 self.inner = self.inner.service_registries(input);
614 self
615 }
616 /// <note>
617 /// <p>You must have a service-linked role when you update this property.</p>
618 /// <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>
619 /// </note>
620 /// <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>
621 /// <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>
622 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
623 /// <p>This parameter triggers a new service deployment.</p>
624 pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
625 self.inner = self.inner.set_service_registries(input);
626 self
627 }
628 /// <note>
629 /// <p>You must have a service-linked role when you update this property.</p>
630 /// <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>
631 /// </note>
632 /// <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>
633 /// <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>
634 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
635 /// <p>This parameter triggers a new service deployment.</p>
636 pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
637 self.inner.get_service_registries()
638 }
639 /// <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>
640 /// <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>
641 /// <p>This parameter triggers a new service deployment.</p>
642 pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
643 self.inner = self.inner.service_connect_configuration(input);
644 self
645 }
646 /// <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>
647 /// <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>
648 /// <p>This parameter triggers a new service deployment.</p>
649 pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
650 self.inner = self.inner.set_service_connect_configuration(input);
651 self
652 }
653 /// <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>
654 /// <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>
655 /// <p>This parameter triggers a new service deployment.</p>
656 pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
657 self.inner.get_service_connect_configuration()
658 }
659 ///
660 /// Appends an item to `volumeConfigurations`.
661 ///
662 /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
663 ///
664 /// <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>
665 /// <p>This parameter triggers a new service deployment.</p>
666 pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
667 self.inner = self.inner.volume_configurations(input);
668 self
669 }
670 /// <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>
671 /// <p>This parameter triggers a new service deployment.</p>
672 pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
673 self.inner = self.inner.set_volume_configurations(input);
674 self
675 }
676 /// <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>
677 /// <p>This parameter triggers a new service deployment.</p>
678 pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
679 self.inner.get_volume_configurations()
680 }
681 ///
682 /// Appends an item to `vpcLatticeConfigurations`.
683 ///
684 /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
685 ///
686 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
687 /// <p>This parameter triggers a new service deployment.</p>
688 pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
689 self.inner = self.inner.vpc_lattice_configurations(input);
690 self
691 }
692 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
693 /// <p>This parameter triggers a new service deployment.</p>
694 pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
695 self.inner = self.inner.set_vpc_lattice_configurations(input);
696 self
697 }
698 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
699 /// <p>This parameter triggers a new service deployment.</p>
700 pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
701 self.inner.get_vpc_lattice_configurations()
702 }
703}