ec2instanceconnect.d.ts 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare 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 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.
  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 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.
  20. */
  21. sendSSHPublicKey(callback?: (err: AWSError, data: EC2InstanceConnect.Types.SendSSHPublicKeyResponse) => void): Request<EC2InstanceConnect.Types.SendSSHPublicKeyResponse, AWSError>;
  22. /**
  23. * 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.
  24. */
  25. sendSerialConsoleSSHPublicKey(params: EC2InstanceConnect.Types.SendSerialConsoleSSHPublicKeyRequest, callback?: (err: AWSError, data: EC2InstanceConnect.Types.SendSerialConsoleSSHPublicKeyResponse) => void): Request<EC2InstanceConnect.Types.SendSerialConsoleSSHPublicKeyResponse, AWSError>;
  26. /**
  27. * 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.
  28. */
  29. sendSerialConsoleSSHPublicKey(callback?: (err: AWSError, data: EC2InstanceConnect.Types.SendSerialConsoleSSHPublicKeyResponse) => void): Request<EC2InstanceConnect.Types.SendSerialConsoleSSHPublicKeyResponse, AWSError>;
  30. }
  31. declare namespace EC2InstanceConnect {
  32. export type AvailabilityZone = string;
  33. export type InstanceId = string;
  34. export type InstanceOSUser = string;
  35. export type RequestId = string;
  36. export type SSHPublicKey = string;
  37. export interface SendSSHPublicKeyRequest {
  38. /**
  39. * The ID of the EC2 instance.
  40. */
  41. InstanceId: InstanceId;
  42. /**
  43. * The OS user on the EC2 instance for whom the key can be used to authenticate.
  44. */
  45. InstanceOSUser: InstanceOSUser;
  46. /**
  47. * The public key material. To use the public key, you must have the matching private key.
  48. */
  49. SSHPublicKey: SSHPublicKey;
  50. /**
  51. * The Availability Zone in which the EC2 instance was launched.
  52. */
  53. AvailabilityZone?: AvailabilityZone;
  54. }
  55. export interface SendSSHPublicKeyResponse {
  56. /**
  57. * The ID of the request. Please provide this ID when contacting AWS Support for assistance.
  58. */
  59. RequestId?: RequestId;
  60. /**
  61. * Is true if the request succeeds and an error otherwise.
  62. */
  63. Success?: Success;
  64. }
  65. export interface SendSerialConsoleSSHPublicKeyRequest {
  66. /**
  67. * The ID of the EC2 instance.
  68. */
  69. InstanceId: InstanceId;
  70. /**
  71. * The serial port of the EC2 instance. Currently only port 0 is supported. Default: 0
  72. */
  73. SerialPort?: SerialPort;
  74. /**
  75. * 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.
  76. */
  77. SSHPublicKey: SSHPublicKey;
  78. }
  79. export interface SendSerialConsoleSSHPublicKeyResponse {
  80. /**
  81. * The ID of the request. Please provide this ID when contacting AWS Support for assistance.
  82. */
  83. RequestId?: RequestId;
  84. /**
  85. * Is true if the request succeeds and an error otherwise.
  86. */
  87. Success?: Success;
  88. }
  89. export type SerialPort = number;
  90. export type Success = boolean;
  91. /**
  92. * 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.
  93. */
  94. export type apiVersion = "2018-04-02"|"latest"|string;
  95. export interface ClientApiVersions {
  96. /**
  97. * 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.
  98. */
  99. apiVersion?: apiVersion;
  100. }
  101. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  102. /**
  103. * Contains interfaces for use with the EC2InstanceConnect client.
  104. */
  105. export import Types = EC2InstanceConnect;
  106. }
  107. export = EC2InstanceConnect;