Class KeyVaultKeyReference
java.lang.Object
com.azure.resourcemanager.compute.models.KeyVaultKeyReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultKeyReference>
public final class KeyVaultKeyReference
extends Object
implements com.azure.json.JsonSerializable<KeyVaultKeyReference>
Describes a reference to Key Vault Key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyVaultKeyReferencefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KeyVaultKeyReference from the JsonReader.keyUrl()Get the keyUrl property: The URL referencing a key encryption key in Key Vault.com.azure.core.management.SubResourceGet the sourceVault property: The relative URL of the Key Vault containing the key.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withKeyUrl(String keyUrl) Set the keyUrl property: The URL referencing a key encryption key in Key Vault.withSourceVault(com.azure.core.management.SubResource sourceVault) Set the sourceVault property: The relative URL of the Key Vault containing the key.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KeyVaultKeyReference
public KeyVaultKeyReference()Creates an instance of KeyVaultKeyReference class.
-
-
Method Details
-
keyUrl
Get the keyUrl property: The URL referencing a key encryption key in Key Vault.- Returns:
- the keyUrl value.
-
withKeyUrl
Set the keyUrl property: The URL referencing a key encryption key in Key Vault.- Parameters:
keyUrl- the keyUrl value to set.- Returns:
- the KeyVaultKeyReference object itself.
-
sourceVault
public com.azure.core.management.SubResource sourceVault()Get the sourceVault property: The relative URL of the Key Vault containing the key.- Returns:
- the sourceVault value.
-
withSourceVault
Set the sourceVault property: The relative URL of the Key Vault containing the key.- Parameters:
sourceVault- the sourceVault value to set.- Returns:
- the KeyVaultKeyReference object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KeyVaultKeyReference>- Throws:
IOException
-
fromJson
public static KeyVaultKeyReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of KeyVaultKeyReference from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KeyVaultKeyReference 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 KeyVaultKeyReference.
-