import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; import { CreatePublicKeyRequest, CreatePublicKeyResult } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreatePublicKeyCommand}. */ export interface CreatePublicKeyCommandInput extends CreatePublicKeyRequest { } /** * @public * * The output of {@link CreatePublicKeyCommand}. */ export interface CreatePublicKeyCommandOutput extends CreatePublicKeyResult, __MetadataBearer { } declare const CreatePublicKeyCommand_base: { new (input: CreatePublicKeyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreatePublicKeyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Uploads a public key to CloudFront that you can use with signed URLs and signed cookies, or with field-level encryption.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudFrontClient, CreatePublicKeyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import * // const { CloudFrontClient, CreatePublicKeyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import * const client = new CloudFrontClient(config); * const input = { // CreatePublicKeyRequest * PublicKeyConfig: { // PublicKeyConfig * CallerReference: "STRING_VALUE", // required * Name: "STRING_VALUE", // required * EncodedKey: "STRING_VALUE", // required * Comment: "STRING_VALUE", * }, * }; * const command = new CreatePublicKeyCommand(input); * const response = await client.send(command); * // { // CreatePublicKeyResult * // PublicKey: { // PublicKey * // Id: "STRING_VALUE", // required * // CreatedTime: new Date("TIMESTAMP"), // required * // PublicKeyConfig: { // PublicKeyConfig * // CallerReference: "STRING_VALUE", // required * // Name: "STRING_VALUE", // required * // EncodedKey: "STRING_VALUE", // required * // Comment: "STRING_VALUE", * // }, * // }, * // Location: "STRING_VALUE", * // ETag: "STRING_VALUE", * // }; * * ``` * * @param CreatePublicKeyCommandInput - {@link CreatePublicKeyCommandInput} * @returns {@link CreatePublicKeyCommandOutput} * @see {@link CreatePublicKeyCommandInput} for command's `input` shape. * @see {@link CreatePublicKeyCommandOutput} for command's `response` shape. * @see {@link CloudFrontClientResolvedConfig | config} for CloudFrontClient's `config` shape. * * @throws {@link InvalidArgument} (client fault) *

An argument is invalid.

* * @throws {@link PublicKeyAlreadyExists} (client fault) *

The specified public key already exists.

* * @throws {@link TooManyPublicKeys} (client fault) *

The maximum number of public keys for field-level encryption have been created. To create a new public key, delete one of the existing keys.

* * @throws {@link CloudFrontServiceException} *

Base exception class for all service exceptions from CloudFront service.

* * * @public */ export declare class CreatePublicKeyCommand extends CreatePublicKeyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreatePublicKeyRequest; output: CreatePublicKeyResult; }; sdk: { input: CreatePublicKeyCommandInput; output: CreatePublicKeyCommandOutput; }; }; }