fixing examples
This commit is contained in:
Родитель
d950bad460
Коммит
04fc85e65b
|
@ -15,7 +15,7 @@ ev_api_version <- "2017-11-01"
|
|||
#' @return
|
||||
#' The updating functions return the contents of their respective environments as lists, invisibly.
|
||||
#' @seealso
|
||||
#' [is_azure_vm]
|
||||
#' [in_azure_vm]
|
||||
#'
|
||||
#' [Instance metadata service documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service)
|
||||
#'
|
||||
|
@ -26,7 +26,7 @@ ev_api_version <- "2017-11-01"
|
|||
#' ## these will only be meaningful when run in an Azure VM
|
||||
#'
|
||||
#' # all compute metadata
|
||||
#' as.list(AzureVMmetadata::instance$compute)
|
||||
#' AzureVMmetadata::instance$compute
|
||||
#'
|
||||
#' # VM name and ID
|
||||
#' AzureVMmetadata::instance$compute$name
|
||||
|
@ -38,10 +38,10 @@ ev_api_version <- "2017-11-01"
|
|||
#' AzureVMmetadata::instance$compute$resourceId
|
||||
#'
|
||||
#' # all network metadata
|
||||
#' as.list(AzureVMmetadata::instance$network)
|
||||
#' AzureVMmetadata::instance$network
|
||||
#'
|
||||
#' # IP address details (IPv4)
|
||||
#' AzureVMmetadata::instance$network$interface$ipv4
|
||||
#' # IPv4 address details (1st network interface)
|
||||
#' AzureVMmetadata::instance$network$interface[[1]]$ipv4
|
||||
#'
|
||||
#' @rdname metadata
|
||||
#' @export
|
||||
|
|
28
README.md
28
README.md
|
@ -12,5 +12,33 @@ AzureVMmetadata exposes 3 environments that contain the instance metadata for th
|
|||
|
||||
The first two are automatically populated when the package is loaded; you can also manually update them with the `update_instance_metadata()` and `update_attested_metadata()` functions. `events` is not populated at package startup (it causes the event scheduler service to be started on the VM, which can take up to several minutes), but you can update it manually with `update_scheduled_events()`.
|
||||
|
||||
```r
|
||||
## these will only be meaningful when run in an Azure VM
|
||||
|
||||
# all compute metadata
|
||||
AzureVMmetadata::instance$compute
|
||||
|
||||
# VM name and ID
|
||||
AzureVMmetadata::instance$compute$name
|
||||
AzureVMmetadata::instance$compute$vmId
|
||||
|
||||
# VM resource details: subscription, resource group, ID
|
||||
AzureVMmetadata::instance$compute$subscriptionId
|
||||
AzureVMmetadata::instance$compute$resourceGroupName
|
||||
AzureVMmetadata::instance$compute$resourceId
|
||||
|
||||
# all network metadata
|
||||
AzureVMmetadata::instance$network
|
||||
|
||||
# IPv4 address details (1st network interface)
|
||||
AzureVMmetadata::instance$network$interface$ipv4
|
||||
|
||||
# raw PKCS-7 certificate for the VM
|
||||
AzureVMmetadata::attested$signature
|
||||
|
||||
# certificate as an openssl::cert object
|
||||
get_vm_cert()
|
||||
```
|
||||
|
||||
----
|
||||
<p align="center"><a href="https://github.com/Azure/AzureR"><img src="https://github.com/Azure/AzureR/raw/master/images/logo2.png" width=800 /></a></p>
|
||||
|
|
Загрузка…
Ссылка в новой задаче