Untitled

mail@pastecode.io avatar
unknown
r
2 months ago
625 B
3
Indexable
Never

# Authenticate with Azure AD
az <- create_azure_login() # or get_azure_login() for subsequent logins

# Get the subscription object
sub <- az$get_subscription("{subscription_id}")

# Construct the resource ID for the storage account
# You need to know the resource group name and the storage account name
resource_id <- paste0("/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Storage/storageAccounts/{storage_account_name}")

# Get the resource directly using its ID
stor <- sub$get_resource(resource_id = resource_id)

# Now `stor` refers to your storage account resource directly
Leave a Comment