in_azure_vm {AzureVMmetadata} | R Documentation |
Check if R is running in an Azure VM
Description
Check if R is running in an Azure VM
Usage
in_azure_vm()
get_vm_cert(nonce = NULL)
Arguments
nonce |
An optional string to use as a nonce. |
Details
These functions check if R is running in an Azure VM by attempting to contact the instance metadata host. in_azure_vm
simply returns TRUE or FALSE based on whether it succeeds. get_vm_cert
provides a stronger check, by retrieving the VM's certificate and throwing an error if this is not found. Note that you should still verify the certificate's authenticity before relying on it.
Value
For in_azure_vm
, a boolean. For get_vm_cert
, a PKCS-7 certificate object.
[Package AzureVMmetadata version 1.0.1 Index]