Class SshKeyPair
java.lang.Object
com.azure.resourcemanager.workloads.models.SshKeyPair
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the privateKey property: SSH private key.Get the publicKey property: SSH public key.void
validate()
Validates the instance.withPrivateKey
(String privateKey) Set the privateKey property: SSH private key.withPublicKey
(String publicKey) Set the publicKey property: SSH public key.
-
Constructor Details
-
SshKeyPair
public SshKeyPair()
-
-
Method Details
-
publicKey
Get the publicKey property: SSH public key.- Returns:
- the publicKey value.
-
withPublicKey
Set the publicKey property: SSH public key.- Parameters:
publicKey
- the publicKey value to set.- Returns:
- the SshKeyPair object itself.
-
privateKey
Get the privateKey property: SSH private key.- Returns:
- the privateKey value.
-
withPrivateKey
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.
-