aws_sdk_lightsail/client/create_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 [`CreateKeyPair`](crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`key_pair_name(impl Into<String>)`](crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder::key_pair_name) / [`set_key_pair_name(Option<String>)`](crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder::set_key_pair_name):<br>required: **true**<br><p>The name for your new key pair.</p><br>
7 /// - [`tags(Tag)`](crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder::set_tags):<br>required: **false**<br><p>The tag keys and optional values to add to the resource during create.</p> <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p><br>
8 /// - On success, responds with [`CreateKeyPairOutput`](crate::operation::create_key_pair::CreateKeyPairOutput) with field(s):
9 /// - [`key_pair(Option<KeyPair>)`](crate::operation::create_key_pair::CreateKeyPairOutput::key_pair): <p>An array of key-value pairs containing information about the new key pair you just created.</p>
10 /// - [`public_key_base64(Option<String>)`](crate::operation::create_key_pair::CreateKeyPairOutput::public_key_base64): <p>A base64-encoded public key of the <code>ssh-rsa</code> type.</p>
11 /// - [`private_key_base64(Option<String>)`](crate::operation::create_key_pair::CreateKeyPairOutput::private_key_base64): <p>A base64-encoded RSA private key.</p>
12 /// - [`operation(Option<Operation>)`](crate::operation::create_key_pair::CreateKeyPairOutput::operation): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
13 /// - On failure, responds with [`SdkError<CreateKeyPairError>`](crate::operation::create_key_pair::CreateKeyPairError)
14 pub fn create_key_pair(&self) -> crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder {
15 crate::operation::create_key_pair::builders::CreateKeyPairFluentBuilder::new(self.handle.clone())
16 }
17}