org.jclouds.ec2.services
Interface KeyPairClient

All Known Subinterfaces:
AWSKeyPairClient

public interface KeyPairClient

Provides access to EC2 via their REST API.

Author:
Adrian Cole

Method Summary
 KeyPair createKeyPairInRegion(String region, String keyName)
          Creates a new 2048-bit RSA key pair with the specified name.
 void deleteKeyPairInRegion(String region, String keyName)
          Deletes the specified key pair, by removing the public key from Amazon EC2.
 Set<KeyPair> describeKeyPairsInRegion(String region, String... keyPairNames)
          Returns information about key pairs available to you.
 

Method Detail

createKeyPairInRegion

KeyPair createKeyPairInRegion(@Nullable
                              String region,
                              String keyName)
Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by Amazon EC2 and the private key is displayed on the console. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

Parameters:
region - Key pairs (to connect to instances) are Region-specific.
keyName - A unique name for the key pair.
See Also:
#runInstances, #describeKeyPairs, #deleteKeyPair,

describeKeyPairsInRegion

Set<KeyPair> describeKeyPairsInRegion(@Nullable
                                      String region,
                                      String... keyPairNames)
Returns information about key pairs available to you. If you specify key pairs, information about those key pairs is returned. Otherwise, information for all registered key pairs is returned.

Parameters:
region - Key pairs (to connect to instances) are Region-specific.
keyPairNames - Key pairs to describe.
See Also:
#runInstances, #describeAvailabilityZones,

deleteKeyPairInRegion

void deleteKeyPairInRegion(@Nullable
                           String region,
                           String keyName)
Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the key pair

Parameters:
region - Key pairs (to connect to instances) are Region-specific.
keyName - Name of the key pair to delete
See Also:
#describeKeyPairs, #createKeyPair,


Copyright © 2009-2011 jclouds. All Rights Reserved.