aws_sdk_ecs/operation/update_service/_update_service_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateServiceInput {
6 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service runs on. If you do not specify a cluster, the default cluster is assumed.</p>
7 /// <p>You can't change the cluster name.</p>
8 pub cluster: ::std::option::Option<::std::string::String>,
9 /// <p>The name of the service to update.</p>
10 pub service: ::std::option::Option<::std::string::String>,
11 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
12 pub desired_count: ::std::option::Option<i32>,
13 /// <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>
14 pub task_definition: ::std::option::Option<::std::string::String>,
15 /// <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>
16 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
17 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
18 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
19 /// <p>The following list provides the valid transitions:</p>
20 /// <ul>
21 /// <li>
22 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
23 /// <li>
24 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
25 /// <li>
26 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
27 /// <li>
28 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
29 /// <li>
30 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
31 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
32 /// </ul>
33 /// <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>
34 pub capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
35 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
36 pub deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
37 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
38 /// <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>
39 pub availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
40 /// <p>An object representing the network configuration for the service.</p>
41 pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
42 /// <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>
43 /// <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>
44 pub placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
45 /// <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>
46 /// <p>You can specify a maximum of five strategy rules for each service.</p>
47 pub placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
48 /// <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>
49 pub platform_version: ::std::option::Option<::std::string::String>,
50 /// <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>
51 pub force_new_deployment: ::std::option::Option<bool>,
52 /// <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>
53 /// <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>
54 pub health_check_grace_period_seconds: ::std::option::Option<i32>,
55 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
56 /// <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>
57 pub enable_execute_command: ::std::option::Option<bool>,
58 /// <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>
59 /// <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>
60 pub enable_ecs_managed_tags: ::std::option::Option<bool>,
61 /// <note>
62 /// <p>You must have a service-linked role when you update this property</p>
63 /// </note>
64 /// <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>
65 /// <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>
66 /// <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>
67 /// <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>
68 /// <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>
69 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
70 pub load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
71 /// <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>
72 /// <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>
73 pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
74 /// <note>
75 /// <p>You must have a service-linked role when you update this property.</p>
76 /// <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>
77 /// </note>
78 /// <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>
79 /// <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>
80 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
81 pub service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
82 /// <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>
83 /// <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>
84 pub service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
85 /// <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>
86 pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
87 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
88 pub vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
89}
90impl UpdateServiceInput {
91 /// <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>
92 /// <p>You can't change the cluster name.</p>
93 pub fn cluster(&self) -> ::std::option::Option<&str> {
94 self.cluster.as_deref()
95 }
96 /// <p>The name of the service to update.</p>
97 pub fn service(&self) -> ::std::option::Option<&str> {
98 self.service.as_deref()
99 }
100 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
101 pub fn desired_count(&self) -> ::std::option::Option<i32> {
102 self.desired_count
103 }
104 /// <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>
105 pub fn task_definition(&self) -> ::std::option::Option<&str> {
106 self.task_definition.as_deref()
107 }
108 /// <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>
109 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
110 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
111 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
112 /// <p>The following list provides the valid transitions:</p>
113 /// <ul>
114 /// <li>
115 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
116 /// <li>
117 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
118 /// <li>
119 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
120 /// <li>
121 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
122 /// <li>
123 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
124 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
125 /// </ul>
126 /// <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>
127 ///
128 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capacity_provider_strategy.is_none()`.
129 pub fn capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
130 self.capacity_provider_strategy.as_deref().unwrap_or_default()
131 }
132 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
133 pub fn deployment_configuration(&self) -> ::std::option::Option<&crate::types::DeploymentConfiguration> {
134 self.deployment_configuration.as_ref()
135 }
136 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
137 /// <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>
138 pub fn availability_zone_rebalancing(&self) -> ::std::option::Option<&crate::types::AvailabilityZoneRebalancing> {
139 self.availability_zone_rebalancing.as_ref()
140 }
141 /// <p>An object representing the network configuration for the service.</p>
142 pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
143 self.network_configuration.as_ref()
144 }
145 /// <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>
146 /// <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>
147 ///
148 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_constraints.is_none()`.
149 pub fn placement_constraints(&self) -> &[crate::types::PlacementConstraint] {
150 self.placement_constraints.as_deref().unwrap_or_default()
151 }
152 /// <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>
153 /// <p>You can specify a maximum of five strategy rules for each service.</p>
154 ///
155 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_strategy.is_none()`.
156 pub fn placement_strategy(&self) -> &[crate::types::PlacementStrategy] {
157 self.placement_strategy.as_deref().unwrap_or_default()
158 }
159 /// <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>
160 pub fn platform_version(&self) -> ::std::option::Option<&str> {
161 self.platform_version.as_deref()
162 }
163 /// <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>
164 pub fn force_new_deployment(&self) -> ::std::option::Option<bool> {
165 self.force_new_deployment
166 }
167 /// <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>
168 /// <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>
169 pub fn health_check_grace_period_seconds(&self) -> ::std::option::Option<i32> {
170 self.health_check_grace_period_seconds
171 }
172 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
173 /// <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>
174 pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
175 self.enable_execute_command
176 }
177 /// <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>
178 /// <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>
179 pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
180 self.enable_ecs_managed_tags
181 }
182 /// <note>
183 /// <p>You must have a service-linked role when you update this property</p>
184 /// </note>
185 /// <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>
186 /// <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>
187 /// <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>
188 /// <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>
189 /// <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>
190 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
191 ///
192 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.load_balancers.is_none()`.
193 pub fn load_balancers(&self) -> &[crate::types::LoadBalancer] {
194 self.load_balancers.as_deref().unwrap_or_default()
195 }
196 /// <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>
197 /// <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>
198 pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
199 self.propagate_tags.as_ref()
200 }
201 /// <note>
202 /// <p>You must have a service-linked role when you update this property.</p>
203 /// <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>
204 /// </note>
205 /// <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>
206 /// <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>
207 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
208 ///
209 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.service_registries.is_none()`.
210 pub fn service_registries(&self) -> &[crate::types::ServiceRegistry] {
211 self.service_registries.as_deref().unwrap_or_default()
212 }
213 /// <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>
214 /// <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>
215 pub fn service_connect_configuration(&self) -> ::std::option::Option<&crate::types::ServiceConnectConfiguration> {
216 self.service_connect_configuration.as_ref()
217 }
218 /// <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>
219 ///
220 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.volume_configurations.is_none()`.
221 pub fn volume_configurations(&self) -> &[crate::types::ServiceVolumeConfiguration] {
222 self.volume_configurations.as_deref().unwrap_or_default()
223 }
224 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
225 ///
226 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_lattice_configurations.is_none()`.
227 pub fn vpc_lattice_configurations(&self) -> &[crate::types::VpcLatticeConfiguration] {
228 self.vpc_lattice_configurations.as_deref().unwrap_or_default()
229 }
230}
231impl UpdateServiceInput {
232 /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
233 pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
234 crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
235 }
236}
237
238/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
239#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
240#[non_exhaustive]
241pub struct UpdateServiceInputBuilder {
242 pub(crate) cluster: ::std::option::Option<::std::string::String>,
243 pub(crate) service: ::std::option::Option<::std::string::String>,
244 pub(crate) desired_count: ::std::option::Option<i32>,
245 pub(crate) task_definition: ::std::option::Option<::std::string::String>,
246 pub(crate) capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
247 pub(crate) deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
248 pub(crate) availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
249 pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
250 pub(crate) placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
251 pub(crate) placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
252 pub(crate) platform_version: ::std::option::Option<::std::string::String>,
253 pub(crate) force_new_deployment: ::std::option::Option<bool>,
254 pub(crate) health_check_grace_period_seconds: ::std::option::Option<i32>,
255 pub(crate) enable_execute_command: ::std::option::Option<bool>,
256 pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
257 pub(crate) load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
258 pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
259 pub(crate) service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
260 pub(crate) service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
261 pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
262 pub(crate) vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
263}
264impl UpdateServiceInputBuilder {
265 /// <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>
266 /// <p>You can't change the cluster name.</p>
267 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.cluster = ::std::option::Option::Some(input.into());
269 self
270 }
271 /// <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>
272 /// <p>You can't change the cluster name.</p>
273 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274 self.cluster = input;
275 self
276 }
277 /// <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>
278 /// <p>You can't change the cluster name.</p>
279 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
280 &self.cluster
281 }
282 /// <p>The name of the service to update.</p>
283 /// This field is required.
284 pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
285 self.service = ::std::option::Option::Some(input.into());
286 self
287 }
288 /// <p>The name of the service to update.</p>
289 pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290 self.service = input;
291 self
292 }
293 /// <p>The name of the service to update.</p>
294 pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
295 &self.service
296 }
297 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
298 pub fn desired_count(mut self, input: i32) -> Self {
299 self.desired_count = ::std::option::Option::Some(input);
300 self
301 }
302 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
303 pub fn set_desired_count(mut self, input: ::std::option::Option<i32>) -> Self {
304 self.desired_count = input;
305 self
306 }
307 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
308 pub fn get_desired_count(&self) -> &::std::option::Option<i32> {
309 &self.desired_count
310 }
311 /// <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>
312 pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313 self.task_definition = ::std::option::Option::Some(input.into());
314 self
315 }
316 /// <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>
317 pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318 self.task_definition = input;
319 self
320 }
321 /// <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>
322 pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
323 &self.task_definition
324 }
325 /// Appends an item to `capacity_provider_strategy`.
326 ///
327 /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
328 ///
329 /// <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>
330 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
331 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
332 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
333 /// <p>The following list provides the valid transitions:</p>
334 /// <ul>
335 /// <li>
336 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
337 /// <li>
338 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
339 /// <li>
340 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
341 /// <li>
342 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
343 /// <li>
344 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
345 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
346 /// </ul>
347 /// <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>
348 pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
349 let mut v = self.capacity_provider_strategy.unwrap_or_default();
350 v.push(input);
351 self.capacity_provider_strategy = ::std::option::Option::Some(v);
352 self
353 }
354 /// <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>
355 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
356 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
357 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
358 /// <p>The following list provides the valid transitions:</p>
359 /// <ul>
360 /// <li>
361 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
362 /// <li>
363 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
364 /// <li>
365 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
366 /// <li>
367 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
368 /// <li>
369 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
370 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
371 /// </ul>
372 /// <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>
373 pub fn set_capacity_provider_strategy(
374 mut self,
375 input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
376 ) -> Self {
377 self.capacity_provider_strategy = input;
378 self
379 }
380 /// <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>
381 /// <p>When you use Fargate, the capacity providers are <code>FARGATE</code> or <code>FARGATE_SPOT</code>.</p>
382 /// <p>When you use Amazon EC2, the capacity providers are Auto Scaling groups.</p>
383 /// <p>You can change capacity providers for rolling deployments and blue/green deployments.</p>
384 /// <p>The following list provides the valid transitions:</p>
385 /// <ul>
386 /// <li>
387 /// <p>Update the Fargate launch type to an Auto Scaling group capacity provider.</p></li>
388 /// <li>
389 /// <p>Update the Amazon EC2 launch type to a Fargate capacity provider.</p></li>
390 /// <li>
391 /// <p>Update the Fargate capacity provider to an Auto Scaling group capacity provider.</p></li>
392 /// <li>
393 /// <p>Update the Amazon EC2 capacity provider to a Fargate capacity provider.</p></li>
394 /// <li>
395 /// <p>Update the Auto Scaling group or Fargate capacity provider back to the launch type.</p>
396 /// <p>Pass an empty list in the <code>capacityProviderStrategy</code> parameter.</p></li>
397 /// </ul>
398 /// <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>
399 pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
400 &self.capacity_provider_strategy
401 }
402 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
403 pub fn deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
404 self.deployment_configuration = ::std::option::Option::Some(input);
405 self
406 }
407 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
408 pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
409 self.deployment_configuration = input;
410 self
411 }
412 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
413 pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
414 &self.deployment_configuration
415 }
416 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
417 /// <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>
418 pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
419 self.availability_zone_rebalancing = ::std::option::Option::Some(input);
420 self
421 }
422 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
423 /// <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>
424 pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
425 self.availability_zone_rebalancing = input;
426 self
427 }
428 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
429 /// <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>
430 pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
431 &self.availability_zone_rebalancing
432 }
433 /// <p>An object representing the network configuration for the service.</p>
434 pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
435 self.network_configuration = ::std::option::Option::Some(input);
436 self
437 }
438 /// <p>An object representing the network configuration for the service.</p>
439 pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
440 self.network_configuration = input;
441 self
442 }
443 /// <p>An object representing the network configuration for the service.</p>
444 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
445 &self.network_configuration
446 }
447 /// Appends an item to `placement_constraints`.
448 ///
449 /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
450 ///
451 /// <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>
452 /// <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>
453 pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
454 let mut v = self.placement_constraints.unwrap_or_default();
455 v.push(input);
456 self.placement_constraints = ::std::option::Option::Some(v);
457 self
458 }
459 /// <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>
460 /// <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>
461 pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
462 self.placement_constraints = input;
463 self
464 }
465 /// <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>
466 /// <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>
467 pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
468 &self.placement_constraints
469 }
470 /// Appends an item to `placement_strategy`.
471 ///
472 /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
473 ///
474 /// <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>
475 /// <p>You can specify a maximum of five strategy rules for each service.</p>
476 pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
477 let mut v = self.placement_strategy.unwrap_or_default();
478 v.push(input);
479 self.placement_strategy = ::std::option::Option::Some(v);
480 self
481 }
482 /// <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>
483 /// <p>You can specify a maximum of five strategy rules for each service.</p>
484 pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
485 self.placement_strategy = input;
486 self
487 }
488 /// <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>
489 /// <p>You can specify a maximum of five strategy rules for each service.</p>
490 pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
491 &self.placement_strategy
492 }
493 /// <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>
494 pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
495 self.platform_version = ::std::option::Option::Some(input.into());
496 self
497 }
498 /// <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>
499 pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
500 self.platform_version = input;
501 self
502 }
503 /// <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>
504 pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
505 &self.platform_version
506 }
507 /// <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>
508 pub fn force_new_deployment(mut self, input: bool) -> Self {
509 self.force_new_deployment = ::std::option::Option::Some(input);
510 self
511 }
512 /// <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>
513 pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
514 self.force_new_deployment = input;
515 self
516 }
517 /// <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>
518 pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
519 &self.force_new_deployment
520 }
521 /// <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>
522 /// <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>
523 pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
524 self.health_check_grace_period_seconds = ::std::option::Option::Some(input);
525 self
526 }
527 /// <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>
528 /// <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>
529 pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
530 self.health_check_grace_period_seconds = input;
531 self
532 }
533 /// <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>
534 /// <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>
535 pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
536 &self.health_check_grace_period_seconds
537 }
538 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
539 /// <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>
540 pub fn enable_execute_command(mut self, input: bool) -> Self {
541 self.enable_execute_command = ::std::option::Option::Some(input);
542 self
543 }
544 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
545 /// <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>
546 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
547 self.enable_execute_command = input;
548 self
549 }
550 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
551 /// <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>
552 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
553 &self.enable_execute_command
554 }
555 /// <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>
556 /// <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>
557 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
558 self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
559 self
560 }
561 /// <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>
562 /// <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>
563 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
564 self.enable_ecs_managed_tags = input;
565 self
566 }
567 /// <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>
568 /// <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>
569 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
570 &self.enable_ecs_managed_tags
571 }
572 /// Appends an item to `load_balancers`.
573 ///
574 /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
575 ///
576 /// <note>
577 /// <p>You must have a service-linked role when you update this property</p>
578 /// </note>
579 /// <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>
580 /// <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>
581 /// <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>
582 /// <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>
583 /// <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>
584 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
585 pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
586 let mut v = self.load_balancers.unwrap_or_default();
587 v.push(input);
588 self.load_balancers = ::std::option::Option::Some(v);
589 self
590 }
591 /// <note>
592 /// <p>You must have a service-linked role when you update this property</p>
593 /// </note>
594 /// <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>
595 /// <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>
596 /// <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>
597 /// <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>
598 /// <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>
599 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
600 pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
601 self.load_balancers = input;
602 self
603 }
604 /// <note>
605 /// <p>You must have a service-linked role when you update this property</p>
606 /// </note>
607 /// <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>
608 /// <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>
609 /// <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>
610 /// <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>
611 /// <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>
612 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
613 pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
614 &self.load_balancers
615 }
616 /// <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>
617 /// <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>
618 pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
619 self.propagate_tags = ::std::option::Option::Some(input);
620 self
621 }
622 /// <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>
623 /// <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>
624 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
625 self.propagate_tags = input;
626 self
627 }
628 /// <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>
629 /// <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>
630 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
631 &self.propagate_tags
632 }
633 /// Appends an item to `service_registries`.
634 ///
635 /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
636 ///
637 /// <note>
638 /// <p>You must have a service-linked role when you update this property.</p>
639 /// <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>
640 /// </note>
641 /// <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>
642 /// <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>
643 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
644 pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
645 let mut v = self.service_registries.unwrap_or_default();
646 v.push(input);
647 self.service_registries = ::std::option::Option::Some(v);
648 self
649 }
650 /// <note>
651 /// <p>You must have a service-linked role when you update this property.</p>
652 /// <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>
653 /// </note>
654 /// <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>
655 /// <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>
656 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
657 pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
658 self.service_registries = input;
659 self
660 }
661 /// <note>
662 /// <p>You must have a service-linked role when you update this property.</p>
663 /// <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>
664 /// </note>
665 /// <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>
666 /// <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>
667 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
668 pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
669 &self.service_registries
670 }
671 /// <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>
672 /// <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>
673 pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
674 self.service_connect_configuration = ::std::option::Option::Some(input);
675 self
676 }
677 /// <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>
678 /// <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>
679 pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
680 self.service_connect_configuration = input;
681 self
682 }
683 /// <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>
684 /// <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>
685 pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
686 &self.service_connect_configuration
687 }
688 /// Appends an item to `volume_configurations`.
689 ///
690 /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
691 ///
692 /// <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>
693 pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
694 let mut v = self.volume_configurations.unwrap_or_default();
695 v.push(input);
696 self.volume_configurations = ::std::option::Option::Some(v);
697 self
698 }
699 /// <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>
700 pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
701 self.volume_configurations = input;
702 self
703 }
704 /// <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>
705 pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
706 &self.volume_configurations
707 }
708 /// Appends an item to `vpc_lattice_configurations`.
709 ///
710 /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
711 ///
712 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
713 pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
714 let mut v = self.vpc_lattice_configurations.unwrap_or_default();
715 v.push(input);
716 self.vpc_lattice_configurations = ::std::option::Option::Some(v);
717 self
718 }
719 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
720 pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
721 self.vpc_lattice_configurations = input;
722 self
723 }
724 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
725 pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
726 &self.vpc_lattice_configurations
727 }
728 /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
729 pub fn build(
730 self,
731 ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
732 ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
733 cluster: self.cluster,
734 service: self.service,
735 desired_count: self.desired_count,
736 task_definition: self.task_definition,
737 capacity_provider_strategy: self.capacity_provider_strategy,
738 deployment_configuration: self.deployment_configuration,
739 availability_zone_rebalancing: self.availability_zone_rebalancing,
740 network_configuration: self.network_configuration,
741 placement_constraints: self.placement_constraints,
742 placement_strategy: self.placement_strategy,
743 platform_version: self.platform_version,
744 force_new_deployment: self.force_new_deployment,
745 health_check_grace_period_seconds: self.health_check_grace_period_seconds,
746 enable_execute_command: self.enable_execute_command,
747 enable_ecs_managed_tags: self.enable_ecs_managed_tags,
748 load_balancers: self.load_balancers,
749 propagate_tags: self.propagate_tags,
750 service_registries: self.service_registries,
751 service_connect_configuration: self.service_connect_configuration,
752 volume_configurations: self.volume_configurations,
753 vpc_lattice_configurations: self.vpc_lattice_configurations,
754 })
755 }
756}