Class SshPublicKeyGenerateKeyPairResultInner

java.lang.Object
com.azure.resourcemanager.compute.fluent.models.SshPublicKeyGenerateKeyPairResultInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<SshPublicKeyGenerateKeyPairResultInner>

public final class SshPublicKeyGenerateKeyPairResultInner extends Object implements com.azure.json.JsonSerializable<SshPublicKeyGenerateKeyPairResultInner>
Response from generation of an SSH key pair.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SshPublicKeyGenerateKeyPairResultInner from the JsonReader.
    id()
    Get the id property: The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}.
    Get the privateKey property: Private key portion of the key pair used to authenticate to a virtual machine through ssh.
    Get the publicKey property: Public key portion of the key pair used to authenticate to a virtual machine through ssh.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • privateKey

      public String privateKey()
      Get the privateKey property: Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
      Returns:
      the privateKey value.
    • publicKey

      public String publicKey()
      Get the publicKey property: Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
      Returns:
      the publicKey value.
    • id

      public String id()
      Get the id property: The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}.
      Returns:
      the id value.
    • validate

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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SshPublicKeyGenerateKeyPairResultInner>
      Throws:
      IOException
    • fromJson

      public static SshPublicKeyGenerateKeyPairResultInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SshPublicKeyGenerateKeyPairResultInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SshPublicKeyGenerateKeyPairResultInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the SshPublicKeyGenerateKeyPairResultInner.