Interface Ec2InstanceConnectClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
This is the Amazon EC2 Instance Connect API Reference. It provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2 Instance Connect. Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH public keys to EC2, providing users a simple and secure way to connect to their instances.
To view the Amazon EC2 Instance Connect content in the Amazon EC2 User Guide, see Connect to your Linux instance using EC2 Instance Connect.
For Amazon EC2 APIs, see the Amazon EC2 API Reference.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aEc2InstanceConnectClient
.static Ec2InstanceConnectClient
create()
Create aEc2InstanceConnectClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.sendSerialConsoleSSHPublicKey
(Consumer<SendSerialConsoleSshPublicKeyRequest.Builder> sendSerialConsoleSshPublicKeyRequest) Pushes an SSH public key to the specified EC2 instance.sendSerialConsoleSSHPublicKey
(SendSerialConsoleSshPublicKeyRequest sendSerialConsoleSshPublicKeyRequest) Pushes an SSH public key to the specified EC2 instance.default SendSshPublicKeyResponse
sendSSHPublicKey
(Consumer<SendSshPublicKeyRequest.Builder> sendSshPublicKeyRequest) Pushes an SSH public key to the specified EC2 instance for use by the specified user.default SendSshPublicKeyResponse
sendSSHPublicKey
(SendSshPublicKeyRequest sendSshPublicKeyRequest) Pushes an SSH public key to the specified EC2 instance for use by the specified user.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
sendSSHPublicKey
default SendSshPublicKeyResponse sendSSHPublicKey(SendSshPublicKeyRequest sendSshPublicKeyRequest) throws AuthException, InvalidArgsException, ServiceException, ThrottlingException, Ec2InstanceNotFoundException, Ec2InstanceStateInvalidException, Ec2InstanceUnavailableException, AwsServiceException, SdkClientException, Ec2InstanceConnectException Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see Connect to your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide.
- Parameters:
sendSshPublicKeyRequest
-- Returns:
- Result of the SendSSHPublicKey operation returned by the service.
- See Also:
-
sendSSHPublicKey
default SendSshPublicKeyResponse sendSSHPublicKey(Consumer<SendSshPublicKeyRequest.Builder> sendSshPublicKeyRequest) throws AuthException, InvalidArgsException, ServiceException, ThrottlingException, Ec2InstanceNotFoundException, Ec2InstanceStateInvalidException, Ec2InstanceUnavailableException, AwsServiceException, SdkClientException, Ec2InstanceConnectException Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see Connect to your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide.
This is a convenience which creates an instance of the
SendSshPublicKeyRequest.Builder
avoiding the need to create one manually viaSendSshPublicKeyRequest.builder()
- Parameters:
sendSshPublicKeyRequest
- AConsumer
that will call methods onSendSshPublicKeyRequest.Builder
to create a request.- Returns:
- Result of the SendSSHPublicKey operation returned by the service.
- See Also:
-
sendSerialConsoleSSHPublicKey
default SendSerialConsoleSshPublicKeyResponse sendSerialConsoleSSHPublicKey(SendSerialConsoleSshPublicKeyRequest sendSerialConsoleSshPublicKeyRequest) throws AuthException, SerialConsoleAccessDisabledException, InvalidArgsException, ServiceException, ThrottlingException, Ec2InstanceNotFoundException, Ec2InstanceTypeInvalidException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, Ec2InstanceStateInvalidException, Ec2InstanceUnavailableException, SerialConsoleSessionUnsupportedException, AwsServiceException, SdkClientException, Ec2InstanceConnectException 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.
- Parameters:
sendSerialConsoleSshPublicKeyRequest
-- Returns:
- Result of the SendSerialConsoleSSHPublicKey operation returned by the service.
- See Also:
-
sendSerialConsoleSSHPublicKey
default SendSerialConsoleSshPublicKeyResponse sendSerialConsoleSSHPublicKey(Consumer<SendSerialConsoleSshPublicKeyRequest.Builder> sendSerialConsoleSshPublicKeyRequest) throws AuthException, SerialConsoleAccessDisabledException, InvalidArgsException, ServiceException, ThrottlingException, Ec2InstanceNotFoundException, Ec2InstanceTypeInvalidException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, Ec2InstanceStateInvalidException, Ec2InstanceUnavailableException, SerialConsoleSessionUnsupportedException, AwsServiceException, SdkClientException, Ec2InstanceConnectException 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.
This is a convenience which creates an instance of the
SendSerialConsoleSshPublicKeyRequest.Builder
avoiding the need to create one manually viaSendSerialConsoleSshPublicKeyRequest.builder()
- Parameters:
sendSerialConsoleSshPublicKeyRequest
- AConsumer
that will call methods onSendSerialConsoleSshPublicKeyRequest.Builder
to create a request.- Returns:
- Result of the SendSerialConsoleSSHPublicKey operation returned by the service.
- See Also:
-
create
Create aEc2InstanceConnectClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aEc2InstanceConnectClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-