UNPKG

3.05 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class EC2InstanceConnect extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: EC2InstanceConnect.Types.ClientConfiguration)
13 config: Config & EC2InstanceConnect.Types.ClientConfiguration;
14 /**
15 * Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds.
16 */
17 sendSSHPublicKey(params: EC2InstanceConnect.Types.SendSSHPublicKeyRequest, callback?: (err: AWSError, data: EC2InstanceConnect.Types.SendSSHPublicKeyResponse) => void): Request<EC2InstanceConnect.Types.SendSSHPublicKeyResponse, AWSError>;
18 /**
19 * Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds.
20 */
21 sendSSHPublicKey(callback?: (err: AWSError, data: EC2InstanceConnect.Types.SendSSHPublicKeyResponse) => void): Request<EC2InstanceConnect.Types.SendSSHPublicKeyResponse, AWSError>;
22}
23declare namespace EC2InstanceConnect {
24 export type AvailabilityZone = string;
25 export type InstanceId = string;
26 export type InstanceOSUser = string;
27 export type RequestId = string;
28 export type SSHPublicKey = string;
29 export interface SendSSHPublicKeyRequest {
30 /**
31 * The EC2 instance you wish to publish the SSH key to.
32 */
33 InstanceId: InstanceId;
34 /**
35 * The OS user on the EC2 instance whom the key may be used to authenticate as.
36 */
37 InstanceOSUser: InstanceOSUser;
38 /**
39 * The public key to be published to the instance. To use it after publication you must have the matching private key.
40 */
41 SSHPublicKey: SSHPublicKey;
42 /**
43 * The availability zone the EC2 instance was launched in.
44 */
45 AvailabilityZone: AvailabilityZone;
46 }
47 export interface SendSSHPublicKeyResponse {
48 /**
49 * The request ID as logged by EC2 Connect. Please provide this when contacting AWS Support.
50 */
51 RequestId?: RequestId;
52 /**
53 * Indicates request success.
54 */
55 Success?: Success;
56 }
57 export type Success = boolean;
58 /**
59 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
60 */
61 export type apiVersion = "2018-04-02"|"latest"|string;
62 export interface ClientApiVersions {
63 /**
64 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
65 */
66 apiVersion?: apiVersion;
67 }
68 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
69 /**
70 * Contains interfaces for use with the EC2InstanceConnect client.
71 */
72 export import Types = EC2InstanceConnect;
73}
74export = EC2InstanceConnect;