import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { LocationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LocationClient"; import { CreateKeyRequest, CreateKeyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateKeyCommand}. */ export interface CreateKeyCommandInput extends CreateKeyRequest { } /** * @public * * The output of {@link CreateKeyCommand}. */ export interface CreateKeyCommandOutput extends CreateKeyResponse, __MetadataBearer { } declare const CreateKeyCommand_base: { new (input: CreateKeyCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateKeyCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates an API key resource in your Amazon Web Services account, which lets you grant * actions for Amazon Location resources to the API key bearer.

* *

For more information, see Using API keys.

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { LocationClient, CreateKeyCommand } from "@aws-sdk/client-location"; // ES Modules import * // const { LocationClient, CreateKeyCommand } = require("@aws-sdk/client-location"); // CommonJS import * const client = new LocationClient(config); * const input = { // CreateKeyRequest * KeyName: "STRING_VALUE", // required * Restrictions: { // ApiKeyRestrictions * AllowActions: [ // ApiKeyActionList // required * "STRING_VALUE", * ], * AllowResources: [ // GeoArnList // required * "STRING_VALUE", * ], * AllowReferers: [ // RefererPatternList * "STRING_VALUE", * ], * }, * Description: "STRING_VALUE", * ExpireTime: new Date("TIMESTAMP"), * NoExpiry: true || false, * Tags: { // TagMap * "": "STRING_VALUE", * }, * }; * const command = new CreateKeyCommand(input); * const response = await client.send(command); * // { // CreateKeyResponse * // Key: "STRING_VALUE", // required * // KeyArn: "STRING_VALUE", // required * // KeyName: "STRING_VALUE", // required * // CreateTime: new Date("TIMESTAMP"), // required * // }; * * ``` * * @param CreateKeyCommandInput - {@link CreateKeyCommandInput} * @returns {@link CreateKeyCommandOutput} * @see {@link CreateKeyCommandInput} for command's `input` shape. * @see {@link CreateKeyCommandOutput} for command's `response` shape. * @see {@link LocationClientResolvedConfig | config} for LocationClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request was denied because of insufficient access or permissions. Check with an * administrator to verify your permissions.

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

The request was unsuccessful because of a conflict.

* * @throws {@link InternalServerException} (server fault) *

The request has failed to process because of an unknown server error, exception, or failure.

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

The operation was denied because the request would exceed the maximum quota * set for Amazon Location Service.

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

The request was denied because of request throttling.

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

The input failed to meet the constraints specified by the AWS service.

* * @throws {@link LocationServiceException} *

Base exception class for all service exceptions from Location service.

* * * @public */ export declare class CreateKeyCommand extends CreateKeyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateKeyRequest; output: CreateKeyResponse; }; sdk: { input: CreateKeyCommandInput; output: CreateKeyCommandOutput; }; }; }