aws_sdk_ec2/client/
delete_key_pair.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 [`DeleteKeyPair`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`key_name(impl Into<String>)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::key_name) / [`set_key_name(Option<String>)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::set_key_name):<br>required: **false**<br><p>The name of the key pair.</p><br>
7    ///   - [`key_pair_id(impl Into<String>)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::key_pair_id) / [`set_key_pair_id(Option<String>)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::set_key_pair_id):<br>required: **false**<br><p>The ID of the key pair.</p><br>
8    ///   - [`dry_run(bool)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::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 [`DeleteKeyPairOutput`](crate::operation::delete_key_pair::DeleteKeyPairOutput) with field(s):
10    ///   - [`r#return(Option<bool>)`](crate::operation::delete_key_pair::DeleteKeyPairOutput::return): <p>Is <code>true</code> if the request succeeds, and an error otherwise.</p>
11    ///   - [`key_pair_id(Option<String>)`](crate::operation::delete_key_pair::DeleteKeyPairOutput::key_pair_id): <p>The ID of the key pair.</p>
12    /// - On failure, responds with [`SdkError<DeleteKeyPairError>`](crate::operation::delete_key_pair::DeleteKeyPairError)
13    pub fn delete_key_pair(&self) -> crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder {
14        crate::operation::delete_key_pair::builders::DeleteKeyPairFluentBuilder::new(self.handle.clone())
15    }
16}