aws_sdk_lightsail/client/
get_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 [`GetKeyPair`](crate::operation::get_key_pair::builders::GetKeyPairFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`key_pair_name(impl Into<String>)`](crate::operation::get_key_pair::builders::GetKeyPairFluentBuilder::key_pair_name) / [`set_key_pair_name(Option<String>)`](crate::operation::get_key_pair::builders::GetKeyPairFluentBuilder::set_key_pair_name):<br>required: **true**<br><p>The name of the key pair for which you are requesting information.</p><br>
7    /// - On success, responds with [`GetKeyPairOutput`](crate::operation::get_key_pair::GetKeyPairOutput) with field(s):
8    ///   - [`key_pair(Option<KeyPair>)`](crate::operation::get_key_pair::GetKeyPairOutput::key_pair): <p>An array of key-value pairs containing information about the key pair.</p>
9    /// - On failure, responds with [`SdkError<GetKeyPairError>`](crate::operation::get_key_pair::GetKeyPairError)
10    pub fn get_key_pair(&self) -> crate::operation::get_key_pair::builders::GetKeyPairFluentBuilder {
11        crate::operation::get_key_pair::builders::GetKeyPairFluentBuilder::new(self.handle.clone())
12    }
13}