1{
2  "version":"2.0",
3  "metadata":{
4    "apiVersion":"2018-04-02",
5    "endpointPrefix":"ec2-instance-connect",
6    "jsonVersion":"1.1",
7    "protocol":"json",
8    "serviceAbbreviation":"EC2 Instance Connect",
9    "serviceFullName":"AWS EC2 Instance Connect",
10    "serviceId":"EC2 Instance Connect",
11    "signatureVersion":"v4",
12    "targetPrefix":"AWSEC2InstanceConnectService",
13    "uid":"ec2-instance-connect-2018-04-02"
14  },
15  "operations":{
16    "SendSSHPublicKey":{
17      "name":"SendSSHPublicKey",
18      "http":{
19        "method":"POST",
20        "requestUri":"/"
21      },
22      "input":{"shape":"SendSSHPublicKeyRequest"},
23      "output":{"shape":"SendSSHPublicKeyResponse"},
24      "errors":[
25        {"shape":"AuthException"},
26        {"shape":"InvalidArgsException"},
27        {"shape":"ServiceException"},
28        {"shape":"ThrottlingException"},
29        {"shape":"EC2InstanceNotFoundException"},
30        {"shape":"EC2InstanceStateInvalidException"},
31        {"shape":"EC2InstanceUnavailableException"}
32      ],
33      "documentation":"<p>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 <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html\">Connect to your Linux instance using EC2 Instance Connect</a> in the <i>Amazon EC2 User Guide</i>.</p>"
34    },
35    "SendSerialConsoleSSHPublicKey":{
36      "name":"SendSerialConsoleSSHPublicKey",
37      "http":{
38        "method":"POST",
39        "requestUri":"/"
40      },
41      "input":{"shape":"SendSerialConsoleSSHPublicKeyRequest"},
42      "output":{"shape":"SendSerialConsoleSSHPublicKeyResponse"},
43      "errors":[
44        {"shape":"AuthException"},
45        {"shape":"SerialConsoleAccessDisabledException"},
46        {"shape":"InvalidArgsException"},
47        {"shape":"ServiceException"},
48        {"shape":"ThrottlingException"},
49        {"shape":"EC2InstanceNotFoundException"},
50        {"shape":"EC2InstanceTypeInvalidException"},
51        {"shape":"SerialConsoleSessionLimitExceededException"},
52        {"shape":"SerialConsoleSessionUnavailableException"},
53        {"shape":"EC2InstanceStateInvalidException"},
54        {"shape":"EC2InstanceUnavailableException"}
55      ],
56      "documentation":"<p>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 <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console.html\">EC2 Serial Console</a> in the <i>Amazon EC2 User Guide</i>.</p>"
57    }
58  },
59  "shapes":{
60    "AuthException":{
61      "type":"structure",
62      "members":{
63        "Message":{"shape":"String"}
64      },
65      "documentation":"<p>Either your AWS credentials are not valid or you do not have access to the EC2 instance.</p>",
66      "exception":true
67    },
68    "AvailabilityZone":{
69      "type":"string",
70      "max":32,
71      "min":6,
72      "pattern":"^(\\w+-){2,3}\\d+\\w+$"
73    },
74    "EC2InstanceNotFoundException":{
75      "type":"structure",
76      "members":{
77        "Message":{"shape":"String"}
78      },
79      "documentation":"<p>The specified instance was not found.</p>",
80      "exception":true
81    },
82    "EC2InstanceStateInvalidException":{
83      "type":"structure",
84      "members":{
85        "Message":{"shape":"String"}
86      },
87      "documentation":"<p>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.</p>",
88      "exception":true
89    },
90    "EC2InstanceTypeInvalidException":{
91      "type":"structure",
92      "members":{
93        "Message":{"shape":"String"}
94      },
95      "documentation":"<p>The instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported.</p>",
96      "exception":true
97    },
98    "EC2InstanceUnavailableException":{
99      "type":"structure",
100      "members":{
101        "Message":{"shape":"String"}
102      },
103      "documentation":"<p>The instance is currently unavailable. Wait a few minutes and try again.</p>",
104      "exception":true
105    },
106    "InstanceId":{
107      "type":"string",
108      "max":32,
109      "min":10,
110      "pattern":"^i-[a-f0-9]+$"
111    },
112    "InstanceOSUser":{
113      "type":"string",
114      "max":32,
115      "min":1,
116      "pattern":"^[A-Za-z_][A-Za-z0-9\\@\\._-]{0,30}[A-Za-z0-9\\$_-]?$"
117    },
118    "InvalidArgsException":{
119      "type":"structure",
120      "members":{
121        "Message":{"shape":"String"}
122      },
123      "documentation":"<p>One of the parameters is not valid.</p>",
124      "exception":true
125    },
126    "RequestId":{"type":"string"},
127    "SSHPublicKey":{
128      "type":"string",
129      "max":4096,
130      "min":80
131    },
132    "SendSSHPublicKeyRequest":{
133      "type":"structure",
134      "required":[
135        "InstanceId",
136        "InstanceOSUser",
137        "SSHPublicKey"
138      ],
139      "members":{
140        "InstanceId":{
141          "shape":"InstanceId",
142          "documentation":"<p>The ID of the EC2 instance.</p>"
143        },
144        "InstanceOSUser":{
145          "shape":"InstanceOSUser",
146          "documentation":"<p>The OS user on the EC2 instance for whom the key can be used to authenticate.</p>"
147        },
148        "SSHPublicKey":{
149          "shape":"SSHPublicKey",
150          "documentation":"<p>The public key material. To use the public key, you must have the matching private key.</p>"
151        },
152        "AvailabilityZone":{
153          "shape":"AvailabilityZone",
154          "documentation":"<p>The Availability Zone in which the EC2 instance was launched.</p>"
155        }
156      }
157    },
158    "SendSSHPublicKeyResponse":{
159      "type":"structure",
160      "members":{
161        "RequestId":{
162          "shape":"RequestId",
163          "documentation":"<p>The ID of the request. Please provide this ID when contacting AWS Support for assistance.</p>"
164        },
165        "Success":{
166          "shape":"Success",
167          "documentation":"<p>Is true if the request succeeds and an error otherwise.</p>"
168        }
169      }
170    },
171    "SendSerialConsoleSSHPublicKeyRequest":{
172      "type":"structure",
173      "required":[
174        "InstanceId",
175        "SSHPublicKey"
176      ],
177      "members":{
178        "InstanceId":{
179          "shape":"InstanceId",
180          "documentation":"<p>The ID of the EC2 instance.</p>"
181        },
182        "SerialPort":{
183          "shape":"SerialPort",
184          "documentation":"<p>The serial port of the EC2 instance. Currently only port 0 is supported.</p> <p>Default: 0</p>"
185        },
186        "SSHPublicKey":{
187          "shape":"SSHPublicKey",
188          "documentation":"<p>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 <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws\">Requirements for key pairs</a> in the <i>Amazon EC2 User Guide</i>.</p>"
189        }
190      }
191    },
192    "SendSerialConsoleSSHPublicKeyResponse":{
193      "type":"structure",
194      "members":{
195        "RequestId":{
196          "shape":"RequestId",
197          "documentation":"<p>The ID of the request. Please provide this ID when contacting AWS Support for assistance.</p>"
198        },
199        "Success":{
200          "shape":"Success",
201          "documentation":"<p>Is true if the request succeeds and an error otherwise.</p>"
202        }
203      }
204    },
205    "SerialConsoleAccessDisabledException":{
206      "type":"structure",
207      "members":{
208        "Message":{"shape":"String"}
209      },
210      "documentation":"<p>Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the EnableSerialConsoleAccess API. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EnableSerialConsoleAccess.html\">EnableSerialConsoleAccess</a> in the <i>Amazon EC2 API Reference</i>.</p>",
211      "exception":true
212    },
213    "SerialConsoleSessionLimitExceededException":{
214      "type":"structure",
215      "members":{
216        "Message":{"shape":"String"}
217      },
218      "documentation":"<p>The instance currently has 1 active serial console session. Only 1 session is supported at a time.</p>",
219      "exception":true
220    },
221    "SerialConsoleSessionUnavailableException":{
222      "type":"structure",
223      "members":{
224        "Message":{"shape":"String"}
225      },
226      "documentation":"<p>Unable to start a serial console session. Please try again.</p>",
227      "exception":true,
228      "fault":true
229    },
230    "SerialPort":{
231      "type":"integer",
232      "max":0,
233      "min":0
234    },
235    "ServiceException":{
236      "type":"structure",
237      "members":{
238        "Message":{"shape":"String"}
239      },
240      "documentation":"<p>The service encountered an error. Follow the instructions in the error message and try again.</p>",
241      "exception":true,
242      "fault":true
243    },
244    "String":{"type":"string"},
245    "Success":{"type":"boolean"},
246    "ThrottlingException":{
247      "type":"structure",
248      "members":{
249        "Message":{"shape":"String"}
250      },
251      "documentation":"<p>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.</p>",
252      "exception":true
253    }
254  },
255  "documentation":"<p>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.</p>"
256}
257