org.jclouds.ec2.features
Interface KeyPairApi


public interface KeyPairApi

Provides access to EC2 via their REST API.


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.
 Set<KeyPair> describeKeyPairsInRegionWithFilter(String region, com.google.common.collect.Multimap<String,String> filter)
          Returns information about key pairs available to you.
 

Method Detail

createKeyPairInRegion

@Named(value="CreateKeyPair")
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

@Named(value="DescribeKeyPairs")
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,

describeKeyPairsInRegionWithFilter

@Named(value="DescribeKeyPairs")
Set<KeyPair> describeKeyPairsInRegionWithFilter(@Nullable
                                                      String region,
                                                      com.google.common.collect.Multimap<String,String> filter)
Returns information about key pairs available to you. If you specify filters, information about keypairs matching those filters is returned. Otherwise, all keypairs you have access to are returned.

Parameters:
region - Key pairs (to connect to instances) are Region-specific.
filter - Multimap of filter key/values.
See Also:
#runInstances, #describeAvailabilityZones,

deleteKeyPairInRegion

@Named(value="DeleteKeyPair")
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-2014 The Apache Software Foundation. All Rights Reserved.