pub struct Builder { /* private fields */ }
Expand description

A builder for CreateKeyPairInput.

Implementations§

A unique name for the key pair.

Constraints: Up to 255 ASCII characters

Examples found in repository?
src/client.rs (line 17728)
17727
17728
17729
17730
        pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.key_name(input.into());
            self
        }

A unique name for the key pair.

Constraints: Up to 255 ASCII characters

Examples found in repository?
src/client.rs (line 17734)
17733
17734
17735
17736
        pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_key_name(input);
            self
        }

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 17739)
17738
17739
17740
17741
        pub fn dry_run(mut self, input: bool) -> Self {
            self.inner = self.inner.dry_run(input);
            self
        }

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

Examples found in repository?
src/client.rs (line 17744)
17743
17744
17745
17746
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

The type of key pair. Note that ED25519 keys are not supported for Windows instances.

Default: rsa

Examples found in repository?
src/client.rs (line 17750)
17749
17750
17751
17752
        pub fn key_type(mut self, input: crate::model::KeyType) -> Self {
            self.inner = self.inner.key_type(input);
            self
        }

The type of key pair. Note that ED25519 keys are not supported for Windows instances.

Default: rsa

Examples found in repository?
src/client.rs (line 17756)
17755
17756
17757
17758
        pub fn set_key_type(mut self, input: std::option::Option<crate::model::KeyType>) -> Self {
            self.inner = self.inner.set_key_type(input);
            self
        }

Appends an item to tag_specifications.

To override the contents of this collection use set_tag_specifications.

The tags to apply to the new key pair.

Examples found in repository?
src/client.rs (line 17765)
17764
17765
17766
17767
        pub fn tag_specifications(mut self, input: crate::model::TagSpecification) -> Self {
            self.inner = self.inner.tag_specifications(input);
            self
        }

The tags to apply to the new key pair.

Examples found in repository?
src/client.rs (line 17773)
17769
17770
17771
17772
17773
17774
17775
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
        ) -> Self {
            self.inner = self.inner.set_tag_specifications(input);
            self
        }

The format of the key pair.

Default: pem

Examples found in repository?
src/client.rs (line 17779)
17778
17779
17780
17781
        pub fn key_format(mut self, input: crate::model::KeyFormat) -> Self {
            self.inner = self.inner.key_format(input);
            self
        }

The format of the key pair.

Default: pem

Examples found in repository?
src/client.rs (line 17788)
17784
17785
17786
17787
17788
17789
17790
        pub fn set_key_format(
            mut self,
            input: std::option::Option<crate::model::KeyFormat>,
        ) -> Self {
            self.inner = self.inner.set_key_format(input);
            self
        }

Consumes the builder and constructs a CreateKeyPairInput.

Examples found in repository?
src/client.rs (line 17694)
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateKeyPair,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateKeyPairError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateKeyPairOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateKeyPairError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more