I am using the C# management API of Azure to create my resources in the cloud. I am stuck creating a container in the blob storage. I did create a storage account following these instructions:
// storageAccount here is a Microsoft.Azure.Management.Storage.Fluent.IStorageAccount instance
var storageAccount = _azure.StorageAccounts
.Define(name)
.WithRegion(region)
.WithExistingResourceGroup(resourceGroup)
.WithBlobEncryption()
.WithOnlyHttpsTraffic()
.WithBlobStorageAccountKind()
.WithAccessTier(AccessTier.Hot)
.Create();
But I do not know how to go on from there. From the Microsoft documentation it seems that I have to retrieve a Microsoft.WindowsAzure.Storage.CloudStorageAccount
instance, but the storageAccount
instance I obtain with the above code lives in the namespace Microsoft.Azure.Management.Storage.Fluent
, and I have not found any way to get the CloudStorageAccount
from there.
Is it possible to create containers directly with the API in the fluent namespace? If not, how do I get the CloudStorageAccount
instance from my IStorageAccount
one?
This answer in SO is not helpful because it does use the Microsoft.WindowsAzure
namespace directly.