import_key_pair
async
¶
import_key_pair(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
key_name: Optional[String] = None,
public_key_material: Optional[Blob] = None,
) -> ImportKeyPairResult
Imports the public key from an RSA or ED25519 key pair that you created using a third-party tool. You give Amazon Web Services only the public key. The private key is never transferred between you and Amazon Web Services.
For more information about the requirements for importing a key pair, see Create a key pair and import the public key to Amazon EC2 in the Amazon EC2 User Guide.
Parameters:
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the imported key pair.
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
key_name(Optional[String], default:None) –A unique name for the key pair.
-
public_key_material(Optional[Blob], default:None) –The public key.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
48956 48957 48958 48959 48960 48961 48962 48963 48964 48965 48966 48967 48968 48969 48970 48971 48972 48973 48974 48975 48976 48977 48978 48979 48980 48981 48982 48983 48984 48985 48986 48987 48988 48989 48990 48991 48992 48993 48994 48995 48996 48997 48998 48999 49000 49001 49002 49003 49004 49005 49006 49007 49008 49009 49010 49011 49012 49013 | |