Interface SSHKeyPairApi


  • public interface SSHKeyPairApi
    Provides synchronous access to CloudStack SSHKeyPair features.
    See Also:
    • Method Detail

      • listSSHKeyPairs

        @Named("listSSHKeyPairs")
        @GET
        @Consumes("application/json")
        Set<SshKeyPair> listSSHKeyPairs​(ListSSHKeyPairsOptions... options)
        Returns a list of SshKeyPairs registered by current user.
        Parameters:
        options - if present, how to constrain the list
        Returns:
        Set of SshKeyPairs matching the current constrains or empty set if no SshKeyPairs found.
      • registerSSHKeyPair

        @Named("registerSSHKeyPair")
        @GET
        @Consumes("application/json")
        SshKeyPair registerSSHKeyPair​(@QueryParam("name")
                                      String name,
                                      @QueryParam("publickey")
                                      String publicKey)
        Registers a SshKeyPair with the given name and public kay material.
        Parameters:
        name - of the keypair
        publicKey - Public key material of the keypair
        Returns:
        Created SshKeyPair.
      • createSSHKeyPair

        @Named("createSSHKeyPair")
        @GET
        @Consumes("application/json")
        SshKeyPair createSSHKeyPair​(@QueryParam("name")
                                    String name)
        Creates a SshKeyPair with specified name.
        Parameters:
        name - of the SshKeyPair.
        Returns:
        Created SshKeyPair.
      • getSSHKeyPair

        @Named("listSSHKeyPairs")
        @GET
        @Consumes("application/json")
        SshKeyPair getSSHKeyPair​(@QueryParam("name")
                                 String name)
        Retrieves the SSHKeyPairApi with given name.
        Parameters:
        name - name of the key pair
        Returns:
        SSH Key pair or null if not found.
      • deleteSSHKeyPair

        @Named("deleteSSHKeyPair")
        @GET
        void deleteSSHKeyPair​(@QueryParam("name")
                              String name)
        Deletes the SSHKeyPairApi with given name.
        Parameters:
        name - name of the key pair