@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AWSEC2InstanceConnect
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSEC2InstanceConnect
instead.
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.
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT_PREFIX
The region metadata service name for computing region endpoints.
|
Modifier and Type | Method and Description |
---|---|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request, typically used for debugging issues
where a service isn't acting as expected.
|
SendSerialConsoleSSHPublicKeyResult |
sendSerialConsoleSSHPublicKey(SendSerialConsoleSSHPublicKeyRequest sendSerialConsoleSSHPublicKeyRequest)
Pushes an SSH public key to the specified EC2 instance.
|
SendSSHPublicKeyResult |
sendSSHPublicKey(SendSSHPublicKeyRequest sendSSHPublicKeyRequest)
Pushes an SSH public key to the specified EC2 instance for use by the specified user.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held open.
|
static final String ENDPOINT_PREFIX
SendSSHPublicKeyResult sendSSHPublicKey(SendSSHPublicKeyRequest sendSSHPublicKeyRequest)
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.
sendSSHPublicKeyRequest
- AuthException
- Either your AWS credentials are not valid or you do not have access to the EC2 instance.InvalidArgsException
- One of the parameters is not valid.ServiceException
- The service encountered an error. Follow the instructions in the error message and try again.ThrottlingException
- The requests were made too frequently and have been throttled. Wait a while and try again. To increase
the limit on your request frequency, contact AWS Support.EC2InstanceNotFoundException
- The specified instance was not found.EC2InstanceStateInvalidException
- Unable to connect because the instance is not in a valid state. Connecting to a stopped or terminated
instance is not supported. If the instance is stopped, start your instance, and try to connect again.EC2InstanceUnavailableException
- The instance is currently unavailable. Wait a few minutes and try again.SendSerialConsoleSSHPublicKeyResult sendSerialConsoleSSHPublicKey(SendSerialConsoleSSHPublicKeyRequest sendSerialConsoleSSHPublicKeyRequest)
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.
sendSerialConsoleSSHPublicKeyRequest
- AuthException
- Either your AWS credentials are not valid or you do not have access to the EC2 instance.SerialConsoleAccessDisabledException
- Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the
EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess in the Amazon EC2 API Reference.InvalidArgsException
- One of the parameters is not valid.ServiceException
- The service encountered an error. Follow the instructions in the error message and try again.ThrottlingException
- The requests were made too frequently and have been throttled. Wait a while and try again. To increase
the limit on your request frequency, contact AWS Support.EC2InstanceNotFoundException
- The specified instance was not found.EC2InstanceTypeInvalidException
- The instance type is not supported for connecting via the serial console. Only Nitro instance types are
currently supported.SerialConsoleSessionLimitExceededException
- The instance currently has 1 active serial console session. Only 1 session is supported at a time.SerialConsoleSessionUnavailableException
- Unable to start a serial console session. Please try again.EC2InstanceStateInvalidException
- Unable to connect because the instance is not in a valid state. Connecting to a stopped or terminated
instance is not supported. If the instance is stopped, start your instance, and try to connect again.EC2InstanceUnavailableException
- The instance is currently unavailable. Wait a few minutes and try again.SerialConsoleSessionUnsupportedException
- Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update
its BIOS, and then try again to connect.void shutdown()
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
request
- The originally executed request.