{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/2212","repository_url":"https://api.github.com/repos/Azure/azure-powershell","labels_url":"https://api.github.com/repos/Azure/azure-powershell/issues/2212/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-powershell/issues/2212/comments","events_url":"https://api.github.com/repos/Azure/azure-powershell/issues/2212/events","html_url":"https://github.com/Azure/azure-powershell/issues/2212","id":153170319,"number":2212,"title":"Can't index into Storage Account Keys using string","user":{"login":"pcgeek86","id":466713,"avatar_url":"https://avatars.githubusercontent.com/u/466713?v=3","gravatar_id":"","url":"https://api.github.com/users/pcgeek86","html_url":"https://github.com/pcgeek86","followers_url":"https://api.github.com/users/pcgeek86/followers","following_url":"https://api.github.com/users/pcgeek86/following{/other_user}","gists_url":"https://api.github.com/users/pcgeek86/gists{/gist_id}","starred_url":"https://api.github.com/users/pcgeek86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcgeek86/subscriptions","organizations_url":"https://api.github.com/users/pcgeek86/orgs","repos_url":"https://api.github.com/users/pcgeek86/repos","events_url":"https://api.github.com/users/pcgeek86/events{/privacy}","received_events_url":"https://api.github.com/users/pcgeek86/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Azure/azure-powershell/labels/Storage","name":"Storage","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-05T05:30:04Z","updated_at":"2016-05-12T17:06:40Z","closed_at":null,"body":"# Issue\r\n\r\nThe output from `Get-AzureRmStorageAccountKey` clearly indicates that there are two \"keys\" along with their corresponding values. When I try to index into the dictionary, it fails to retrieve the value.\r\n\r\n```\r\n$StorageKey = Get-AzureRmStorageAccountKey -ResourceGroupName foo -Name bar;\r\n$StorageKey['key1'] -eq $null;\r\n\r\n### Return value: True\r\n```\r\n\r\n![image](https://cloud.githubusercontent.com/assets/466713/15036683/d6c1102c-124f-11e6-98bc-54bf62cf4ef9.png)\r\n\r\n# Expected Result\r\n\r\nI should be able to index into the array of keys, using the key's name (string). It looks like a dictionary, but doesn't index like a dictionary.\r\n\r\nCheers,\r\n**Trevor Sullivan**\r\nMicrosoft MVP: PowerShell\r\nhttps://trevorsullivan.net\r\nhttps://twitter.com/pcgeek86"},"comment":{"url":"https://api.github.com/repos/Azure/azure-powershell/issues/comments/218821891","html_url":"https://github.com/Azure/azure-powershell/issues/2212#issuecomment-218821891","issue_url":"https://api.github.com/repos/Azure/azure-powershell/issues/2212","id":218821891,"user":{"login":"pcgeek86","id":466713,"avatar_url":"https://avatars.githubusercontent.com/u/466713?v=3","gravatar_id":"","url":"https://api.github.com/users/pcgeek86","html_url":"https://github.com/pcgeek86","followers_url":"https://api.github.com/users/pcgeek86/followers","following_url":"https://api.github.com/users/pcgeek86/following{/other_user}","gists_url":"https://api.github.com/users/pcgeek86/gists{/gist_id}","starred_url":"https://api.github.com/users/pcgeek86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcgeek86/subscriptions","organizations_url":"https://api.github.com/users/pcgeek86/orgs","repos_url":"https://api.github.com/users/pcgeek86/repos","events_url":"https://api.github.com/users/pcgeek86/events{/privacy}","received_events_url":"https://api.github.com/users/pcgeek86/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T17:06:40Z","updated_at":"2016-05-12T17:06:40Z","body":"Shouldn't we call `KeyName` just `Name` instead? The data model is named `Microsoft.Azure.Management.Storage.Models.StorageAccountKey`, so it is redundant to have a property `KeyName`, when it's really just the `Name` of the object.\r\n\r\nSame goes for Storage Accounts. The Storage team seems to be doing things differently than other Azure teams, and we need some consistency. For example, when you call `Get-AzureRmPublicIpAddress` and `Get-AzureRmVm`, you get back an object that simply has a `Name` property. The property isn't called `PublicIPAddressName` or `VirtualMachineName`, because that would be redundant."}}