{"id":780,"date":"2024-10-10T07:40:01","date_gmt":"2024-10-09T21:40:01","guid":{"rendered":"https:\/\/www.cloudproinc.com.au\/?p=780"},"modified":"2024-10-10T07:40:03","modified_gmt":"2024-10-09T21:40:03","slug":"creating-a-storage-container-in-azure-using-azure-sdk-for-net","status":"publish","type":"post","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/","title":{"rendered":"Creating a Storage Container in Azure Using Azure SDK for .NET"},"content":{"rendered":"\n<p>In this\u00a0\u00a0Microsoft Azure\u00a0article, we will create a storage container inside an Azure storage account using Azure SDK for .NET.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-yoast-seo-estimated-reading-time yoast-reading-time__wrapper\"><span class=\"yoast-reading-time__icon\"><svg aria-hidden=\"true\" focusable=\"false\" data-icon=\"clock\" width=\"20\" height=\"20\" fill=\"none\" stroke=\"currentColor\" style=\"display:inline-block;vertical-align:-0.1em\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"><\/path><\/svg><\/span><span class=\"yoast-reading-time__spacer\" style=\"display:inline-block;width:1em\"><\/span><span class=\"yoast-reading-time__descriptive-text\">Estimated reading time: <\/span><span class=\"yoast-reading-time__reading-time\">3<\/span><span class=\"yoast-reading-time__time-unit\"> minutes<\/span><\/p>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-creating-a-storage-container-in-azure-using-azure-sdk-for-net\" data-level=\"2\">Creating a Storage Container in Azure Using Azure SDK for .NET<\/a><\/li><li><a href=\"#h-create-storage-account\" data-level=\"2\">Create Storage Account<\/a><\/li><li><a href=\"#h-retrieve-storage-account-connection-string-using-powershell\" data-level=\"2\">Retrieve Storage Account Connection String Using PowerShell<\/a><\/li><li><a href=\"#h-create-c-console-application\" data-level=\"2\">Create C# Console Application<\/a><\/li><li><a href=\"#h-create-an-environment-variable\" data-level=\"2\">Create an Environment Variable<\/a><\/li><li><a href=\"#h-console-app-code\" data-level=\"2\">Console App Code<\/a><\/li><li><a href=\"#h-related-articles\" data-level=\"2\">Related Articles<\/a><\/li><\/ul><\/div>\n\n\n\n<p>Azure SDK for .NET allows us to use native C# code and create infrastructure resources on the Azure cloud platform.<\/p>\n\n\n\n<p>Using .NET tools to manage Azure allows us to integrate Azure services with existing and new .NET applications.<\/p>\n\n\n\n<p>The SDK also shorten the learning curve for developers looking to integrate and use .NET to build cloud-native applications or add services like storage, data and more to their applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-creating-a-storage-container-in-azure-using-azure-sdk-for-net\">Creating a Storage Container in Azure Using Azure SDK for .NET<\/h2>\n\n\n\n<p>This post will focus on creating a storage container inside an Azure storage account. We will start with the first infrastructure provision, which consists of a storage account using Azure PowerShell and Bicep.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-storage-account\">Create Storage Account<\/h2>\n\n\n\n<p>We will use Azure PowerShell and the following commands to create a resource group and a storage account.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-a2df63a6b81e2cb8df686aae9fc54236\"><code># Login to Azure (if not already logged in)\nConnect-AzAccount\n\n# Create a new resource group named 'bicep-lab' in a specific location (e.g., East US)\nNew-AzResourceGroup -Name \"bicep-lab\" -Location \"EastUS\"<\/code><\/pre>\n\n\n\n<p>Once the resource group is ready, we will create a storage account using\u00a0Bicep. Azure Bicep is an Azure-only Infrastructure-as-code(IaC) tool that allows us to programmatically provision infrastructure and services on Azure.<\/p>\n\n\n\n<p>Bicep is similar to Terraform but only works on Azure, uses the latest Azure API, and stores the state files in Azure.<\/p>\n\n\n\n<p>The following Bicep file contains the deployment file for a storage account.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-98c90d98d884133b633201d1c914feee\"><code>param storageAccountName string = 'deploycontainers1001'\nparam location string = 'eastus'\nparam skuName string = 'Standard_LRS'\n\n\nresource storageAccount 'Microsoft.Storage\/storageAccounts@2023-01-01' = {\n  name: storageAccountName\n  location: location\n  sku: {\n    name: skuName\n  }\n  kind: 'StorageV2'\n  properties: {\n    accessTier: 'Hot'\n  }\n}<\/code><\/pre>\n\n\n\n<p>To create the storage account, run the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-a698a7ccee53c087b615135b7ca1f62d\"><code># Install Bicep on Windows \nwinget install -e --id Microsoft.Bicep\n\n# Deploy storage account\nNew-AzResourceGroupDeployment -ResourceGroupName \"bicep-lab\" -TemplateFile .\\main.bicep<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-retrieve-storage-account-connection-string-using-powershell\">Retrieve Storage Account Connection String Using PowerShell<\/h2>\n\n\n\n<p>Before we can access the storage account for our C# Console application, we need to retrieve the storage account\u2019s connection string.<\/p>\n\n\n\n<p>I will use the PowerShell script to retrieve the connection string from the storage account.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f877bbdd0d767d33b517675fa365a150\"><code>$rgname=\"bicep-lab\"\n$storageAccountName=\"deploycontainers1001\"\n$storageAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storageAccountName\n\n# Construct the connection string\n$connectionString = \"DefaultEndpointsProtocol=https;AccountName=$storageAccountName;AccountKey=$($storageAccountKeys&#91;0].Value);EndpointSuffix=core.windows.net\"\n\n# Output the connection string\nWrite-Output $connectionString<\/code><\/pre>\n\n\n\n<p>Copy the connection string and save it for the next section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-c-console-application\">Create C# Console Application<\/h2>\n\n\n\n<p>To create a storage container on Azure, we must first create a console application and install the Azure SDK storage libraries.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-50a36dc727abc51696cef27bf0e0bca6\"><code># Create C# Console application\ndotnet new console\n\n# Install the Azure Storage SDK library \ndotnet add package Azure.Storage.Blobs<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-an-environment-variable\">Create an Environment Variable<\/h2>\n\n\n\n<p>To connect to the storage account, the console app needs the connection string details to authenticate to Azure.<\/p>\n\n\n\n<p>Using the connection string we copied from the previous section, create an environment variable called connectionString, as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6a266dc5df18e15592a8567a9cb65181\"><code>$env:connectionString=\"connection string details\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-console-app-code\">Console App Code<\/h2>\n\n\n\n<p>Copy the following code to your Program.cs file and run the application. The application will create a container with a random name of deploycontainers and today\u2019s date.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-173d718614a34ae831b7f1d74c14c5c7\"><code>using Azure.Storage.Blobs; \/\/ Namespace for Blob storage types\nusing Azure.Storage.Blobs.Models; \/\/ Namespace for Blob storage models\n\n\nclass Program\n{\n\n    static void Main(string&#91;] args)\n    {\n        \/\/ Retrieve the connection string from environment variables\n        string connectionString = Environment.GetEnvironmentVariable(\"connectionString\");\n\n        \/\/ Check if the connection string is not null or empty\n        if (!string.IsNullOrEmpty(connectionString))\n        {\n            \/\/ Print the connection string to the console for verification\n            Console.WriteLine($\"connectionString: {connectionString}\");\n        }\n        else\n        {\n            \/\/ Inform the user that the connection string environment variable is not set\n            Console.WriteLine(\"The environment variable 'connectionString' is not set.\");\n        }\n\n        \/\/ Initiate asynchronous processing with the Azure Blob Storage\n        ProcessAsync(connectionString).GetAwaiter().GetResult();\n\n        \/\/ Prompt the user to press enter to exit the application\n        Console.WriteLine(\"Press enter to exit the sample application.\");\n        Console.ReadLine();\n    }\n\n    \/\/\/ &lt;summary>\n    \/\/\/ Asynchronously processes operations against Azure Blob Storage.\n    \/\/\/ It creates a Blob Service Client using the provided connection string,\n    \/\/\/ creates a new container with a unique name, and prompts the user to verify its creation in the Azure portal.\n    \/\/\/ &lt;\/summary>\n    \/\/\/ &lt;param name=\"connectionString\">The Azure Blob Storage connection string.&lt;\/param>\n    \/\/\/ &lt;returns>A task representing the asynchronous operation.&lt;\/returns>\n    static async Task ProcessAsync(string connectionString)\n    {\n        \/\/ Create a BlobServiceClient instance for interacting with the Azure Blob Storage\n        BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString);\n\n        \/\/ Generate a unique name for the new container\n        string containerName = \"deploycontainers\" + DateTime.Now.ToString(\"yyyyMMddHHmmss\");\n\n        \/\/ Create the container and obtain a reference to it\n        BlobContainerClient containerClient = await blobServiceClient.CreateBlobContainerAsync(containerName);\n\n        \/\/ Inform the user that the container has been created and prompt for manual verification in the Azure portal\n        Console.WriteLine($\"A new container named '{containerName}' has been created successfully.\");\n      \n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-related-articles\">Related Articles<\/h2>\n\n\n\n<ul class=\"wp-block-yoast-seo-related-links yoast-seo-related-links\">\n<li><a href=\"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/07\/generate-dall-e-images-with-net-c-console-application\/\">Generate DALL-E Images with .NET C# Console Application<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/07\/21\/retrieving-azure-ai-services-keys-and-endpoints-using-bicep\/\">Retrieving Azure AI Services Keys and Endpoints Using Bicep<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/09\/10\/how-to-translate-text-using-azure-ai-translator-and-net\/\">How to Translate Text Using Azure AI Translator and .NET<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/07\/29\/reading-handwriting-with-azure-ai-vision-and-net-c\/\">Reading Handwriting with Azure AI Vision and .NET C#<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.cloudproinc.com.au\/index.php\/2024\/08\/01\/automating-access-to-microsoft-graph-api-using-azure-pipelines\/\">Automating Access to Microsoft Graph API Using Azure Pipelines<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this\u00a0\u00a0Microsoft Azure\u00a0article, we will create a storage container inside an Azure storage account using Azure SDK for .NET.<\/p>\n","protected":false},"author":1,"featured_media":460,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"Creating a Storage Container in Azure Using Azure SDK for .NET","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.","_yoast_wpseo_opengraph-title":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_twitter-title":"","_yoast_wpseo_twitter-description":"","_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[27,16,13],"tags":[],"class_list":["post-780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-microsoft-azure","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Creating a Storage Container in Azure Using Azure SDK for .NET - CPI Consulting<\/title>\n<meta name=\"description\" content=\"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Storage Container in Azure Using Azure SDK for .NET\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/\" \/>\n<meta property=\"og:site_name\" content=\"CPI Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-09T21:40:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-09T21:40:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudproinc.azurewebsites.net\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"CPI Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CPI Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/\"},\"author\":{\"name\":\"CPI Staff\",\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\"},\"headline\":\"Creating a Storage Container in Azure Using Azure SDK for .NET\",\"datePublished\":\"2024-10-09T21:40:01+00:00\",\"dateModified\":\"2024-10-09T21:40:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/\"},\"wordCount\":482,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp\",\"articleSection\":[\".NET\",\"Azure\",\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#respond\"]}],\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/\",\"url\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/\",\"name\":\"Creating a Storage Container in Azure Using Azure SDK for .NET - CPI Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp\",\"datePublished\":\"2024-10-09T21:40:01+00:00\",\"dateModified\":\"2024-10-09T21:40:03+00:00\",\"description\":\"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#primaryimage\",\"url\":\"\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cloudproinc.com.au\\\/index.php\\\/2024\\\/10\\\/10\\\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cloudproinc.com.au\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Storage Container in Azure Using Azure SDK for .NET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#website\",\"url\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/\",\"name\":\"Cloud Pro Inc - CPI Consulting Pty Ltd\",\"description\":\"Cloud, AI &amp; Cybersecurity Consulting | Melbourne\",\"publisher\":{\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#organization\",\"name\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\",\"url\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/favfinalfile.png\",\"width\":500,\"height\":500,\"caption\":\"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd\"},\"image\":{\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/#\\\/schema\\\/person\\\/192eeeb0ce91062126ce3822ae88fe6e\",\"name\":\"CPI Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g\",\"caption\":\"CPI Staff\"},\"sameAs\":[\"http:\\\/\\\/www.cloudproinc.com.au\"],\"url\":\"https:\\\/\\\/cloudproinc.azurewebsites.net\\\/index.php\\\/author\\\/cpiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating a Storage Container in Azure Using Azure SDK for .NET - CPI Consulting","description":"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Storage Container in Azure Using Azure SDK for .NET","og_description":"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.","og_url":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/","og_site_name":"CPI Consulting","article_published_time":"2024-10-09T21:40:01+00:00","article_modified_time":"2024-10-09T21:40:03+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/cloudproinc.azurewebsites.net\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","type":"image\/webp"}],"author":"CPI Staff","twitter_card":"summary_large_image","twitter_misc":{"Written by":"CPI Staff","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#article","isPartOf":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/"},"author":{"name":"CPI Staff","@id":"https:\/\/cloudproinc.azurewebsites.net\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e"},"headline":"Creating a Storage Container in Azure Using Azure SDK for .NET","datePublished":"2024-10-09T21:40:01+00:00","dateModified":"2024-10-09T21:40:03+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/"},"wordCount":482,"commentCount":0,"publisher":{"@id":"https:\/\/cloudproinc.azurewebsites.net\/#organization"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","articleSection":[".NET","Azure","Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#respond"]}],"accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/","url":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/","name":"Creating a Storage Container in Azure Using Azure SDK for .NET - CPI Consulting","isPartOf":{"@id":"https:\/\/cloudproinc.azurewebsites.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#primaryimage"},"image":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","datePublished":"2024-10-09T21:40:01+00:00","dateModified":"2024-10-09T21:40:03+00:00","description":"Learn how to create a storage container in Azure using Azure SDK for .NET. Integrate Azure services with your .NET applications.","breadcrumb":{"@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#primaryimage","url":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","contentUrl":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/cloudproinc.com.au\/index.php\/2024\/10\/10\/creating-a-storage-container-in-azure-using-azure-sdk-for-net\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cloudproinc.com.au\/"},{"@type":"ListItem","position":2,"name":"Creating a Storage Container in Azure Using Azure SDK for .NET"}]},{"@type":"WebSite","@id":"https:\/\/cloudproinc.azurewebsites.net\/#website","url":"https:\/\/cloudproinc.azurewebsites.net\/","name":"Cloud Pro Inc - CPI Consulting Pty Ltd","description":"Cloud, AI &amp; Cybersecurity Consulting | Melbourne","publisher":{"@id":"https:\/\/cloudproinc.azurewebsites.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudproinc.azurewebsites.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudproinc.azurewebsites.net\/#organization","name":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd","url":"https:\/\/cloudproinc.azurewebsites.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudproinc.azurewebsites.net\/#\/schema\/logo\/image\/","url":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","contentUrl":"\/wp-content\/uploads\/2022\/01\/favfinalfile.png","width":500,"height":500,"caption":"Cloud Pro Inc - Cloud Pro Inc - CPI Consulting Pty Ltd"},"image":{"@id":"https:\/\/cloudproinc.azurewebsites.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudproinc.azurewebsites.net\/#\/schema\/person\/192eeeb0ce91062126ce3822ae88fe6e","name":"CPI Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d96eeb53b791d92c8c50dd667e3beec92c93253bb6ff21c02cfa8ca73665c70?s=96&d=mm&r=g","caption":"CPI Staff"},"sameAs":["http:\/\/www.cloudproinc.com.au"],"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/author\/cpiadmin\/"}]}},"jetpack_featured_media_url":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","jetpack-related-posts":[{"id":56770,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/11\/05\/securely-use-managed-identity-in-production-and-azure-cli-locally\/","url_meta":{"origin":780,"position":0},"title":"Securely use Managed Identity in Production and Azure CLI Locally","author":"CPI Staff","date":"November 5, 2025","format":false,"excerpt":"A clean pattern: Managed Identity in prod, Azure CLI for local dev. Practical steps, code, and gotchas to keep secrets out and developers productive.","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/microsoft-azure\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png 1x, \/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png 1.5x, \/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png 2x, \/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png 3x, \/wp-content\/uploads\/2025\/11\/securely-use-managed-identity-in-production-and-azure-cli-locally.png 4x"},"classes":[]},{"id":784,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2024\/10\/11\/create-an-app-registration-for-microsoft-azure-sdk-for-net\/","url_meta":{"origin":780,"position":1},"title":"Create an App Registration for Microsoft Azure SDK for .NET","author":"CPI Staff","date":"October 11, 2024","format":false,"excerpt":"In this\u00a0\u00a0Azure\u00a0REST API post, I will show you how to create an App Registration for Microsoft Azure SDK for .NET. Azure SDK for .NET allows us to manage Azure programmatically using .NET libraries. Using the SDK, we can create and manage any Azure resource. The Azure SDK for .NET has\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2024\/09\/create-an-Azure-AI-Translator-service-using-the-Azure-REST-API.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2024\/09\/create-an-Azure-AI-Translator-service-using-the-Azure-REST-API.webp 1x, \/wp-content\/uploads\/2024\/09\/create-an-Azure-AI-Translator-service-using-the-Azure-REST-API.webp 1.5x, \/wp-content\/uploads\/2024\/09\/create-an-Azure-AI-Translator-service-using-the-Azure-REST-API.webp 2x"},"classes":[]},{"id":751,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2024\/10\/07\/generate-dall-e-images-with-net-c-console-application\/","url_meta":{"origin":780,"position":2},"title":"Generate DALL-E Images with .NET C# Console Application","author":"CPI Staff","date":"October 7, 2024","format":false,"excerpt":"This Azure OpenAI article will show you how to generate DALL-E images with .NET C# Console application using the Azure SDK for .NET. Table of contentsAzure SDK for .NETGenerate DALL-E Images with .NET C# Console ApplicationInstall-PackageProgram.csRelated Articles Azure SDK for .NET allows us to build Gen-AI applications using .NET, the\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp 1x, \/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp 1.5x, \/wp-content\/uploads\/2024\/07\/Reading-Handwriting-with-Azure-AI-Vision-and-.NET-C.webp 2x"},"classes":[]},{"id":53210,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/04\/18\/build-ai-applications-with-azure-ai-foundry\/","url_meta":{"origin":780,"position":3},"title":"Build AI applications With Azure AI Foundry","author":"CPI Staff","date":"April 18, 2025","format":false,"excerpt":"In this post, we will show how to build AI applications using Azure AI Foundry and the benefits of using the SDK for Foundry. Introduction The world of Artificial Intelligence (AI) is expanding rapidly, and businesses are increasingly seeking ways to leverage this technology to gain a competitive edge. One\u2026","rel":"","context":"In &quot;Azure&quot;","block_context":{"text":"Azure","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/microsoft-azure\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png 1x, \/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png 1.5x, \/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png 2x, \/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png 3x, \/wp-content\/uploads\/2025\/04\/Build-AI-applications-With-Azure-AI-Foundry.png 4x"},"classes":[]},{"id":53079,"url":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/2025\/01\/28\/running-c-net-applications-in-azure-devops-pipelines\/","url_meta":{"origin":780,"position":4},"title":"Running C# .NET Applications in Azure DevOps Pipelines","author":"CPI Staff","date":"January 28, 2025","format":false,"excerpt":"In this blog post, I will show you how to build and run a C# application in Azure DevOps Pipelines. Estimated reading time: 3 minutes Table of contentsWhat Are Azure Pipelines?Step 1: Build the Console ApplicationStep 2: Create a YAML PipelineStep 3: Create a New PipelinePipeline Execution OverviewSummaryRelated Articles What\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2025\/01\/Running-C-.NET-Applications-in-Azure-DevOps-Pipelines.webp","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2025\/01\/Running-C-.NET-Applications-in-Azure-DevOps-Pipelines.webp 1x, \/wp-content\/uploads\/2025\/01\/Running-C-.NET-Applications-in-Azure-DevOps-Pipelines.webp 1.5x, \/wp-content\/uploads\/2025\/01\/Running-C-.NET-Applications-in-Azure-DevOps-Pipelines.webp 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=780"}],"version-history":[{"count":1,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/780\/revisions"}],"predecessor-version":[{"id":783,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/780\/revisions\/783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media\/460"}],"wp:attachment":[{"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudproinc.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}