Skip to content

Commit dc1adcf

Browse files
author
awstools
committed
feat(client-iot): This release adds the Amazon Location action to IoT Rules Engine.
1 parent c97217f commit dc1adcf

File tree

8 files changed

+2118
-1534
lines changed

8 files changed

+2118
-1534
lines changed

clients/client-iot/src/commands/DeleteRegistrationCodeCommand.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ import {
1414
} from "@aws-sdk/types";
1515

1616
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
17-
import {
18-
DeleteRegistrationCodeRequest,
19-
DeleteRegistrationCodeRequestFilterSensitiveLog,
20-
DeleteRegistrationCodeResponse,
21-
DeleteRegistrationCodeResponseFilterSensitiveLog,
22-
} from "../models/models_0";
17+
import { DeleteRegistrationCodeRequest, DeleteRegistrationCodeRequestFilterSensitiveLog } from "../models/models_0";
18+
import { DeleteRegistrationCodeResponse, DeleteRegistrationCodeResponseFilterSensitiveLog } from "../models/models_1";
2319
import {
2420
deserializeAws_restJson1DeleteRegistrationCodeCommand,
2521
serializeAws_restJson1DeleteRegistrationCodeCommand,

clients/client-iot/src/commands/DeleteRoleAliasCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ import {
1414
} from "@aws-sdk/types";
1515

1616
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
17-
import { DeleteRoleAliasRequest, DeleteRoleAliasRequestFilterSensitiveLog } from "../models/models_0";
18-
import { DeleteRoleAliasResponse, DeleteRoleAliasResponseFilterSensitiveLog } from "../models/models_1";
17+
import {
18+
DeleteRoleAliasRequest,
19+
DeleteRoleAliasRequestFilterSensitiveLog,
20+
DeleteRoleAliasResponse,
21+
DeleteRoleAliasResponseFilterSensitiveLog,
22+
} from "../models/models_1";
1923
import {
2024
deserializeAws_restJson1DeleteRoleAliasCommand,
2125
serializeAws_restJson1DeleteRoleAliasCommand,

clients/client-iot/src/commands/ListThingGroupsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
ListThingGroupsRequestFilterSensitiveLog,
2020
ListThingGroupsResponse,
2121
ListThingGroupsResponseFilterSensitiveLog,
22-
} from "../models/models_1";
22+
} from "../models/models_2";
2323
import {
2424
deserializeAws_restJson1ListThingGroupsCommand,
2525
serializeAws_restJson1ListThingGroupsCommand,

clients/client-iot/src/models/models_0.ts

Lines changed: 82 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,65 @@ export interface LambdaAction {
848848
functionArn: string | undefined;
849849
}
850850

851+
/**
852+
* <p>Describes how to interpret an application-defined timestamp value from an MQTT message
853+
* payload and the precision of that value.</p>
854+
*/
855+
export interface LocationTimestamp {
856+
/**
857+
* <p>An expression that returns a long epoch time value.</p>
858+
*/
859+
value: string | undefined;
860+
861+
/**
862+
* <p>The precision of the timestamp value that results from the expression
863+
* described in <code>value</code>.</p>
864+
* <p>Valid values: <code>SECONDS</code> | <code>MILLISECONDS</code> |
865+
* <code>MICROSECONDS</code> | <code>NANOSECONDS</code>. The default is
866+
* <code>MILLISECONDS</code>.</p>
867+
*/
868+
unit?: string;
869+
}
870+
871+
/**
872+
* <p>The Amazon Location rule action sends device location updates from
873+
* an MQTT message to an Amazon Location tracker resource.</p>
874+
*/
875+
export interface LocationAction {
876+
/**
877+
* <p>The IAM role that grants permission to write to the Amazon Location resource.</p>
878+
*/
879+
roleArn: string | undefined;
880+
881+
/**
882+
* <p>The name of the tracker resource in Amazon Location in which the location is updated.</p>
883+
*/
884+
trackerName: string | undefined;
885+
886+
/**
887+
* <p>The unique ID of the device providing the location data.</p>
888+
*/
889+
deviceId: string | undefined;
890+
891+
/**
892+
* <p>The time that the location data was sampled. The default value is
893+
* the time the MQTT message was processed.</p>
894+
*/
895+
timestamp?: LocationTimestamp;
896+
897+
/**
898+
* <p>A string that evaluates to a double value that represents the
899+
* latitude of the device's location.</p>
900+
*/
901+
latitude: string | undefined;
902+
903+
/**
904+
* <p>A string that evaluates to a double value that represents the
905+
* longitude of the device's location.</p>
906+
*/
907+
longitude: string | undefined;
908+
}
909+
851910
/**
852911
* <p>Describes an action that writes data to an Amazon OpenSearch Service
853912
* domain.</p>
@@ -1232,6 +1291,12 @@ export interface Action {
12321291
* <p>Write data to an Amazon OpenSearch Service domain.</p>
12331292
*/
12341293
openSearch?: OpenSearchAction;
1294+
1295+
/**
1296+
* <p>The Amazon Location Service rule action sends device location updates from
1297+
* an MQTT message to an Amazon Location tracker resource.</p>
1298+
*/
1299+
location?: LocationAction;
12351300
}
12361301

