aws-sdk-codedeploy 1.99.0

AWS SDK for AWS CodeDeploy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the input of an <code>UpdateDeploymentGroup</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateDeploymentGroupInput {
    /// <p>The application name that corresponds to the deployment group to update.</p>
    pub application_name: ::std::option::Option<::std::string::String>,
    /// <p>The current name of the deployment group.</p>
    pub current_deployment_group_name: ::std::option::Option<::std::string::String>,
    /// <p>The new name of the deployment group, if you want to change it.</p>
    pub new_deployment_group_name: ::std::option::Option<::std::string::String>,
    /// <p>The replacement deployment configuration name to use, if you want to change it.</p>
    pub deployment_config_name: ::std::option::Option<::std::string::String>,
    /// <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub ec2_tag_filters: ::std::option::Option<::std::vec::Vec<crate::types::Ec2TagFilter>>,
    /// <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub on_premises_instance_tag_filters: ::std::option::Option<::std::vec::Vec<crate::types::TagFilter>>,
    /// <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p>
    /// <ul>
    /// <li>
    /// <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter.</p></li>
    /// <li>
    /// <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout"</a> in the <i>CodeDeploy User Guide</i>.</p></li>
    /// </ul>
    pub auto_scaling_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A replacement ARN for the service role, if you want to change it.</p>
    pub service_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Information about triggers to change when the deployment group is updated. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
    pub trigger_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TriggerConfig>>,
    /// <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
    pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
    /// <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
    pub auto_rollback_configuration: ::std::option::Option<crate::types::AutoRollbackConfiguration>,
    /// <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p>
    /// <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p>
    /// <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
    pub outdated_instances_strategy: ::std::option::Option<crate::types::OutdatedInstancesStrategy>,
    /// <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
    pub deployment_style: ::std::option::Option<crate::types::DeploymentStyle>,
    /// <p>Information about blue/green deployment options for a deployment group.</p>
    pub blue_green_deployment_configuration: ::std::option::Option<crate::types::BlueGreenDeploymentConfiguration>,
    /// <p>Information about the load balancer used in a deployment.</p>
    pub load_balancer_info: ::std::option::Option<crate::types::LoadBalancerInfo>,
    /// <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
    pub ec2_tag_set: ::std::option::Option<crate::types::Ec2TagSet>,
    /// <p>The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>
    /// :
    /// <servicename></servicename>
    /// </clustername></code>.</p>
    pub ecs_services: ::std::option::Option<::std::vec::Vec<crate::types::EcsService>>,
    /// <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
    pub on_premises_tag_set: ::std::option::Option<crate::types::OnPremisesTagSet>,
    /// <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p>
    /// <p>For information about termination deployments, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>For more information about Auto Scaling scale-in events, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
    pub termination_hook_enabled: ::std::option::Option<bool>,
}
impl UpdateDeploymentGroupInput {
    /// <p>The application name that corresponds to the deployment group to update.</p>
    pub fn application_name(&self) -> ::std::option::Option<&str> {
        self.application_name.as_deref()
    }
    /// <p>The current name of the deployment group.</p>
    pub fn current_deployment_group_name(&self) -> ::std::option::Option<&str> {
        self.current_deployment_group_name.as_deref()
    }
    /// <p>The new name of the deployment group, if you want to change it.</p>
    pub fn new_deployment_group_name(&self) -> ::std::option::Option<&str> {
        self.new_deployment_group_name.as_deref()
    }
    /// <p>The replacement deployment configuration name to use, if you want to change it.</p>
    pub fn deployment_config_name(&self) -> ::std::option::Option<&str> {
        self.deployment_config_name.as_deref()
    }
    /// <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ec2_tag_filters.is_none()`.
    pub fn ec2_tag_filters(&self) -> &[crate::types::Ec2TagFilter] {
        self.ec2_tag_filters.as_deref().unwrap_or_default()
    }
    /// <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.on_premises_instance_tag_filters.is_none()`.
    pub fn on_premises_instance_tag_filters(&self) -> &[crate::types::TagFilter] {
        self.on_premises_instance_tag_filters.as_deref().unwrap_or_default()
    }
    /// <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p>
    /// <ul>
    /// <li>
    /// <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter.</p></li>
    /// <li>
    /// <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout"</a> in the <i>CodeDeploy User Guide</i>.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.auto_scaling_groups.is_none()`.
    pub fn auto_scaling_groups(&self) -> &[::std::string::String] {
        self.auto_scaling_groups.as_deref().unwrap_or_default()
    }
    /// <p>A replacement ARN for the service role, if you want to change it.</p>
    pub fn service_role_arn(&self) -> ::std::option::Option<&str> {
        self.service_role_arn.as_deref()
    }
    /// <p>Information about triggers to change when the deployment group is updated. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.trigger_configurations.is_none()`.
    pub fn trigger_configurations(&self) -> &[crate::types::TriggerConfig] {
        self.trigger_configurations.as_deref().unwrap_or_default()
    }
    /// <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
    pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
        self.alarm_configuration.as_ref()
    }
    /// <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
    pub fn auto_rollback_configuration(&self) -> ::std::option::Option<&crate::types::AutoRollbackConfiguration> {
        self.auto_rollback_configuration.as_ref()
    }
    /// <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p>
    /// <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p>
    /// <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
    pub fn outdated_instances_strategy(&self) -> ::std::option::Option<&crate::types::OutdatedInstancesStrategy> {
        self.outdated_instances_strategy.as_ref()
    }
    /// <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
    pub fn deployment_style(&self) -> ::std::option::Option<&crate::types::DeploymentStyle> {
        self.deployment_style.as_ref()
    }
    /// <p>Information about blue/green deployment options for a deployment group.</p>
    pub fn blue_green_deployment_configuration(&self) -> ::std::option::Option<&crate::types::BlueGreenDeploymentConfiguration> {
        self.blue_green_deployment_configuration.as_ref()
    }
    /// <p>Information about the load balancer used in a deployment.</p>
    pub fn load_balancer_info(&self) -> ::std::option::Option<&crate::types::LoadBalancerInfo> {
        self.load_balancer_info.as_ref()
    }
    /// <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
    pub fn ec2_tag_set(&self) -> ::std::option::Option<&crate::types::Ec2TagSet> {
        self.ec2_tag_set.as_ref()
    }
    /// <p>The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>
    /// :
    /// <servicename></servicename>
    /// </clustername></code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ecs_services.is_none()`.
    pub fn ecs_services(&self) -> &[crate::types::EcsService] {
        self.ecs_services.as_deref().unwrap_or_default()
    }
    /// <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
    pub fn on_premises_tag_set(&self) -> ::std::option::Option<&crate::types::OnPremisesTagSet> {
        self.on_premises_tag_set.as_ref()
    }
    /// <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p>
    /// <p>For information about termination deployments, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>For more information about Auto Scaling scale-in events, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
    pub fn termination_hook_enabled(&self) -> ::std::option::Option<bool> {
        self.termination_hook_enabled
    }
}
impl UpdateDeploymentGroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateDeploymentGroupInput`](crate::operation::update_deployment_group::UpdateDeploymentGroupInput).
    pub fn builder() -> crate::operation::update_deployment_group::builders::UpdateDeploymentGroupInputBuilder {
        crate::operation::update_deployment_group::builders::UpdateDeploymentGroupInputBuilder::default()
    }
}

/// A builder for [`UpdateDeploymentGroupInput`](crate::operation::update_deployment_group::UpdateDeploymentGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDeploymentGroupInputBuilder {
    pub(crate) application_name: ::std::option::Option<::std::string::String>,
    pub(crate) current_deployment_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) new_deployment_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_config_name: ::std::option::Option<::std::string::String>,
    pub(crate) ec2_tag_filters: ::std::option::Option<::std::vec::Vec<crate::types::Ec2TagFilter>>,
    pub(crate) on_premises_instance_tag_filters: ::std::option::Option<::std::vec::Vec<crate::types::TagFilter>>,
    pub(crate) auto_scaling_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) service_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) trigger_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TriggerConfig>>,
    pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
    pub(crate) auto_rollback_configuration: ::std::option::Option<crate::types::AutoRollbackConfiguration>,
    pub(crate) outdated_instances_strategy: ::std::option::Option<crate::types::OutdatedInstancesStrategy>,
    pub(crate) deployment_style: ::std::option::Option<crate::types::DeploymentStyle>,
    pub(crate) blue_green_deployment_configuration: ::std::option::Option<crate::types::BlueGreenDeploymentConfiguration>,
    pub(crate) load_balancer_info: ::std::option::Option<crate::types::LoadBalancerInfo>,
    pub(crate) ec2_tag_set: ::std::option::Option<crate::types::Ec2TagSet>,
    pub(crate) ecs_services: ::std::option::Option<::std::vec::Vec<crate::types::EcsService>>,
    pub(crate) on_premises_tag_set: ::std::option::Option<crate::types::OnPremisesTagSet>,
    pub(crate) termination_hook_enabled: ::std::option::Option<bool>,
}
impl UpdateDeploymentGroupInputBuilder {
    /// <p>The application name that corresponds to the deployment group to update.</p>
    /// This field is required.
    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The application name that corresponds to the deployment group to update.</p>
    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_name = input;
        self
    }
    /// <p>The application name that corresponds to the deployment group to update.</p>
    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_name
    }
    /// <p>The current name of the deployment group.</p>
    /// This field is required.
    pub fn current_deployment_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.current_deployment_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The current name of the deployment group.</p>
    pub fn set_current_deployment_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.current_deployment_group_name = input;
        self
    }
    /// <p>The current name of the deployment group.</p>
    pub fn get_current_deployment_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.current_deployment_group_name
    }
    /// <p>The new name of the deployment group, if you want to change it.</p>
    pub fn new_deployment_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.new_deployment_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new name of the deployment group, if you want to change it.</p>
    pub fn set_new_deployment_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.new_deployment_group_name = input;
        self
    }
    /// <p>The new name of the deployment group, if you want to change it.</p>
    pub fn get_new_deployment_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.new_deployment_group_name
    }
    /// <p>The replacement deployment configuration name to use, if you want to change it.</p>
    pub fn deployment_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_config_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The replacement deployment configuration name to use, if you want to change it.</p>
    pub fn set_deployment_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_config_name = input;
        self
    }
    /// <p>The replacement deployment configuration name to use, if you want to change it.</p>
    pub fn get_deployment_config_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_config_name
    }
    /// Appends an item to `ec2_tag_filters`.
    ///
    /// To override the contents of this collection use [`set_ec2_tag_filters`](Self::set_ec2_tag_filters).
    ///
    /// <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn ec2_tag_filters(mut self, input: crate::types::Ec2TagFilter) -> Self {
        let mut v = self.ec2_tag_filters.unwrap_or_default();
        v.push(input);
        self.ec2_tag_filters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn set_ec2_tag_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Ec2TagFilter>>) -> Self {
        self.ec2_tag_filters = input;
        self
    }
    /// <p>The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn get_ec2_tag_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Ec2TagFilter>> {
        &self.ec2_tag_filters
    }
    /// Appends an item to `on_premises_instance_tag_filters`.
    ///
    /// To override the contents of this collection use [`set_on_premises_instance_tag_filters`](Self::set_on_premises_instance_tag_filters).
    ///
    /// <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn on_premises_instance_tag_filters(mut self, input: crate::types::TagFilter) -> Self {
        let mut v = self.on_premises_instance_tag_filters.unwrap_or_default();
        v.push(input);
        self.on_premises_instance_tag_filters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn set_on_premises_instance_tag_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagFilter>>) -> Self {
        self.on_premises_instance_tag_filters = input;
        self
    }
    /// <p>The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.</p>
    pub fn get_on_premises_instance_tag_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagFilter>> {
        &self.on_premises_instance_tag_filters
    }
    /// Appends an item to `auto_scaling_groups`.
    ///
    /// To override the contents of this collection use [`set_auto_scaling_groups`](Self::set_auto_scaling_groups).
    ///
    /// <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p>
    /// <ul>
    /// <li>
    /// <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter.</p></li>
    /// <li>
    /// <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout"</a> in the <i>CodeDeploy User Guide</i>.</p></li>
    /// </ul>
    pub fn auto_scaling_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.auto_scaling_groups.unwrap_or_default();
        v.push(input.into());
        self.auto_scaling_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p>
    /// <ul>
    /// <li>
    /// <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter.</p></li>
    /// <li>
    /// <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout"</a> in the <i>CodeDeploy User Guide</i>.</p></li>
    /// </ul>
    pub fn set_auto_scaling_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.auto_scaling_groups = input;
        self
    }
    /// <p>The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.</p>
    /// <ul>
    /// <li>
    /// <p>To keep the Auto Scaling groups, enter their names or do not specify this parameter.</p></li>
    /// <li>
    /// <p>To remove Auto Scaling groups, specify a non-null empty list of Auto Scaling group names to detach all CodeDeploy-managed Auto Scaling lifecycle hooks. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-heartbeat">Amazon EC2 instances in an Amazon EC2 Auto Scaling group fail to launch and receive the error "Heartbeat Timeout"</a> in the <i>CodeDeploy User Guide</i>.</p></li>
    /// </ul>
    pub fn get_auto_scaling_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.auto_scaling_groups
    }
    /// <p>A replacement ARN for the service role, if you want to change it.</p>
    pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A replacement ARN for the service role, if you want to change it.</p>
    pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_role_arn = input;
        self
    }
    /// <p>A replacement ARN for the service role, if you want to change it.</p>
    pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_role_arn
    }
    /// Appends an item to `trigger_configurations`.
    ///
    /// To override the contents of this collection use [`set_trigger_configurations`](Self::set_trigger_configurations).
    ///
    /// <p>Information about triggers to change when the deployment group is updated. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
    pub fn trigger_configurations(mut self, input: crate::types::TriggerConfig) -> Self {
        let mut v = self.trigger_configurations.unwrap_or_default();
        v.push(input);
        self.trigger_configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about triggers to change when the deployment group is updated. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
    pub fn set_trigger_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TriggerConfig>>) -> Self {
        self.trigger_configurations = input;
        self
    }
    /// <p>Information about triggers to change when the deployment group is updated. For examples, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html">Edit a Trigger in a CodeDeploy Deployment Group</a> in the <i>CodeDeploy User Guide</i>.</p>
    pub fn get_trigger_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TriggerConfig>> {
        &self.trigger_configurations
    }
    /// <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
        self.alarm_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
        self.alarm_configuration = input;
        self
    }
    /// <p>Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.</p>
    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
        &self.alarm_configuration
    }
    /// <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
    pub fn auto_rollback_configuration(mut self, input: crate::types::AutoRollbackConfiguration) -> Self {
        self.auto_rollback_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
    pub fn set_auto_rollback_configuration(mut self, input: ::std::option::Option<crate::types::AutoRollbackConfiguration>) -> Self {
        self.auto_rollback_configuration = input;
        self
    }
    /// <p>Information for an automatic rollback configuration that is added or changed when a deployment group is updated.</p>
    pub fn get_auto_rollback_configuration(&self) -> &::std::option::Option<crate::types::AutoRollbackConfiguration> {
        &self.auto_rollback_configuration
    }
    /// <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p>
    /// <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p>
    /// <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
    pub fn outdated_instances_strategy(mut self, input: crate::types::OutdatedInstancesStrategy) -> Self {
        self.outdated_instances_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p>
    /// <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p>
    /// <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
    pub fn set_outdated_instances_strategy(mut self, input: ::std::option::Option<crate::types::OutdatedInstancesStrategy>) -> Self {
        self.outdated_instances_strategy = input;
        self
    }
    /// <p>Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.</p>
    /// <p>If this option is set to <code>UPDATE</code> or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.</p>
    /// <p>If this option is set to <code>IGNORE</code>, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.</p>
    pub fn get_outdated_instances_strategy(&self) -> &::std::option::Option<crate::types::OutdatedInstancesStrategy> {
        &self.outdated_instances_strategy
    }
    /// <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
    pub fn deployment_style(mut self, input: crate::types::DeploymentStyle) -> Self {
        self.deployment_style = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
    pub fn set_deployment_style(mut self, input: ::std::option::Option<crate::types::DeploymentStyle>) -> Self {
        self.deployment_style = input;
        self
    }
    /// <p>Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.</p>
    pub fn get_deployment_style(&self) -> &::std::option::Option<crate::types::DeploymentStyle> {
        &self.deployment_style
    }
    /// <p>Information about blue/green deployment options for a deployment group.</p>
    pub fn blue_green_deployment_configuration(mut self, input: crate::types::BlueGreenDeploymentConfiguration) -> Self {
        self.blue_green_deployment_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about blue/green deployment options for a deployment group.</p>
    pub fn set_blue_green_deployment_configuration(mut self, input: ::std::option::Option<crate::types::BlueGreenDeploymentConfiguration>) -> Self {
        self.blue_green_deployment_configuration = input;
        self
    }
    /// <p>Information about blue/green deployment options for a deployment group.</p>
    pub fn get_blue_green_deployment_configuration(&self) -> &::std::option::Option<crate::types::BlueGreenDeploymentConfiguration> {
        &self.blue_green_deployment_configuration
    }
    /// <p>Information about the load balancer used in a deployment.</p>
    pub fn load_balancer_info(mut self, input: crate::types::LoadBalancerInfo) -> Self {
        self.load_balancer_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the load balancer used in a deployment.</p>
    pub fn set_load_balancer_info(mut self, input: ::std::option::Option<crate::types::LoadBalancerInfo>) -> Self {
        self.load_balancer_info = input;
        self
    }
    /// <p>Information about the load balancer used in a deployment.</p>
    pub fn get_load_balancer_info(&self) -> &::std::option::Option<crate::types::LoadBalancerInfo> {
        &self.load_balancer_info
    }
    /// <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
    pub fn ec2_tag_set(mut self, input: crate::types::Ec2TagSet) -> Self {
        self.ec2_tag_set = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
    pub fn set_ec2_tag_set(mut self, input: ::std::option::Option<crate::types::Ec2TagSet>) -> Self {
        self.ec2_tag_set = input;
        self
    }
    /// <p>Information about groups of tags applied to on-premises instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups.</p>
    pub fn get_ec2_tag_set(&self) -> &::std::option::Option<crate::types::Ec2TagSet> {
        &self.ec2_tag_set
    }
    /// Appends an item to `ecs_services`.
    ///
    /// To override the contents of this collection use [`set_ecs_services`](Self::set_ecs_services).
    ///
    /// <p>The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>
    /// :
    /// <servicename></servicename>
    /// </clustername></code>.</p>
    pub fn ecs_services(mut self, input: crate::types::EcsService) -> Self {
        let mut v = self.ecs_services.unwrap_or_default();
        v.push(input);
        self.ecs_services = ::std::option::Option::Some(v);
        self
    }
    /// <p>The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>
    /// :
    /// <servicename></servicename>
    /// </clustername></code>.</p>
    pub fn set_ecs_services(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EcsService>>) -> Self {
        self.ecs_services = input;
        self
    }
    /// <p>The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format <code><clustername>
    /// :
    /// <servicename></servicename>
    /// </clustername></code>.</p>
    pub fn get_ecs_services(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EcsService>> {
        &self.ecs_services
    }
    /// <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
    pub fn on_premises_tag_set(mut self, input: crate::types::OnPremisesTagSet) -> Self {
        self.on_premises_tag_set = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
    pub fn set_on_premises_tag_set(mut self, input: ::std::option::Option<crate::types::OnPremisesTagSet>) -> Self {
        self.on_premises_tag_set = input;
        self
    }
    /// <p>Information about an on-premises instance tag set. The deployment group includes only on-premises instances identified by all the tag groups.</p>
    pub fn get_on_premises_tag_set(&self) -> &::std::option::Option<crate::types::OnPremisesTagSet> {
        &self.on_premises_tag_set
    }
    /// <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p>
    /// <p>For information about termination deployments, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>For more information about Auto Scaling scale-in events, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
    pub fn termination_hook_enabled(mut self, input: bool) -> Self {
        self.termination_hook_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p>
    /// <p>For information about termination deployments, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>For more information about Auto Scaling scale-in events, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
    pub fn set_termination_hook_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.termination_hook_enabled = input;
        self
    }
    /// <p>This parameter only applies if you are using CodeDeploy with Amazon EC2 Auto Scaling. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html">Integrating CodeDeploy with Amazon EC2 Auto Scaling</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>Set <code>terminationHookEnabled</code> to <code>true</code> to have CodeDeploy install a termination hook into your Auto Scaling group when you update a deployment group. When this hook is installed, CodeDeploy will perform termination deployments.</p>
    /// <p>For information about termination deployments, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable">Enabling termination deployments during Auto Scaling scale-in events</a> in the <i>CodeDeploy User Guide</i>.</p>
    /// <p>For more information about Auto Scaling scale-in events, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html#as-lifecycle-scale-in">Scale in</a> topic in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
    pub fn get_termination_hook_enabled(&self) -> &::std::option::Option<bool> {
        &self.termination_hook_enabled
    }
    /// Consumes the builder and constructs a [`UpdateDeploymentGroupInput`](crate::operation::update_deployment_group::UpdateDeploymentGroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_deployment_group::UpdateDeploymentGroupInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_deployment_group::UpdateDeploymentGroupInput {
            application_name: self.application_name,
            current_deployment_group_name: self.current_deployment_group_name,
            new_deployment_group_name: self.new_deployment_group_name,
            deployment_config_name: self.deployment_config_name,
            ec2_tag_filters: self.ec2_tag_filters,
            on_premises_instance_tag_filters: self.on_premises_instance_tag_filters,
            auto_scaling_groups: self.auto_scaling_groups,
            service_role_arn: self.service_role_arn,
            trigger_configurations: self.trigger_configurations,
            alarm_configuration: self.alarm_configuration,
            auto_rollback_configuration: self.auto_rollback_configuration,
            outdated_instances_strategy: self.outdated_instances_strategy,
            deployment_style: self.deployment_style,
            blue_green_deployment_configuration: self.blue_green_deployment_configuration,
            load_balancer_info: self.load_balancer_info,
            ec2_tag_set: self.ec2_tag_set,
            ecs_services: self.ecs_services,
            on_premises_tag_set: self.on_premises_tag_set,
            termination_hook_enabled: self.termination_hook_enabled,
        })
    }
}