Skip to content

Commit b35f84b

Browse files
author
awstools
committed
feat(client-iotfleetwise): AWS IoT FleetWise now supports encryption through a customer managed AWS KMS key. The PutEncryptionConfiguration and GetEncryptionConfiguration APIs were added.
1 parent 4202837 commit b35f84b

File tree

9 files changed

+927
-3
lines changed

9 files changed

+927
-3
lines changed

clients/client-iotfleetwise/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,14 @@ GetDecoderManifest
352352

353353
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/classes/getdecodermanifestcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/getdecodermanifestcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/getdecodermanifestcommandoutput.html)
354354

355+
</details>
356+
<details>
357+
<summary>
358+
GetEncryptionConfiguration
359+
</summary>
360+
361+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/classes/getencryptionconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/getencryptionconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/getencryptionconfigurationcommandoutput.html)
362+
355363
</details>
356364
<details>
357365
<summary>
@@ -528,6 +536,14 @@ ListVehiclesInFleet
528536

529537
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/classes/listvehiclesinfleetcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/listvehiclesinfleetcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/listvehiclesinfleetcommandoutput.html)
530538

539+
</details>
540+
<details>
541+
<summary>
542+
PutEncryptionConfiguration
543+
</summary>
544+
545+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/classes/putencryptionconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/putencryptionconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-iotfleetwise/interfaces/putencryptionconfigurationcommandoutput.html)
546+
531547
</details>
532548
<details>
533549
<summary>

