Class KeyVaultSecretReference

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

public final class KeyVaultSecretReference extends Object implements com.azure.json.JsonSerializable<KeyVaultSecretReference>
Describes a reference to Key Vault Secret.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of KeyVaultSecretReference class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of KeyVaultSecretReference from the JsonReader.
    Get the secretUrl property: The URL referencing a secret in a Key Vault.
    com.azure.core.management.SubResource
    Get the sourceVault property: The relative URL of the Key Vault containing the secret.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withSecretUrl(String secretUrl)
    Set the secretUrl property: The URL referencing a secret in a Key Vault.
    withSourceVault(com.azure.core.management.SubResource sourceVault)
    Set the sourceVault property: The relative URL of the Key Vault containing the secret.

    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
  • Constructor Details

    • KeyVaultSecretReference

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

    • secretUrl

      public String secretUrl()
      Get the secretUrl property: The URL referencing a secret in a Key Vault.
      Returns:
      the secretUrl value.
    • withSecretUrl

      public KeyVaultSecretReference withSecretUrl(String secretUrl)
      Set the secretUrl property: The URL referencing a secret in a Key Vault.
      Parameters:
      secretUrl - the secretUrl value to set.
      Returns:
      the KeyVaultSecretReference object itself.
    • sourceVault

      public com.azure.core.management.SubResource sourceVault()
      Get the sourceVault property: The relative URL of the Key Vault containing the secret.
      Returns:
      the sourceVault value.
    • withSourceVault

      public KeyVaultSecretReference withSourceVault(com.azure.core.management.SubResource sourceVault)
      Set the sourceVault property: The relative URL of the Key Vault containing the secret.
      Parameters:
      sourceVault - the sourceVault value to set.
      Returns:
      the KeyVaultSecretReference 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<KeyVaultSecretReference>
      Throws:
      IOException
    • fromJson

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