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 pub cluster: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the service to update.</p>
9 pub service: ::std::option::Option<::std::string::String>,
10 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
11 pub desired_count: ::std::option::Option<i32>,
12 /// <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>
13 pub task_definition: ::std::option::Option<::std::string::String>,
14 /// <p>The capacity provider strategy to update the service to use.</p>
15 /// <p>if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that's not the default capacity provider strategy, the service can't be updated to use the cluster's default capacity provider strategy.</p>
16 /// <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p>
17 /// <p>If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html">CreateClusterCapacityProvider</a> API operation.</p>
18 /// <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p>
19 /// <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a>API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p>
20 /// <p></p>
21 pub capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
22 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
23 pub deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
24 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
25 /// <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>
26 pub availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
27 /// <p>An object representing the network configuration for the service.</p>
28 pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
29 /// <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>
30 /// <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>
31 pub placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
32 /// <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>
33 /// <p>You can specify a maximum of five strategy rules for each service.</p>
34 pub placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
35 /// <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>
36 pub platform_version: ::std::option::Option<::std::string::String>,
37 /// <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>
38 pub force_new_deployment: ::std::option::Option<bool>,
39 /// <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>
40 /// <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>
41 pub health_check_grace_period_seconds: ::std::option::Option<i32>,
42 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
43 /// <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>
44 pub enable_execute_command: ::std::option::Option<bool>,
45 /// <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>
46 /// <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>
47 pub enable_ecs_managed_tags: ::std::option::Option<bool>,
48 /// <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>
49 /// <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>
50 /// <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>
51 /// <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>
52 /// <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>
53 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
54 pub load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
55 /// <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>
56 /// <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>
57 pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
58 /// <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>
59 /// <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>
60 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
61 pub service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
62 /// <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>
63 /// <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>
64 pub service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
65 /// <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>
66 pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
67 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
68 pub vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
69}
70impl UpdateServiceInput {
71 /// <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>
72 pub fn cluster(&self) -> ::std::option::Option<&str> {
73 self.cluster.as_deref()
74 }
75 /// <p>The name of the service to update.</p>
76 pub fn service(&self) -> ::std::option::Option<&str> {
77 self.service.as_deref()
78 }
79 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
80 pub fn desired_count(&self) -> ::std::option::Option<i32> {
81 self.desired_count
82 }
83 /// <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>
84 pub fn task_definition(&self) -> ::std::option::Option<&str> {
85 self.task_definition.as_deref()
86 }
87 /// <p>The capacity provider strategy to update the service to use.</p>
88 /// <p>if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that's not the default capacity provider strategy, the service can't be updated to use the cluster's default capacity provider strategy.</p>
89 /// <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p>
90 /// <p>If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html">CreateClusterCapacityProvider</a> API operation.</p>
91 /// <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p>
92 /// <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a>API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p>
93 /// <p></p>
94 ///
95 /// 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()`.
96 pub fn capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
97 self.capacity_provider_strategy.as_deref().unwrap_or_default()
98 }
99 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
100 pub fn deployment_configuration(&self) -> ::std::option::Option<&crate::types::DeploymentConfiguration> {
101 self.deployment_configuration.as_ref()
102 }
103 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
104 /// <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>
105 pub fn availability_zone_rebalancing(&self) -> ::std::option::Option<&crate::types::AvailabilityZoneRebalancing> {
106 self.availability_zone_rebalancing.as_ref()
107 }
108 /// <p>An object representing the network configuration for the service.</p>
109 pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
110 self.network_configuration.as_ref()
111 }
112 /// <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>
113 /// <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>
114 ///
115 /// 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()`.
116 pub fn placement_constraints(&self) -> &[crate::types::PlacementConstraint] {
117 self.placement_constraints.as_deref().unwrap_or_default()
118 }
119 /// <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>
120 /// <p>You can specify a maximum of five strategy rules for each service.</p>
121 ///
122 /// 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()`.
123 pub fn placement_strategy(&self) -> &[crate::types::PlacementStrategy] {
124 self.placement_strategy.as_deref().unwrap_or_default()
125 }
126 /// <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>
127 pub fn platform_version(&self) -> ::std::option::Option<&str> {
128 self.platform_version.as_deref()
129 }
130 /// <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>
131 pub fn force_new_deployment(&self) -> ::std::option::Option<bool> {
132 self.force_new_deployment
133 }
134 /// <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>
135 /// <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>
136 pub fn health_check_grace_period_seconds(&self) -> ::std::option::Option<i32> {
137 self.health_check_grace_period_seconds
138 }
139 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
140 /// <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>
141 pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
142 self.enable_execute_command
143 }
144 /// <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>
145 /// <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>
146 pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
147 self.enable_ecs_managed_tags
148 }
149 /// <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>
150 /// <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>
151 /// <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>
152 /// <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>
153 /// <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>
154 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
155 ///
156 /// 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()`.
157 pub fn load_balancers(&self) -> &[crate::types::LoadBalancer] {
158 self.load_balancers.as_deref().unwrap_or_default()
159 }
160 /// <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>
161 /// <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>
162 pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
163 self.propagate_tags.as_ref()
164 }
165 /// <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>
166 /// <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>
167 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
168 ///
169 /// 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()`.
170 pub fn service_registries(&self) -> &[crate::types::ServiceRegistry] {
171 self.service_registries.as_deref().unwrap_or_default()
172 }
173 /// <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>
174 /// <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>
175 pub fn service_connect_configuration(&self) -> ::std::option::Option<&crate::types::ServiceConnectConfiguration> {
176 self.service_connect_configuration.as_ref()
177 }
178 /// <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>
179 ///
180 /// 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()`.
181 pub fn volume_configurations(&self) -> &[crate::types::ServiceVolumeConfiguration] {
182 self.volume_configurations.as_deref().unwrap_or_default()
183 }
184 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
185 ///
186 /// 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()`.
187 pub fn vpc_lattice_configurations(&self) -> &[crate::types::VpcLatticeConfiguration] {
188 self.vpc_lattice_configurations.as_deref().unwrap_or_default()
189 }
190}
191impl UpdateServiceInput {
192 /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
193 pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
194 crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
195 }
196}
197
198/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
199#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
200#[non_exhaustive]
201pub struct UpdateServiceInputBuilder {
202 pub(crate) cluster: ::std::option::Option<::std::string::String>,
203 pub(crate) service: ::std::option::Option<::std::string::String>,
204 pub(crate) desired_count: ::std::option::Option<i32>,
205 pub(crate) task_definition: ::std::option::Option<::std::string::String>,
206 pub(crate) capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
207 pub(crate) deployment_configuration: ::std::option::Option<crate::types::DeploymentConfiguration>,
208 pub(crate) availability_zone_rebalancing: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>,
209 pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
210 pub(crate) placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
211 pub(crate) placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
212 pub(crate) platform_version: ::std::option::Option<::std::string::String>,
213 pub(crate) force_new_deployment: ::std::option::Option<bool>,
214 pub(crate) health_check_grace_period_seconds: ::std::option::Option<i32>,
215 pub(crate) enable_execute_command: ::std::option::Option<bool>,
216 pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
217 pub(crate) load_balancers: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>,
218 pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
219 pub(crate) service_registries: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>,
220 pub(crate) service_connect_configuration: ::std::option::Option<crate::types::ServiceConnectConfiguration>,
221 pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>,
222 pub(crate) vpc_lattice_configurations: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>,
223}
224impl UpdateServiceInputBuilder {
225 /// <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>
226 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.cluster = ::std::option::Option::Some(input.into());
228 self
229 }
230 /// <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>
231 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232 self.cluster = input;
233 self
234 }
235 /// <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>
236 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
237 &self.cluster
238 }
239 /// <p>The name of the service to update.</p>
240 /// This field is required.
241 pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242 self.service = ::std::option::Option::Some(input.into());
243 self
244 }
245 /// <p>The name of the service to update.</p>
246 pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247 self.service = input;
248 self
249 }
250 /// <p>The name of the service to update.</p>
251 pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
252 &self.service
253 }
254 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
255 pub fn desired_count(mut self, input: i32) -> Self {
256 self.desired_count = ::std::option::Option::Some(input);
257 self
258 }
259 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
260 pub fn set_desired_count(mut self, input: ::std::option::Option<i32>) -> Self {
261 self.desired_count = input;
262 self
263 }
264 /// <p>The number of instantiations of the task to place and keep running in your service.</p>
265 pub fn get_desired_count(&self) -> &::std::option::Option<i32> {
266 &self.desired_count
267 }
268 /// <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>
269 pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270 self.task_definition = ::std::option::Option::Some(input.into());
271 self
272 }
273 /// <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>
274 pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275 self.task_definition = input;
276 self
277 }
278 /// <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>
279 pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
280 &self.task_definition
281 }
282 /// Appends an item to `capacity_provider_strategy`.
283 ///
284 /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
285 ///
286 /// <p>The capacity provider strategy to update the service to use.</p>
287 /// <p>if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that's not the default capacity provider strategy, the service can't be updated to use the cluster's default capacity provider strategy.</p>
288 /// <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p>
289 /// <p>If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html">CreateClusterCapacityProvider</a> API operation.</p>
290 /// <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p>
291 /// <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a>API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p>
292 /// <p></p>
293 pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
294 let mut v = self.capacity_provider_strategy.unwrap_or_default();
295 v.push(input);
296 self.capacity_provider_strategy = ::std::option::Option::Some(v);
297 self
298 }
299 /// <p>The capacity provider strategy to update the service to use.</p>
300 /// <p>if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that's not the default capacity provider strategy, the service can't be updated to use the cluster's default capacity provider strategy.</p>
301 /// <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p>
302 /// <p>If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html">CreateClusterCapacityProvider</a> API operation.</p>
303 /// <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p>
304 /// <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a>API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p>
305 /// <p></p>
306 pub fn set_capacity_provider_strategy(
307 mut self,
308 input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
309 ) -> Self {
310 self.capacity_provider_strategy = input;
311 self
312 }
313 /// <p>The capacity provider strategy to update the service to use.</p>
314 /// <p>if the service uses the default capacity provider strategy for the cluster, the service can be updated to use one or more capacity providers as opposed to the default capacity provider strategy. However, when a service is using a capacity provider strategy that's not the default capacity provider strategy, the service can't be updated to use the cluster's default capacity provider strategy.</p>
315 /// <p>A capacity provider strategy consists of one or more capacity providers along with the <code>base</code> and <code>weight</code> to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a> API is used to associate a capacity provider with a cluster. Only capacity providers with an <code>ACTIVE</code> or <code>UPDATING</code> status can be used.</p>
316 /// <p>If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html">CreateClusterCapacityProvider</a> API operation.</p>
317 /// <p>To use a Fargate capacity provider, specify either the <code>FARGATE</code> or <code>FARGATE_SPOT</code> capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.</p>
318 /// <p>The <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html">PutClusterCapacityProviders</a>API operation is used to update the list of available capacity providers for a cluster after the cluster is created.</p>
319 /// <p></p>
320 pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
321 &self.capacity_provider_strategy
322 }
323 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
324 pub fn deployment_configuration(mut self, input: crate::types::DeploymentConfiguration) -> Self {
325 self.deployment_configuration = ::std::option::Option::Some(input);
326 self
327 }
328 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
329 pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DeploymentConfiguration>) -> Self {
330 self.deployment_configuration = input;
331 self
332 }
333 /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p>
334 pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DeploymentConfiguration> {
335 &self.deployment_configuration
336 }
337 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
338 /// <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>
339 pub fn availability_zone_rebalancing(mut self, input: crate::types::AvailabilityZoneRebalancing) -> Self {
340 self.availability_zone_rebalancing = ::std::option::Option::Some(input);
341 self
342 }
343 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
344 /// <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>
345 pub fn set_availability_zone_rebalancing(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneRebalancing>) -> Self {
346 self.availability_zone_rebalancing = input;
347 self
348 }
349 /// <p>Indicates whether to use Availability Zone rebalancing for the service.</p>
350 /// <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>
351 pub fn get_availability_zone_rebalancing(&self) -> &::std::option::Option<crate::types::AvailabilityZoneRebalancing> {
352 &self.availability_zone_rebalancing
353 }
354 /// <p>An object representing the network configuration for the service.</p>
355 pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
356 self.network_configuration = ::std::option::Option::Some(input);
357 self
358 }
359 /// <p>An object representing the network configuration for the service.</p>
360 pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
361 self.network_configuration = input;
362 self
363 }
364 /// <p>An object representing the network configuration for the service.</p>
365 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
366 &self.network_configuration
367 }
368 /// Appends an item to `placement_constraints`.
369 ///
370 /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
371 ///
372 /// <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>
373 /// <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>
374 pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
375 let mut v = self.placement_constraints.unwrap_or_default();
376 v.push(input);
377 self.placement_constraints = ::std::option::Option::Some(v);
378 self
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 pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
383 self.placement_constraints = input;
384 self
385 }
386 /// <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>
387 /// <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>
388 pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
389 &self.placement_constraints
390 }
391 /// Appends an item to `placement_strategy`.
392 ///
393 /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
394 ///
395 /// <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>
396 /// <p>You can specify a maximum of five strategy rules for each service.</p>
397 pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
398 let mut v = self.placement_strategy.unwrap_or_default();
399 v.push(input);
400 self.placement_strategy = ::std::option::Option::Some(v);
401 self
402 }
403 /// <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>
404 /// <p>You can specify a maximum of five strategy rules for each service.</p>
405 pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
406 self.placement_strategy = input;
407 self
408 }
409 /// <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>
410 /// <p>You can specify a maximum of five strategy rules for each service.</p>
411 pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
412 &self.placement_strategy
413 }
414 /// <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>
415 pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416 self.platform_version = ::std::option::Option::Some(input.into());
417 self
418 }
419 /// <p>The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If a platform version is not specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
420 pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421 self.platform_version = input;
422 self
423 }
424 /// <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>
425 pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
426 &self.platform_version
427 }
428 /// <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>
429 pub fn force_new_deployment(mut self, input: bool) -> Self {
430 self.force_new_deployment = ::std::option::Option::Some(input);
431 self
432 }
433 /// <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>
434 pub fn set_force_new_deployment(mut self, input: ::std::option::Option<bool>) -> Self {
435 self.force_new_deployment = input;
436 self
437 }
438 /// <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>
439 pub fn get_force_new_deployment(&self) -> &::std::option::Option<bool> {
440 &self.force_new_deployment
441 }
442 /// <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>
443 /// <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>
444 pub fn health_check_grace_period_seconds(mut self, input: i32) -> Self {
445 self.health_check_grace_period_seconds = ::std::option::Option::Some(input);
446 self
447 }
448 /// <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>
449 /// <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>
450 pub fn set_health_check_grace_period_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
451 self.health_check_grace_period_seconds = input;
452 self
453 }
454 /// <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>
455 /// <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>
456 pub fn get_health_check_grace_period_seconds(&self) -> &::std::option::Option<i32> {
457 &self.health_check_grace_period_seconds
458 }
459 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
460 /// <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>
461 pub fn enable_execute_command(mut self, input: bool) -> Self {
462 self.enable_execute_command = ::std::option::Option::Some(input);
463 self
464 }
465 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
466 /// <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>
467 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
468 self.enable_execute_command = input;
469 self
470 }
471 /// <p>If <code>true</code>, this enables execute command functionality on all task containers.</p>
472 /// <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>
473 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
474 &self.enable_execute_command
475 }
476 /// <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>
477 /// <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>
478 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
479 self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
480 self
481 }
482 /// <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>
483 /// <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>
484 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
485 self.enable_ecs_managed_tags = input;
486 self
487 }
488 /// <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>
489 /// <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>
490 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
491 &self.enable_ecs_managed_tags
492 }
493 /// Appends an item to `load_balancers`.
494 ///
495 /// To override the contents of this collection use [`set_load_balancers`](Self::set_load_balancers).
496 ///
497 /// <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>
498 /// <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>
499 /// <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>
500 /// <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>
501 /// <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>
502 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
503 pub fn load_balancers(mut self, input: crate::types::LoadBalancer) -> Self {
504 let mut v = self.load_balancers.unwrap_or_default();
505 v.push(input);
506 self.load_balancers = ::std::option::Option::Some(v);
507 self
508 }
509 /// <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>
510 /// <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>
511 /// <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>
512 /// <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>
513 /// <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>
514 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
515 pub fn set_load_balancers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>>) -> Self {
516 self.load_balancers = input;
517 self
518 }
519 /// <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>
520 /// <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>
521 /// <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>
522 /// <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>
523 /// <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>
524 /// <p>You can remove existing <code>loadBalancers</code> by passing an empty list.</p>
525 pub fn get_load_balancers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LoadBalancer>> {
526 &self.load_balancers
527 }
528 /// <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>
529 /// <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>
530 pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
531 self.propagate_tags = ::std::option::Option::Some(input);
532 self
533 }
534 /// <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>
535 /// <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>
536 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
537 self.propagate_tags = input;
538 self
539 }
540 /// <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>
541 /// <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>
542 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
543 &self.propagate_tags
544 }
545 /// Appends an item to `service_registries`.
546 ///
547 /// To override the contents of this collection use [`set_service_registries`](Self::set_service_registries).
548 ///
549 /// <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>
550 /// <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>
551 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
552 pub fn service_registries(mut self, input: crate::types::ServiceRegistry) -> Self {
553 let mut v = self.service_registries.unwrap_or_default();
554 v.push(input);
555 self.service_registries = ::std::option::Option::Some(v);
556 self
557 }
558 /// <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>
559 /// <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>
560 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
561 pub fn set_service_registries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>>) -> Self {
562 self.service_registries = input;
563 self
564 }
565 /// <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>
566 /// <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>
567 /// <p>You can remove existing <code>serviceRegistries</code> by passing an empty list.</p>
568 pub fn get_service_registries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceRegistry>> {
569 &self.service_registries
570 }
571 /// <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>
572 /// <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>
573 pub fn service_connect_configuration(mut self, input: crate::types::ServiceConnectConfiguration) -> Self {
574 self.service_connect_configuration = ::std::option::Option::Some(input);
575 self
576 }
577 /// <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>
578 /// <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>
579 pub fn set_service_connect_configuration(mut self, input: ::std::option::Option<crate::types::ServiceConnectConfiguration>) -> Self {
580 self.service_connect_configuration = input;
581 self
582 }
583 /// <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>
584 /// <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>
585 pub fn get_service_connect_configuration(&self) -> &::std::option::Option<crate::types::ServiceConnectConfiguration> {
586 &self.service_connect_configuration
587 }
588 /// Appends an item to `volume_configurations`.
589 ///
590 /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
591 ///
592 /// <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>
593 pub fn volume_configurations(mut self, input: crate::types::ServiceVolumeConfiguration) -> Self {
594 let mut v = self.volume_configurations.unwrap_or_default();
595 v.push(input);
596 self.volume_configurations = ::std::option::Option::Some(v);
597 self
598 }
599 /// <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>
600 pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>>) -> Self {
601 self.volume_configurations = input;
602 self
603 }
604 /// <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>
605 pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceVolumeConfiguration>> {
606 &self.volume_configurations
607 }
608 /// Appends an item to `vpc_lattice_configurations`.
609 ///
610 /// To override the contents of this collection use [`set_vpc_lattice_configurations`](Self::set_vpc_lattice_configurations).
611 ///
612 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
613 pub fn vpc_lattice_configurations(mut self, input: crate::types::VpcLatticeConfiguration) -> Self {
614 let mut v = self.vpc_lattice_configurations.unwrap_or_default();
615 v.push(input);
616 self.vpc_lattice_configurations = ::std::option::Option::Some(v);
617 self
618 }
619 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
620 pub fn set_vpc_lattice_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>>) -> Self {
621 self.vpc_lattice_configurations = input;
622 self
623 }
624 /// <p>An object representing the VPC Lattice configuration for the service being updated.</p>
625 pub fn get_vpc_lattice_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcLatticeConfiguration>> {
626 &self.vpc_lattice_configurations
627 }
628 /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
629 pub fn build(
630 self,
631 ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
632 ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
633 cluster: self.cluster,
634 service: self.service,
635 desired_count: self.desired_count,
636 task_definition: self.task_definition,
637 capacity_provider_strategy: self.capacity_provider_strategy,
638 deployment_configuration: self.deployment_configuration,
639 availability_zone_rebalancing: self.availability_zone_rebalancing,
640 network_configuration: self.network_configuration,
641 placement_constraints: self.placement_constraints,
642 placement_strategy: self.placement_strategy,
643 platform_version: self.platform_version,
644 force_new_deployment: self.force_new_deployment,
645 health_check_grace_period_seconds: self.health_check_grace_period_seconds,
646 enable_execute_command: self.enable_execute_command,
647 enable_ecs_managed_tags: self.enable_ecs_managed_tags,
648 load_balancers: self.load_balancers,
649 propagate_tags: self.propagate_tags,
650 service_registries: self.service_registries,
651 service_connect_configuration: self.service_connect_configuration,
652 volume_configurations: self.volume_configurations,
653 vpc_lattice_configurations: self.vpc_lattice_configurations,
654 })
655 }
656}