UNPKG

24 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 * Lists the tags (metadata key/value pairs) which you have assigned to the resource.
104 */
105 listTagsForResource(params: IoT1ClickProjects.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickProjects.Types.ListTagsForResourceResponse, AWSError>;
106 /**
107 * Lists the tags (metadata key/value pairs) which you have assigned to the resource.
108 */
109 listTagsForResource(callback?: (err: AWSError, data: IoT1ClickProjects.Types.ListTagsForResourceResponse) => void): Request<IoT1ClickProjects.Types.ListTagsForResourceResponse, AWSError>;
110 /**
111 * Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be used to manage a resource. For more information, see AWS Tagging Strategies.
112 */
113 tagResource(params: IoT1ClickProjects.Types.TagResourceRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.TagResourceResponse) => void): Request<IoT1ClickProjects.Types.TagResourceResponse, AWSError>;
114 /**
115 * Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be used to manage a resource. For more information, see AWS Tagging Strategies.
116 */
117 tagResource(callback?: (err: AWSError, data: IoT1ClickProjects.Types.TagResourceResponse) => void): Request<IoT1ClickProjects.Types.TagResourceResponse, AWSError>;
118 /**
119 * Removes one or more tags (metadata key/value pairs) from a resource.
120 */
121 untagResource(params: IoT1ClickProjects.Types.UntagResourceRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.UntagResourceResponse) => void): Request<IoT1ClickProjects.Types.UntagResourceResponse, AWSError>;
122 /**
123 * Removes one or more tags (metadata key/value pairs) from a resource.
124 */
125 untagResource(callback?: (err: AWSError, data: IoT1ClickProjects.Types.UntagResourceResponse) => void): Request<IoT1ClickProjects.Types.UntagResourceResponse, AWSError>;
126 /**
127 * Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").
128 */
129 updatePlacement(params: IoT1ClickProjects.Types.UpdatePlacementRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdatePlacementResponse) => void): Request<IoT1ClickProjects.Types.UpdatePlacementResponse, AWSError>;
130 /**
131 * Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").
132 */
133 updatePlacement(callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdatePlacementResponse) => void): Request<IoT1ClickProjects.Types.UpdatePlacementResponse, AWSError>;
134 /**
135 * 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., "").
136 */
137 updateProject(params: IoT1ClickProjects.Types.UpdateProjectRequest, callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdateProjectResponse) => void): Request<IoT1ClickProjects.Types.UpdateProjectResponse, AWSError>;
138 /**
139 * 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., "").
140 */
141 updateProject(callback?: (err: AWSError, data: IoT1ClickProjects.Types.UpdateProjectResponse) => void): Request<IoT1ClickProjects.Types.UpdateProjectResponse, AWSError>;
142}
143declare namespace IoT1ClickProjects {
144 export interface AssociateDeviceWithPlacementRequest {
145 /**
146 * The name of the project containing the placement in which to associate the device.
147 */
148 projectName: ProjectName;
149 /**
150 * The name of the placement in which to associate the device.
151 */
152 placementName: PlacementName;
153 /**
154 * 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.
155 */
156 deviceId: DeviceId;
157 /**
158 * The device template name to associate with the device ID.
159 */
160 deviceTemplateName: DeviceTemplateName;
161 }
162 export interface AssociateDeviceWithPlacementResponse {
163 }
164 export type AttributeDefaultValue = string;
165 export type AttributeName = string;
166 export type AttributeValue = string;
167 export interface CreatePlacementRequest {
168 /**
169 * The name of the placement to be created.
170 */
171 placementName: PlacementName;
172 /**
173 * The name of the project in which to create the placement.
174 */
175 projectName: ProjectName;
176 /**
177 * Optional user-defined key/value pairs providing contextual data (such as location or function) for the placement.
178 */
179 attributes?: PlacementAttributeMap;
180 }
181 export interface CreatePlacementResponse {
182 }
183 export interface CreateProjectRequest {
184 /**
185 * The name of the project to create.
186 */
187 projectName: ProjectName;
188 /**
189 * An optional description for the project.
190 */
191 description?: Description;
192 /**
193 * 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.
194 */
195 placementTemplate?: PlacementTemplate;
196 /**
197 * Optional tags (metadata key/value pairs) to be associated with the project. For example, { {"key1": "value1", "key2": "value2"} }. For more information, see AWS Tagging Strategies.
198 */
199 tags?: TagMap;
200 }
201 export interface CreateProjectResponse {
202 }
203 export type DefaultPlacementAttributeMap = {[key: string]: AttributeDefaultValue};
204 export interface DeletePlacementRequest {
205 /**
206 * The name of the empty placement to delete.
207 */
208 placementName: PlacementName;
209 /**
210 * The project containing the empty placement to delete.
211 */
212 projectName: ProjectName;
213 }
214 export interface DeletePlacementResponse {
215 }
216 export interface DeleteProjectRequest {
217 /**
218 * The name of the empty project to delete.
219 */
220 projectName: ProjectName;
221 }
222 export interface DeleteProjectResponse {
223 }
224 export interface DescribePlacementRequest {
225 /**
226 * The name of the placement within a project.
227 */
228 placementName: PlacementName;
229 /**
230 * The project containing the placement to be described.
231 */
232 projectName: ProjectName;
233 }
234 export interface DescribePlacementResponse {
235 /**
236 * An object describing the placement.
237 */
238 placement: PlacementDescription;
239 }
240 export interface DescribeProjectRequest {
241 /**
242 * The name of the project to be described.
243 */
244 projectName: ProjectName;
245 }
246 export interface DescribeProjectResponse {
247 /**
248 * An object describing the project.
249 */
250 project: ProjectDescription;
251 }
252 export type Description = string;
253 export type DeviceCallbackKey = string;
254 export type DeviceCallbackOverrideMap = {[key: string]: DeviceCallbackValue};
255 export type DeviceCallbackValue = string;
256 export type DeviceId = string;
257 export type DeviceMap = {[key: string]: DeviceId};
258 export interface DeviceTemplate {
259 /**
260 * The device type, which currently must be "button".
261 */
262 deviceType?: DeviceType;
263 /**
264 * An optional Lambda function to invoke instead of the default Lambda function provided by the placement template.
265 */
266 callbackOverrides?: DeviceCallbackOverrideMap;
267 }
268 export type DeviceTemplateMap = {[key: string]: DeviceTemplate};
269 export type DeviceTemplateName = string;
270 export type DeviceType = string;
271 export interface DisassociateDeviceFromPlacementRequest {
272 /**
273 * The name of the project that contains the placement.
274 */
275 projectName: ProjectName;
276 /**
277 * The name of the placement that the device should be removed from.
278 */
279 placementName: PlacementName;
280 /**
281 * The device ID that should be removed from the placement.
282 */
283 deviceTemplateName: DeviceTemplateName;
284 }
285 export interface DisassociateDeviceFromPlacementResponse {
286 }
287 export interface GetDevicesInPlacementRequest {
288 /**
289 * The name of the project containing the placement.
290 */
291 projectName: ProjectName;
292 /**
293 * The name of the placement to get the devices from.
294 */
295 placementName: PlacementName;
296 }
297 export interface GetDevicesInPlacementResponse {
298 /**
299 * An object containing the devices (zero or more) within the placement.
300 */
301 devices: DeviceMap;
302 }
303 export interface ListPlacementsRequest {
304 /**
305 * The project containing the placements to be listed.
306 */
307 projectName: ProjectName;
308 /**
309 * The token to retrieve the next set of results.
310 */
311 nextToken?: NextToken;
312 /**
313 * The maximum number of results to return per request. If not set, a default value of 100 is used.
314 */
315 maxResults?: MaxResults;
316 }
317 export interface ListPlacementsResponse {
318 /**
319 * An object listing the requested placements.
320 */
321 placements: PlacementSummaryList;
322 /**
323 * The token used to retrieve the next set of results - will be effectively empty if there are no further results.
324 */
325 nextToken?: NextToken;
326 }
327 export interface ListProjectsRequest {
328 /**
329 * The token to retrieve the next set of results.
330 */
331 nextToken?: NextToken;
332 /**
333 * The maximum number of results to return per request. If not set, a default value of 100 is used.
334 */
335 maxResults?: MaxResults;
336 }
337 export interface ListProjectsResponse {
338 /**
339 * An object containing the list of projects.
340 */
341 projects: ProjectSummaryList;
342 /**
343 * The token used to retrieve the next set of results - will be effectively empty if there are no further results.
344 */
345 nextToken?: NextToken;
346 }
347 export interface ListTagsForResourceRequest {
348 /**
349 * The ARN of the resource whose tags you want to list.
350 */
351 resourceArn: ProjectArn;
352 }
353 export interface ListTagsForResourceResponse {
354 /**
355 * The tags (metadata key/value pairs) which you have assigned to the resource.
356 */
357 tags?: TagMap;
358 }
359 export type MaxResults = number;
360 export type NextToken = string;
361 export type PlacementAttributeMap = {[key: string]: AttributeValue};
362 export interface PlacementDescription {
363 /**
364 * The name of the project containing the placement.
365 */
366 projectName: ProjectName;
367 /**
368 * The name of the placement.
369 */
370 placementName: PlacementName;
371 /**
372 * The user-defined attributes associated with the placement.
373 */
374 attributes: PlacementAttributeMap;
375 /**
376 * The date when the placement was initially created, in UNIX epoch time format.
377 */
378 createdDate: Time;
379 /**
380 * 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.
381 */
382 updatedDate: Time;
383 }
384 export type PlacementName = string;
385 export interface PlacementSummary {
386 /**
387 * The name of the project containing the placement.
388 */
389 projectName: ProjectName;
390 /**
391 * The name of the placement being summarized.
392 */
393 placementName: PlacementName;
394 /**
395 * The date when the placement was originally created, in UNIX epoch time format.
396 */
397 createdDate: Time;
398 /**
399 * 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.
400 */
401 updatedDate: Time;
402 }
403 export type PlacementSummaryList = PlacementSummary[];
404 export interface PlacementTemplate {
405 /**
406 * The default attributes (key/value pairs) to be applied to all placements using this template.
407 */
408 defaultAttributes?: DefaultPlacementAttributeMap;
409 /**
410 * An object specifying the DeviceTemplate for all placements using this (PlacementTemplate) template.
411 */
412 deviceTemplates?: DeviceTemplateMap;
413 }
414 export type ProjectArn = string;
415 export interface ProjectDescription {
416 /**
417 * The ARN of the project.
418 */
419 arn?: ProjectArn;
420 /**
421 * The name of the project for which to obtain information from.
422 */
423 projectName: ProjectName;
424 /**
425 * The description of the project.
426 */
427 description?: Description;
428 /**
429 * The date when the project was originally created, in UNIX epoch time format.
430 */
431 createdDate: Time;
432 /**
433 * 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.
434 */
435 updatedDate: Time;
436 /**
437 * An object describing the project's placement specifications.
438 */
439 placementTemplate?: PlacementTemplate;
440 /**
441 * The tags (metadata key/value pairs) associated with the project.
442 */
443 tags?: TagMap;
444 }
445 export type ProjectName = string;
446 export interface ProjectSummary {
447 /**
448 * The ARN of the project.
449 */
450 arn?: ProjectArn;
451 /**
452 * The name of the project being summarized.
453 */
454 projectName: ProjectName;
455 /**
456 * The date when the project was originally created, in UNIX epoch time format.
457 */
458 createdDate: Time;
459 /**
460 * 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.
461 */
462 updatedDate: Time;
463 /**
464 * The tags (metadata key/value pairs) associated with the project.
465 */
466 tags?: TagMap;
467 }
468 export type ProjectSummaryList = ProjectSummary[];
469 export type TagKey = string;
470 export type TagKeyList = TagKey[];
471 export type TagMap = {[key: string]: TagValue};
472 export interface TagResourceRequest {
473 /**
474 * The ARN of the resouce for which tag(s) should be added or modified.
475 */
476 resourceArn: ProjectArn;
477 /**
478 * The new or modifying tag(s) for the resource. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per resource.
479 */
480 tags: TagMap;
481 }
482 export interface TagResourceResponse {
483 }
484 export type TagValue = string;
485 export type Time = Date;
486 export interface UntagResourceRequest {
487 /**
488 * The ARN of the resource whose tag you want to remove.
489 */
490 resourceArn: ProjectArn;
491 /**
492 * The keys of those tags which you want to remove.
493 */
494 tagKeys: TagKeyList;
495 }
496 export interface UntagResourceResponse {
497 }
498 export interface UpdatePlacementRequest {
499 /**
500 * The name of the placement to update.
501 */
502 placementName: PlacementName;
503 /**
504 * The name of the project containing the placement to be updated.
505 */
506 projectName: ProjectName;
507 /**
508 * The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.
509 */
510 attributes?: PlacementAttributeMap;
511 }
512 export interface UpdatePlacementResponse {
513 }
514 export interface UpdateProjectRequest {
515 /**
516 * The name of the project to be updated.
517 */
518 projectName: ProjectName;
519 /**
520 * An optional user-defined description for the project.
521 */
522 description?: Description;
523 /**
524 * 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.
525 */
526 placementTemplate?: PlacementTemplate;
527 }
528 export interface UpdateProjectResponse {
529 }
530 /**
531 * 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.
532 */
533 export type apiVersion = "2018-05-14"|"latest"|string;
534 export interface ClientApiVersions {
535 /**
536 * 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.
537 */
538 apiVersion?: apiVersion;
539 }
540 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
541 /**
542 * Contains interfaces for use with the IoT1ClickProjects client.
543 */
544 export import Types = IoT1ClickProjects;
545}
546export = IoT1ClickProjects;