1{
2  "metadata" : {
3    "apiVersion" : "2018-05-14",
4    "endpointPrefix" : "devices.iot1click",
5    "signingName" : "iot1click",
6    "serviceFullName" : "AWS IoT 1-Click Devices Service",
7    "serviceId" : "IoT 1Click Devices Service",
8    "protocol" : "rest-json",
9    "jsonVersion" : "1.1",
10    "uid" : "devices-2018-05-14",
11    "signatureVersion" : "v4"
12  },
13  "operations" : {
14    "ClaimDevicesByClaimCode" : {
15      "name" : "ClaimDevicesByClaimCode",
16      "http" : {
17        "method" : "PUT",
18        "requestUri" : "/claims/{claimCode}",
19        "responseCode" : 200
20      },
21      "input" : {
22        "shape" : "ClaimDevicesByClaimCodeRequest"
23      },
24      "output" : {
25        "shape" : "ClaimDevicesByClaimCodeResponse"
26      },
27      "errors" : [ {
28        "shape" : "InvalidRequestException"
29      }, {
30        "shape" : "InternalFailureException"
31      }, {
32        "shape" : "ForbiddenException"
33      } ]
34    },
35    "DescribeDevice" : {
36      "name" : "DescribeDevice",
37      "http" : {
38        "method" : "GET",
39        "requestUri" : "/devices/{deviceId}",
40        "responseCode" : 200
41      },
42      "input" : {
43        "shape" : "DescribeDeviceRequest"
44      },
45      "output" : {
46        "shape" : "DescribeDeviceResponse"
47      },
48      "errors" : [ {
49        "shape" : "ResourceNotFoundException"
50      }, {
51        "shape" : "InvalidRequestException"
52      }, {
53        "shape" : "InternalFailureException"
54      } ]
55    },
56    "FinalizeDeviceClaim" : {
57      "name" : "FinalizeDeviceClaim",
58      "http" : {
59        "method" : "PUT",
60        "requestUri" : "/devices/{deviceId}/finalize-claim",
61        "responseCode" : 200
62      },
63      "input" : {
64        "shape" : "FinalizeDeviceClaimRequest"
65      },
66      "output" : {
67        "shape" : "FinalizeDeviceClaimResponse"
68      },
69      "errors" : [ {
70        "shape" : "ResourceNotFoundException"
71      }, {
72        "shape" : "InvalidRequestException"
73      }, {
74        "shape" : "InternalFailureException"
75      }, {
76        "shape" : "PreconditionFailedException"
77      }, {
78        "shape" : "ResourceConflictException"
79      } ]
80    },
81    "GetDeviceMethods" : {
82      "name" : "GetDeviceMethods",
83      "http" : {
84        "method" : "GET",
85        "requestUri" : "/devices/{deviceId}/methods",
86        "responseCode" : 200
87      },
88      "input" : {
89        "shape" : "GetDeviceMethodsRequest"
90      },
91      "output" : {
92        "shape" : "GetDeviceMethodsResponse"
93      },
94      "errors" : [ {
95        "shape" : "ResourceNotFoundException"
96      }, {
97        "shape" : "InvalidRequestException"
98      }, {
99        "shape" : "InternalFailureException"
100      } ]
101    },
102    "InitiateDeviceClaim" : {
103      "name" : "InitiateDeviceClaim",
104      "http" : {
105        "method" : "PUT",
106        "requestUri" : "/devices/{deviceId}/initiate-claim",
107        "responseCode" : 200
108      },
109      "input" : {
110        "shape" : "InitiateDeviceClaimRequest"
111      },
112      "output" : {
113        "shape" : "InitiateDeviceClaimResponse"
114      },
115      "errors" : [ {
116        "shape" : "ResourceNotFoundException"
117      }, {
118        "shape" : "InvalidRequestException"
119      }, {
120        "shape" : "InternalFailureException"
121      }, {
122        "shape" : "ResourceConflictException"
123      } ]
124    },
125    "InvokeDeviceMethod" : {
126      "name" : "InvokeDeviceMethod",
127      "http" : {
128        "method" : "POST",
129        "requestUri" : "/devices/{deviceId}/methods",
130        "responseCode" : 200
131      },
132      "input" : {
133        "shape" : "InvokeDeviceMethodRequest"
134      },
135      "output" : {
136        "shape" : "InvokeDeviceMethodResponse"
137      },
138      "errors" : [ {
139        "shape" : "InvalidRequestException"
140      }, {
141        "shape" : "PreconditionFailedException"
142      }, {
143        "shape" : "InternalFailureException"
144      }, {
145        "shape" : "ResourceNotFoundException"
146      }, {
147        "shape" : "RangeNotSatisfiableException"
148      }, {
149        "shape" : "ResourceConflictException"
150      } ]
151    },
152    "ListDeviceEvents" : {
153      "name" : "ListDeviceEvents",
154      "http" : {
155        "method" : "GET",
156        "requestUri" : "/devices/{deviceId}/events",
157        "responseCode" : 200
158      },
159      "input" : {
160        "shape" : "ListDeviceEventsRequest"
161      },
162      "output" : {
163        "shape" : "ListDeviceEventsResponse"
164      },
165      "errors" : [ {
166        "shape" : "ResourceNotFoundException"
167      }, {
168        "shape" : "RangeNotSatisfiableException"
169      }, {
170        "shape" : "InvalidRequestException"
171      }, {
172        "shape" : "InternalFailureException"
173      } ]
174    },
175    "ListDevices" : {
176      "name" : "ListDevices",
177      "http" : {
178        "method" : "GET",
179        "requestUri" : "/devices",
180        "responseCode" : 200
181      },
182      "input" : {
183        "shape" : "ListDevicesRequest"
184      },
185      "output" : {
186        "shape" : "ListDevicesResponse"
187      },
188      "errors" : [ {
189        "shape" : "RangeNotSatisfiableException"
190      }, {
191        "shape" : "InvalidRequestException"
192      }, {
193        "shape" : "InternalFailureException"
194      } ]
195    },
196    "UnclaimDevice" : {
197      "name" : "UnclaimDevice",
198      "http" : {
199        "method" : "PUT",
200        "requestUri" : "/devices/{deviceId}/unclaim",
201        "responseCode" : 200
202      },
203      "input" : {
204        "shape" : "UnclaimDeviceRequest"
205      },
206      "output" : {
207        "shape" : "UnclaimDeviceResponse"
208      },
209      "errors" : [ {
210        "shape" : "ResourceNotFoundException"
211      }, {
212        "shape" : "InvalidRequestException"
213      }, {
214        "shape" : "InternalFailureException"
215      } ]
216    },
217    "UpdateDeviceState" : {
218      "name" : "UpdateDeviceState",
219      "http" : {
220        "method" : "PUT",
221        "requestUri" : "/devices/{deviceId}/state",
222        "responseCode" : 200
223      },
224      "input" : {
225        "shape" : "UpdateDeviceStateRequest"
226      },
227      "output" : {
228        "shape" : "UpdateDeviceStateResponse"
229      },
230      "errors" : [ {
231        "shape" : "ResourceNotFoundException"
232      }, {
233        "shape" : "InvalidRequestException"
234      }, {
235        "shape" : "InternalFailureException"
236      } ]
237    }
238  },
239  "shapes" : {
240    "Attributes" : {
241      "type" : "structure",
242      "members" : { }
243    },
244    "ClaimDevicesByClaimCodeRequest" : {
245      "type" : "structure",
246      "members" : {
247        "ClaimCode" : {
248          "shape" : "__string",
249          "location" : "uri",
250          "locationName" : "claimCode"
251        }
252      },
253      "required" : [ "ClaimCode" ]
254    },
255    "ClaimDevicesByClaimCodeResponse" : {
256      "type" : "structure",
257      "members" : {
258        "ClaimCode" : {
259          "shape" : "__stringMin12Max40",
260          "locationName" : "claimCode"
261        },
262        "Total" : {
263          "shape" : "__integer",
264          "locationName" : "total"
265        }
266      }
267    },
268    "DescribeDeviceRequest" : {
269      "type" : "structure",
270      "members" : {
271        "DeviceId" : {
272          "shape" : "__string",
273          "location" : "uri",
274          "locationName" : "deviceId"
275        }
276      },
277      "required" : [ "DeviceId" ]
278    },
279    "DescribeDeviceResponse" : {
280      "type" : "structure",
281      "members" : {
282        "DeviceDescription" : {
283          "shape" : "DeviceDescription",
284          "locationName" : "deviceDescription"
285        }
286      }
287    },
288    "Device" : {
289      "type" : "structure",
290      "members" : {
291        "Attributes" : {
292          "shape" : "Attributes",
293          "locationName" : "attributes"
294        },
295        "DeviceId" : {
296          "shape" : "__string",
297          "locationName" : "deviceId"
298        },
299        "Type" : {
300          "shape" : "__string",
301          "locationName" : "type"
302        }
303      }
304    },
305    "DeviceAttributes" : {
306      "type" : "map",
307      "key" : {
308        "shape" : "__string"
309      },
310      "value" : {
311        "shape" : "__string"
312      }
313    },
314    "DeviceClaimResponse" : {
315      "type" : "structure",
316      "members" : {
317        "State" : {
318          "shape" : "__string",
319          "locationName" : "state"
320        }
321      }
322    },
323    "DeviceDescription" : {
324      "type" : "structure",
325      "members" : {
326        "Attributes" : {
327          "shape" : "DeviceAttributes",
328          "locationName" : "attributes"
329        },
330        "DeviceId" : {
331          "shape" : "__string",
332          "locationName" : "deviceId"
333        },
334        "Enabled" : {
335          "shape" : "__boolean",
336          "locationName" : "enabled"
337        },
338        "RemainingLife" : {
339          "shape" : "__doubleMin0Max100",
340          "locationName" : "remainingLife"
341        },
342        "Type" : {
343          "shape" : "__string",
344          "locationName" : "type"
345        }
346      }
347    },
348    "DeviceEvent" : {
349      "type" : "structure",
350      "members" : {
351        "Device" : {
352          "shape" : "Device",
353          "locationName" : "device"
354        },
355        "StdEvent" : {
356          "shape" : "__string",
357          "locationName" : "stdEvent"
358        }
359      }
360    },
361    "DeviceEventsResponse" : {
362      "type" : "structure",
363      "members" : {
364        "Events" : {
365          "shape" : "__listOfDeviceEvent",
366          "locationName" : "events"
367        },
368        "NextToken" : {
369          "shape" : "__string",
370          "locationName" : "nextToken"
371        }
372      }
373    },
374    "DeviceMethod" : {
375      "type" : "structure",
376      "members" : {
377        "DeviceType" : {
378          "shape" : "__string",
379          "locationName" : "deviceType"
380        },
381        "MethodName" : {
382          "shape" : "__string",
383          "locationName" : "methodName"
384        }
385      }
386    },
387    "Empty" : {
388      "type" : "structure",
389      "members" : { }
390    },
391    "FinalizeDeviceClaimRequest" : {
392      "type" : "structure",
393      "members" : {
394        "DeviceId" : {
395          "shape" : "__string",
396          "location" : "uri",
397          "locationName" : "deviceId"
398        }
399      },
400      "required" : [ "DeviceId" ]
401    },
402    "FinalizeDeviceClaimResponse" : {
403      "type" : "structure",
404      "members" : {
405        "State" : {
406          "shape" : "__string",
407          "locationName" : "state"
408        }
409      }
410    },
411    "ForbiddenException" : {
412      "type" : "structure",
413      "members" : {
414        "Code" : {
415          "shape" : "__string",
416          "locationName" : "code"
417        },
418        "Message" : {
419          "shape" : "__string",
420          "locationName" : "message"
421        }
422      },
423      "exception" : true,
424      "error" : {
425        "httpStatusCode" : 403
426      }
427    },
428    "GetDeviceMethodsRequest" : {
429      "type" : "structure",
430      "members" : {
431        "DeviceId" : {
432          "shape" : "__string",
433          "location" : "uri",
434          "locationName" : "deviceId"
435        }
436      },
437      "required" : [ "DeviceId" ]
438    },
439    "GetDeviceMethodsResponse" : {
440      "type" : "structure",
441      "members" : {
442        "DeviceMethods" : {
443          "shape" : "__listOfDeviceMethod",
444          "locationName" : "deviceMethods"
445        }
446      }
447    },
448    "InitiateDeviceClaimRequest" : {
449      "type" : "structure",
450      "members" : {
451        "DeviceId" : {
452          "shape" : "__string",
453          "location" : "uri",
454          "locationName" : "deviceId"
455        }
456      },
457      "required" : [ "DeviceId" ]
458    },
459    "InitiateDeviceClaimResponse" : {
460      "type" : "structure",
461      "members" : {
462        "State" : {
463          "shape" : "__string",
464          "locationName" : "state"
465        }
466      }
467    },
468    "InternalFailureException" : {
469      "type" : "structure",
470      "members" : {
471        "Code" : {
472          "shape" : "__string",
473          "locationName" : "code"
474        },
475        "Message" : {
476          "shape" : "__string",
477          "locationName" : "message"
478        }
479      },
480      "exception" : true,
481      "error" : {
482        "httpStatusCode" : 500
483      }
484    },
485    "InvalidRequestException" : {
486      "type" : "structure",
487      "members" : {
488        "Code" : {
489          "shape" : "__string",
490          "locationName" : "code"
491        },
492        "Message" : {
493          "shape" : "__string",
494          "locationName" : "message"
495        }
496      },
497      "exception" : true,
498      "error" : {
499        "httpStatusCode" : 400
500      }
501    },
502    "InvokeDeviceMethodRequest" : {
503      "type" : "structure",
504      "members" : {
505        "DeviceId" : {
506          "shape" : "__string",
507          "location" : "uri",
508          "locationName" : "deviceId"
509        },
510        "DeviceMethod" : {
511          "shape" : "DeviceMethod",
512          "locationName" : "deviceMethod"
513        },
514        "DeviceMethodParameters" : {
515          "shape" : "__string",
516          "locationName" : "deviceMethodParameters"
517        }
518      },
519      "required" : [ "DeviceId" ]
520    },
521    "InvokeDeviceMethodResponse" : {
522      "type" : "structure",
523      "members" : {
524        "DeviceMethodResponse" : {
525          "shape" : "__string",
526          "locationName" : "deviceMethodResponse"
527        }
528      }
529    },
530    "ListDeviceEventsRequest" : {
531      "type" : "structure",
532      "members" : {
533        "DeviceId" : {
534          "shape" : "__string",
535          "location" : "uri",
536          "locationName" : "deviceId"
537        },
538        "FromTimeStamp" : {
539          "shape" : "__timestampIso8601",
540          "location" : "querystring",
541          "locationName" : "fromTimeStamp"
542        },
543        "MaxResults" : {
544          "shape" : "MaxResults",
545          "location" : "querystring",
546          "locationName" : "maxResults"
547        },
548        "NextToken" : {
549          "shape" : "__string",
550          "location" : "querystring",
551          "locationName" : "nextToken"
552        },
553        "ToTimeStamp" : {
554          "shape" : "__timestampIso8601",
555          "location" : "querystring",
556          "locationName" : "toTimeStamp"
557        }
558      },
559      "required" : [ "DeviceId", "FromTimeStamp", "ToTimeStamp" ]
560    },
561    "ListDeviceEventsResponse" : {
562      "type" : "structure",
563      "members" : {
564        "Events" : {
565          "shape" : "__listOfDeviceEvent",
566          "locationName" : "events"
567        },
568        "NextToken" : {
569          "shape" : "__string",
570          "locationName" : "nextToken"
571        }
572      }
573    },
574    "ListDevicesRequest" : {
575      "type" : "structure",
576      "members" : {
577        "DeviceType" : {
578          "shape" : "__string",
579          "location" : "querystring",
580          "locationName" : "deviceType"
581        },
582        "MaxResults" : {
583          "shape" : "MaxResults",
584          "location" : "querystring",
585          "locationName" : "maxResults"
586        },
587        "NextToken" : {
588          "shape" : "__string",
589          "location" : "querystring",
590          "locationName" : "nextToken"
591        }
592      }
593    },
594    "ListDevicesResponse" : {
595      "type" : "structure",
596      "members" : {
597        "Devices" : {
598          "shape" : "__listOfDeviceDescription",
599          "locationName" : "devices"
600        },
601        "NextToken" : {
602          "shape" : "__string",
603          "locationName" : "nextToken"
604        }
605      }
606    },
607    "MaxResults" : {
608      "type" : "integer",
609      "min" : 1,
610      "max" : 250
611    },
612    "PreconditionFailedException" : {
613      "type" : "structure",
614      "members" : {
615        "Code" : {
616          "shape" : "__string",
617          "locationName" : "code"
618        },
619        "Message" : {
620          "shape" : "__string",
621          "locationName" : "message"
622        }
623      },
624      "exception" : true,
625      "error" : {
626        "httpStatusCode" : 412
627      }
628    },
629    "RangeNotSatisfiableException" : {
630      "type" : "structure",
631      "members" : {
632        "Code" : {
633          "shape" : "__string",
634          "locationName" : "code"
635        },
636        "Message" : {
637          "shape" : "__string",
638          "locationName" : "message"
639        }
640      },
641      "exception" : true,
642      "error" : {
643        "httpStatusCode" : 416
644      }
645    },
646    "ResourceConflictException" : {
647      "type" : "structure",
648      "members" : {
649        "Code" : {
650          "shape" : "__string",
651          "locationName" : "code"
652        },
653        "Message" : {
654          "shape" : "__string",
655          "locationName" : "message"
656        }
657      },
658      "exception" : true,
659      "error" : {
660        "httpStatusCode" : 409
661      }
662    },
663    "ResourceNotFoundException" : {
664      "type" : "structure",
665      "members" : {
666        "Code" : {
667          "shape" : "__string",
668          "locationName" : "code"
669        },
670        "Message" : {
671          "shape" : "__string",
672          "locationName" : "message"
673        }
674      },
675      "exception" : true,
676      "error" : {
677        "httpStatusCode" : 404
678      }
679    },
680    "UnclaimDeviceRequest" : {
681      "type" : "structure",
682      "members" : {
683        "DeviceId" : {
684          "shape" : "__string",
685          "location" : "uri",
686          "locationName" : "deviceId"
687        }
688      },
689      "required" : [ "DeviceId" ]
690    },
691    "UnclaimDeviceResponse" : {
692      "type" : "structure",
693      "members" : {
694        "State" : {
695          "shape" : "__string",
696          "locationName" : "state"
697        }
698      }
699    },
700    "UpdateDeviceStateRequest" : {
701      "type" : "structure",
702      "members" : {
703        "DeviceId" : {
704          "shape" : "__string",
705          "location" : "uri",
706          "locationName" : "deviceId"
707        },
708        "Enabled" : {
709          "shape" : "__boolean",
710          "locationName" : "enabled"
711        }
712      },
713      "required" : [ "DeviceId" ]
714    },
715    "UpdateDeviceStateResponse" : {
716      "type" : "structure",
717      "members" : { }
718    },
719    "__boolean" : {
720      "type" : "boolean"
721    },
722    "__double" : {
723      "type" : "double"
724    },
725    "__doubleMin0Max100" : {
726      "type" : "double"
727    },
728    "__integer" : {
729      "type" : "integer"
730    },
731    "__listOfDeviceDescription" : {
732      "type" : "list",
733      "member" : {
734        "shape" : "DeviceDescription"
735      }
736    },
737    "__listOfDeviceEvent" : {
738      "type" : "list",
739      "member" : {
740        "shape" : "DeviceEvent"
741      }
742    },
743    "__listOfDeviceMethod" : {
744      "type" : "list",
745      "member" : {
746        "shape" : "DeviceMethod"
747      }
748    },
749    "__long" : {
750      "type" : "long"
751    },
752    "__string" : {
753      "type" : "string"
754    },
755    "__stringMin12Max40" : {
756      "type" : "string",
757      "min" : 12,
758      "max" : 40
759    },
760    "__timestampIso8601" : {
761      "type" : "timestamp",
762      "timestampFormat" : "iso8601"
763    },
764    "__timestampUnix" : {
765      "type" : "timestamp",
766      "timestampFormat" : "unixTimestamp"
767    }
768  }
769}