Interface KeyPairApi
-
@Beta @Consumes("application/json") @Path("/os-keypairs") public interface KeyPairApi
Provides access to the OpenStack Compute (Nova) Key Pair Extension API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyPair
create(String name)
Creates aKeyPair
.KeyPair
createWithPublicKey(String name, String publicKey)
Creates aKeyPair
with a public key.boolean
delete(String name)
Deletes aKeyPair
.KeyPair
get(String name)
Gets a specificKeyPair
by name.com.google.common.collect.FluentIterable<KeyPair>
list()
Lists all Key Pairs.
-
-
-
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 aKeyPair
.- Returns:
- the created
KeyPair
.
-
createWithPublicKey
@Named("keypair:create") @POST @Produces("application/json") KeyPair createWithPublicKey(String name, String publicKey)
Creates aKeyPair
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 specificKeyPair
by name.
-
-