VaultCertificate Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. VaultCertificate
- com.
Implements
public final class VaultCertificate
implements JsonSerializable<VaultCertificate>
Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.
Constructor Summary
Constructor | Description |
---|---|
VaultCertificate() |
Creates an instance of Vault |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
certificateStore()
Get the certificate |
String |
certificateUrl()
Get the certificate |
static
Vault |
fromJson(JsonReader jsonReader)
Reads an instance of Vault |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Vault |
withCertificateStore(String certificateStore)
Set the certificate |
Vault |
withCertificateUrl(String certificateUrl)
Set the certificate |
Methods inherited from java.lang.Object
Constructor Details
VaultCertificate
public VaultCertificate()
Creates an instance of VaultCertificate class.
Method Details
certificateStore
public String certificateStore()
Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted.
Returns:
certificateUrl
public String certificateUrl()
Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/\#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
Returns:
fromJson
public static VaultCertificate fromJson(JsonReader jsonReader)
Reads an instance of VaultCertificate from the JsonReader.
Parameters:
Returns:
Throws:
toJson
validate
public void validate()
Validates the instance.
withCertificateStore
public VaultCertificate withCertificateStore(String certificateStore)
Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted.
Parameters:
Returns:
withCertificateUrl
public VaultCertificate withCertificateUrl(String certificateUrl)
Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/\#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
Parameters:
Returns:
Applies to
Azure SDK for Java