clients/client-iotfleetwise/src/IoTFleetWise.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ import {
8080
GetDecoderManifestCommandInput,
8181
GetDecoderManifestCommandOutput,
8282
} from "./commands/GetDecoderManifestCommand";
83+
import {
84+
GetEncryptionConfigurationCommand,
85+
GetEncryptionConfigurationCommandInput,
86+
GetEncryptionConfigurationCommandOutput,
87+
} from "./commands/GetEncryptionConfigurationCommand";
8388
import { GetFleetCommand, GetFleetCommandInput, GetFleetCommandOutput } from "./commands/GetFleetCommand";
8489
import {
8590
GetLoggingOptionsCommand,
@@ -178,6 +183,11 @@ import {
178183
ListVehiclesInFleetCommandInput,
179184
ListVehiclesInFleetCommandOutput,
180185
} from "./commands/ListVehiclesInFleetCommand";
186+
import {
187+
PutEncryptionConfigurationCommand,
188+
PutEncryptionConfigurationCommandInput,
189+
PutEncryptionConfigurationCommandOutput,
190+
} from "./commands/PutEncryptionConfigurationCommand";
181191
import {
182192
PutLoggingOptionsCommand,
183193
PutLoggingOptionsCommandInput,
@@ -241,6 +251,7 @@ const commands = {
241251
DisassociateVehicleFleetCommand,
242252
GetCampaignCommand,
243253
GetDecoderManifestCommand,
254+
GetEncryptionConfigurationCommand,
244255
GetFleetCommand,
245256
GetLoggingOptionsCommand,
246257
GetModelManifestCommand,
@@ -263,6 +274,7 @@ const commands = {
263274
ListTagsForResourceCommand,
264275
ListVehiclesCommand,
265276
ListVehiclesInFleetCommand,
277+
PutEncryptionConfigurationCommand,
266278
PutLoggingOptionsCommand,
267279
RegisterAccountCommand,
268280
TagResourceCommand,
@@ -546,6 +558,23 @@ export interface IoTFleetWise {
546558
cb: (err: any, data?: GetDecoderManifestCommandOutput) => void
547559
): void;
548560

561+
/**
562+
* @see {@link GetEncryptionConfigurationCommand}
563+
*/
564+
getEncryptionConfiguration(
565+
args: GetEncryptionConfigurationCommandInput,
566+
options?: __HttpHandlerOptions
567+
): Promise<GetEncryptionConfigurationCommandOutput>;
568+
getEncryptionConfiguration(
569+
args: GetEncryptionConfigurationCommandInput,
570+
cb: (err: any, data?: GetEncryptionConfigurationCommandOutput) => void
571+
): void;
572+
getEncryptionConfiguration(
573+
args: GetEncryptionConfigurationCommandInput,
574+
options: __HttpHandlerOptions,
575+
cb: (err: any, data?: GetEncryptionConfigurationCommandOutput) => void
576+
): void;
577+
549578
/**
550579
* @see {@link GetFleetCommand}
551580
*/
@@ -890,6 +919,23 @@ export interface IoTFleetWise {
890919
cb: (err: any, data?: ListVehiclesInFleetCommandOutput) => void
891920
): void;
892921

922+
/**
923+
* @see {@link PutEncryptionConfigurationCommand}
924+
*/
925+
putEncryptionConfiguration(
926+
args: PutEncryptionConfigurationCommandInput,
927+
options?: __HttpHandlerOptions
928+
): Promise<PutEncryptionConfigurationCommandOutput>;
929+
putEncryptionConfiguration(
930+
args: PutEncryptionConfigurationCommandInput,
931+
cb: (err: any, data?: PutEncryptionConfigurationCommandOutput) => void
932+
): void;
933+
putEncryptionConfiguration(
934+
args: PutEncryptionConfigurationCommandInput,
935+
options: __HttpHandlerOptions,
936+
cb: (err: any, data?: PutEncryptionConfigurationCommandOutput) => void
937+
): void;
938+
893939
/**
894940
* @see {@link PutLoggingOptionsCommand}
895941
*/

clients/client-iotfleetwise/src/IoTFleetWiseClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ import {
9292
} from "./commands/DisassociateVehicleFleetCommand";
9393
import { GetCampaignCommandInput, GetCampaignCommandOutput } from "./commands/GetCampaignCommand";
9494
import { GetDecoderManifestCommandInput, GetDecoderManifestCommandOutput } from "./commands/GetDecoderManifestCommand";
95+
import {
96+
GetEncryptionConfigurationCommandInput,
97+
GetEncryptionConfigurationCommandOutput,
98+
} from "./commands/GetEncryptionConfigurationCommand";
9599
import { GetFleetCommandInput, GetFleetCommandOutput } from "./commands/GetFleetCommand";
96100
import { GetLoggingOptionsCommandInput, GetLoggingOptionsCommandOutput } from "./commands/GetLoggingOptionsCommand";
97101
import { GetModelManifestCommandInput, GetModelManifestCommandOutput } from "./commands/GetModelManifestCommand";
@@ -147,6 +151,10 @@ import {
147151
ListVehiclesInFleetCommandInput,
148152
ListVehiclesInFleetCommandOutput,
149153
} from "./commands/ListVehiclesInFleetCommand";
154+
import {
155+
PutEncryptionConfigurationCommandInput,
156+
PutEncryptionConfigurationCommandOutput,
157+
} from "./commands/PutEncryptionConfigurationCommand";
150158
import { PutLoggingOptionsCommandInput, PutLoggingOptionsCommandOutput } from "./commands/PutLoggingOptionsCommand";
151159
import { RegisterAccountCommandInput, RegisterAccountCommandOutput } from "./commands/RegisterAccountCommand";
152160
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -199,6 +207,7 @@ export type ServiceInputTypes =
199207
| DisassociateVehicleFleetCommandInput
200208
| GetCampaignCommandInput
201209
| GetDecoderManifestCommandInput
210+
| GetEncryptionConfigurationCommandInput
202211
| GetFleetCommandInput
203212
| GetLoggingOptionsCommandInput
204213
| GetModelManifestCommandInput
@@ -221,6 +230,7 @@ export type ServiceInputTypes =
221230
| ListTagsForResourceCommandInput
222231
| ListVehiclesCommandInput
223232
| ListVehiclesInFleetCommandInput
233+
| PutEncryptionConfigurationCommandInput
224234
| PutLoggingOptionsCommandInput
225235
| RegisterAccountCommandInput
226236
| TagResourceCommandInput
@@ -254,6 +264,7 @@ export type ServiceOutputTypes =
254264
| DisassociateVehicleFleetCommandOutput
255265
| GetCampaignCommandOutput
256266
| GetDecoderManifestCommandOutput
267+
| GetEncryptionConfigurationCommandOutput
257268
| GetFleetCommandOutput
258269
| GetLoggingOptionsCommandOutput
259270
| GetModelManifestCommandOutput
@@ -276,6 +287,7 @@ export type ServiceOutputTypes =
276287
| ListTagsForResourceCommandOutput
277288
| ListVehiclesCommandOutput
278289
| ListVehiclesInFleetCommandOutput
290+
| PutEncryptionConfigurationCommandOutput
279291
| PutLoggingOptionsCommandOutput
280292
| RegisterAccountCommandOutput
281293
| TagResourceCommandOutput
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
SMITHY_CONTEXT_KEY,
15+
} from "@smithy/types";
16+
17+
import { IoTFleetWiseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTFleetWiseClient";
18+
import { GetEncryptionConfigurationRequest, GetEncryptionConfigurationResponse } from "../models/models_0";
19+
import { de_GetEncryptionConfigurationCommand, se_GetEncryptionConfigurationCommand } from "../protocols/Aws_json1_0";
20+
21+
/**
22+
* @public
23+
*/
24+
export { __MetadataBearer, $Command };
25+
/**
26+
* @public
27+
*
28+
* The input for {@link GetEncryptionConfigurationCommand}.
29+
*/
30+
export interface GetEncryptionConfigurationCommandInput extends GetEncryptionConfigurationRequest {}
31+
/**
32+
* @public
33+
*
34+
* The output of {@link GetEncryptionConfigurationCommand}.
35+
*/
36+
export interface GetEncryptionConfigurationCommandOutput extends GetEncryptionConfigurationResponse, __MetadataBearer {}
37+
38+
/**
39+
* @public
40+
* <p>Retrieves the encryption configuration for resources and data in Amazon Web Services IoT FleetWise.</p>
41+
* @example
42+
* Use a bare-bones client and the command you need to make an API call.
43+
* ```javascript
44+
* import { IoTFleetWiseClient, GetEncryptionConfigurationCommand } from "@aws-sdk/client-iotfleetwise"; // ES Modules import
45+
* // const { IoTFleetWiseClient, GetEncryptionConfigurationCommand } = require("@aws-sdk/client-iotfleetwise"); // CommonJS import
46+
* const client = new IoTFleetWiseClient(config);
47+
* const input = {};
48+
* const command = new GetEncryptionConfigurationCommand(input);
49+
* const response = await client.send(command);
50+
* // { // GetEncryptionConfigurationResponse
51+
* // kmsKeyId: "STRING_VALUE",
52+
* // encryptionStatus: "STRING_VALUE", // required
53+
* // encryptionType: "STRING_VALUE", // required
54+
* // errorMessage: "STRING_VALUE",
55+
* // creationTime: new Date("TIMESTAMP"),
56+
* // lastModificationTime: new Date("TIMESTAMP"),
57+
* // };
58+
*
59+
* ```
60+
*
61+
* @param GetEncryptionConfigurationCommandInput - {@link GetEncryptionConfigurationCommandInput}
62+
* @returns {@link GetEncryptionConfigurationCommandOutput}
63+
* @see {@link GetEncryptionConfigurationCommandInput} for command's `input` shape.
64+
* @see {@link GetEncryptionConfigurationCommandOutput} for command's `response` shape.
65+
* @see {@link IoTFleetWiseClientResolvedConfig | config} for IoTFleetWiseClient's `config` shape.
66+
*
67+
* @throws {@link AccessDeniedException} (client fault)
68+
* <p>You don't have sufficient permission to perform this action.</p>
69+
*
70+
* @throws {@link InternalServerException} (server fault)
71+
* <p>The request couldn't be completed because the server temporarily failed.</p>
72+
*
73+
* @throws {@link ResourceNotFoundException} (client fault)
74+
* <p>The resource wasn't found.</p>
75+
*
76+
* @throws {@link ThrottlingException} (client fault)
77+
* <p>The request couldn't be completed due to throttling.</p>
78+
*
79+
* @throws {@link ValidationException} (client fault)
80+
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
81+
*
82+
* @throws {@link IoTFleetWiseServiceException}
83+
* <p>Base exception class for all service exceptions from IoTFleetWise service.</p>
84+
*
85+
*/
86+
export class GetEncryptionConfigurationCommand extends $Command<
87+
GetEncryptionConfigurationCommandInput,
88+
GetEncryptionConfigurationCommandOutput,
89+
IoTFleetWiseClientResolvedConfig
90+
> {
91+
// Start section: command_properties
92+
// End section: command_properties
93+
94+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
95+
return {
96+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
97+
Endpoint: { type: "builtInParams", name: "endpoint" },
98+
Region: { type: "builtInParams", name: "region" },
99+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
100+
};
101+
}
102+
103+
/**
104+
* @public
105+
*/
106+
constructor(readonly input: GetEncryptionConfigurationCommandInput) {
107+
// Start section: command_constructor
108+
super();
109+
// End section: command_constructor
110+
}
111+
112+
/**
113+
* @internal
114+
*/
115+
resolveMiddleware(
116+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
117+
configuration: IoTFleetWiseClientResolvedConfig,
118+
options?: __HttpHandlerOptions
119+
): Handler<GetEncryptionConfigurationCommandInput, GetEncryptionConfigurationCommandOutput> {
120+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
121+
this.middlewareStack.use(
122+
getEndpointPlugin(configuration, GetEncryptionConfigurationCommand.getEndpointParameterInstructions())
123+
);
124+
125+
const stack = clientStack.concat(this.middlewareStack);
126+
127+
const { logger } = configuration;
128+
const clientName = "IoTFleetWiseClient";
129+
const commandName = "GetEncryptionConfigurationCommand";
130+
const handlerExecutionContext: HandlerExecutionContext = {
131+
logger,
132+
clientName,
133+
commandName,
134+
inputFilterSensitiveLog: (_: any) => _,
135+
outputFilterSensitiveLog: (_: any) => _,
136+
[SMITHY_CONTEXT_KEY]: {
137+
service: "IoTAutobahnControlPlane",
138+
operation: "GetEncryptionConfiguration",
139+
},
140+
};
141+
const { requestHandler } = configuration;
142+
return stack.resolve(
143+
(request: FinalizeHandlerArguments<any>) =>
144+
requestHandler.handle(request.request as __HttpRequest, options || {}),
145+
handlerExecutionContext
146+
);
147+
}
148+
149+
/**
150+
* @internal
151+
*/
152+
private serialize(input: GetEncryptionConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
153+
return se_GetEncryptionConfigurationCommand(input, context);
154+
}
155+
156+
/**
157+
* @internal
158+
*/
159+
private deserialize(
160+
output: __HttpResponse,
161+
context: __SerdeContext
162+
): Promise<GetEncryptionConfigurationCommandOutput> {
163+
return de_GetEncryptionConfigurationCommand(output, context);
164+
}
165+
166+
// Start section: command_body_extra
167+
// End section: command_body_extra
168+
}

0 commit comments

Comments
 (0)