Skip to content

Commit

Permalink
feat(client-iot): This release adds the Amazon Location action to IoT…
Browse files Browse the repository at this point in the history
… Rules Engine.
  • Loading branch information
awstools committed Oct 31, 2022
1 parent c97217f commit dc1adcf
Show file tree
Hide file tree
Showing 8 changed files with 2,118 additions and 1,534 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ import {
} from "@aws-sdk/types";

import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import {
DeleteRegistrationCodeRequest,
DeleteRegistrationCodeRequestFilterSensitiveLog,
DeleteRegistrationCodeResponse,
DeleteRegistrationCodeResponseFilterSensitiveLog,
} from "../models/models_0";
import { DeleteRegistrationCodeRequest, DeleteRegistrationCodeRequestFilterSensitiveLog } from "../models/models_0";
import { DeleteRegistrationCodeResponse, DeleteRegistrationCodeResponseFilterSensitiveLog } from "../models/models_1";
import {
deserializeAws_restJson1DeleteRegistrationCodeCommand,
serializeAws_restJson1DeleteRegistrationCodeCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-iot/src/commands/DeleteRoleAliasCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@aws-sdk/types";

import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
import { DeleteRoleAliasRequest, DeleteRoleAliasRequestFilterSensitiveLog } from "../models/models_0";
import { DeleteRoleAliasResponse, DeleteRoleAliasResponseFilterSensitiveLog } from "../models/models_1";
import {
DeleteRoleAliasRequest,
DeleteRoleAliasRequestFilterSensitiveLog,
DeleteRoleAliasResponse,
DeleteRoleAliasResponseFilterSensitiveLog,
} from "../models/models_1";
import {
deserializeAws_restJson1DeleteRoleAliasCommand,
serializeAws_restJson1DeleteRoleAliasCommand,
Expand Down
2 changes: 1 addition & 1 deletion clients/client-iot/src/commands/ListThingGroupsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ListThingGroupsRequestFilterSensitiveLog,
ListThingGroupsResponse,
ListThingGroupsResponseFilterSensitiveLog,
} from "../models/models_1";
} from "../models/models_2";
import {
deserializeAws_restJson1ListThingGroupsCommand,
serializeAws_restJson1ListThingGroupsCommand,
Expand Down
109 changes: 82 additions & 27 deletions clients/client-iot/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,65 @@ export interface LambdaAction {
functionArn: string | undefined;
}

/**
* <p>Describes how to interpret an application-defined timestamp value from an MQTT message
* payload and the precision of that value.</p>
*/
export interface LocationTimestamp {
/**
* <p>An expression that returns a long epoch time value.</p>
*/
value: string | undefined;

/**
* <p>The precision of the timestamp value that results from the expression
* described in <code>value</code>.</p>
* <p>Valid values: <code>SECONDS</code> | <code>MILLISECONDS</code> |
* <code>MICROSECONDS</code> | <code>NANOSECONDS</code>. The default is
* <code>MILLISECONDS</code>.</p>
*/
unit?: string;
}

/**
* <p>The Amazon Location rule action sends device location updates from
* an MQTT message to an Amazon Location tracker resource.</p>
*/
export interface LocationAction {
/**
* <p>The IAM role that grants permission to write to the Amazon Location resource.</p>
*/
roleArn: string | undefined;

/**
* <p>The name of the tracker resource in Amazon Location in which the location is updated.</p>
*/
trackerName: string | undefined;

/**
* <p>The unique ID of the device providing the location data.</p>
*/
deviceId: string | undefined;

/**
* <p>The time that the location data was sampled. The default value is
* the time the MQTT message was processed.</p>
*/
timestamp?: LocationTimestamp;

/**
* <p>A string that evaluates to a double value that represents the
* latitude of the device's location.</p>
*/
latitude: string | undefined;

/**
* <p>A string that evaluates to a double value that represents the
* longitude of the device's location.</p>
*/
longitude: string | undefined;
}

/**
* <p>Describes an action that writes data to an Amazon OpenSearch Service
* domain.</p>
Expand Down Expand Up @@ -1232,6 +1291,12 @@ export interface Action {
* <p>Write data to an Amazon OpenSearch Service domain.</p>
*/
openSearch?: OpenSearchAction;

/**
* <p>The Amazon Location Service rule action sends device location updates from
* an MQTT message to an Amazon Location tracker resource.</p>
*/
location?: LocationAction;
}

