aws_sdk_lambda/operation/put_runtime_management_config/_put_runtime_management_config_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutRuntimeManagementConfigInput {
6 /// <p>The name or ARN of the Lambda function.</p>
7 /// <p class="title"><b>Name formats</b></p>
8 /// <ul>
9 /// <li>
10 /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
11 /// <li>
12 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
13 /// <li>
14 /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
15 /// </ul>
16 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
17 pub function_name: ::std::option::Option<::std::string::String>,
18 /// <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
19 pub qualifier: ::std::option::Option<::std::string::String>,
20 /// <p>Specify the runtime update mode.</p>
21 /// <ul>
22 /// <li>
23 /// <p><b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p></li>
24 /// <li>
25 /// <p><b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p></li>
26 /// <li>
27 /// <p><b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback">Roll back a runtime version</a>.</p></li>
28 /// </ul>
29 pub update_runtime_on: ::std::option::Option<crate::types::UpdateRuntimeOn>,
30 /// <p>The ARN of the runtime version you want the function to use.</p><note>
31 /// <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p>
32 /// </note>
33 pub runtime_version_arn: ::std::option::Option<::std::string::String>,
34}
35impl PutRuntimeManagementConfigInput {
36 /// <p>The name or ARN of the Lambda function.</p>
37 /// <p class="title"><b>Name formats</b></p>
38 /// <ul>
39 /// <li>
40 /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
41 /// <li>
42 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
43 /// <li>
44 /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
45 /// </ul>
46 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
47 pub fn function_name(&self) -> ::std::option::Option<&str> {
48 self.function_name.as_deref()
49 }
50 /// <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
51 pub fn qualifier(&self) -> ::std::option::Option<&str> {
52 self.qualifier.as_deref()
53 }
54 /// <p>Specify the runtime update mode.</p>
55 /// <ul>
56 /// <li>
57 /// <p><b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p></li>
58 /// <li>
59 /// <p><b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p></li>
60 /// <li>
61 /// <p><b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback">Roll back a runtime version</a>.</p></li>
62 /// </ul>
63 pub fn update_runtime_on(&self) -> ::std::option::Option<&crate::types::UpdateRuntimeOn> {
64 self.update_runtime_on.as_ref()
65 }
66 /// <p>The ARN of the runtime version you want the function to use.</p><note>
67 /// <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p>
68 /// </note>
69 pub fn runtime_version_arn(&self) -> ::std::option::Option<&str> {
70 self.runtime_version_arn.as_deref()
71 }
72}
73impl PutRuntimeManagementConfigInput {
74 /// Creates a new builder-style object to manufacture [`PutRuntimeManagementConfigInput`](crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput).
75 pub fn builder() -> crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigInputBuilder {
76 crate::operation::put_runtime_management_config::builders::PutRuntimeManagementConfigInputBuilder::default()
77 }
78}
79
80/// A builder for [`PutRuntimeManagementConfigInput`](crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct PutRuntimeManagementConfigInputBuilder {
84 pub(crate) function_name: ::std::option::Option<::std::string::String>,
85 pub(crate) qualifier: ::std::option::Option<::std::string::String>,
86 pub(crate) update_runtime_on: ::std::option::Option<crate::types::UpdateRuntimeOn>,
87 pub(crate) runtime_version_arn: ::std::option::Option<::std::string::String>,
88}
89impl PutRuntimeManagementConfigInputBuilder {
90 /// <p>The name or ARN of the Lambda function.</p>
91 /// <p class="title"><b>Name formats</b></p>
92 /// <ul>
93 /// <li>
94 /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
95 /// <li>
96 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
97 /// <li>
98 /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
99 /// </ul>
100 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
101 /// This field is required.
102 pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.function_name = ::std::option::Option::Some(input.into());
104 self
105 }
106 /// <p>The name or ARN of the Lambda function.</p>
107 /// <p class="title"><b>Name formats</b></p>
108 /// <ul>
109 /// <li>
110 /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
111 /// <li>
112 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
113 /// <li>
114 /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
115 /// </ul>
116 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
117 pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.function_name = input;
119 self
120 }
121 /// <p>The name or ARN of the Lambda function.</p>
122 /// <p class="title"><b>Name formats</b></p>
123 /// <ul>
124 /// <li>
125 /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
126 /// <li>
127 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
128 /// <li>
129 /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
130 /// </ul>
131 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
132 pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
133 &self.function_name
134 }
135 /// <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
136 pub fn qualifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.qualifier = ::std::option::Option::Some(input.into());
138 self
139 }
140 /// <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
141 pub fn set_qualifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.qualifier = input;
143 self
144 }
145 /// <p>Specify a version of the function. This can be <code>$LATEST</code> or a published version number. If no value is specified, the configuration for the <code>$LATEST</code> version is returned.</p>
146 pub fn get_qualifier(&self) -> &::std::option::Option<::std::string::String> {
147 &self.qualifier
148 }
149 /// <p>Specify the runtime update mode.</p>
150 /// <ul>
151 /// <li>
152 /// <p><b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p></li>
153 /// <li>
154 /// <p><b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p></li>
155 /// <li>
156 /// <p><b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback">Roll back a runtime version</a>.</p></li>
157 /// </ul>
158 /// This field is required.
159 pub fn update_runtime_on(mut self, input: crate::types::UpdateRuntimeOn) -> Self {
160 self.update_runtime_on = ::std::option::Option::Some(input);
161 self
162 }
163 /// <p>Specify the runtime update mode.</p>
164 /// <ul>
165 /// <li>
166 /// <p><b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p></li>
167 /// <li>
168 /// <p><b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p></li>
169 /// <li>
170 /// <p><b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback">Roll back a runtime version</a>.</p></li>
171 /// </ul>
172 pub fn set_update_runtime_on(mut self, input: ::std::option::Option<crate::types::UpdateRuntimeOn>) -> Self {
173 self.update_runtime_on = input;
174 self
175 }
176 /// <p>Specify the runtime update mode.</p>
177 /// <ul>
178 /// <li>
179 /// <p><b>Auto (default)</b> - Automatically update to the most recent and secure runtime version using a <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase">Two-phase runtime version rollout</a>. This is the best choice for most customers to ensure they always benefit from runtime updates.</p></li>
180 /// <li>
181 /// <p><b>Function update</b> - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.</p></li>
182 /// <li>
183 /// <p><b>Manual</b> - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback">Roll back a runtime version</a>.</p></li>
184 /// </ul>
185 pub fn get_update_runtime_on(&self) -> &::std::option::Option<crate::types::UpdateRuntimeOn> {
186 &self.update_runtime_on
187 }
188 /// <p>The ARN of the runtime version you want the function to use.</p><note>
189 /// <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p>
190 /// </note>
191 pub fn runtime_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192 self.runtime_version_arn = ::std::option::Option::Some(input.into());
193 self
194 }
195 /// <p>The ARN of the runtime version you want the function to use.</p><note>
196 /// <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p>
197 /// </note>
198 pub fn set_runtime_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199 self.runtime_version_arn = input;
200 self
201 }
202 /// <p>The ARN of the runtime version you want the function to use.</p><note>
203 /// <p>This is only required if you're using the <b>Manual</b> runtime update mode.</p>
204 /// </note>
205 pub fn get_runtime_version_arn(&self) -> &::std::option::Option<::std::string::String> {
206 &self.runtime_version_arn
207 }
208 /// Consumes the builder and constructs a [`PutRuntimeManagementConfigInput`](crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput).
209 pub fn build(
210 self,
211 ) -> ::std::result::Result<
212 crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput,
213 ::aws_smithy_types::error::operation::BuildError,
214 > {
215 ::std::result::Result::Ok(crate::operation::put_runtime_management_config::PutRuntimeManagementConfigInput {
216 function_name: self.function_name,
217 qualifier: self.qualifier,
218 update_runtime_on: self.update_runtime_on,
219 runtime_version_arn: self.runtime_version_arn,
220 })
221 }
222}