paws.compute (version 0.1.0)

ec2_create_key_pair: Creates a 2048-bit RSA key pair with the specified name

Description

Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS\#1 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

Usage

ec2_create_key_pair(KeyName, DryRun)

Arguments

KeyName

[required] A unique name for the key pair.

Constraints: Up to 255 ASCII characters

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.

Request syntax

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

Details

You can have up to five thousand key pairs per region.

The key pair returned to you is available only in the region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any region using ImportKeyPair.

For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples

Run this code
# NOT RUN {
# This example creates a key pair named my-key-pair.
# }
# NOT RUN {
svc$create_key_pair(
  KeyName = "my-key-pair"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab