Interface KeyPairApi


  • @Beta
    @Consumes("application/json")
    @Path("/os-keypairs")
    public interface KeyPairApi
    Provides access to the OpenStack Compute (Nova) Key Pair Extension API.
    • Method Detail

      • list

        @Named("keypair:list")
        @GET
        com.google.common.collect.FluentIterable<KeyPair> list()
        Lists all Key Pairs.
        Returns:
        all Key Pairs
      • create

        @Named("keypair:create")
        @POST
        @Produces("application/json")
        KeyPair create​(String name)
        Creates a KeyPair.
        Returns:
        the created KeyPair.
      • createWithPublicKey

        @Named("keypair:create")
        @POST
        @Produces("application/json")
        KeyPair createWithPublicKey​(String name,
                                    String publicKey)
        Creates a KeyPair with a public key.
        Returns:
        the created KeyPair.
      • get

        @Named("keypair:get")
        @GET
        @Path("/{name}")
        @Consumes("application/json")
        @Nullable
        KeyPair get​(@PathParam("name")
                    String name)
        Gets a specific KeyPair by name.
        Parameters:
        name - the name of the KeyPair
        Returns:
        the specified KeyPair, otherwise null.
      • delete

        @Named("keypair:delete")
        @DELETE
        @Path("/{name}")
        boolean delete​(@PathParam("name")
                       String name)
        Deletes a KeyPair.
        Parameters:
        name - the name of the KeyPair
        Returns:
        true if the KeyPair was deleted, otherwise false.