aws_key_pair.md

April 1, 2019 ยท View on GitHub

Document: "ec2"

Path: "https://github.com/aws/aws-sdk-go-v2/tree/master/models/apis/ec2/2016-11-15/api-2.json")

KeyPair

aws_key_pair {
  dry_run => "DryRun (optional)",
  filters => "Filters (optional)",
  key_name => "key_name (optional)",
  key_names => "KeyNames (optional)",
  key_name => "key_name (optional)",
}
NameTypeRequired
dry_runBooleanfalse
filtersFilterListfalse
key_nameStringfalse
key_namesKeyNameStringListfalse
key_nameStringfalse

CRUD operations

Here is a list of endpoints that we use to create, read, update and delete the KeyPair

OperationPathVerbDescriptionOperationID
Create/POST

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.

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.

CreateKeyPair
List - list all/POST

Describes one or more of your key pairs.

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

DescribeKeyPairs
List - get one``
List - get list using params/POST

Describes one or more of your key pairs.

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

DescribeKeyPairs
Update``
Delete/POST

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

DeleteKeyPair