12371302
export enum ActionType {
@@ -4670,7 +4735,9 @@ export interface CreateProvisioningTemplateRequest {
46704735
provisioningRoleArn: string | undefined;
46714736

46724737
/**
4673-
* <p>Creates a pre-provisioning hook template.</p>
4738+
* <p>Creates a pre-provisioning hook template. Only supports template of type
4739+
* <code>FLEET_PROVISIONING</code>. For more information about provisioning template types,
4740+
* see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
46744741
*/
46754742
preProvisioningHook?: ProvisioningHook;
46764743

@@ -5745,18 +5812,6 @@ export interface DeleteProvisioningTemplateVersionResponse {}
57455812
*/
57465813
export interface DeleteRegistrationCodeRequest {}
57475814

5748-
/**
5749-
* <p>The output for the DeleteRegistrationCode operation.</p>
5750-
*/
5751-
export interface DeleteRegistrationCodeResponse {}
5752-
5753-
export interface DeleteRoleAliasRequest {
5754-
/**
5755-
* <p>The role alias to delete.</p>
5756-
*/
5757-
roleAlias: string | undefined;
5758-
}
5759-
57605815
/**
57615816
* @internal
57625817
*/
@@ -5940,6 +5995,20 @@ export const LambdaActionFilterSensitiveLog = (obj: LambdaAction): any => ({
59405995
...obj,
59415996
});
59425997

5998+
/**
5999+
* @internal
6000+
*/
6001+
export const LocationTimestampFilterSensitiveLog = (obj: LocationTimestamp): any => ({
6002+
...obj,
6003+
});
6004+
6005+
/**
6006+
* @internal
6007+
*/
6008+
export const LocationActionFilterSensitiveLog = (obj: LocationAction): any => ({
6009+
...obj,
6010+
});
6011+
59436012
/**
59446013
* @internal
59456014
*/
@@ -7429,17 +7498,3 @@ export const DeleteProvisioningTemplateVersionResponseFilterSensitiveLog = (
74297498
export const DeleteRegistrationCodeRequestFilterSensitiveLog = (obj: DeleteRegistrationCodeRequest): any => ({
74307499
...obj,
74317500
});
7432-
7433-
/**
7434-
* @internal
7435-
*/
7436-
export const DeleteRegistrationCodeResponseFilterSensitiveLog = (obj: DeleteRegistrationCodeResponse): any => ({
7437-
...obj,
7438-
});
7439-
7440-
/**
7441-
* @internal
7442-
*/
7443-
export const DeleteRoleAliasRequestFilterSensitiveLog = (obj: DeleteRoleAliasRequest): any => ({
7444-
...obj,
7445-
});

clients/client-iot/src/models/models_1.ts

Lines changed: 26 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ import {
6262
VerificationState,
6363
} from "./models_0";
6464

65+
/**
66+
* <p>The output for the DeleteRegistrationCode operation.</p>
67+
*/
68+
export interface DeleteRegistrationCodeResponse {}
69+
70+
export interface DeleteRoleAliasRequest {
71+
/**
72+
* <p>The role alias to delete.</p>
73+
*/
74+
roleAlias: string | undefined;
75+
}
76+
6577
export interface DeleteRoleAliasResponse {}
6678

6779
export interface DeleteScheduledAuditRequest {
@@ -2718,7 +2730,7 @@ export interface GetBehaviorModelTrainingSummariesRequest {
27182730

27192731
/**
27202732
* <p>
2721-
* The maximum number of results to return at one time. The default is 25.
2733+
* The maximum number of results to return at one time. The default is 10.
27222734
* </p>
27232735
*/
27242736
maxResults?: number;
@@ -5561,7 +5573,7 @@ export interface ListProvisioningTemplateVersionsRequest {
55615573
*/
55625574
export interface ProvisioningTemplateVersionSummary {
55635575
/**
5564-
* <p>The ID of the fleet privisioning template version.</p>
5576+
* <p>The ID of the fleet provisioning template version.</p>
55655577
*/
55665578
versionId?: number;
55675579

@@ -5930,46 +5942,19 @@ export interface ListTargetsForSecurityProfileResponse {
59305942
nextToken?: string;
59315943
}
59325944

5933-
export interface ListThingGroupsRequest {
5934-
/**
5935-
* <p>To retrieve the next set of results, the <code>nextToken</code>
5936-
* value from a previous response; otherwise <b>null</b> to receive
5937-
* the first set of results.</p>
5938-
*/
5939-
nextToken?: string;
5940-
5941-
/**
5942-
* <p>The maximum number of results to return at one time.</p>
5943-
*/
5944-
maxResults?: number;
5945-
5946-
/**
5947-
* <p>A filter that limits the results to those with the specified parent group.</p>
5948-
*/
5949-
parentGroup?: string;
5950-
5951-
/**
5952-
* <p>A filter that limits the results to those with the specified name prefix.</p>
5953-
*/
5954-
namePrefixFilter?: string;
5955-
5956-
/**
5957-
* <p>If true, return child groups as well.</p>
5958-
*/
5959-
recursive?: boolean;
5960-
}
5961-
5962-
export interface ListThingGroupsResponse {
5963-
/**
5964-
* <p>The thing groups.</p>
5965-
*/
5966-
thingGroups?: GroupNameAndArn[];
5945+
/**
5946+
* @internal
5947+
*/
5948+
export const DeleteRegistrationCodeResponseFilterSensitiveLog = (obj: DeleteRegistrationCodeResponse): any => ({
5949+
...obj,
5950+
});
59675951

5968-
/**
5969-
* <p>The token to use to get the next set of results. Will not be returned if operation has returned all results.</p>
5970-
*/
5971-
nextToken?: string;
5972-
}
5952+
/**
5953+
* @internal
5954+
*/
5955+
export const DeleteRoleAliasRequestFilterSensitiveLog = (obj: DeleteRoleAliasRequest): any => ({
5956+
...obj,
5957+
});
59735958

59745959
/**
59755960
* @internal
@@ -7936,17 +7921,3 @@ export const ListTargetsForSecurityProfileResponseFilterSensitiveLog = (
79367921
): any => ({
79377922
...obj,
79387923
});
7939-
7940-
/**
7941-
* @internal
7942-
*/
7943-
export const ListThingGroupsRequestFilterSensitiveLog = (obj: ListThingGroupsRequest): any => ({
7944-
...obj,
7945-
});
7946-
7947-
/**
7948-
* @internal
7949-
*/
7950-
export const ListThingGroupsResponseFilterSensitiveLog = (obj: ListThingGroupsResponse): any => ({
7951-
...obj,
7952-
});

clients/client-iot/src/models/models_2.ts

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,47 @@ import {
5959
ViolationEventOccurrenceRange,
6060
} from "./models_1";
6161

62+
export interface ListThingGroupsRequest {
63+
/**
64+
* <p>To retrieve the next set of results, the <code>nextToken</code>
65+
* value from a previous response; otherwise <b>null</b> to receive
66+
* the first set of results.</p>
67+
*/
68+
nextToken?: string;
69+
70+
/**
71+
* <p>The maximum number of results to return at one time.</p>
72+
*/
73+
maxResults?: number;
74+
75+
/**
76+
* <p>A filter that limits the results to those with the specified parent group.</p>
77+
*/
78+
parentGroup?: string;
79+
80+
/**
81+
* <p>A filter that limits the results to those with the specified name prefix.</p>
82+
*/
83+
namePrefixFilter?: string;
84+
85+
/**
86+
* <p>If true, return child groups as well.</p>
87+
*/
88+
recursive?: boolean;
89+
}
90+
91+
export interface ListThingGroupsResponse {
92+
/**
93+
* <p>The thing groups.</p>
94+
*/
95+
thingGroups?: GroupNameAndArn[];
96+
97+
/**
98+
* <p>The token to use to get the next set of results. Will not be returned if operation has returned all results.</p>
99+
*/
100+
nextToken?: string;
101+
}
102+
62103
export interface ListThingGroupsForThingRequest {
63104
/**
64105
* <p>The thing name.</p>
@@ -2379,7 +2420,9 @@ export interface UpdateProvisioningTemplateRequest {
23792420
provisioningRoleArn?: string;
23802421

23812422
/**
2382-
* <p>Updates the pre-provisioning hook template.</p>
2423+
* <p>Updates the pre-provisioning hook template. Only supports template of type
2424+
* <code>FLEET_PROVISIONING</code>. For more information about provisioning template types,
2425+
* see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type">type</a>.</p>
23832426
*/
23842427
preProvisioningHook?: ProvisioningHook;
23852428

@@ -2820,6 +2863,20 @@ export interface ValidateSecurityProfileBehaviorsResponse {
28202863
validationErrors?: ValidationError[];
28212864
}
28222865

2866+
/**
2867+
* @internal
2868+
*/
2869+
export const ListThingGroupsRequestFilterSensitiveLog = (obj: ListThingGroupsRequest): any => ({
2870+
...obj,
2871+
});
2872+
2873+
/**
2874+
* @internal
2875+
*/
2876+
export const ListThingGroupsResponseFilterSensitiveLog = (obj: ListThingGroupsResponse): any => ({
2877+
...obj,
2878+
});
2879+
28232880
/**
28242881
* @internal
28252882
*/

0 commit comments

Comments
 (0)