|
| 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