|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { |
| 10 | + GetInstanceTpmEkPubRequest, |
| 11 | + GetInstanceTpmEkPubResult, |
| 12 | + GetInstanceTpmEkPubResultFilterSensitiveLog, |
| 13 | +} from "../models/models_5"; |
| 14 | +import { de_GetInstanceTpmEkPubCommand, se_GetInstanceTpmEkPubCommand } from "../protocols/Aws_ec2"; |
| 15 | + |
| 16 | +/** |
| 17 | + * @public |
| 18 | + */ |
| 19 | +export { __MetadataBearer, $Command }; |
| 20 | +/** |
| 21 | + * @public |
| 22 | + * |
| 23 | + * The input for {@link GetInstanceTpmEkPubCommand}. |
| 24 | + */ |
| 25 | +export interface GetInstanceTpmEkPubCommandInput extends GetInstanceTpmEkPubRequest {} |
| 26 | +/** |
| 27 | + * @public |
| 28 | + * |
| 29 | + * The output of {@link GetInstanceTpmEkPubCommand}. |
| 30 | + */ |
| 31 | +export interface GetInstanceTpmEkPubCommandOutput extends GetInstanceTpmEkPubResult, __MetadataBearer {} |
| 32 | + |
| 33 | +/** |
| 34 | + * <p>Gets the public endorsement key associated with the Nitro Trusted |
| 35 | + * Platform Module (NitroTPM) for the specified instance.</p> |
| 36 | + * @example |
| 37 | + * Use a bare-bones client and the command you need to make an API call. |
| 38 | + * ```javascript |
| 39 | + * import { EC2Client, GetInstanceTpmEkPubCommand } from "@aws-sdk/client-ec2"; // ES Modules import |
| 40 | + * // const { EC2Client, GetInstanceTpmEkPubCommand } = require("@aws-sdk/client-ec2"); // CommonJS import |
| 41 | + * const client = new EC2Client(config); |
| 42 | + * const input = { // GetInstanceTpmEkPubRequest |
| 43 | + * InstanceId: "STRING_VALUE", // required |
| 44 | + * KeyType: "rsa-2048" || "ecc-sec-p384", // required |
| 45 | + * KeyFormat: "der" || "tpmt", // required |
| 46 | + * DryRun: true || false, |
| 47 | + * }; |
| 48 | + * const command = new GetInstanceTpmEkPubCommand(input); |
| 49 | + * const response = await client.send(command); |
| 50 | + * // { // GetInstanceTpmEkPubResult |
| 51 | + * // InstanceId: "STRING_VALUE", |
| 52 | + * // KeyType: "rsa-2048" || "ecc-sec-p384", |
| 53 | + * // KeyFormat: "der" || "tpmt", |
| 54 | + * // KeyValue: "STRING_VALUE", |
| 55 | + * // }; |
| 56 | + * |
| 57 | + * ``` |
| 58 | + * |
| 59 | + * @param GetInstanceTpmEkPubCommandInput - {@link GetInstanceTpmEkPubCommandInput} |
| 60 | + * @returns {@link GetInstanceTpmEkPubCommandOutput} |
| 61 | + * @see {@link GetInstanceTpmEkPubCommandInput} for command's `input` shape. |
| 62 | + * @see {@link GetInstanceTpmEkPubCommandOutput} for command's `response` shape. |
| 63 | + * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. |
| 64 | + * |
| 65 | + * @throws {@link EC2ServiceException} |
| 66 | + * <p>Base exception class for all service exceptions from EC2 service.</p> |
| 67 | + * |
| 68 | + * @public |
| 69 | + */ |
| 70 | +export class GetInstanceTpmEkPubCommand extends $Command |
| 71 | + .classBuilder< |
| 72 | + GetInstanceTpmEkPubCommandInput, |
| 73 | + GetInstanceTpmEkPubCommandOutput, |
| 74 | + EC2ClientResolvedConfig, |
| 75 | + ServiceInputTypes, |
| 76 | + ServiceOutputTypes |
| 77 | + >() |
| 78 | + .ep({ |
| 79 | + ...commonParams, |
| 80 | + }) |
| 81 | + .m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) { |
| 82 | + return [ |
| 83 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 84 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 85 | + ]; |
| 86 | + }) |
| 87 | + .s("AmazonEC2", "GetInstanceTpmEkPub", {}) |
| 88 | + .n("EC2Client", "GetInstanceTpmEkPubCommand") |
| 89 | + .f(void 0, GetInstanceTpmEkPubResultFilterSensitiveLog) |
| 90 | + .ser(se_GetInstanceTpmEkPubCommand) |
| 91 | + .de(de_GetInstanceTpmEkPubCommand) |
| 92 | + .build() {} |
0 commit comments