Class SshKeyPair

java.lang.Object
com.azure.resourcemanager.workloads.models.SshKeyPair

public final class SshKeyPair extends Object
The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
  • Constructor Details

    • SshKeyPair

      public SshKeyPair()
  • Method Details

    • publicKey

      public String publicKey()
      Get the publicKey property: SSH public key.
      Returns:
      the publicKey value.
    • withPublicKey

      public SshKeyPair withPublicKey(String publicKey)
      Set the publicKey property: SSH public key.
      Parameters:
      publicKey - the publicKey value to set.
      Returns:
      the SshKeyPair object itself.
    • privateKey

      public String privateKey()
      Get the privateKey property: SSH private key.
      Returns:
      the privateKey value.
    • withPrivateKey

      public SshKeyPair withPrivateKey(String privateKey)
      Set the privateKey property: SSH private key.
      Parameters:
      privateKey - the privateKey value to set.
      Returns:
      the SshKeyPair object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.