UNPKG

20.3 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 IoT1ClickProjects extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: IoT1ClickProjects.Types.ClientConfiguration)
13 config: Config & IoT1ClickProjects.Types.ClientConfiguration;
14 /**
15 * Associates a physical device with a placement.
16 */
17 associateDeviceWithPlacement(params: IoT1ClickProjects.Types.AssociateDeviceWithPlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.AssociateDeviceWithPlacementResponse) => void): Request<IoT1ClickProjects.Types.AssociateDeviceWithPlacementResponse, AWSError>;
18 /**
19 * Associates a physical device with a placement.
20 */
21 associateDeviceWithPlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.AssociateDeviceWithPlacementResponse) => void): Request<IoT1ClickProjects.Types.AssociateDeviceWithPlacementResponse, AWSError>;
22 /**
23 * Creates an empty placement.
24 */
25 createPlacement(params: IoT1ClickProjects.Types.CreatePlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.CreatePlacementResponse) => void): Request<IoT1ClickProjects.Types.CreatePlacementResponse, AWSError>;
26 /**
27 * Creates an empty placement.
28 */
29 createPlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.CreatePlacementResponse) => void): Request<IoT1ClickProjects.Types.CreatePlacementResponse, AWSError>;
30 /**
31 * Creates an empty project with a placement template. A project contains zero or more placements that adhere to the placement template defined in the project.
32 */
33 createProject(params: IoT1ClickProjects.Types.CreateProjectRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.CreateProjectResponse) => void): Request<IoT1ClickProjects.Types.CreateProjectResponse, AWSError>;
34 /**
35 * Creates an empty project with a placement template. A project contains zero or more placements that adhere to the placement template defined in the project.
36 */
37 createProject(callback?: (err: AWSError, data: IoT1ClickProjects.Types.CreateProjectResponse) => void): Request<IoT1ClickProjects.Types.CreateProjectResponse, AWSError>;
38 /**
39 * Deletes a placement. To delete a placement, it must not have any devices associated with it. When you delete a placement, all associated data becomes irretrievable.
40 */
41 deletePlacement(params: IoT1ClickProjects.Types.DeletePlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.DeletePlacementResponse) => void): Request<IoT1ClickProjects.Types.DeletePlacementResponse, AWSError>;
42 /**
43 * Deletes a placement. To delete a placement, it must not have any devices associated with it. When you delete a placement, all associated data becomes irretrievable.
44 */
45 deletePlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.DeletePlacementResponse) => void): Request<IoT1ClickProjects.Types.DeletePlacementResponse, AWSError>;
46 /**
47 * Deletes a project. To delete a project, it must not have any placements associated with it. When you delete a project, all associated data becomes irretrievable.
48 */
49 deleteProject(params: IoT1ClickProjects.Types.DeleteProjectRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.DeleteProjectResponse) => void): Request<IoT1ClickProjects.Types.DeleteProjectResponse, AWSError>;
50 /**
51 * Deletes a project. To delete a project, it must not have any placements associated with it. When you delete a project, all associated data becomes irretrievable.
52 */
53 deleteProject(callback?: (err: AWSError, data: IoT1ClickProjects.Types.DeleteProjectResponse) => void): Request<IoT1ClickProjects.Types.DeleteProjectResponse, AWSError>;
54 /**
55 * Describes a placement in a project.
56 */
57 describePlacement(params: IoT1ClickProjects.Types.DescribePlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.DescribePlacementResponse) => void): Request<IoT1ClickProjects.Types.DescribePlacementResponse, AWSError>;
58 /**
59 * Describes a placement in a project.
60 */
61 describePlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.DescribePlacementResponse) => void): Request<IoT1ClickProjects.Types.DescribePlacementResponse, AWSError>;
62 /**
63 * Returns an object describing a project.
64 */
65 describeProject(params: IoT1ClickProjects.Types.DescribeProjectRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.DescribeProjectResponse) => void): Request<IoT1ClickProjects.Types.DescribeProjectResponse, AWSError>;
66 /**
67 * Returns an object describing a project.
68 */
69 describeProject(callback?: (err: AWSError, data: IoT1ClickProjects.Types.DescribeProjectResponse) => void): Request<IoT1ClickProjects.Types.DescribeProjectResponse, AWSError>;
70 /**
71 * Removes a physical device from a placement.
72 */
73 disassociateDeviceFromPlacement(params: IoT1ClickProjects.Types.DisassociateDeviceFromPlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.DisassociateDeviceFromPlacementResponse) => void): Request<IoT1ClickProjects.Types.DisassociateDeviceFromPlacementResponse, AWSError>;
74 /**
75 * Removes a physical device from a placement.
76 */
77 disassociateDeviceFromPlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.DisassociateDeviceFromPlacementResponse) => void): Request<IoT1ClickProjects.Types.DisassociateDeviceFromPlacementResponse, AWSError>;
78 /**
79 * Returns an object enumerating the devices in a placement.
80 */
81 getDevicesInPlacement(params: IoT1ClickProjects.Types.GetDevicesInPlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.GetDevicesInPlacementResponse) => void): Request<IoT1ClickProjects.Types.GetDevicesInPlacementResponse, AWSError>;
82 /**
83 * Returns an object enumerating the devices in a placement.
84 */
85 getDevicesInPlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.GetDevicesInPlacementResponse) => void): Request<IoT1ClickProjects.Types.GetDevicesInPlacementResponse, AWSError>;
86 /**
87 * Lists the placement(s) of a project.
88 */
89 listPlacements(params: IoT1ClickProjects.Types.ListPlacementsRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListPlacementsResponse) => void): Request<IoT1ClickProjects.Types.ListPlacementsResponse, AWSError>;
90 /**
91 * Lists the placement(s) of a project.
92 */
93 listPlacements(callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListPlacementsResponse) => void): Request<IoT1ClickProjects.Types.ListPlacementsResponse, AWSError>;
94 /**
95 * Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.
96 */
97 listProjects(params: IoT1ClickProjects.Types.ListProjectsRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListProjectsResponse) => void): Request<IoT1ClickProjects.Types.ListProjectsResponse, AWSError>;
98 /**
99 * Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.
100 */
101 listProjects(callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListProjectsResponse) => void): Request<IoT1ClickProjects.Types.ListProjectsResponse, AWSError>;
102 /**
103 * Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").
104 */
105 updatePlacement(params: IoT1ClickProjects.Types.UpdatePlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdatePlacementResponse) => void): Request<IoT1ClickProjects.Types.UpdatePlacementResponse, AWSError>;
106 /**
107 * Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").
108 */
109 updatePlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdatePlacementResponse) => void): Request<IoT1ClickProjects.Types.UpdatePlacementResponse, AWSError>;
110 /**
111 * Updates a project associated with your AWS account and region. With the exception of device template names, you can pass just the values that need to be updated because the update request will change only the values that are provided. To clear a value, pass the empty string (i.e., "").
112 */
113 updateProject(params: IoT1ClickProjects.Types.UpdateProjectRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdateProjectResponse) => void): Request<IoT1ClickProjects.Types.UpdateProjectResponse, AWSError>;
114 /**
115 * Updates a project associated with your AWS account and region. With the exception of device template names, you can pass just the values that need to be updated because the update request will change only the values that are provided. To clear a value, pass the empty string (i.e., "").
116 */
117 updateProject(callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdateProjectResponse) => void): Request<IoT1ClickProjects.Types.UpdateProjectResponse, AWSError>;
118}
119declare namespace IoT1ClickProjects {
120 export interface AssociateDeviceWithPlacementRequest {
121 /**
122 * The name of the project containing the placement in which to associate the device.
123 */
124 projectName: ProjectName;
125 /**
126 * The name of the placement in which to associate the device.
127 */
128 placementName: PlacementName;
129 /**
130 * The ID of the physical device to be associated with the given placement in the project. Note that a mandatory 4 character prefix is required for all deviceId values.
131 */
132 deviceId: DeviceId;
133 /**
134 * The device template name to associate with the device ID.
135 */
136 deviceTemplateName: DeviceTemplateName;
137 }
138 export interface AssociateDeviceWithPlacementResponse {
139 }
140 export type AttributeDefaultValue = string;
141 export type AttributeName = string;
142 export type AttributeValue = string;
143 export interface CreatePlacementRequest {
144 /**
145 * The name of the placement to be created.
146 */
147 placementName: PlacementName;
148 /**
149 * The name of the project in which to create the placement.
150 */
151 projectName: ProjectName;
152 /**
153 * Optional user-defined key/value pairs providing contextual data (such as location or function) for the placement.
154 */
155 attributes?: PlacementAttributeMap;
156 }
157 export interface CreatePlacementResponse {
158 }
159 export interface CreateProjectRequest {
160 /**
161 * The name of the project to create.
162 */
163 projectName: ProjectName;
164 /**
165 * An optional description for the project.
166 */
167 description?: Description;
168 /**
169 * The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update callbackOverrides for the device templates using the UpdateProject API.
170 */
171 placementTemplate?: PlacementTemplate;
172 }
173 export interface CreateProjectResponse {
174 }
175 export type DefaultPlacementAttributeMap = {[key: string]: AttributeDefaultValue};
176 export interface DeletePlacementRequest {
177 /**
178 * The name of the empty placement to delete.
179 */
180 placementName: PlacementName;
181 /**
182 * The project containing the empty placement to delete.
183 */
184 projectName: ProjectName;
185 }
186 export interface DeletePlacementResponse {
187 }
188 export interface DeleteProjectRequest {
189 /**
190 * The name of the empty project to delete.
191 */
192 projectName: ProjectName;
193 }
194 export interface DeleteProjectResponse {
195 }
196 export interface DescribePlacementRequest {
197 /**
198 * The name of the placement within a project.
199 */
200 placementName: PlacementName;
201 /**
202 * The project containing the placement to be described.
203 */
204 projectName: ProjectName;
205 }
206 export interface DescribePlacementResponse {
207 /**
208 * An object describing the placement.
209 */
210 placement: PlacementDescription;
211 }
212 export interface DescribeProjectRequest {
213 /**
214 * The name of the project to be described.
215 */
216 projectName: ProjectName;
217 }
218 export interface DescribeProjectResponse {
219 /**
220 * An object describing the project.
221 */
222 project: ProjectDescription;
223 }
224 export type Description = string;
225 export type DeviceCallbackKey = string;
226 export type DeviceCallbackOverrideMap = {[key: string]: DeviceCallbackValue};
227 export type DeviceCallbackValue = string;
228 export type DeviceId = string;
229 export type DeviceMap = {[key: string]: DeviceId};
230 export interface DeviceTemplate {
231 /**
232 * The device type, which currently must be "button".
233 */
234 deviceType?: DeviceType;
235 /**
236 * An optional Lambda function to invoke instead of the default Lambda function provided by the placement template.
237 */
238 callbackOverrides?: DeviceCallbackOverrideMap;
239 }
240 export type DeviceTemplateMap = {[key: string]: DeviceTemplate};
241 export type DeviceTemplateName = string;
242 export type DeviceType = string;
243 export interface DisassociateDeviceFromPlacementRequest {
244 /**
245 * The name of the project that contains the placement.
246 */
247 projectName: ProjectName;
248 /**
249 * The name of the placement that the device should be removed from.
250 */
251 placementName: PlacementName;
252 /**
253 * The device ID that should be removed from the placement.
254 */
255 deviceTemplateName: DeviceTemplateName;
256 }
257 export interface DisassociateDeviceFromPlacementResponse {
258 }
259 export interface GetDevicesInPlacementRequest {
260 /**
261 * The name of the project containing the placement.
262 */
263 projectName: ProjectName;
264 /**
265 * The name of the placement to get the devices from.
266 */
267 placementName: PlacementName;
268 }
269 export interface GetDevicesInPlacementResponse {
270 /**
271 * An object containing the devices (zero or more) within the placement.
272 */
273 devices: DeviceMap;
274 }
275 export interface ListPlacementsRequest {
276 /**
277 * The project containing the placements to be listed.
278 */
279 projectName: ProjectName;
280 /**
281 * The token to retrieve the next set of results.
282 */
283 nextToken?: NextToken;
284 /**
285 * The maximum number of results to return per request. If not set, a default value of 100 is used.
286 */
287 maxResults?: MaxResults;
288 }
289 export interface ListPlacementsResponse {
290 /**
291 * An object listing the requested placements.
292 */
293 placements: PlacementSummaryList;
294 /**
295 * The token used to retrieve the next set of results - will be effectively empty if there are no further results.
296 */
297 nextToken?: NextToken;
298 }
299 export interface ListProjectsRequest {
300 /**
301 * The token to retrieve the next set of results.
302 */
303 nextToken?: NextToken;
304 /**
305 * The maximum number of results to return per request. If not set, a default value of 100 is used.
306 */
307 maxResults?: MaxResults;
308 }
309 export interface ListProjectsResponse {
310 /**
311 * An object containing the list of projects.
312 */
313 projects: ProjectSummaryList;
314 /**
315 * The token used to retrieve the next set of results - will be effectively empty if there are no further results.
316 */
317 nextToken?: NextToken;
318 }
319 export type MaxResults = number;
320 export type NextToken = string;
321 export type PlacementAttributeMap = {[key: string]: AttributeValue};
322 export interface PlacementDescription {
323 /**
324 * The name of the project containing the placement.
325 */
326 projectName: ProjectName;
327 /**
328 * The name of the placement.
329 */
330 placementName: PlacementName;
331 /**
332 * The user-defined attributes associated with the placement.
333 */
334 attributes: PlacementAttributeMap;
335 /**
336 * The date when the placement was initially created, in UNIX epoch time format.
337 */
338 createdDate: Time;
339 /**
340 * The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same.
341 */
342 updatedDate: Time;
343 }
344 export type PlacementName = string;
345 export interface PlacementSummary {
346 /**
347 * The name of the project containing the placement.
348 */
349 projectName: ProjectName;
350 /**
351 * The name of the placement being summarized.
352 */
353 placementName: PlacementName;
354 /**
355 * The date when the placement was originally created, in UNIX epoch time format.
356 */
357 createdDate: Time;
358 /**
359 * The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same.
360 */
361 updatedDate: Time;
362 }
363 export type PlacementSummaryList = PlacementSummary[];
364 export interface PlacementTemplate {
365 /**
366 * The default attributes (key/value pairs) to be applied to all placements using this template.
367 */
368 defaultAttributes?: DefaultPlacementAttributeMap;
369 /**
370 * An object specifying the DeviceTemplate for all placements using this (PlacementTemplate) template.
371 */
372 deviceTemplates?: DeviceTemplateMap;
373 }
374 export interface ProjectDescription {
375 /**
376 * The name of the project for which to obtain information from.
377 */
378 projectName: ProjectName;
379 /**
380 * The description of the project.
381 */
382 description?: Description;
383 /**
384 * The date when the project was originally created, in UNIX epoch time format.
385 */
386 createdDate: Time;
387 /**
388 * The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same.
389 */
390 updatedDate: Time;
391 /**
392 * An object describing the project's placement specifications.
393 */
394 placementTemplate?: PlacementTemplate;
395 }
396 export type ProjectName = string;
397 export interface ProjectSummary {
398 /**
399 * The name of the project being summarized.
400 */
401 projectName: ProjectName;
402 /**
403 * The date when the project was originally created, in UNIX epoch time format.
404 */
405 createdDate: Time;
406 /**
407 * The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same.
408 */
409 updatedDate: Time;
410 }
411 export type ProjectSummaryList = ProjectSummary[];
412 export type Time = Date;
413 export interface UpdatePlacementRequest {
414 /**
415 * The name of the placement to update.
416 */
417 placementName: PlacementName;
418 /**
419 * The name of the project containing the placement to be updated.
420 */
421 projectName: ProjectName;
422 /**
423 * The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.
424 */
425 attributes?: PlacementAttributeMap;
426 }
427 export interface UpdatePlacementResponse {
428 }
429 export interface UpdateProjectRequest {
430 /**
431 * The name of the project to be updated.
432 */
433 projectName: ProjectName;
434 /**
435 * An optional user-defined description for the project.
436 */
437 description?: Description;
438 /**
439 * An object defining the project update. Once a project has been created, you cannot add device template names to the project. However, for a given placementTemplate, you can update the associated callbackOverrides for the device definition using this API.
440 */
441 placementTemplate?: PlacementTemplate;
442 }
443 export interface UpdateProjectResponse {
444 }
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 export type apiVersion = "2018-05-14"|"latest"|string;
449 export interface ClientApiVersions {
450 /**
451 * 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.
452 */
453 apiVersion?: apiVersion;
454 }
455 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
456 /**
457 * Contains interfaces for use with the IoT1ClickProjects client.
458 */
459 export import Types = IoT1ClickProjects;
460}
461export = IoT1ClickProjects;