aws_sdk_ec2/client/import_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 [`ImportKeyPair`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`tag_specifications(TagSpecification)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the imported key pair.</p><br>
7 /// - [`dry_run(bool)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::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>
8 /// - [`key_name(impl Into<String>)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::key_name) / [`set_key_name(Option<String>)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::set_key_name):<br>required: **true**<br><p>A unique name for the key pair.</p><br>
9 /// - [`public_key_material(Blob)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::public_key_material) / [`set_public_key_material(Option<Blob>)`](crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::set_public_key_material):<br>required: **true**<br><p>The public key.</p><br>
10 /// - On success, responds with [`ImportKeyPairOutput`](crate::operation::import_key_pair::ImportKeyPairOutput) with field(s):
11 /// - [`key_fingerprint(Option<String>)`](crate::operation::import_key_pair::ImportKeyPairOutput::key_fingerprint): <ul> <li> <p>For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC 4716.</p></li> <li> <p>For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with <a href="http://www.openssh.com/txt/release-6.8">OpenSSH 6.8</a>.</p></li> </ul>
12 /// - [`key_name(Option<String>)`](crate::operation::import_key_pair::ImportKeyPairOutput::key_name): <p>The key pair name that you provided.</p>
13 /// - [`key_pair_id(Option<String>)`](crate::operation::import_key_pair::ImportKeyPairOutput::key_pair_id): <p>The ID of the resulting key pair.</p>
14 /// - [`tags(Option<Vec::<Tag>>)`](crate::operation::import_key_pair::ImportKeyPairOutput::tags): <p>The tags applied to the imported key pair.</p>
15 /// - On failure, responds with [`SdkError<ImportKeyPairError>`](crate::operation::import_key_pair::ImportKeyPairError)
16 pub fn import_key_pair(&self) -> crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder {
17 crate::operation::import_key_pair::builders::ImportKeyPairFluentBuilder::new(self.handle.clone())
18 }
19}