Skip to content

Delete Key Pair

ec2_delete_key_pair R Documentation

Deletes the specified key pair, by removing the public key from Amazon EC2

Description

Deletes the specified key pair, by removing the public key from Amazon EC2.

Usage

ec2_delete_key_pair(KeyName, KeyPairId, DryRun)

Arguments

KeyName

The name of the key pair.

KeyPairId

The ID of the key pair.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Value

A list with the following syntax:

list(
  Return = TRUE|FALSE,
  KeyPairId = "string"
)

Request syntax

svc$delete_key_pair(
  KeyName = "string",
  KeyPairId = "string",
  DryRun = TRUE|FALSE
)

Examples

## Not run: 
# This example deletes the specified key pair.
svc$delete_key_pair(
  KeyName = "my-key-pair"
)

## End(Not run)