aws_sdk_ecs/operation/create_daemon/_create_daemon_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 CreateDaemonInput {
6 /// <p>The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
7 pub daemon_name: ::std::option::Option<::std::string::String>,
8 /// <p>The Amazon Resource Name (ARN) of the cluster to create the daemon in.</p>
9 pub cluster_arn: ::std::option::Option<::std::string::String>,
10 /// <p>The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.</p>
11 pub daemon_task_definition_arn: ::std::option::Option<::std::string::String>,
12 /// <p>The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.</p>
13 pub capacity_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 /// <p>Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.</p>
15 pub deployment_configuration: ::std::option::Option<crate::types::DaemonDeploymentConfiguration>,
16 /// <p>The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
17 /// <p>The following basic restrictions apply to tags:</p>
18 /// <ul>
19 /// <li>
20 /// <p>Maximum number of tags per resource - 50</p></li>
21 /// <li>
22 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
23 /// <li>
24 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
25 /// <li>
26 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
27 /// <li>
28 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
29 /// <li>
30 /// <p>Tag keys and values are case-sensitive.</p></li>
31 /// <li>
32 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
33 /// </ul>
34 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
35 /// <p>Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p>
36 pub propagate_tags: ::std::option::Option<crate::types::DaemonPropagateTags>,
37 /// <p>Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. 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>
38 pub enable_ecs_managed_tags: ::std::option::Option<bool>,
39 /// <p>Determines whether the execute command functionality is turned on for the daemon. If <code>true</code>, the execute command functionality is turned on for all tasks in the daemon.</p>
40 pub enable_execute_command: ::std::option::Option<bool>,
41 /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p>
42 pub client_token: ::std::option::Option<::std::string::String>,
43 /// <p>If the <code>critical</code> parameter of a daemon is <code>true</code>, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the <code>critical</code> parameter is <code>false</code>, the daemon task failure doesn't affect the other tasks on the instance. The default value is <code>true</code>.</p>
44 /// <p>A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.</p>
45 /// <p>Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.</p>
46 /// <p>Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.</p>
47 pub critical: ::std::option::Option<bool>,
48}
49impl CreateDaemonInput {
50 /// <p>The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
51 pub fn daemon_name(&self) -> ::std::option::Option<&str> {
52 self.daemon_name.as_deref()
53 }
54 /// <p>The Amazon Resource Name (ARN) of the cluster to create the daemon in.</p>
55 pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
56 self.cluster_arn.as_deref()
57 }
58 /// <p>The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.</p>
59 pub fn daemon_task_definition_arn(&self) -> ::std::option::Option<&str> {
60 self.daemon_task_definition_arn.as_deref()
61 }
62 /// <p>The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.</p>
63 ///
64 /// 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_arns.is_none()`.
65 pub fn capacity_provider_arns(&self) -> &[::std::string::String] {
66 self.capacity_provider_arns.as_deref().unwrap_or_default()
67 }
68 /// <p>Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.</p>
69 pub fn deployment_configuration(&self) -> ::std::option::Option<&crate::types::DaemonDeploymentConfiguration> {
70 self.deployment_configuration.as_ref()
71 }
72 /// <p>The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
73 /// <p>The following basic restrictions apply to tags:</p>
74 /// <ul>
75 /// <li>
76 /// <p>Maximum number of tags per resource - 50</p></li>
77 /// <li>
78 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
79 /// <li>
80 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
81 /// <li>
82 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
83 /// <li>
84 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
85 /// <li>
86 /// <p>Tag keys and values are case-sensitive.</p></li>
87 /// <li>
88 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
89 /// </ul>
90 ///
91 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
92 pub fn tags(&self) -> &[crate::types::Tag] {
93 self.tags.as_deref().unwrap_or_default()
94 }
95 /// <p>Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p>
96 pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::DaemonPropagateTags> {
97 self.propagate_tags.as_ref()
98 }
99 /// <p>Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. 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>
100 pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
101 self.enable_ecs_managed_tags
102 }
103 /// <p>Determines whether the execute command functionality is turned on for the daemon. If <code>true</code>, the execute command functionality is turned on for all tasks in the daemon.</p>
104 pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
105 self.enable_execute_command
106 }
107 /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p>
108 pub fn client_token(&self) -> ::std::option::Option<&str> {
109 self.client_token.as_deref()
110 }
111 /// <p>If the <code>critical</code> parameter of a daemon is <code>true</code>, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the <code>critical</code> parameter is <code>false</code>, the daemon task failure doesn't affect the other tasks on the instance. The default value is <code>true</code>.</p>
112 /// <p>A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.</p>
113 /// <p>Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.</p>
114 /// <p>Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.</p>
115 pub fn critical(&self) -> ::std::option::Option<bool> {
116 self.critical
117 }
118}
119impl CreateDaemonInput {
120 /// Creates a new builder-style object to manufacture [`CreateDaemonInput`](crate::operation::create_daemon::CreateDaemonInput).
121 pub fn builder() -> crate::operation::create_daemon::builders::CreateDaemonInputBuilder {
122 crate::operation::create_daemon::builders::CreateDaemonInputBuilder::default()
123 }
124}
125
126/// A builder for [`CreateDaemonInput`](crate::operation::create_daemon::CreateDaemonInput).
127#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
128#[non_exhaustive]
129pub struct CreateDaemonInputBuilder {
130 pub(crate) daemon_name: ::std::option::Option<::std::string::String>,
131 pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
132 pub(crate) daemon_task_definition_arn: ::std::option::Option<::std::string::String>,
133 pub(crate) capacity_provider_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
134 pub(crate) deployment_configuration: ::std::option::Option<crate::types::DaemonDeploymentConfiguration>,
135 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
136 pub(crate) propagate_tags: ::std::option::Option<crate::types::DaemonPropagateTags>,
137 pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
138 pub(crate) enable_execute_command: ::std::option::Option<bool>,
139 pub(crate) client_token: ::std::option::Option<::std::string::String>,
140 pub(crate) critical: ::std::option::Option<bool>,
141}
142impl CreateDaemonInputBuilder {
143 /// <p>The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
144 /// This field is required.
145 pub fn daemon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.daemon_name = ::std::option::Option::Some(input.into());
147 self
148 }
149 /// <p>The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
150 pub fn set_daemon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.daemon_name = input;
152 self
153 }
154 /// <p>The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
155 pub fn get_daemon_name(&self) -> &::std::option::Option<::std::string::String> {
156 &self.daemon_name
157 }
158 /// <p>The Amazon Resource Name (ARN) of the cluster to create the daemon in.</p>
159 pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.cluster_arn = ::std::option::Option::Some(input.into());
161 self
162 }
163 /// <p>The Amazon Resource Name (ARN) of the cluster to create the daemon in.</p>
164 pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.cluster_arn = input;
166 self
167 }
168 /// <p>The Amazon Resource Name (ARN) of the cluster to create the daemon in.</p>
169 pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
170 &self.cluster_arn
171 }
172 /// <p>The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.</p>
173 /// This field is required.
174 pub fn daemon_task_definition_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.daemon_task_definition_arn = ::std::option::Option::Some(input.into());
176 self
177 }
178 /// <p>The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.</p>
179 pub fn set_daemon_task_definition_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.daemon_task_definition_arn = input;
181 self
182 }
183 /// <p>The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon.</p>
184 pub fn get_daemon_task_definition_arn(&self) -> &::std::option::Option<::std::string::String> {
185 &self.daemon_task_definition_arn
186 }
187 /// Appends an item to `capacity_provider_arns`.
188 ///
189 /// To override the contents of this collection use [`set_capacity_provider_arns`](Self::set_capacity_provider_arns).
190 ///
191 /// <p>The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.</p>
192 pub fn capacity_provider_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 let mut v = self.capacity_provider_arns.unwrap_or_default();
194 v.push(input.into());
195 self.capacity_provider_arns = ::std::option::Option::Some(v);
196 self
197 }
198 /// <p>The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.</p>
199 pub fn set_capacity_provider_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
200 self.capacity_provider_arns = input;
201 self
202 }
203 /// <p>The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers.</p>
204 pub fn get_capacity_provider_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
205 &self.capacity_provider_arns
206 }
207 /// <p>Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.</p>
208 pub fn deployment_configuration(mut self, input: crate::types::DaemonDeploymentConfiguration) -> Self {
209 self.deployment_configuration = ::std::option::Option::Some(input);
210 self
211 }
212 /// <p>Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.</p>
213 pub fn set_deployment_configuration(mut self, input: ::std::option::Option<crate::types::DaemonDeploymentConfiguration>) -> Self {
214 self.deployment_configuration = input;
215 self
216 }
217 /// <p>Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.</p>
218 pub fn get_deployment_configuration(&self) -> &::std::option::Option<crate::types::DaemonDeploymentConfiguration> {
219 &self.deployment_configuration
220 }
221 /// Appends an item to `tags`.
222 ///
223 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
224 ///
225 /// <p>The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
226 /// <p>The following basic restrictions apply to tags:</p>
227 /// <ul>
228 /// <li>
229 /// <p>Maximum number of tags per resource - 50</p></li>
230 /// <li>
231 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
232 /// <li>
233 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
234 /// <li>
235 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
236 /// <li>
237 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
238 /// <li>
239 /// <p>Tag keys and values are case-sensitive.</p></li>
240 /// <li>
241 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
242 /// </ul>
243 pub fn tags(mut self, input: crate::types::Tag) -> Self {
244 let mut v = self.tags.unwrap_or_default();
245 v.push(input);
246 self.tags = ::std::option::Option::Some(v);
247 self
248 }
249 /// <p>The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
250 /// <p>The following basic restrictions apply to tags:</p>
251 /// <ul>
252 /// <li>
253 /// <p>Maximum number of tags per resource - 50</p></li>
254 /// <li>
255 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
256 /// <li>
257 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
258 /// <li>
259 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
260 /// <li>
261 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
262 /// <li>
263 /// <p>Tag keys and values are case-sensitive.</p></li>
264 /// <li>
265 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
266 /// </ul>
267 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
268 self.tags = input;
269 self
270 }
271 /// <p>The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
272 /// <p>The following basic restrictions apply to tags:</p>
273 /// <ul>
274 /// <li>
275 /// <p>Maximum number of tags per resource - 50</p></li>
276 /// <li>
277 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
278 /// <li>
279 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
280 /// <li>
281 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
282 /// <li>
283 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
284 /// <li>
285 /// <p>Tag keys and values are case-sensitive.</p></li>
286 /// <li>
287 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
288 /// </ul>
289 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
290 &self.tags
291 }
292 /// <p>Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p>
293 pub fn propagate_tags(mut self, input: crate::types::DaemonPropagateTags) -> Self {
294 self.propagate_tags = ::std::option::Option::Some(input);
295 self
296 }
297 /// <p>Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p>
298 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::DaemonPropagateTags>) -> Self {
299 self.propagate_tags = input;
300 self
301 }
302 /// <p>Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p>
303 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::DaemonPropagateTags> {
304 &self.propagate_tags
305 }
306 /// <p>Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. 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>
307 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
308 self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
309 self
310 }
311 /// <p>Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. 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>
312 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
313 self.enable_ecs_managed_tags = input;
314 self
315 }
316 /// <p>Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. 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>
317 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
318 &self.enable_ecs_managed_tags
319 }
320 /// <p>Determines whether the execute command functionality is turned on for the daemon. If <code>true</code>, the execute command functionality is turned on for all tasks in the daemon.</p>
321 pub fn enable_execute_command(mut self, input: bool) -> Self {
322 self.enable_execute_command = ::std::option::Option::Some(input);
323 self
324 }
325 /// <p>Determines whether the execute command functionality is turned on for the daemon. If <code>true</code>, the execute command functionality is turned on for all tasks in the daemon.</p>
326 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
327 self.enable_execute_command = input;
328 self
329 }
330 /// <p>Determines whether the execute command functionality is turned on for the daemon. If <code>true</code>, the execute command functionality is turned on for all tasks in the daemon.</p>
331 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
332 &self.enable_execute_command
333 }
334 /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p>
335 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336 self.client_token = ::std::option::Option::Some(input.into());
337 self
338 }
339 /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p>
340 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341 self.client_token = input;
342 self
343 }
344 /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed.</p>
345 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
346 &self.client_token
347 }
348 /// <p>If the <code>critical</code> parameter of a daemon is <code>true</code>, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the <code>critical</code> parameter is <code>false</code>, the daemon task failure doesn't affect the other tasks on the instance. The default value is <code>true</code>.</p>
349 /// <p>A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.</p>
350 /// <p>Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.</p>
351 /// <p>Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.</p>
352 pub fn critical(mut self, input: bool) -> Self {
353 self.critical = ::std::option::Option::Some(input);
354 self
355 }
356 /// <p>If the <code>critical</code> parameter of a daemon is <code>true</code>, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the <code>critical</code> parameter is <code>false</code>, the daemon task failure doesn't affect the other tasks on the instance. The default value is <code>true</code>.</p>
357 /// <p>A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.</p>
358 /// <p>Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.</p>
359 /// <p>Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.</p>
360 pub fn set_critical(mut self, input: ::std::option::Option<bool>) -> Self {
361 self.critical = input;
362 self
363 }
364 /// <p>If the <code>critical</code> parameter of a daemon is <code>true</code>, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the <code>critical</code> parameter is <code>false</code>, the daemon task failure doesn't affect the other tasks on the instance. The default value is <code>true</code>.</p>
365 /// <p>A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.</p>
366 /// <p>Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.</p>
367 /// <p>Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.</p>
368 pub fn get_critical(&self) -> &::std::option::Option<bool> {
369 &self.critical
370 }
371 /// Consumes the builder and constructs a [`CreateDaemonInput`](crate::operation::create_daemon::CreateDaemonInput).
372 pub fn build(
373 self,
374 ) -> ::std::result::Result<crate::operation::create_daemon::CreateDaemonInput, ::aws_smithy_types::error::operation::BuildError> {
375 ::std::result::Result::Ok(crate::operation::create_daemon::CreateDaemonInput {
376 daemon_name: self.daemon_name,
377 cluster_arn: self.cluster_arn,
378 daemon_task_definition_arn: self.daemon_task_definition_arn,
379 capacity_provider_arns: self.capacity_provider_arns,
380 deployment_configuration: self.deployment_configuration,
381 tags: self.tags,
382 propagate_tags: self.propagate_tags,
383 enable_ecs_managed_tags: self.enable_ecs_managed_tags,
384 enable_execute_command: self.enable_execute_command,
385 client_token: self.client_token,
386 critical: self.critical,
387 })
388 }
389}