org.jclouds.digitalocean.features
Interface KeyPairApi

All Superinterfaces:
Closeable

public interface KeyPairApi
extends Closeable

Provides access to the SSH key pair management features.


Method Summary
 SshKey create(String name, String publicKey)
          Creates a new SSH key pair.
 void delete(int id)
          Deletes an existing SSH key pair.
 SshKey edit(int id, String newPublicKey)
          Changes the SSH key for the given key pair.
 SshKey get(int id)
          Gets the details of an existing SSH key pair.
 List<SshKey> list()
          Lists all existing SSH key pairs.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

list

List<SshKey> list()
Lists all existing SSH key pairs.

Returns:
The list of all existing SSH key pairs.

get

@Nullable
SshKey get(int id)
Gets the details of an existing SSH key pair.

Parameters:
id - The id of the SSH key pair.
Returns:
The details of the SSH key pair or null if no key exists with the given id.

create

SshKey create(String name,
              String publicKey)
Creates a new SSH key pair.

Parameters:
name - The name of the key pair.
publicKey - The public key.
Returns:
The details of the created key pair.

edit

SshKey edit(int id,
            String newPublicKey)
Changes the SSH key for the given key pair.

Parameters:
id - The id of the key pair.
newPublicKey - The new public key.
Returns:
The details of the modified key pair.

delete

void delete(int id)
Deletes an existing SSH key pair.

Parameters:
id - The id of the key pair.


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.