Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class CreateUsagePlanKeyCommandProtected

Creates a usage plan key for adding an existing API key to a usage plan.

Example

Use a bare-bones client and the command you need to make an API call.

import { APIGatewayClient, CreateUsagePlanKeyCommand } from "@aws-sdk/client-api-gateway"; // ES Modules import
// const { APIGatewayClient, CreateUsagePlanKeyCommand } = require("@aws-sdk/client-api-gateway"); // CommonJS import
const client = new APIGatewayClient(config);
const input = { // CreateUsagePlanKeyRequest
usagePlanId: "STRING_VALUE", // required
keyId: "STRING_VALUE", // required
keyType: "STRING_VALUE", // required
};
const command = new CreateUsagePlanKeyCommand(input);
const response = await client.send(command);
// { // UsagePlanKey
// id: "STRING_VALUE",
// type: "STRING_VALUE",
// value: "STRING_VALUE",
// name: "STRING_VALUE",
// };

Param

CreateUsagePlanKeyCommandInput

Returns

CreateUsagePlanKeyCommandOutput

See

Throws

BadRequestException (client fault)

The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

Throws

ConflictException (client fault)

The request configuration has conflicts. For details, see the accompanying error message.

Throws

LimitExceededException (client fault)

The request exceeded the rate limit. Retry after the specified time period.

Throws

NotFoundException (client fault)

The requested resource is not found. Make sure that the request URI is correct.

Throws

TooManyRequestsException (client fault)

The request has reached its throttling limit. Retry after the specified time period.

Throws

UnauthorizedException (client fault)

The request is denied because the caller has insufficient permissions.

Throws

APIGatewayServiceException

Base exception class for all service exceptions from APIGateway service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods