This message was deleted.
# getting-started
s
This message was deleted.
b
I doh't see a
list_storage_account
call? I see
list_storage_account_keys
?
you also may want to redact your values
‼️ 1
can you share the code you have so far?
e
Thanks for the reply! This is how I list the keys:
Copy code
list_storage_account = azure_native.storage.list_storage_account_keys(
    account_name=scrubout.name,
    resource_group_name=resource_group.name   
)
b
okay, what do you want to do with the values now you're retirved them? pass them to another resource?
e
I just need the primary storage key but I get the entire output, so I don’t know if theres a method to get only the primary access key, the first one
Copy code
The storage account was created using azure_native.storage.StorageAccount()
b
i assume the primary key is the first result in the array, which you'll need to use an
apply
to access
it looks like the arm API doesn't have primary key for storage account keys? I can't find it in the spec
e
Yes, it is the first result in the array but I can’t access to it, it is just not “suscriptable”.
Copy code
pulumi.export("name", list_storage_account[0])
    TypeError: 'AwaitableListStorageAccountKeysResult' object is not subscriptable
b
Yes because as I just said, you need to use an apply
e
Ok, I’ll cheeck the C# example you provided 👍