aws_sdk_ec2/client/enable_image_deprecation.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`EnableImageDeprecation`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`image_id(impl Into<String>)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::image_id) / [`set_image_id(Option<String>)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::set_image_id):<br>required: **true**<br><p>The ID of the AMI.</p><br>
7 /// - [`deprecate_at(DateTime)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::deprecate_at) / [`set_deprecate_at(Option<DateTime>)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::set_deprecate_at):<br>required: **true**<br><p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p> <p>You can’t specify a date in the past. The upper limit for <code>DeprecateAt</code> is 10 years from now, except for public AMIs, where the upper limit is 2 years from the creation date.</p><br>
8 /// - [`dry_run(bool)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
9 /// - On success, responds with [`EnableImageDeprecationOutput`](crate::operation::enable_image_deprecation::EnableImageDeprecationOutput) with field(s):
10 /// - [`r#return(Option<bool>)`](crate::operation::enable_image_deprecation::EnableImageDeprecationOutput::return): <p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>
11 /// - On failure, responds with [`SdkError<EnableImageDeprecationError>`](crate::operation::enable_image_deprecation::EnableImageDeprecationError)
12 pub fn enable_image_deprecation(&self) -> crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder {
13 crate::operation::enable_image_deprecation::builders::EnableImageDeprecationFluentBuilder::new(self.handle.clone())
14 }
15}