Learn R Programming

azr (version 0.2.0)

az_cli_account_show: Show Azure CLI Account Information

Description

Retrieves information about the currently active Azure CLI account and subscription. This function runs az account show and parses the JSON output into an R list.

Usage

az_cli_account_show(timeout = 10L)

Value

A list containing the account information from Azure CLI

Arguments

timeout

An integer specifying the timeout in seconds for the Azure CLI command. Defaults to 10.

Details

The function returns details about the current Azure subscription including:

  • Subscription ID and name

  • Tenant ID

  • Account state (e.g., "Enabled")

  • User information

  • Cloud environment details

Examples

Run this code
if (FALSE) {
# Get current account information
account_info <- az_cli_account_show()

# Access subscription ID
subscription_id <- account_info$id

# Access tenant ID
tenant_id <- account_info$tenantId
}

Run the code above in your browser using DataLab