aws_sdk_rds/types/_pending_maintenance_action.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides information about a pending maintenance action for a resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PendingMaintenanceAction {
7 /// <p>The type of pending maintenance action that is available for the resource.</p>
8 /// <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
9 /// <p>Valid Values:</p>
10 /// <ul>
11 /// <li>
12 /// <p><code>ca-certificate-rotation</code></p></li>
13 /// <li>
14 /// <p><code>db-upgrade</code></p></li>
15 /// <li>
16 /// <p><code>hardware-maintenance</code></p></li>
17 /// <li>
18 /// <p><code>os-upgrade</code></p></li>
19 /// <li>
20 /// <p><code>system-update</code></p></li>
21 /// </ul>
22 /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
23 pub action: ::std::option::Option<::std::string::String>,
24 /// <p>The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date.</p>
25 pub auto_applied_after_date: ::std::option::Option<::aws_smithy_types::DateTime>,
26 /// <p>The date when the maintenance action is automatically applied.</p>
27 /// <p>On this date, the maintenance action is applied to the resource as soon as possible, regardless of the maintenance window for the resource. There might be a delay of one or more days from this date before the maintenance action is applied.</p>
28 pub forced_apply_date: ::std::option::Option<::aws_smithy_types::DateTime>,
29 /// <p>Indicates the type of opt-in request that has been received for the resource.</p>
30 pub opt_in_status: ::std::option::Option<::std::string::String>,
31 /// <p>The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the <code>ApplyPendingMaintenanceAction</code> API, the <code>AutoAppliedAfterDate</code>, and the <code>ForcedApplyDate</code>. This value is blank if an opt-in request has not been received and nothing has been specified as <code>AutoAppliedAfterDate</code> or <code>ForcedApplyDate</code>.</p>
32 pub current_apply_date: ::std::option::Option<::aws_smithy_types::DateTime>,
33 /// <p>A description providing more detail about the maintenance action.</p>
34 pub description: ::std::option::Option<::std::string::String>,
35}
36impl PendingMaintenanceAction {
37 /// <p>The type of pending maintenance action that is available for the resource.</p>
38 /// <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
39 /// <p>Valid Values:</p>
40 /// <ul>
41 /// <li>
42 /// <p><code>ca-certificate-rotation</code></p></li>
43 /// <li>
44 /// <p><code>db-upgrade</code></p></li>
45 /// <li>
46 /// <p><code>hardware-maintenance</code></p></li>
47 /// <li>
48 /// <p><code>os-upgrade</code></p></li>
49 /// <li>
50 /// <p><code>system-update</code></p></li>
51 /// </ul>
52 /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
53 pub fn action(&self) -> ::std::option::Option<&str> {
54 self.action.as_deref()
55 }
56 /// <p>The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date.</p>
57 pub fn auto_applied_after_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
58 self.auto_applied_after_date.as_ref()
59 }
60 /// <p>The date when the maintenance action is automatically applied.</p>
61 /// <p>On this date, the maintenance action is applied to the resource as soon as possible, regardless of the maintenance window for the resource. There might be a delay of one or more days from this date before the maintenance action is applied.</p>
62 pub fn forced_apply_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63 self.forced_apply_date.as_ref()
64 }
65 /// <p>Indicates the type of opt-in request that has been received for the resource.</p>
66 pub fn opt_in_status(&self) -> ::std::option::Option<&str> {
67 self.opt_in_status.as_deref()
68 }
69 /// <p>The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the <code>ApplyPendingMaintenanceAction</code> API, the <code>AutoAppliedAfterDate</code>, and the <code>ForcedApplyDate</code>. This value is blank if an opt-in request has not been received and nothing has been specified as <code>AutoAppliedAfterDate</code> or <code>ForcedApplyDate</code>.</p>
70 pub fn current_apply_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
71 self.current_apply_date.as_ref()
72 }
73 /// <p>A description providing more detail about the maintenance action.</p>
74 pub fn description(&self) -> ::std::option::Option<&str> {
75 self.description.as_deref()
76 }
77}
78impl PendingMaintenanceAction {
79 /// Creates a new builder-style object to manufacture [`PendingMaintenanceAction`](crate::types::PendingMaintenanceAction).
80 pub fn builder() -> crate::types::builders::PendingMaintenanceActionBuilder {
81 crate::types::builders::PendingMaintenanceActionBuilder::default()
82 }
83}
84
85/// A builder for [`PendingMaintenanceAction`](crate::types::PendingMaintenanceAction).
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
87#[non_exhaustive]
88pub struct PendingMaintenanceActionBuilder {
89 pub(crate) action: ::std::option::Option<::std::string::String>,
90 pub(crate) auto_applied_after_date: ::std::option::Option<::aws_smithy_types::DateTime>,
91 pub(crate) forced_apply_date: ::std::option::Option<::aws_smithy_types::DateTime>,
92 pub(crate) opt_in_status: ::std::option::Option<::std::string::String>,
93 pub(crate) current_apply_date: ::std::option::Option<::aws_smithy_types::DateTime>,
94 pub(crate) description: ::std::option::Option<::std::string::String>,
95}
96impl PendingMaintenanceActionBuilder {
97 /// <p>The type of pending maintenance action that is available for the resource.</p>
98 /// <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
99 /// <p>Valid Values:</p>
100 /// <ul>
101 /// <li>
102 /// <p><code>ca-certificate-rotation</code></p></li>
103 /// <li>
104 /// <p><code>db-upgrade</code></p></li>
105 /// <li>
106 /// <p><code>hardware-maintenance</code></p></li>
107 /// <li>
108 /// <p><code>os-upgrade</code></p></li>
109 /// <li>
110 /// <p><code>system-update</code></p></li>
111 /// </ul>
112 /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
113 pub fn action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.action = ::std::option::Option::Some(input.into());
115 self
116 }
117 /// <p>The type of pending maintenance action that is available for the resource.</p>
118 /// <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
119 /// <p>Valid Values:</p>
120 /// <ul>
121 /// <li>
122 /// <p><code>ca-certificate-rotation</code></p></li>
123 /// <li>
124 /// <p><code>db-upgrade</code></p></li>
125 /// <li>
126 /// <p><code>hardware-maintenance</code></p></li>
127 /// <li>
128 /// <p><code>os-upgrade</code></p></li>
129 /// <li>
130 /// <p><code>system-update</code></p></li>
131 /// </ul>
132 /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
133 pub fn set_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.action = input;
135 self
136 }
137 /// <p>The type of pending maintenance action that is available for the resource.</p>
138 /// <p>For more information about maintenance actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html">Maintaining a DB instance</a>.</p>
139 /// <p>Valid Values:</p>
140 /// <ul>
141 /// <li>
142 /// <p><code>ca-certificate-rotation</code></p></li>
143 /// <li>
144 /// <p><code>db-upgrade</code></p></li>
145 /// <li>
146 /// <p><code>hardware-maintenance</code></p></li>
147 /// <li>
148 /// <p><code>os-upgrade</code></p></li>
149 /// <li>
150 /// <p><code>system-update</code></p></li>
151 /// </ul>
152 /// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-aurora">Maintenance actions for Amazon Aurora</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#maintenance-actions-rds">Maintenance actions for Amazon RDS</a>.</p>
153 pub fn get_action(&self) -> &::std::option::Option<::std::string::String> {
154 &self.action
155 }
156 /// <p>The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date.</p>
157 pub fn auto_applied_after_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
158 self.auto_applied_after_date = ::std::option::Option::Some(input);
159 self
160 }
161 /// <p>The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date.</p>
162 pub fn set_auto_applied_after_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
163 self.auto_applied_after_date = input;
164 self
165 }
166 /// <p>The date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date.</p>
167 pub fn get_auto_applied_after_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
168 &self.auto_applied_after_date
169 }
170 /// <p>The date when the maintenance action is automatically applied.</p>
171 /// <p>On this date, the maintenance action is applied to the resource as soon as possible, regardless of the maintenance window for the resource. There might be a delay of one or more days from this date before the maintenance action is applied.</p>
172 pub fn forced_apply_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
173 self.forced_apply_date = ::std::option::Option::Some(input);
174 self
175 }
176 /// <p>The date when the maintenance action is automatically applied.</p>
177 /// <p>On this date, the maintenance action is applied to the resource as soon as possible, regardless of the maintenance window for the resource. There might be a delay of one or more days from this date before the maintenance action is applied.</p>
178 pub fn set_forced_apply_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
179 self.forced_apply_date = input;
180 self
181 }
182 /// <p>The date when the maintenance action is automatically applied.</p>
183 /// <p>On this date, the maintenance action is applied to the resource as soon as possible, regardless of the maintenance window for the resource. There might be a delay of one or more days from this date before the maintenance action is applied.</p>
184 pub fn get_forced_apply_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
185 &self.forced_apply_date
186 }
187 /// <p>Indicates the type of opt-in request that has been received for the resource.</p>
188 pub fn opt_in_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.opt_in_status = ::std::option::Option::Some(input.into());
190 self
191 }
192 /// <p>Indicates the type of opt-in request that has been received for the resource.</p>
193 pub fn set_opt_in_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.opt_in_status = input;
195 self
196 }
197 /// <p>Indicates the type of opt-in request that has been received for the resource.</p>
198 pub fn get_opt_in_status(&self) -> &::std::option::Option<::std::string::String> {
199 &self.opt_in_status
200 }
201 /// <p>The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the <code>ApplyPendingMaintenanceAction</code> API, the <code>AutoAppliedAfterDate</code>, and the <code>ForcedApplyDate</code>. This value is blank if an opt-in request has not been received and nothing has been specified as <code>AutoAppliedAfterDate</code> or <code>ForcedApplyDate</code>.</p>
202 pub fn current_apply_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
203 self.current_apply_date = ::std::option::Option::Some(input);
204 self
205 }
206 /// <p>The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the <code>ApplyPendingMaintenanceAction</code> API, the <code>AutoAppliedAfterDate</code>, and the <code>ForcedApplyDate</code>. This value is blank if an opt-in request has not been received and nothing has been specified as <code>AutoAppliedAfterDate</code> or <code>ForcedApplyDate</code>.</p>
207 pub fn set_current_apply_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
208 self.current_apply_date = input;
209 self
210 }
211 /// <p>The effective date when the pending maintenance action is applied to the resource. This date takes into account opt-in requests received from the <code>ApplyPendingMaintenanceAction</code> API, the <code>AutoAppliedAfterDate</code>, and the <code>ForcedApplyDate</code>. This value is blank if an opt-in request has not been received and nothing has been specified as <code>AutoAppliedAfterDate</code> or <code>ForcedApplyDate</code>.</p>
212 pub fn get_current_apply_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
213 &self.current_apply_date
214 }
215 /// <p>A description providing more detail about the maintenance action.</p>
216 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217 self.description = ::std::option::Option::Some(input.into());
218 self
219 }
220 /// <p>A description providing more detail about the maintenance action.</p>
221 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222 self.description = input;
223 self
224 }
225 /// <p>A description providing more detail about the maintenance action.</p>
226 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
227 &self.description
228 }
229 /// Consumes the builder and constructs a [`PendingMaintenanceAction`](crate::types::PendingMaintenanceAction).
230 pub fn build(self) -> crate::types::PendingMaintenanceAction {
231 crate::types::PendingMaintenanceAction {
232 action: self.action,
233 auto_applied_after_date: self.auto_applied_after_date,
234 forced_apply_date: self.forced_apply_date,
235 opt_in_status: self.opt_in_status,
236 current_apply_date: self.current_apply_date,
237 description: self.description,
238 }
239 }
240}