Imports the public key from an RSA key pair that you created with a
third-party tool. Compare this with
create_key_pair
, in which AWS creates the key
pair and gives the keys to you (AWS keeps a copy of the public key).
With ImportKeyPair, you create the key pair and give AWS just the public
key. The private key is never transferred between you and AWS.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
ec2_import_key_pair(DryRun, KeyName, PublicKeyMaterial,
TagSpecifications)
A list with the following syntax:
list(
KeyFingerprint = "string",
KeyName = "string",
KeyPairId = "string",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
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
.
[required] A unique name for the key pair.
[required] The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.
The tags to apply to the imported key pair.
svc$import_key_pair(
DryRun = TRUE|FALSE,
KeyName = "string",
PublicKeyMaterial = raw,
TagSpecifications = list(
list(
ResourceType = "client-vpn-endpoint"|"customer-gateway"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"import-image-task"|"import-snapshot-task"|"instance"|"internet-gateway"|"key-pair"|"launch-template"|"local-gateway-route-table-vpc-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"placement-group"|"reserved-instances"|"route-table"|"security-group"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-route-table"|"volume"|"vpc"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
)
)