export enum ActionType {
Expand Down Expand Up @@ -4670,7 +4735,9 @@ export interface CreateProvisioningTemplateRequest {
provisioningRoleArn: string | undefined;

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

Expand Down Expand Up @@ -5745,18 +5812,6 @@ export interface DeleteProvisioningTemplateVersionResponse {}
*/
export interface DeleteRegistrationCodeRequest {}

/**
* <p>The output for the DeleteRegistrationCode operation.</p>
*/
export interface DeleteRegistrationCodeResponse {}

export interface DeleteRoleAliasRequest {
/**
* <p>The role alias to delete.</p>
*/
roleAlias: string | undefined;
}

/**
* @internal
*/
Expand Down Expand Up @@ -5940,6 +5995,20 @@ export const LambdaActionFilterSensitiveLog = (obj: LambdaAction): any => ({
...obj,
});

/**
* @internal
*/
export const LocationTimestampFilterSensitiveLog = (obj: LocationTimestamp): any => ({
...obj,
});

/**
* @internal
*/
export const LocationActionFilterSensitiveLog = (obj: LocationAction): any => ({
...obj,
});

/**
* @internal
*/
Expand Down Expand Up @@ -7429,17 +7498,3 @@ export const DeleteProvisioningTemplateVersionResponseFilterSensitiveLog = (
export const DeleteRegistrationCodeRequestFilterSensitiveLog = (obj: DeleteRegistrationCodeRequest): any => ({
...obj,
});

/**
* @internal
*/
export const DeleteRegistrationCodeResponseFilterSensitiveLog = (obj: DeleteRegistrationCodeResponse): any => ({
...obj,
});

/**
* @internal
*/
export const DeleteRoleAliasRequestFilterSensitiveLog = (obj: DeleteRoleAliasRequest): any => ({
...obj,
});
81 changes: 26 additions & 55 deletions clients/client-iot/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ import {
VerificationState,
} from "./models_0";

/**
* <p>The output for the DeleteRegistrationCode operation.</p>
*/
export interface DeleteRegistrationCodeResponse {}

export interface DeleteRoleAliasRequest {
/**
* <p>The role alias to delete.</p>
*/
roleAlias: string | undefined;
}

export interface DeleteRoleAliasResponse {}

export interface DeleteScheduledAuditRequest {
Expand Down Expand Up @@ -2718,7 +2730,7 @@ export interface GetBehaviorModelTrainingSummariesRequest {

/**
* <p>
* The maximum number of results to return at one time. The default is 25.
* The maximum number of results to return at one time. The default is 10.
* </p>
*/
maxResults?: number;
Expand Down Expand Up @@ -5561,7 +5573,7 @@ export interface ListProvisioningTemplateVersionsRequest {
*/
export interface ProvisioningTemplateVersionSummary {
/**
* <p>The ID of the fleet privisioning template version.</p>
* <p>The ID of the fleet provisioning template version.</p>
*/
versionId?: number;

Expand Down Expand Up @@ -5930,46 +5942,19 @@ export interface ListTargetsForSecurityProfileResponse {
nextToken?: string;
}

export interface ListThingGroupsRequest {
/**
* <p>To retrieve the next set of results, the <code>nextToken</code>
* value from a previous response; otherwise <b>null</b> to receive
* the first set of results.</p>
*/
nextToken?: string;

/**
* <p>The maximum number of results to return at one time.</p>
*/
maxResults?: number;

/**
* <p>A filter that limits the results to those with the specified parent group.</p>
*/
parentGroup?: string;

/**
* <p>A filter that limits the results to those with the specified name prefix.</p>
*/
namePrefixFilter?: string;

/**
* <p>If true, return child groups as well.</p>
*/
recursive?: boolean;
}

export interface ListThingGroupsResponse {
/**
* <p>The thing groups.</p>
*/
thingGroups?: GroupNameAndArn[];
/**
* @internal
*/
export const DeleteRegistrationCodeResponseFilterSensitiveLog = (obj: DeleteRegistrationCodeResponse): any => ({
...obj,
});

/**
* <p>The token to use to get the next set of results. Will not be returned if operation has returned all results.</p>
*/
nextToken?: string;
}
/**
* @internal
*/
export const DeleteRoleAliasRequestFilterSensitiveLog = (obj: DeleteRoleAliasRequest): any => ({
...obj,
});

/**
* @internal
Expand Down Expand Up @@ -7936,17 +7921,3 @@ export const ListTargetsForSecurityProfileResponseFilterSensitiveLog = (
): any => ({
...obj,
});

/**
* @internal
*/
export const ListThingGroupsRequestFilterSensitiveLog = (obj: ListThingGroupsRequest): any => ({
...obj,
});

/**
* @internal
*/
export const ListThingGroupsResponseFilterSensitiveLog = (obj: ListThingGroupsResponse): any => ({
...obj,
});
59 changes: 58 additions & 1 deletion clients/client-iot/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,47 @@ import {
ViolationEventOccurrenceRange,
} from "./models_1";

export interface ListThingGroupsRequest {
/**
* <p>To retrieve the next set of results, the <code>nextToken</code>
* value from a previous response; otherwise <b>null</b> to receive
* the first set of results.</p>
*/
nextToken?: string;

/**
* <p>The maximum number of results to return at one time.</p>
*/
maxResults?: number;

/**
* <p>A filter that limits the results to those with the specified parent group.</p>
*/
parentGroup?: string;

/**
* <p>A filter that limits the results to those with the specified name prefix.</p>
*/
namePrefixFilter?: string;

/**
* <p>If true, return child groups as well.</p>
*/
recursive?: boolean;
}

export interface ListThingGroupsResponse {
/**
* <p>The thing groups.</p>
*/
thingGroups?: GroupNameAndArn[];

/**
* <p>The token to use to get the next set of results. Will not be returned if operation has returned all results.</p>
*/
nextToken?: string;
}

export interface ListThingGroupsForThingRequest {
/**
* <p>The thing name.</p>
Expand Down Expand Up @@ -2379,7 +2420,9 @@ export interface UpdateProvisioningTemplateRequest {
provisioningRoleArn?: string;

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

Expand Down Expand Up @@ -2820,6 +2863,20 @@ export interface ValidateSecurityProfileBehaviorsResponse {
validationErrors?: ValidationError[];
}

/**
* @internal
*/
export const ListThingGroupsRequestFilterSensitiveLog = (obj: ListThingGroupsRequest): any => ({
...obj,
});

/**
* @internal
*/
export const ListThingGroupsResponseFilterSensitiveLog = (obj: ListThingGroupsResponse): any => ({
...obj,
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit dc1adcf

Please sign in to comment.