Describes the specified key pairs or all of your key pairs.
For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DescribeKeyPairsCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DescribeKeyPairsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DescribeKeyPairsCommand(input); const response = await client.send(command);
DescribeKeyPairsCommandInput for command's input shape.
input
DescribeKeyPairsCommandOutput for command's response shape.
response
config for EC2Client's config shape.
config
Describes the specified key pairs or all of your key pairs.
For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DescribeKeyPairsCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DescribeKeyPairsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DescribeKeyPairsCommand(input); const response = await client.send(command);
DescribeKeyPairsCommandInput for command's
input
shape.DescribeKeyPairsCommandOutput for command's
response
shape.config for EC2Client's
config
shape.