Class: AWS.EC2InstanceConnect
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.EC2InstanceConnect
- Identifier:
- ec2instanceconnect
- API Version:
- 2018-04-02
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
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.
Sending a Request Using EC2InstanceConnect
var ec2instanceconnect = new AWS.EC2InstanceConnect();
ec2instanceconnect.sendSSHPublicKey(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the EC2InstanceConnect object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var ec2instanceconnect = new AWS.EC2InstanceConnect({apiVersion: '2018-04-02'});
You can also set the API version globally in AWS.config.apiVersions
using
the ec2instanceconnect service identifier:
AWS.config.apiVersions = {
ec2instanceconnect: '2018-04-02',
// other service API versions
};
var ec2instanceconnect = new AWS.EC2InstanceConnect();
Constructor Summary collapse
-
new AWS.EC2InstanceConnect(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
sendSerialConsoleSSHPublicKey(params = {}, callback) ⇒ AWS.Request
Pushes an SSH public key to the specified EC2 instance.
-
sendSSHPublicKey(params = {}, callback) ⇒ AWS.Request
Pushes an SSH public key to the specified EC2 instance for use by the specified user.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.EC2InstanceConnect(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
sendSerialConsoleSSHPublicKey(params = {}, callback) ⇒ AWS.Request
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.
sendSSHPublicKey(params = {}, callback) ⇒ AWS.Request
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.