aws_sdk_elasticloadbalancingv2/types/_target_group_attribute.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a target group attribute.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TargetGroupAttribute {
7 /// <p>The name of the attribute.</p>
8 /// <p>The following attributes are supported by all load balancers:</p>
9 /// <ul>
10 /// <li>
11 /// <p><code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p></li>
12 /// <li>
13 /// <p><code>stickiness.enabled</code> - Indicates whether target stickiness is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
14 /// <li>
15 /// <p><code>stickiness.type</code> - Indicates the type of stickiness. The possible values are:</p>
16 /// <ul>
17 /// <li>
18 /// <p><code>lb_cookie</code> and <code>app_cookie</code> for Application Load Balancers.</p></li>
19 /// <li>
20 /// <p><code>source_ip</code> for Network Load Balancers.</p></li>
21 /// <li>
22 /// <p><code>source_ip_dest_ip</code> and <code>source_ip_dest_ip_proto</code> for Gateway Load Balancers.</p></li>
23 /// </ul></li>
24 /// </ul>
25 /// <p>The following attributes are supported by Application Load Balancers and Network Load Balancers:</p>
26 /// <ul>
27 /// <li>
28 /// <p><code>load_balancing.cross_zone.enabled</code> - Indicates whether cross zone load balancing is enabled. The value is <code>true</code>, <code>false</code> or <code>use_load_balancer_configuration</code>. The default is <code>use_load_balancer_configuration</code>.</p></li>
29 /// <li>
30 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to the maximum number of targets. The default is 1.</p></li>
31 /// <li>
32 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
33 /// <li>
34 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.</p></li>
35 /// <li>
36 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
37 /// </ul>
38 /// <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p>
39 /// <ul>
40 /// <li>
41 /// <p><code>load_balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round_robin</code>, <code>least_outstanding_requests</code>, or <code>weighted_random</code>. The default is <code>round_robin</code>.</p></li>
42 /// <li>
43 /// <p><code>load_balancing.algorithm.anomaly_mitigation</code> - Only available when <code>load_balancing.algorithm.type</code> is <code>weighted_random</code>. Indicates whether anomaly mitigation is enabled. The value is <code>on</code> or <code>off</code>. The default is <code>off</code>.</p></li>
44 /// <li>
45 /// <p><code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).</p></li>
46 /// <li>
47 /// <p><code>stickiness.app_cookie.cookie_name</code> - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: <code>AWSALB</code>, <code>AWSALBAPP</code>, and <code>AWSALBTG</code>; they're reserved for use by the load balancer.</p></li>
48 /// <li>
49 /// <p><code>stickiness.app_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
50 /// <li>
51 /// <p><code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
52 /// </ul>
53 /// <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p>
54 /// <ul>
55 /// <li>
56 /// <p><code>lambda.multi_value_headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p></li>
57 /// </ul>
58 /// <p>The following attributes are supported only by Network Load Balancers:</p>
59 /// <ul>
60 /// <li>
61 /// <p><code>deregistration_delay.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is <code>true</code> or <code>false</code>. For new UDP/TCP_UDP target groups the default is <code>true</code>. Otherwise, the default is <code>false</code>.</p></li>
62 /// <li>
63 /// <p><code>preserve_client_ip.enabled</code> - Indicates whether client IP preservation is enabled. The value is <code>true</code> or <code>false</code>. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP and TCP_UDP target groups.</p></li>
64 /// <li>
65 /// <p><code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
66 /// <li>
67 /// <p><code>target_health_state.unhealthy.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections to unhealthy targets. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. This attribute can't be enabled for UDP and TCP_UDP target groups.</p></li>
68 /// <li>
69 /// <p><code>target_health_state.unhealthy.draining_interval_seconds</code> - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from <code>unhealthy.draining</code> to <code>unhealthy</code>. The range is 0-360000 seconds. The default value is 0 seconds.</p>
70 /// <p>Note: This attribute can only be configured when <code>target_health_state.unhealthy.connection_termination.enabled</code> is <code>false</code>.</p></li>
71 /// </ul>
72 /// <p>The following attributes are supported only by Gateway Load Balancers:</p>
73 /// <ul>
74 /// <li>
75 /// <p><code>target_failover.on_deregistration</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
76 /// <li>
77 /// <p><code>target_failover.on_unhealthy</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
78 /// </ul>
79 pub key: ::std::option::Option<::std::string::String>,
80 /// <p>The value of the attribute.</p>
81 pub value: ::std::option::Option<::std::string::String>,
82}
83impl TargetGroupAttribute {
84 /// <p>The name of the attribute.</p>
85 /// <p>The following attributes are supported by all load balancers:</p>
86 /// <ul>
87 /// <li>
88 /// <p><code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p></li>
89 /// <li>
90 /// <p><code>stickiness.enabled</code> - Indicates whether target stickiness is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
91 /// <li>
92 /// <p><code>stickiness.type</code> - Indicates the type of stickiness. The possible values are:</p>
93 /// <ul>
94 /// <li>
95 /// <p><code>lb_cookie</code> and <code>app_cookie</code> for Application Load Balancers.</p></li>
96 /// <li>
97 /// <p><code>source_ip</code> for Network Load Balancers.</p></li>
98 /// <li>
99 /// <p><code>source_ip_dest_ip</code> and <code>source_ip_dest_ip_proto</code> for Gateway Load Balancers.</p></li>
100 /// </ul></li>
101 /// </ul>
102 /// <p>The following attributes are supported by Application Load Balancers and Network Load Balancers:</p>
103 /// <ul>
104 /// <li>
105 /// <p><code>load_balancing.cross_zone.enabled</code> - Indicates whether cross zone load balancing is enabled. The value is <code>true</code>, <code>false</code> or <code>use_load_balancer_configuration</code>. The default is <code>use_load_balancer_configuration</code>.</p></li>
106 /// <li>
107 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to the maximum number of targets. The default is 1.</p></li>
108 /// <li>
109 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
110 /// <li>
111 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.</p></li>
112 /// <li>
113 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
114 /// </ul>
115 /// <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p>
116 /// <ul>
117 /// <li>
118 /// <p><code>load_balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round_robin</code>, <code>least_outstanding_requests</code>, or <code>weighted_random</code>. The default is <code>round_robin</code>.</p></li>
119 /// <li>
120 /// <p><code>load_balancing.algorithm.anomaly_mitigation</code> - Only available when <code>load_balancing.algorithm.type</code> is <code>weighted_random</code>. Indicates whether anomaly mitigation is enabled. The value is <code>on</code> or <code>off</code>. The default is <code>off</code>.</p></li>
121 /// <li>
122 /// <p><code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).</p></li>
123 /// <li>
124 /// <p><code>stickiness.app_cookie.cookie_name</code> - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: <code>AWSALB</code>, <code>AWSALBAPP</code>, and <code>AWSALBTG</code>; they're reserved for use by the load balancer.</p></li>
125 /// <li>
126 /// <p><code>stickiness.app_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
127 /// <li>
128 /// <p><code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
129 /// </ul>
130 /// <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p>
131 /// <ul>
132 /// <li>
133 /// <p><code>lambda.multi_value_headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p></li>
134 /// </ul>
135 /// <p>The following attributes are supported only by Network Load Balancers:</p>
136 /// <ul>
137 /// <li>
138 /// <p><code>deregistration_delay.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is <code>true</code> or <code>false</code>. For new UDP/TCP_UDP target groups the default is <code>true</code>. Otherwise, the default is <code>false</code>.</p></li>
139 /// <li>
140 /// <p><code>preserve_client_ip.enabled</code> - Indicates whether client IP preservation is enabled. The value is <code>true</code> or <code>false</code>. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP and TCP_UDP target groups.</p></li>
141 /// <li>
142 /// <p><code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
143 /// <li>
144 /// <p><code>target_health_state.unhealthy.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections to unhealthy targets. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. This attribute can't be enabled for UDP and TCP_UDP target groups.</p></li>
145 /// <li>
146 /// <p><code>target_health_state.unhealthy.draining_interval_seconds</code> - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from <code>unhealthy.draining</code> to <code>unhealthy</code>. The range is 0-360000 seconds. The default value is 0 seconds.</p>
147 /// <p>Note: This attribute can only be configured when <code>target_health_state.unhealthy.connection_termination.enabled</code> is <code>false</code>.</p></li>
148 /// </ul>
149 /// <p>The following attributes are supported only by Gateway Load Balancers:</p>
150 /// <ul>
151 /// <li>
152 /// <p><code>target_failover.on_deregistration</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
153 /// <li>
154 /// <p><code>target_failover.on_unhealthy</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
155 /// </ul>
156 pub fn key(&self) -> ::std::option::Option<&str> {
157 self.key.as_deref()
158 }
159 /// <p>The value of the attribute.</p>
160 pub fn value(&self) -> ::std::option::Option<&str> {
161 self.value.as_deref()
162 }
163}
164impl TargetGroupAttribute {
165 /// Creates a new builder-style object to manufacture [`TargetGroupAttribute`](crate::types::TargetGroupAttribute).
166 pub fn builder() -> crate::types::builders::TargetGroupAttributeBuilder {
167 crate::types::builders::TargetGroupAttributeBuilder::default()
168 }
169}
170
171/// A builder for [`TargetGroupAttribute`](crate::types::TargetGroupAttribute).
172#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
173#[non_exhaustive]
174pub struct TargetGroupAttributeBuilder {
175 pub(crate) key: ::std::option::Option<::std::string::String>,
176 pub(crate) value: ::std::option::Option<::std::string::String>,
177}
178impl TargetGroupAttributeBuilder {
179 /// <p>The name of the attribute.</p>
180 /// <p>The following attributes are supported by all load balancers:</p>
181 /// <ul>
182 /// <li>
183 /// <p><code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p></li>
184 /// <li>
185 /// <p><code>stickiness.enabled</code> - Indicates whether target stickiness is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
186 /// <li>
187 /// <p><code>stickiness.type</code> - Indicates the type of stickiness. The possible values are:</p>
188 /// <ul>
189 /// <li>
190 /// <p><code>lb_cookie</code> and <code>app_cookie</code> for Application Load Balancers.</p></li>
191 /// <li>
192 /// <p><code>source_ip</code> for Network Load Balancers.</p></li>
193 /// <li>
194 /// <p><code>source_ip_dest_ip</code> and <code>source_ip_dest_ip_proto</code> for Gateway Load Balancers.</p></li>
195 /// </ul></li>
196 /// </ul>
197 /// <p>The following attributes are supported by Application Load Balancers and Network Load Balancers:</p>
198 /// <ul>
199 /// <li>
200 /// <p><code>load_balancing.cross_zone.enabled</code> - Indicates whether cross zone load balancing is enabled. The value is <code>true</code>, <code>false</code> or <code>use_load_balancer_configuration</code>. The default is <code>use_load_balancer_configuration</code>.</p></li>
201 /// <li>
202 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to the maximum number of targets. The default is 1.</p></li>
203 /// <li>
204 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
205 /// <li>
206 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.</p></li>
207 /// <li>
208 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
209 /// </ul>
210 /// <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p>
211 /// <ul>
212 /// <li>
213 /// <p><code>load_balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round_robin</code>, <code>least_outstanding_requests</code>, or <code>weighted_random</code>. The default is <code>round_robin</code>.</p></li>
214 /// <li>
215 /// <p><code>load_balancing.algorithm.anomaly_mitigation</code> - Only available when <code>load_balancing.algorithm.type</code> is <code>weighted_random</code>. Indicates whether anomaly mitigation is enabled. The value is <code>on</code> or <code>off</code>. The default is <code>off</code>.</p></li>
216 /// <li>
217 /// <p><code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).</p></li>
218 /// <li>
219 /// <p><code>stickiness.app_cookie.cookie_name</code> - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: <code>AWSALB</code>, <code>AWSALBAPP</code>, and <code>AWSALBTG</code>; they're reserved for use by the load balancer.</p></li>
220 /// <li>
221 /// <p><code>stickiness.app_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
222 /// <li>
223 /// <p><code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
224 /// </ul>
225 /// <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p>
226 /// <ul>
227 /// <li>
228 /// <p><code>lambda.multi_value_headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p></li>
229 /// </ul>
230 /// <p>The following attributes are supported only by Network Load Balancers:</p>
231 /// <ul>
232 /// <li>
233 /// <p><code>deregistration_delay.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is <code>true</code> or <code>false</code>. For new UDP/TCP_UDP target groups the default is <code>true</code>. Otherwise, the default is <code>false</code>.</p></li>
234 /// <li>
235 /// <p><code>preserve_client_ip.enabled</code> - Indicates whether client IP preservation is enabled. The value is <code>true</code> or <code>false</code>. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP and TCP_UDP target groups.</p></li>
236 /// <li>
237 /// <p><code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
238 /// <li>
239 /// <p><code>target_health_state.unhealthy.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections to unhealthy targets. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. This attribute can't be enabled for UDP and TCP_UDP target groups.</p></li>
240 /// <li>
241 /// <p><code>target_health_state.unhealthy.draining_interval_seconds</code> - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from <code>unhealthy.draining</code> to <code>unhealthy</code>. The range is 0-360000 seconds. The default value is 0 seconds.</p>
242 /// <p>Note: This attribute can only be configured when <code>target_health_state.unhealthy.connection_termination.enabled</code> is <code>false</code>.</p></li>
243 /// </ul>
244 /// <p>The following attributes are supported only by Gateway Load Balancers:</p>
245 /// <ul>
246 /// <li>
247 /// <p><code>target_failover.on_deregistration</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
248 /// <li>
249 /// <p><code>target_failover.on_unhealthy</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
250 /// </ul>
251 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.key = ::std::option::Option::Some(input.into());
253 self
254 }
255 /// <p>The name of the attribute.</p>
256 /// <p>The following attributes are supported by all load balancers:</p>
257 /// <ul>
258 /// <li>
259 /// <p><code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p></li>
260 /// <li>
261 /// <p><code>stickiness.enabled</code> - Indicates whether target stickiness is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
262 /// <li>
263 /// <p><code>stickiness.type</code> - Indicates the type of stickiness. The possible values are:</p>
264 /// <ul>
265 /// <li>
266 /// <p><code>lb_cookie</code> and <code>app_cookie</code> for Application Load Balancers.</p></li>
267 /// <li>
268 /// <p><code>source_ip</code> for Network Load Balancers.</p></li>
269 /// <li>
270 /// <p><code>source_ip_dest_ip</code> and <code>source_ip_dest_ip_proto</code> for Gateway Load Balancers.</p></li>
271 /// </ul></li>
272 /// </ul>
273 /// <p>The following attributes are supported by Application Load Balancers and Network Load Balancers:</p>
274 /// <ul>
275 /// <li>
276 /// <p><code>load_balancing.cross_zone.enabled</code> - Indicates whether cross zone load balancing is enabled. The value is <code>true</code>, <code>false</code> or <code>use_load_balancer_configuration</code>. The default is <code>use_load_balancer_configuration</code>.</p></li>
277 /// <li>
278 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to the maximum number of targets. The default is 1.</p></li>
279 /// <li>
280 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
281 /// <li>
282 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.</p></li>
283 /// <li>
284 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
285 /// </ul>
286 /// <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p>
287 /// <ul>
288 /// <li>
289 /// <p><code>load_balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round_robin</code>, <code>least_outstanding_requests</code>, or <code>weighted_random</code>. The default is <code>round_robin</code>.</p></li>
290 /// <li>
291 /// <p><code>load_balancing.algorithm.anomaly_mitigation</code> - Only available when <code>load_balancing.algorithm.type</code> is <code>weighted_random</code>. Indicates whether anomaly mitigation is enabled. The value is <code>on</code> or <code>off</code>. The default is <code>off</code>.</p></li>
292 /// <li>
293 /// <p><code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).</p></li>
294 /// <li>
295 /// <p><code>stickiness.app_cookie.cookie_name</code> - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: <code>AWSALB</code>, <code>AWSALBAPP</code>, and <code>AWSALBTG</code>; they're reserved for use by the load balancer.</p></li>
296 /// <li>
297 /// <p><code>stickiness.app_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
298 /// <li>
299 /// <p><code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
300 /// </ul>
301 /// <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p>
302 /// <ul>
303 /// <li>
304 /// <p><code>lambda.multi_value_headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p></li>
305 /// </ul>
306 /// <p>The following attributes are supported only by Network Load Balancers:</p>
307 /// <ul>
308 /// <li>
309 /// <p><code>deregistration_delay.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is <code>true</code> or <code>false</code>. For new UDP/TCP_UDP target groups the default is <code>true</code>. Otherwise, the default is <code>false</code>.</p></li>
310 /// <li>
311 /// <p><code>preserve_client_ip.enabled</code> - Indicates whether client IP preservation is enabled. The value is <code>true</code> or <code>false</code>. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP and TCP_UDP target groups.</p></li>
312 /// <li>
313 /// <p><code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
314 /// <li>
315 /// <p><code>target_health_state.unhealthy.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections to unhealthy targets. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. This attribute can't be enabled for UDP and TCP_UDP target groups.</p></li>
316 /// <li>
317 /// <p><code>target_health_state.unhealthy.draining_interval_seconds</code> - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from <code>unhealthy.draining</code> to <code>unhealthy</code>. The range is 0-360000 seconds. The default value is 0 seconds.</p>
318 /// <p>Note: This attribute can only be configured when <code>target_health_state.unhealthy.connection_termination.enabled</code> is <code>false</code>.</p></li>
319 /// </ul>
320 /// <p>The following attributes are supported only by Gateway Load Balancers:</p>
321 /// <ul>
322 /// <li>
323 /// <p><code>target_failover.on_deregistration</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
324 /// <li>
325 /// <p><code>target_failover.on_unhealthy</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
326 /// </ul>
327 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
328 self.key = input;
329 self
330 }
331 /// <p>The name of the attribute.</p>
332 /// <p>The following attributes are supported by all load balancers:</p>
333 /// <ul>
334 /// <li>
335 /// <p><code>deregistration_delay.timeout_seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p></li>
336 /// <li>
337 /// <p><code>stickiness.enabled</code> - Indicates whether target stickiness is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
338 /// <li>
339 /// <p><code>stickiness.type</code> - Indicates the type of stickiness. The possible values are:</p>
340 /// <ul>
341 /// <li>
342 /// <p><code>lb_cookie</code> and <code>app_cookie</code> for Application Load Balancers.</p></li>
343 /// <li>
344 /// <p><code>source_ip</code> for Network Load Balancers.</p></li>
345 /// <li>
346 /// <p><code>source_ip_dest_ip</code> and <code>source_ip_dest_ip_proto</code> for Gateway Load Balancers.</p></li>
347 /// </ul></li>
348 /// </ul>
349 /// <p>The following attributes are supported by Application Load Balancers and Network Load Balancers:</p>
350 /// <ul>
351 /// <li>
352 /// <p><code>load_balancing.cross_zone.enabled</code> - Indicates whether cross zone load balancing is enabled. The value is <code>true</code>, <code>false</code> or <code>use_load_balancer_configuration</code>. The default is <code>use_load_balancer_configuration</code>.</p></li>
353 /// <li>
354 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to the maximum number of targets. The default is 1.</p></li>
355 /// <li>
356 /// <p><code>target_group_health.dns_failover.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
357 /// <li>
358 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.count</code> - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.</p></li>
359 /// <li>
360 /// <p><code>target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage</code> - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are <code>off</code> or an integer from 1 to 100. The default is <code>off</code>.</p></li>
361 /// </ul>
362 /// <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p>
363 /// <ul>
364 /// <li>
365 /// <p><code>load_balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round_robin</code>, <code>least_outstanding_requests</code>, or <code>weighted_random</code>. The default is <code>round_robin</code>.</p></li>
366 /// <li>
367 /// <p><code>load_balancing.algorithm.anomaly_mitigation</code> - Only available when <code>load_balancing.algorithm.type</code> is <code>weighted_random</code>. Indicates whether anomaly mitigation is enabled. The value is <code>on</code> or <code>off</code>. The default is <code>off</code>.</p></li>
368 /// <li>
369 /// <p><code>slow_start.duration_seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).</p></li>
370 /// <li>
371 /// <p><code>stickiness.app_cookie.cookie_name</code> - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: <code>AWSALB</code>, <code>AWSALBAPP</code>, and <code>AWSALBTG</code>; they're reserved for use by the load balancer.</p></li>
372 /// <li>
373 /// <p><code>stickiness.app_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
374 /// <li>
375 /// <p><code>stickiness.lb_cookie.duration_seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p></li>
376 /// </ul>
377 /// <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p>
378 /// <ul>
379 /// <li>
380 /// <p><code>lambda.multi_value_headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p></li>
381 /// </ul>
382 /// <p>The following attributes are supported only by Network Load Balancers:</p>
383 /// <ul>
384 /// <li>
385 /// <p><code>deregistration_delay.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is <code>true</code> or <code>false</code>. For new UDP/TCP_UDP target groups the default is <code>true</code>. Otherwise, the default is <code>false</code>.</p></li>
386 /// <li>
387 /// <p><code>preserve_client_ip.enabled</code> - Indicates whether client IP preservation is enabled. The value is <code>true</code> or <code>false</code>. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation can't be disabled for UDP and TCP_UDP target groups.</p></li>
388 /// <li>
389 /// <p><code>proxy_protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p></li>
390 /// <li>
391 /// <p><code>target_health_state.unhealthy.connection_termination.enabled</code> - Indicates whether the load balancer terminates connections to unhealthy targets. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. This attribute can't be enabled for UDP and TCP_UDP target groups.</p></li>
392 /// <li>
393 /// <p><code>target_health_state.unhealthy.draining_interval_seconds</code> - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from <code>unhealthy.draining</code> to <code>unhealthy</code>. The range is 0-360000 seconds. The default value is 0 seconds.</p>
394 /// <p>Note: This attribute can only be configured when <code>target_health_state.unhealthy.connection_termination.enabled</code> is <code>false</code>.</p></li>
395 /// </ul>
396 /// <p>The following attributes are supported only by Gateway Load Balancers:</p>
397 /// <ul>
398 /// <li>
399 /// <p><code>target_failover.on_deregistration</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
400 /// <li>
401 /// <p><code>target_failover.on_unhealthy</code> - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are <code>rebalance</code> and <code>no_rebalance</code>. The default is <code>no_rebalance</code>. The two attributes (<code>target_failover.on_deregistration</code> and <code>target_failover.on_unhealthy</code>) can't be set independently. The value you set for both attributes must be the same.</p></li>
402 /// </ul>
403 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
404 &self.key
405 }
406 /// <p>The value of the attribute.</p>
407 pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
408 self.value = ::std::option::Option::Some(input.into());
409 self
410 }
411 /// <p>The value of the attribute.</p>
412 pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
413 self.value = input;
414 self
415 }
416 /// <p>The value of the attribute.</p>
417 pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
418 &self.value
419 }
420 /// Consumes the builder and constructs a [`TargetGroupAttribute`](crate::types::TargetGroupAttribute).
421 pub fn build(self) -> crate::types::TargetGroupAttribute {
422 crate::types::TargetGroupAttribute {
423 key: self.key,
424 value: self.value,
425 }
426 }
427}