aws_sdk_codedeploy/operation/create_deployment/_create_deployment_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>CreateDeployment</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateDeploymentInput {
7 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
8 pub application_name: ::std::option::Option<::std::string::String>,
9 /// <p>The name of the deployment group.</p>
10 pub deployment_group_name: ::std::option::Option<::std::string::String>,
11 /// <p>The type and location of the revision to deploy.</p>
12 pub revision: ::std::option::Option<crate::types::RevisionLocation>,
13 /// <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
14 /// <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
15 pub deployment_config_name: ::std::option::Option<::std::string::String>,
16 /// <p>A comment about the deployment.</p>
17 pub description: ::std::option::Option<::std::string::String>,
18 /// <p>If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>.</p>
19 /// <p>If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.</p>
20 /// <p>During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.</p>
21 /// <p>If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored.</p>
22 pub ignore_application_stop_failures: ::std::option::Option<bool>,
23 /// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
24 pub target_instances: ::std::option::Option<crate::types::TargetInstances>,
25 /// <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
26 pub auto_rollback_configuration: ::std::option::Option<crate::types::AutoRollbackConfiguration>,
27 /// <p>Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.</p>
28 pub update_outdated_instances_only: ::std::option::Option<bool>,
29 /// <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p>
30 /// <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p>
31 /// <ul>
32 /// <li>
33 /// <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p></li>
34 /// <li>
35 /// <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p></li>
36 /// <li>
37 /// <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p></li>
38 /// </ul>
39 pub file_exists_behavior: ::std::option::Option<crate::types::FileExistsBehavior>,
40 /// <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p><note>
41 /// <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p>
42 /// </note>
43 pub override_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
44}
45impl CreateDeploymentInput {
46 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
47 pub fn application_name(&self) -> ::std::option::Option<&str> {
48 self.application_name.as_deref()
49 }
50 /// <p>The name of the deployment group.</p>
51 pub fn deployment_group_name(&self) -> ::std::option::Option<&str> {
52 self.deployment_group_name.as_deref()
53 }
54 /// <p>The type and location of the revision to deploy.</p>
55 pub fn revision(&self) -> ::std::option::Option<&crate::types::RevisionLocation> {
56 self.revision.as_ref()
57 }
58 /// <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
59 /// <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
60 pub fn deployment_config_name(&self) -> ::std::option::Option<&str> {
61 self.deployment_config_name.as_deref()
62 }
63 /// <p>A comment about the deployment.</p>
64 pub fn description(&self) -> ::std::option::Option<&str> {
65 self.description.as_deref()
66 }
67 /// <p>If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>.</p>
68 /// <p>If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.</p>
69 /// <p>During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.</p>
70 /// <p>If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored.</p>
71 pub fn ignore_application_stop_failures(&self) -> ::std::option::Option<bool> {
72 self.ignore_application_stop_failures
73 }
74 /// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
75 pub fn target_instances(&self) -> ::std::option::Option<&crate::types::TargetInstances> {
76 self.target_instances.as_ref()
77 }
78 /// <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
79 pub fn auto_rollback_configuration(&self) -> ::std::option::Option<&crate::types::AutoRollbackConfiguration> {
80 self.auto_rollback_configuration.as_ref()
81 }
82 /// <p>Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.</p>
83 pub fn update_outdated_instances_only(&self) -> ::std::option::Option<bool> {
84 self.update_outdated_instances_only
85 }
86 /// <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p>
87 /// <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p>
88 /// <ul>
89 /// <li>
90 /// <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p></li>
91 /// <li>
92 /// <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p></li>
93 /// <li>
94 /// <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p></li>
95 /// </ul>
96 pub fn file_exists_behavior(&self) -> ::std::option::Option<&crate::types::FileExistsBehavior> {
97 self.file_exists_behavior.as_ref()
98 }
99 /// <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p><note>
100 /// <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p>
101 /// </note>
102 pub fn override_alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
103 self.override_alarm_configuration.as_ref()
104 }
105}
106impl CreateDeploymentInput {
107 /// Creates a new builder-style object to manufacture [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
108 pub fn builder() -> crate::operation::create_deployment::builders::CreateDeploymentInputBuilder {
109 crate::operation::create_deployment::builders::CreateDeploymentInputBuilder::default()
110 }
111}
112
113/// A builder for [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
114#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
115#[non_exhaustive]
116pub struct CreateDeploymentInputBuilder {
117 pub(crate) application_name: ::std::option::Option<::std::string::String>,
118 pub(crate) deployment_group_name: ::std::option::Option<::std::string::String>,
119 pub(crate) revision: ::std::option::Option<crate::types::RevisionLocation>,
120 pub(crate) deployment_config_name: ::std::option::Option<::std::string::String>,
121 pub(crate) description: ::std::option::Option<::std::string::String>,
122 pub(crate) ignore_application_stop_failures: ::std::option::Option<bool>,
123 pub(crate) target_instances: ::std::option::Option<crate::types::TargetInstances>,
124 pub(crate) auto_rollback_configuration: ::std::option::Option<crate::types::AutoRollbackConfiguration>,
125 pub(crate) update_outdated_instances_only: ::std::option::Option<bool>,
126 pub(crate) file_exists_behavior: ::std::option::Option<crate::types::FileExistsBehavior>,
127 pub(crate) override_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
128}
129impl CreateDeploymentInputBuilder {
130 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
131 /// This field is required.
132 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.application_name = ::std::option::Option::Some(input.into());
134 self
135 }
136 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
137 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.application_name = input;
139 self
140 }
141 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
142 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
143 &self.application_name
144 }
145 /// <p>The name of the deployment group.</p>
146 pub fn deployment_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.deployment_group_name = ::std::option::Option::Some(input.into());
148 self
149 }
150 /// <p>The name of the deployment group.</p>
151 pub fn set_deployment_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.deployment_group_name = input;
153 self
154 }
155 /// <p>The name of the deployment group.</p>
156 pub fn get_deployment_group_name(&self) -> &::std::option::Option<::std::string::String> {
157 &self.deployment_group_name
158 }
159 /// <p>The type and location of the revision to deploy.</p>
160 pub fn revision(mut self, input: crate::types::RevisionLocation) -> Self {
161 self.revision = ::std::option::Option::Some(input);
162 self
163 }
164 /// <p>The type and location of the revision to deploy.</p>
165 pub fn set_revision(mut self, input: ::std::option::Option<crate::types::RevisionLocation>) -> Self {
166 self.revision = input;
167 self
168 }
169 /// <p>The type and location of the revision to deploy.</p>
170 pub fn get_revision(&self) -> &::std::option::Option<crate::types::RevisionLocation> {
171 &self.revision
172 }
173 /// <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
174 /// <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
175 pub fn deployment_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.deployment_config_name = ::std::option::Option::Some(input.into());
177 self
178 }
179 /// <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
180 /// <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
181 pub fn set_deployment_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182 self.deployment_config_name = input;
183 self
184 }
185 /// <p>The name of a deployment configuration associated with the user or Amazon Web Services account.</p>
186 /// <p>If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, <code>CodeDeployDefault</code>.<code>OneAtATime</code> is used by default.</p>
187 pub fn get_deployment_config_name(&self) -> &::std::option::Option<::std::string::String> {
188 &self.deployment_config_name
189 }
190 /// <p>A comment about the deployment.</p>
191 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192 self.description = ::std::option::Option::Some(input.into());
193 self
194 }
195 /// <p>A comment about the deployment.</p>
196 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197 self.description = input;
198 self
199 }
200 /// <p>A comment about the deployment.</p>
201 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
202 &self.description
203 }
204 /// <p>If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>.</p>
205 /// <p>If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.</p>
206 /// <p>During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.</p>
207 /// <p>If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored.</p>
208 pub fn ignore_application_stop_failures(mut self, input: bool) -> Self {
209 self.ignore_application_stop_failures = ::std::option::Option::Some(input);
210 self
211 }
212 /// <p>If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>.</p>
213 /// <p>If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.</p>
214 /// <p>During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.</p>
215 /// <p>If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored.</p>
216 pub fn set_ignore_application_stop_failures(mut self, input: ::std::option::Option<bool>) -> Self {
217 self.ignore_application_stop_failures = input;
218 self
219 }
220 /// <p>If true, then if an <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, or <code>AfterBlockTraffic</code> deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if <code>ApplicationStop</code> fails, the deployment continues with <code>DownloadBundle</code>. If <code>BeforeBlockTraffic</code> fails, the deployment continues with <code>BlockTraffic</code>. If <code>AfterBlockTraffic</code> fails, the deployment continues with <code>ApplicationStop</code>.</p>
221 /// <p>If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.</p>
222 /// <p>During a deployment, the CodeDeploy agent runs the scripts specified for <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.</p>
223 /// <p>If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use <code>ignoreApplicationStopFailures</code> to specify that the <code>ApplicationStop</code>, <code>BeforeBlockTraffic</code>, and <code>AfterBlockTraffic</code> failures should be ignored.</p>
224 pub fn get_ignore_application_stop_failures(&self) -> &::std::option::Option<bool> {
225 &self.ignore_application_stop_failures
226 }
227 /// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
228 pub fn target_instances(mut self, input: crate::types::TargetInstances) -> Self {
229 self.target_instances = ::std::option::Option::Some(input);
230 self
231 }
232 /// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
233 pub fn set_target_instances(mut self, input: ::std::option::Option<crate::types::TargetInstances>) -> Self {
234 self.target_instances = input;
235 self
236 }
237 /// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
238 pub fn get_target_instances(&self) -> &::std::option::Option<crate::types::TargetInstances> {
239 &self.target_instances
240 }
241 /// <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
242 pub fn auto_rollback_configuration(mut self, input: crate::types::AutoRollbackConfiguration) -> Self {
243 self.auto_rollback_configuration = ::std::option::Option::Some(input);
244 self
245 }
246 /// <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
247 pub fn set_auto_rollback_configuration(mut self, input: ::std::option::Option<crate::types::AutoRollbackConfiguration>) -> Self {
248 self.auto_rollback_configuration = input;
249 self
250 }
251 /// <p>Configuration information for an automatic rollback that is added when a deployment is created.</p>
252 pub fn get_auto_rollback_configuration(&self) -> &::std::option::Option<crate::types::AutoRollbackConfiguration> {
253 &self.auto_rollback_configuration
254 }
255 /// <p>Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.</p>
256 pub fn update_outdated_instances_only(mut self, input: bool) -> Self {
257 self.update_outdated_instances_only = ::std::option::Option::Some(input);
258 self
259 }
260 /// <p>Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.</p>
261 pub fn set_update_outdated_instances_only(mut self, input: ::std::option::Option<bool>) -> Self {
262 self.update_outdated_instances_only = input;
263 self
264 }
265 /// <p>Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.</p>
266 pub fn get_update_outdated_instances_only(&self) -> &::std::option::Option<bool> {
267 &self.update_outdated_instances_only
268 }
269 /// <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p>
270 /// <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p>
271 /// <ul>
272 /// <li>
273 /// <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p></li>
274 /// <li>
275 /// <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p></li>
276 /// <li>
277 /// <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p></li>
278 /// </ul>
279 pub fn file_exists_behavior(mut self, input: crate::types::FileExistsBehavior) -> Self {
280 self.file_exists_behavior = ::std::option::Option::Some(input);
281 self
282 }
283 /// <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p>
284 /// <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p>
285 /// <ul>
286 /// <li>
287 /// <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p></li>
288 /// <li>
289 /// <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p></li>
290 /// <li>
291 /// <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p></li>
292 /// </ul>
293 pub fn set_file_exists_behavior(mut self, input: ::std::option::Option<crate::types::FileExistsBehavior>) -> Self {
294 self.file_exists_behavior = input;
295 self
296 }
297 /// <p>Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.</p>
298 /// <p>The <code>fileExistsBehavior</code> parameter takes any of the following values:</p>
299 /// <ul>
300 /// <li>
301 /// <p>DISALLOW: The deployment fails. This is also the default behavior if no option is specified.</p></li>
302 /// <li>
303 /// <p>OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.</p></li>
304 /// <li>
305 /// <p>RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.</p></li>
306 /// </ul>
307 pub fn get_file_exists_behavior(&self) -> &::std::option::Option<crate::types::FileExistsBehavior> {
308 &self.file_exists_behavior
309 }
310 /// <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p><note>
311 /// <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p>
312 /// </note>
313 pub fn override_alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
314 self.override_alarm_configuration = ::std::option::Option::Some(input);
315 self
316 }
317 /// <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p><note>
318 /// <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p>
319 /// </note>
320 pub fn set_override_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
321 self.override_alarm_configuration = input;
322 self
323 }
324 /// <p>Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call <code>CreateDeployment</code> to create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.</p><note>
325 /// <p>If you specify an <code>overrideAlarmConfiguration</code>, you need the <code>UpdateDeploymentGroup</code> IAM permission when calling <code>CreateDeployment</code>.</p>
326 /// </note>
327 pub fn get_override_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
328 &self.override_alarm_configuration
329 }
330 /// Consumes the builder and constructs a [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
331 pub fn build(
332 self,
333 ) -> ::std::result::Result<crate::operation::create_deployment::CreateDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
334 ::std::result::Result::Ok(crate::operation::create_deployment::CreateDeploymentInput {
335 application_name: self.application_name,
336 deployment_group_name: self.deployment_group_name,
337 revision: self.revision,
338 deployment_config_name: self.deployment_config_name,
339 description: self.description,
340 ignore_application_stop_failures: self.ignore_application_stop_failures,
341 target_instances: self.target_instances,
342 auto_rollback_configuration: self.auto_rollback_configuration,
343 update_outdated_instances_only: self.update_outdated_instances_only,
344 file_exists_behavior: self.file_exists_behavior,
345 override_alarm_configuration: self.override_alarm_configuration,
346 })
347 }
348}