Struct aws_sdk_ec2instanceconnect::client::fluent_builders::SendSerialConsoleSSHPublicKey
source · [−]pub struct SendSerialConsoleSSHPublicKey { /* private fields */ }
Expand description
Fluent builder constructing a request to SendSerialConsoleSSHPublicKey
.
Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the Amazon EC2 User Guide.
Implementations
sourceimpl SendSerialConsoleSSHPublicKey
impl SendSerialConsoleSSHPublicKey
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<SendSerialConsoleSSHPublicKey, AwsResponseRetryClassifier>, SdkError<SendSerialConsoleSSHPublicKeyError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<SendSerialConsoleSSHPublicKey, AwsResponseRetryClassifier>, SdkError<SendSerialConsoleSSHPublicKeyError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<SendSerialConsoleSshPublicKeyOutput, SdkError<SendSerialConsoleSSHPublicKeyError>>
pub async fn send(
self
) -> Result<SendSerialConsoleSshPublicKeyOutput, SdkError<SendSerialConsoleSSHPublicKeyError>>
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, which can be set when configuring the client.
sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the EC2 instance.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the EC2 instance.
sourcepub fn serial_port(self, input: i32) -> Self
pub fn serial_port(self, input: i32) -> Self
The serial port of the EC2 instance. Currently only port 0 is supported.
Default: 0
sourcepub fn set_serial_port(self, input: Option<i32>) -> Self
pub fn set_serial_port(self, input: Option<i32>) -> Self
The serial port of the EC2 instance. Currently only port 0 is supported.
Default: 0
sourcepub fn ssh_public_key(self, input: impl Into<String>) -> Self
pub fn ssh_public_key(self, input: impl Into<String>) -> Self
The public key material. To use the public key, you must have the matching private key. For information about the supported key formats and lengths, see Requirements for key pairs in the Amazon EC2 User Guide.
sourcepub fn set_ssh_public_key(self, input: Option<String>) -> Self
pub fn set_ssh_public_key(self, input: Option<String>) -> Self
The public key material. To use the public key, you must have the matching private key. For information about the supported key formats and lengths, see Requirements for key pairs in the Amazon EC2 User Guide.
Trait Implementations
sourceimpl Clone for SendSerialConsoleSSHPublicKey
impl Clone for SendSerialConsoleSSHPublicKey
sourcefn clone(&self) -> SendSerialConsoleSSHPublicKey
fn clone(&self) -> SendSerialConsoleSSHPublicKey
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more