public virtual BatchAccountContext GetKeys(string resourceGroupName, string accountName)
{
if (string.IsNullOrEmpty(resourceGroupName))
{
// use resource mgr to see if account exists and then use resource group name to do the actual lookup
resourceGroupName = GetGroupForAccount(accountName);
}
var context = GetAccount(resourceGroupName, accountName);
var keysResponse = BatchManagementClient.BatchAccount.GetKeys(resourceGroupName, accountName);
context.PrimaryAccountKey = keysResponse.Primary;
context.SecondaryAccountKey = keysResponse.Secondary;
return context;
}