Class KeyForDiskEncryptionSet

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

public final class KeyForDiskEncryptionSet extends Object implements com.azure.json.JsonSerializable<KeyForDiskEncryptionSet>
Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots.
  • Constructor Details

    • KeyForDiskEncryptionSet

      public KeyForDiskEncryptionSet()
      Creates an instance of KeyForDiskEncryptionSet class.
  • Method Details

    • sourceVault

      public SourceVault sourceVault()
      Get the sourceVault property: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
      Returns:
      the sourceVault value.
    • withSourceVault

      public KeyForDiskEncryptionSet withSourceVault(SourceVault sourceVault)
      Set the sourceVault property: Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
      Parameters:
      sourceVault - the sourceVault value to set.
      Returns:
      the KeyForDiskEncryptionSet object itself.
    • keyUrl

      public String keyUrl()
      Get the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.
      Returns:
      the keyUrl value.
    • withKeyUrl

      public KeyForDiskEncryptionSet withKeyUrl(String keyUrl)
      Set the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.
      Parameters:
      keyUrl - the keyUrl value to set.
      Returns:
      the KeyForDiskEncryptionSet object itself.
    • 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<KeyForDiskEncryptionSet>
      Throws:
      IOException
    • fromJson

      public static KeyForDiskEncryptionSet fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of KeyForDiskEncryptionSet from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of KeyForDiskEncryptionSet 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 KeyForDiskEncryptionSet.