Interface KeyPairApi

All Known Subinterfaces:
AWSKeyPairApi, NovaEC2KeyPairApi

public interface KeyPairApi
Provides access to EC2 via their REST API.

  • Method Details

    • createKeyPairInRegion

      @Named("CreateKeyPair") @POST @Path("/") KeyPair createKeyPairInRegion(@Nullable String region, @FormParam("KeyName") 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:
      • invalid reference
        #runInstances
      • invalid reference
        #describeKeyPairs
      • invalid reference
        #deleteKeyPair
    • describeKeyPairsInRegion

      @Named("DescribeKeyPairs") @POST @Path("/") Set<KeyPairdescribeKeyPairsInRegion(@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:
      • invalid reference
        #runInstances
      • invalid reference
        #describeAvailabilityZones
    • describeKeyPairsInRegionWithFilter

      @Named("DescribeKeyPairs") @POST @Path("/") Set<KeyPairdescribeKeyPairsInRegionWithFilter(@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:
      • invalid reference
        #runInstances
      • invalid reference
        #describeAvailabilityZones
    • deleteKeyPairInRegion

      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:
      • invalid reference
        #describeKeyPairs
      • invalid reference
        #createKeyPair