Skip to content

Commit 607458d

Browse files
author
awstools
committed
feat(client-iot): Added support for IoT Rules Engine Kafka Action Headers
1 parent f392d88 commit 607458d

16 files changed

+242
-96
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ export interface CreateCertificateFromCsrCommandOutput extends CreateCertificate
4343
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">CreateCertificateFromCsr</a> action.
4444
* </p>
4545
* <note>
46-
* <p>The CSR must include a public key that is either an
47-
* RSA key with a length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 curves.
48-
* For supported certificates, consult <a href="https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms">
49-
* Certificate signing algorithms supported by IoT</a>.
50-
* </p>
46+
* <p>The CSR must include a public key that is either an RSA key with a length of at least
47+
* 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-521 curves. For supported
48+
* certificates, consult <a href="https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms"> Certificate signing algorithms supported by IoT</a>. </p>
5149
* </note>
5250
* <note>
5351
* <p>Reusing the same certificate signing request (CSR)

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ export interface CreateTopicRuleCommandOutput extends __MetadataBearer {}
232232
* clientProperties: { // ClientProperties // required
233233
* "<keys>": "STRING_VALUE",
234234
* },
235+
* headers: [ // KafkaHeaders
236+
* { // KafkaActionHeader
237+
* key: "STRING_VALUE", // required
238+
* value: "STRING_VALUE", // required
239+
* },
240+
* ],
235241
* },
236242
* openSearch: { // OpenSearchAction
237243
* roleArn: "STRING_VALUE", // required
@@ -435,6 +441,12 @@ export interface CreateTopicRuleCommandOutput extends __MetadataBearer {}
435441
* clientProperties: { // required
436442
* "<keys>": "STRING_VALUE",
437443
* },
444+
* headers: [
445+
* {
446+
* key: "STRING_VALUE", // required
447+
* value: "STRING_VALUE", // required
448+
* },
449+
* ],
438450
* },
439451
* openSearch: {
440452
* roleArn: "STRING_VALUE", // required

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import {
1515
} from "@smithy/types";
1616

1717
import { IoTClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTClient";
18-
import { DeleteDynamicThingGroupRequest, DeleteDynamicThingGroupResponse } from "../models/models_0";
18+
import { DeleteDynamicThingGroupRequest } from "../models/models_0";
19+
import { DeleteDynamicThingGroupResponse } from "../models/models_1";
1920
import { de_DeleteDynamicThingGroupCommand, se_DeleteDynamicThingGroupCommand } from "../protocols/Aws_restJson1";
2021

2122
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface DeletePackageVersionCommandOutput extends DeletePackageVersionR
3939
* @public
4040
* <p>Deletes a specific version from a software package.</p>
4141
* <p>
42-
* <b>Note:</b> If a package version is designated as default, you must remove the designation from the package using the <a>UpdatePackage</a> action.</p>
42+
* <b>Note:</b> If a package version is designated as default, you must remove the designation from the software package using the <a>UpdatePackage</a> action.</p>
4343
* @example
4444
* Use a bare-bones client and the command you need to make an API call.
4545
* ```javascript

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface DeleteV2LoggingLevelCommandOutput extends __MetadataBearer {}
4646
* // const { IoTClient, DeleteV2LoggingLevelCommand } = require("@aws-sdk/client-iot"); // CommonJS import
4747
* const client = new IoTClient(config);
4848
* const input = { // DeleteV2LoggingLevelRequest
49-
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID", // required
49+
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID" || "EVENT_TYPE" || "DEVICE_DEFENDER", // required
5050
* targetName: "STRING_VALUE", // required
5151
* };
5252
* const command = new DeleteV2LoggingLevelCommand(input);

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ export interface GetTopicRuleCommandOutput extends GetTopicRuleResponse, __Metad
238238
* // clientProperties: { // ClientProperties // required
239239
* // "<keys>": "STRING_VALUE",
240240
* // },
241+
* // headers: [ // KafkaHeaders
242+
* // { // KafkaActionHeader
243+
* // key: "STRING_VALUE", // required
244+
* // value: "STRING_VALUE", // required
245+
* // },
246+
* // ],
241247
* // },
242248
* // openSearch: { // OpenSearchAction
243249
* // roleArn: "STRING_VALUE", // required
@@ -441,6 +447,12 @@ export interface GetTopicRuleCommandOutput extends GetTopicRuleResponse, __Metad
441447
* // clientProperties: { // required
442448
* // "<keys>": "STRING_VALUE",
443449
* // },
450+
* // headers: [
451+
* // {
452+
* // key: "STRING_VALUE", // required
453+
* // value: "STRING_VALUE", // required
454+
* // },
455+
* // ],
444456
* // },
445457
* // openSearch: {
446458
* // roleArn: "STRING_VALUE", // required

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface ListV2LoggingLevelsCommandOutput extends ListV2LoggingLevelsRes
4646
* // const { IoTClient, ListV2LoggingLevelsCommand } = require("@aws-sdk/client-iot"); // CommonJS import
4747
* const client = new IoTClient(config);
4848
* const input = { // ListV2LoggingLevelsRequest
49-
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID",
49+
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID" || "EVENT_TYPE" || "DEVICE_DEFENDER",
5050
* nextToken: "STRING_VALUE",
5151
* maxResults: Number("int"),
5252
* };
@@ -56,7 +56,7 @@ export interface ListV2LoggingLevelsCommandOutput extends ListV2LoggingLevelsRes
5656
* // logTargetConfigurations: [ // LogTargetConfigurations
5757
* // { // LogTargetConfiguration
5858
* // logTarget: { // LogTarget
59-
* // targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID", // required
59+
* // targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID" || "EVENT_TYPE" || "DEVICE_DEFENDER", // required
6060
* // targetName: "STRING_VALUE",
6161
* // },
6262
* // logLevel: "DEBUG" || "INFO" || "ERROR" || "WARN" || "DISABLED",

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ export interface ReplaceTopicRuleCommandOutput extends __MetadataBearer {}
233233
* clientProperties: { // ClientProperties // required
234234
* "<keys>": "STRING_VALUE",
235235
* },
236+
* headers: [ // KafkaHeaders
237+
* { // KafkaActionHeader
238+
* key: "STRING_VALUE", // required
239+
* value: "STRING_VALUE", // required
240+
* },
241+
* ],
236242
* },
237243
* openSearch: { // OpenSearchAction
238244
* roleArn: "STRING_VALUE", // required
@@ -436,6 +442,12 @@ export interface ReplaceTopicRuleCommandOutput extends __MetadataBearer {}
436442
* clientProperties: { // required
437443
* "<keys>": "STRING_VALUE",
438444
* },
445+
* headers: [
446+
* {
447+
* key: "STRING_VALUE", // required
448+
* value: "STRING_VALUE", // required
449+
* },
450+
* ],
439451
* },
440452
* openSearch: {
441453
* roleArn: "STRING_VALUE", // required

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface SetV2LoggingLevelCommandOutput extends __MetadataBearer {}
4747
* const client = new IoTClient(config);
4848
* const input = { // SetV2LoggingLevelRequest
4949
* logTarget: { // LogTarget
50-
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID", // required
50+
* targetType: "DEFAULT" || "THING_GROUP" || "CLIENT_ID" || "SOURCE_IP" || "PRINCIPAL_ID" || "EVENT_TYPE" || "DEVICE_DEFENDER", // required
5151
* targetName: "STRING_VALUE",
5252
* },
5353
* logLevel: "DEBUG" || "INFO" || "ERROR" || "WARN" || "DISABLED", // required

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface UpdatePackageCommandOutput extends UpdatePackageResponse, __Met
4141

4242
/**
4343
* @public
44-
* <p>Updates the supported fields for a specific package.</p>
44+
* <p>Updates the supported fields for a specific software package.</p>
4545
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdatePackage</a> and <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">GetIndexingConfiguration</a> actions.</p>
4646
* @example
4747
* Use a bare-bones client and the command you need to make an API call.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface UpdatePackageConfigurationCommandOutput extends UpdatePackageCo
3737

3838
/**
3939
* @public
40-
* <p>Updates the package configuration.</p>
40+
* <p>Updates the software package configuration.</p>
4141
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">UpdatePackageConfiguration</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html">iam:PassRole</a> actions.</p>
4242
* @example
4343
* Use a bare-bones client and the command you need to make an API call.

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

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,28 @@ export interface IotSiteWiseAction {
932932
roleArn: string | undefined;
933933
}
934934

935+
/**
936+
* @public
937+
* <p>Specifies a Kafka header using key-value pairs when you create a Rule’s Kafka Action.
938+
* You can use these headers to route data from IoT clients to downstream Kafka clusters
939+
* without modifying your message payload.</p>
940+
* <p>For more information about Rule's Kafka action, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html">Apache Kafka</a>.
941+
* </p>
942+
*/
943+
export interface KafkaActionHeader {
944+
/**
945+
* @public
946+
* <p>The key of the Kafka header.</p>
947+
*/
948+
key: string | undefined;
949+
950+
/**
951+
* @public
952+
* <p>The value of the Kafka header.</p>
953+
*/
954+
value: string | undefined;
955+
}
956+
935957
/**
936958
* @public
937959
* <p>Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.</p>
@@ -966,6 +988,12 @@ export interface KafkaAction {
966988
* <p>Properties of the Apache Kafka producer client.</p>
967989
*/
968990
clientProperties: Record<string, string> | undefined;
991+
992+
/**
993+
* @public
994+
* <p>The list of Kafka headers that you specify.</p>
995+
*/
996+
headers?: KafkaActionHeader[];
969997
}
970998

971999
/**
@@ -1934,8 +1962,10 @@ export interface Behavior {
19341962

19351963
/**
19361964
* @public
1937-
* <p>The criteria that determine if a device is behaving normally in regard to
1938-
* the <code>metric</code>.</p>
1965+
* <p>The criteria that determine if a device is behaving normally in regard to the <code>metric</code>.</p>
1966+
* <note>
1967+
* <p>In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.</p>
1968+
* </note>
19391969
*/
19401970
criteria?: BehaviorCriteria;
19411971

@@ -4718,6 +4748,8 @@ export interface SchedulingConfig {
47184748
* must be scheduled a minimum of thirty minutes from the current time. The date and time
47194749
* format for the <code>startTime</code> is YYYY-MM-DD for the date and HH:MM for the
47204750
* time.</p>
4751+
* <p>For more information on the syntax for <code>startTime</code> when using an API
4752+
* command or the Command Line Interface, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-types.html#parameter-type-timestamp">Timestamp</a>.</p>
47214753
*/
47224754
startTime?: string;
47234755

@@ -4730,6 +4762,8 @@ export interface SchedulingConfig {
47304762
* minutes. The maximum duration between <code>startTime</code> and <code>endTime</code> is
47314763
* two years. The date and time format for the <code>endTime</code> is YYYY-MM-DD for the
47324764
* date and HH:MM for the time.</p>
4765+
* <p>For more information on the syntax for <code>endTime</code> when using an API command
4766+
* or the Command Line Interface, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-types.html#parameter-type-timestamp">Timestamp</a>.</p>
47334767
*/
47344768
endTime?: string;
47354769

@@ -4991,15 +5025,10 @@ export interface CreateJobTemplateRequest {
49915025

49925026
/**
49935027
* @public
4994-
* <p>An S3 link to the job document to use in the template. Required if you don't specify a value for <code>document</code>.</p>
4995-
* <note>
4996-
* <p>If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.</p>
4997-
* <p>The placeholder link is of the following form:</p>
4998-
* <p>
4999-
* <code>$\{aws:iot:s3-presigned-url:https://s3.amazonaws.com/<i>bucket</i>/<i>key</i>\}</code>
5000-
* </p>
5001-
* <p>where <i>bucket</i> is your bucket name and <i>key</i> is the object in the bucket to which you are linking.</p>
5002-
* </note>
5028+
* <p>An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for <code>document</code>.</p>
5029+
* <p>For example, <code>--document-source https://s3.<i>region-code</i>.amazonaws.com/example-firmware/device-firmware.1.0</code>
5030+
* </p>
5031+
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html">Methods for accessing a bucket</a>.</p>
50035032
*/
50045033
documentSource?: string;
50055034

@@ -5795,7 +5824,7 @@ export interface OTAUpdateFile {
57955824

57965825
/**
57975826
* @public
5798-
* <p>A list of name/attribute pairs.</p>
5827+
* <p>A list of name-attribute pairs. They won't be sent to devices as a part of the Job document.</p>
57995828
*/
58005829
attributes?: Record<string, string>;
58015830
}
@@ -5895,7 +5924,8 @@ export interface CreateOTAUpdateRequest {
58955924

58965925
/**
58975926
* @public
5898-
* <p>A list of additional OTA update parameters which are name-value pairs.</p>
5927+
* <p>A list of additional OTA update parameters, which are name-value pairs.
5928+
* They won't be sent to devices as a part of the Job document.</p>
58995929
*/
59005930
additionalParameters?: Record<string, string>;
59015931

@@ -5965,7 +5995,7 @@ export interface CreateOTAUpdateResponse {
59655995
export interface CreatePackageRequest {
59665996
/**
59675997
* @public
5968-
* <p>The name of the new package.</p>
5998+
* <p>The name of the new software package.</p>
59695999
*/
59706000
packageName: string | undefined;
59716001

@@ -5995,7 +6025,7 @@ export interface CreatePackageRequest {
59956025
export interface CreatePackageResponse {
59966026
/**
59976027
* @public
5998-
* <p>The name of the package.</p>
6028+
* <p>The name of the software package.</p>
59996029
*/
60006030
packageName?: string;
60016031

@@ -6079,7 +6109,7 @@ export class ValidationException extends __BaseException {
60796109
export interface CreatePackageVersionRequest {
60806110
/**
60816111
* @public
6082-
* <p>The name of the associated package.</p>
6112+
* <p>The name of the associated software package.</p>
60836113
*/
60846114
packageName: string | undefined;
60856115

@@ -6143,7 +6173,7 @@ export interface CreatePackageVersionResponse {
61436173

61446174
/**
61456175
* @public
6146-
* <p>The name of the associated package.</p>
6176+
* <p>The name of the associated software package.</p>
61476177
*/
61486178
packageName?: string;
61496179

@@ -7582,11 +7612,6 @@ export interface DeleteDynamicThingGroupRequest {
75827612
expectedVersion?: number;
75837613
}
75847614

7585-
/**
7586-
* @public
7587-
*/
7588-
export interface DeleteDynamicThingGroupResponse {}
7589-
75907615
/**
75917616
* @internal
75927617
*/

0 commit comments

Comments
 (0)