iot1clickdevicesservice.d.ts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  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 IoT1ClickDevicesService extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: IoT1ClickDevicesService.Types.ClientConfiguration)
  13. config: Config & IoT1ClickDevicesService.Types.ClientConfiguration;
  14. /**
  15. * Adds device(s) to your account (i.e., claim one or more devices) if and only if you
  16. received a claim code with the device(s).
  17. */
  18. claimDevicesByClaimCode(params: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse) => void): Request<IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse, AWSError>;
  19. /**
  20. * Adds device(s) to your account (i.e., claim one or more devices) if and only if you
  21. received a claim code with the device(s).
  22. */
  23. claimDevicesByClaimCode(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse) => void): Request<IoT1ClickDevicesService.Types.ClaimDevicesByClaimCodeResponse, AWSError>;
  24. /**
  25. * Given a device ID, returns a DescribeDeviceResponse object describing the
  26. details of the device.
  27. */
  28. describeDevice(params: IoT1ClickDevicesService.Types.DescribeDeviceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.DescribeDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.DescribeDeviceResponse, AWSError>;
  29. /**
  30. * Given a device ID, returns a DescribeDeviceResponse object describing the
  31. details of the device.
  32. */
  33. describeDevice(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.DescribeDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.DescribeDeviceResponse, AWSError>;
  34. /**
  35. * Given a device ID, finalizes the claim request for the associated device.
  36. Claiming a device consists of initiating a claim, then publishing a device event,
  37. and finalizing the claim. For a device of type button, a device event can
  38. be published by simply clicking the device.
  39. */
  40. finalizeDeviceClaim(params: IoT1ClickDevicesService.Types.FinalizeDeviceClaimRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse, AWSError>;
  41. /**
  42. * Given a device ID, finalizes the claim request for the associated device.
  43. Claiming a device consists of initiating a claim, then publishing a device event,
  44. and finalizing the claim. For a device of type button, a device event can
  45. be published by simply clicking the device.
  46. */
  47. finalizeDeviceClaim(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.FinalizeDeviceClaimResponse, AWSError>;
  48. /**
  49. * Given a device ID, returns the invokable methods associated with the device.
  50. */
  51. getDeviceMethods(params: IoT1ClickDevicesService.Types.GetDeviceMethodsRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.GetDeviceMethodsResponse) => void): Request<IoT1ClickDevicesService.Types.GetDeviceMethodsResponse, AWSError>;
  52. /**
  53. * Given a device ID, returns the invokable methods associated with the device.
  54. */
  55. getDeviceMethods(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.GetDeviceMethodsResponse) => void): Request<IoT1ClickDevicesService.Types.GetDeviceMethodsResponse, AWSError>;
  56. /**
  57. * Given a device ID, initiates a claim request for the associated device.
  58. Claiming a device consists of initiating a claim, then publishing a device event,
  59. and finalizing the claim. For a device of type button, a device event can
  60. be published by simply clicking the device.
  61. */
  62. initiateDeviceClaim(params: IoT1ClickDevicesService.Types.InitiateDeviceClaimRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse, AWSError>;
  63. /**
  64. * Given a device ID, initiates a claim request for the associated device.
  65. Claiming a device consists of initiating a claim, then publishing a device event,
  66. and finalizing the claim. For a device of type button, a device event can
  67. be published by simply clicking the device.
  68. */
  69. initiateDeviceClaim(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse) => void): Request<IoT1ClickDevicesService.Types.InitiateDeviceClaimResponse, AWSError>;
  70. /**
  71. * Given a device ID, issues a request to invoke a named device method (with possible
  72. parameters). See the "Example POST" code snippet below.
  73. */
  74. invokeDeviceMethod(params: IoT1ClickDevicesService.Types.InvokeDeviceMethodRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse) => void): Request<IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse, AWSError>;
  75. /**
  76. * Given a device ID, issues a request to invoke a named device method (with possible
  77. parameters). See the "Example POST" code snippet below.
  78. */
  79. invokeDeviceMethod(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse) => void): Request<IoT1ClickDevicesService.Types.InvokeDeviceMethodResponse, AWSError>;
  80. /**
  81. * Using a device ID, returns a DeviceEventsResponse object containing an
  82. array of events for the device.
  83. */
  84. listDeviceEvents(params: IoT1ClickDevicesService.Types.ListDeviceEventsRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDeviceEventsResponse) => void): Request<IoT1ClickDevicesService.Types.ListDeviceEventsResponse, AWSError>;
  85. /**
  86. * Using a device ID, returns a DeviceEventsResponse object containing an
  87. array of events for the device.
  88. */
  89. listDeviceEvents(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDeviceEventsResponse) => void): Request<IoT1ClickDevicesService.Types.ListDeviceEventsResponse, AWSError>;
  90. /**
  91. * Lists the 1-Click compatible devices associated with your AWS account.
  92. */
  93. listDevices(params: IoT1ClickDevicesService.Types.ListDevicesRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDevicesResponse) => void): Request<IoT1ClickDevicesService.Types.ListDevicesResponse, AWSError>;
  94. /**
  95. * Lists the 1-Click compatible devices associated with your AWS account.
  96. */
  97. listDevices(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListDevicesResponse) => void): Request<IoT1ClickDevicesService.Types.ListDevicesResponse, AWSError>;
  98. /**
  99. * Lists the tags associated with the specified resource ARN.
  100. */
  101. listTagsForResource(params: IoT1ClickDevicesService.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickDevicesService.Types.ListTagsForResourceResponse, AWSError>;
  102. /**
  103. * Lists the tags associated with the specified resource ARN.
  104. */
  105. listTagsForResource(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickDevicesService.Types.ListTagsForResourceResponse, AWSError>;
  106. /**
  107. * Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per
  108. resource.
  109. */
  110. tagResource(params: IoT1ClickDevicesService.Types.TagResourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  111. /**
  112. * Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per
  113. resource.
  114. */
  115. tagResource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  116. /**
  117. * Disassociates a device from your AWS account using its device ID.
  118. */
  119. unclaimDevice(params: IoT1ClickDevicesService.Types.UnclaimDeviceRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UnclaimDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.UnclaimDeviceResponse, AWSError>;
  120. /**
  121. * Disassociates a device from your AWS account using its device ID.
  122. */
  123. unclaimDevice(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UnclaimDeviceResponse) => void): Request<IoT1ClickDevicesService.Types.UnclaimDeviceResponse, AWSError>;
  124. /**
  125. * Using tag keys, deletes the tags (key/value pairs) associated with the specified
  126. resource ARN.
  127. */
  128. untagResource(params: IoT1ClickDevicesService.Types.UntagResourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  129. /**
  130. * Using tag keys, deletes the tags (key/value pairs) associated with the specified
  131. resource ARN.
  132. */
  133. untagResource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
  134. /**
  135. * Using a Boolean value (true or false), this operation
  136. enables or disables the device given a device ID.
  137. */
  138. updateDeviceState(params: IoT1ClickDevicesService.Types.UpdateDeviceStateRequest, callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UpdateDeviceStateResponse) => void): Request<IoT1ClickDevicesService.Types.UpdateDeviceStateResponse, AWSError>;
  139. /**
  140. * Using a Boolean value (true or false), this operation
  141. enables or disables the device given a device ID.
  142. */
  143. updateDeviceState(callback?: (err: AWSError, data: IoT1ClickDevicesService.Types.UpdateDeviceStateResponse) => void): Request<IoT1ClickDevicesService.Types.UpdateDeviceStateResponse, AWSError>;
  144. }
  145. declare namespace IoT1ClickDevicesService {
  146. export interface Attributes {
  147. }
  148. export interface ClaimDevicesByClaimCodeRequest {
  149. /**
  150. * The claim code, starting with "C-", as provided by the device manufacturer.
  151. */
  152. ClaimCode: __string;
  153. }
  154. export interface ClaimDevicesByClaimCodeResponse {
  155. /**
  156. * The claim code provided by the device manufacturer.
  157. */
  158. ClaimCode?: __stringMin12Max40;
  159. /**
  160. * The total number of devices associated with the claim code that has been processed in
  161. the claim request.
  162. */
  163. Total?: __integer;
  164. }
  165. export interface DescribeDeviceRequest {
  166. /**
  167. * The unique identifier of the device.
  168. */
  169. DeviceId: __string;
  170. }
  171. export interface DescribeDeviceResponse {
  172. /**
  173. * Device details.
  174. */
  175. DeviceDescription?: DeviceDescription;
  176. }
  177. export interface Device {
  178. /**
  179. * The user specified attributes associated with the device for an event.
  180. */
  181. Attributes?: Attributes;
  182. /**
  183. * The unique identifier of the device.
  184. */
  185. DeviceId?: __string;
  186. /**
  187. * The device type, such as "button".
  188. */
  189. Type?: __string;
  190. }
  191. export type DeviceAttributes = {[key: string]: __string};
  192. export interface DeviceDescription {
  193. /**
  194. * The ARN of the device.
  195. */
  196. Arn?: __string;
  197. /**
  198. * An array of zero or more elements of DeviceAttribute objects providing
  199. user specified device attributes.
  200. */
  201. Attributes?: DeviceAttributes;
  202. /**
  203. * The unique identifier of the device.
  204. */
  205. DeviceId?: __string;
  206. /**
  207. * A Boolean value indicating whether or not the device is enabled.
  208. */
  209. Enabled?: __boolean;
  210. /**
  211. * A value between 0 and 1 inclusive, representing the fraction of life remaining for the
  212. device.
  213. */
  214. RemainingLife?: __doubleMin0Max100;
  215. /**
  216. * The type of the device, such as "button".
  217. */
  218. Type?: __string;
  219. /**
  220. * The tags currently associated with the AWS IoT 1-Click device.
  221. */
  222. Tags?: __mapOf__string;
  223. }
  224. export interface DeviceEvent {
  225. /**
  226. * An object representing the device associated with the event.
  227. */
  228. Device?: Device;
  229. /**
  230. * A serialized JSON object representing the device-type specific event.
  231. */
  232. StdEvent?: __string;
  233. }
  234. export interface DeviceMethod {
  235. /**
  236. * The type of the device, such as "button".
  237. */
  238. DeviceType?: __string;
  239. /**
  240. * The name of the method applicable to the deviceType.
  241. */
  242. MethodName?: __string;
  243. }
  244. export interface FinalizeDeviceClaimRequest {
  245. /**
  246. * The unique identifier of the device.
  247. */
  248. DeviceId: __string;
  249. /**
  250. * A collection of key/value pairs defining the resource tags. For example, {
  251. "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
  252. Tagging Strategies.
  253. */
  254. Tags?: __mapOf__string;
  255. }
  256. export interface FinalizeDeviceClaimResponse {
  257. /**
  258. * The device's final claim state.
  259. */
  260. State?: __string;
  261. }
  262. export interface GetDeviceMethodsRequest {
  263. /**
  264. * The unique identifier of the device.
  265. */
  266. DeviceId: __string;
  267. }
  268. export interface GetDeviceMethodsResponse {
  269. /**
  270. * List of available device APIs.
  271. */
  272. DeviceMethods?: __listOfDeviceMethod;
  273. }
  274. export interface InitiateDeviceClaimRequest {
  275. /**
  276. * The unique identifier of the device.
  277. */
  278. DeviceId: __string;
  279. }
  280. export interface InitiateDeviceClaimResponse {
  281. /**
  282. * The device's final claim state.
  283. */
  284. State?: __string;
  285. }
  286. export interface InvokeDeviceMethodRequest {
  287. /**
  288. * The unique identifier of the device.
  289. */
  290. DeviceId: __string;
  291. /**
  292. * The device method to invoke.
  293. */
  294. DeviceMethod?: DeviceMethod;
  295. /**
  296. * A JSON encoded string containing the device method request parameters.
  297. */
  298. DeviceMethodParameters?: __string;
  299. }
  300. export interface InvokeDeviceMethodResponse {
  301. /**
  302. * A JSON encoded string containing the device method response.
  303. */
  304. DeviceMethodResponse?: __string;
  305. }
  306. export interface ListDeviceEventsRequest {
  307. /**
  308. * The unique identifier of the device.
  309. */
  310. DeviceId: __string;
  311. /**
  312. * The start date for the device event query, in ISO8061 format. For example,
  313. 2018-03-28T15:45:12.880Z
  314. */
  315. FromTimeStamp: __timestampIso8601;
  316. /**
  317. * The maximum number of results to return per request. If not set, a default value of
  318. 100 is used.
  319. */
  320. MaxResults?: MaxResults;
  321. /**
  322. * The token to retrieve the next set of results.
  323. */
  324. NextToken?: __string;
  325. /**
  326. * The end date for the device event query, in ISO8061 format. For example,
  327. 2018-03-28T15:45:12.880Z
  328. */
  329. ToTimeStamp: __timestampIso8601;
  330. }
  331. export interface ListDeviceEventsResponse {
  332. /**
  333. * An array of zero or more elements describing the event(s) associated with the
  334. device.
  335. */
  336. Events?: __listOfDeviceEvent;
  337. /**
  338. * The token to retrieve the next set of results.
  339. */
  340. NextToken?: __string;
  341. }
  342. export interface ListDevicesRequest {
  343. /**
  344. * The type of the device, such as "button".
  345. */
  346. DeviceType?: __string;
  347. /**
  348. * The maximum number of results to return per request. If not set, a default value of
  349. 100 is used.
  350. */
  351. MaxResults?: MaxResults;
  352. /**
  353. * The token to retrieve the next set of results.
  354. */
  355. NextToken?: __string;
  356. }
  357. export interface ListDevicesResponse {
  358. /**
  359. * A list of devices.
  360. */
  361. Devices?: __listOfDeviceDescription;
  362. /**
  363. * The token to retrieve the next set of results.
  364. */
  365. NextToken?: __string;
  366. }
  367. export interface ListTagsForResourceRequest {
  368. /**
  369. * The ARN of the resource.
  370. */
  371. ResourceArn: __string;
  372. }
  373. export interface ListTagsForResourceResponse {
  374. /**
  375. * A collection of key/value pairs defining the resource tags. For example, {
  376. "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
  377. Tagging Strategies.
  378. */
  379. Tags?: __mapOf__string;
  380. }
  381. export type MaxResults = number;
  382. export interface TagResourceRequest {
  383. /**
  384. * The ARN of the resource.
  385. */
  386. ResourceArn: __string;
  387. /**
  388. * A collection of key/value pairs defining the resource tags. For example, {
  389. "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
  390. Tagging Strategies.
  391. */
  392. Tags: __mapOf__string;
  393. }
  394. export interface UnclaimDeviceRequest {
  395. /**
  396. * The unique identifier of the device.
  397. */
  398. DeviceId: __string;
  399. }
  400. export interface UnclaimDeviceResponse {
  401. /**
  402. * The device's final claim state.
  403. */
  404. State?: __string;
  405. }
  406. export interface UntagResourceRequest {
  407. /**
  408. * The ARN of the resource.
  409. */
  410. ResourceArn: __string;
  411. /**
  412. * A collections of tag keys. For example, {"key1","key2"}
  413. */
  414. TagKeys: __listOf__string;
  415. }
  416. export interface UpdateDeviceStateRequest {
  417. /**
  418. * The unique identifier of the device.
  419. */
  420. DeviceId: __string;
  421. /**
  422. * If true, the device is enabled. If false, the device is
  423. disabled.
  424. */
  425. Enabled?: __boolean;
  426. }
  427. export interface UpdateDeviceStateResponse {
  428. }
  429. export type __boolean = boolean;
  430. export type __doubleMin0Max100 = number;
  431. export type __integer = number;
  432. export type __listOfDeviceDescription = DeviceDescription[];
  433. export type __listOfDeviceEvent = DeviceEvent[];
  434. export type __listOfDeviceMethod = DeviceMethod[];
  435. export type __listOf__string = __string[];
  436. export type __mapOf__string = {[key: string]: __string};
  437. export type __string = string;
  438. export type __stringMin12Max40 = string;
  439. export type __timestampIso8601 = Date;
  440. /**
  441. * 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.
  442. */
  443. export type apiVersion = "2018-05-14"|"latest"|string;
  444. export interface ClientApiVersions {
  445. /**
  446. * 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.
  447. */
  448. apiVersion?: apiVersion;
  449. }
  450. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  451. /**
  452. * Contains interfaces for use with the IoT1ClickDevicesService client.
  453. */
  454. export import Types = IoT1ClickDevicesService;
  455. }
  456. export = IoT1ClickDevicesService;