### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps_source=recommendations An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/credential-chains_source=recommendations An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/best-practices_source=recommendations&tabs=aspdotnet An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/best-practices An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps_tabs=azure-portal%2Cvisual-studio%2Ccommand-line An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/best-practices_tabs=aspdotnet An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/credential-chains An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Introduction to Azure and .NET Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/create-token-credentials-from-configuration_tabs=client-id An introductory guide for .NET developers on how to get started with Azure. It covers the fundamental concepts of Azure services and how they integrate with the .NET ecosystem. ```.NET // Example: Creating a simple Azure Function with .NET // using Microsoft.Azure.Functions.Worker; // using Microsoft.Extensions.Logging; // // public class MyHttpTrigger { // private readonly ILogger _logger; // // public MyHttpTrigger(ILogger logger) { // _logger = logger; // } // // [Function("HttpTriggerCSharp")] // public HttpResponseData Run( // [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequestData req) { // _logger.LogInformation("C# HTTP trigger function processed a request."); // // var response = req.CreateResponse(System.Net.HttpStatusCode.OK); // response.Headers.Add("Content-Type", "text/plain; charset=utf-8"); // response.WriteString("Hello from Azure Functions!"); // // return response; // } // } ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging_source=recommendations Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_source=recommendations Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_source=recommendations&tabs=api Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/pagination_source=recommendations Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/thread-safety_source=recommendations Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_tabs=api Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_source=recommendations View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### Install Azure CLI on Windows Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations Instructions for installing the Azure CLI on Windows operating systems. This typically involves downloading an installer or using a package manager. ```bash # Example command for installing Azure CLI on Windows using Winget winget install -e --id Microsoft.AzureCLI ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/pagination_source=recommendations View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_source=recommendations&tabs=api View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging_source=recommendations View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### Configure VS Code for Azure Development (Cross-Platform) Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations This guide explains how to set up Visual Studio Code for developing Azure applications across different operating systems. It includes instructions for installing relevant extensions and configuring the environment for cross-platform Azure development. ```text Configure VS Code for Azure development (cross-platform) ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods_tabs=convenience-methods%2Csystem-clientmodel Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_tabs=api View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/thread-safety_source=recommendations View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods_tabs=convenience-methods%2Csystem-clientmodel View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### Install Azure SDK packages for demonstration Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_source=recommendations Installs specific Azure SDK packages for demonstration purposes, including libraries for Key Vault Secrets, Blob Storage, Service Bus, and Azure OpenAI. ```.NET CLI dotnet add package Azure.Security.KeyVault.Secrets dotnet add package Azure.Storage.Blobs dotnet add package Azure.Messaging.ServiceBus dotnet add package Azure.AI.OpenAI ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/configure-proxy_tabs=cmd View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### Install Azure Developer CLI Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Instructions for installing the Azure Developer CLI, a tool to streamline development workflows for Azure. ```bash azd version ``` -------------------------------- ### Install Azure CLI on macOS Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations Instructions for installing the Azure CLI on macOS. This can be done using Homebrew or by downloading an installer. ```bash # Example command for installing Azure CLI on macOS using Homebrew brew update && brew install azure-cli ``` -------------------------------- ### Install Azure CLI for Windows Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Instructions for installing the Azure Command-Line Interface (CLI) on Windows. The Azure CLI is used to create and manage Azure resources from your command line. ```bash Install the Azure CLI for Windows ``` -------------------------------- ### Install Azure SDK packages Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_source=recommendations&tabs=web-app-builder Installs the Key Vault Secrets, Blob Storage, Service Bus, and Azure OpenAI libraries for demonstration purposes, enabling interaction with these Azure services in the sample code. ```dotnetcli dotnet add package Azure.Security.KeyVault.Secrets dotnet add package Azure.Storage.Blobs dotnet add package Azure.Messaging.ServiceBus dotnet add package Azure.AI.OpenAI ``` -------------------------------- ### SDK Example for .NET on Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/thread-safety View a practical example demonstrating the usage of an SDK within a .NET application for interacting with Azure services. ```text SDK example ``` -------------------------------- ### Install Azure.Identity package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_source=recommendations Installs the Azure.Identity package, enabling the configuration of a TokenCredential type for authenticating registered Azure clients. ```.NET CLI dotnet add package Azure.Identity ``` -------------------------------- ### Install Azure Developer CLI Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Information on installing the Azure Developer CLI, a tool designed to streamline development workflows for Azure. It helps in provisioning and managing Azure resources for applications. ```bash Install Azure Developer CLI ``` -------------------------------- ### Install Azure CLI for Windows Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Instructions for installing the Azure Command-Line Interface (CLI) on Windows to manage Azure resources programmatically. ```bash az --version ``` -------------------------------- ### Install Azure PowerShell Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Guidance on installing Azure PowerShell, a module that allows you to manage Azure resources using PowerShell scripts. This is useful for automation and scripting. ```powershell Install Azure PowerShell ``` -------------------------------- ### Install Azure Data Studio Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Details on installing Azure Data Studio, an IDE for working with Azure SQL and other database options like MySQL, PostgreSQL, and Azure Cosmos DB. ```bash azuredatastudio --version ``` -------------------------------- ### Install Azure CLI for macOS Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Instructions for installing the Azure Command-Line Interface (CLI) on macOS. The Azure CLI is used to create and manage Azure resources from your command line. ```bash Install the Azure CLI for macOS ``` -------------------------------- ### Install Azure CLI for Linux Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Instructions for installing the Azure Command-Line Interface (CLI) on Linux. The Azure CLI is used to create and manage Azure resources from your command line. ```bash Install the Azure CLI for Linux ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/thread-safety Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Install Azure Data Studio Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Instructions for installing Azure Data Studio, an IDE for data professionals. It supports Azure SQL and offers extensions for other databases like MySQL, PostgreSQL, and Azure Cosmos DB. ```bash Install Azure Data Studio ``` -------------------------------- ### Azure SDK for .NET Introduction Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/configure-proxy_tabs=cmd Learn about the Azure SDK for .NET, a crucial tool for .NET developers interacting with Azure services. This section covers its purpose and how to get started. ```text What is the Azure SDK for .NET? ``` -------------------------------- ### Add 'owner' Tag to Virtual Machines in Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/resource-management_tabs=PowerShell Provides a C# example of how to add an 'owner' tag to virtual machines within a specified resource group if the tag is missing. It shows how to get the VirtualMachineCollection, iterate through VMs, and use the AddTagAsync method. ```C# // First we construct our armClient ArmClient client = new ArmClient(new DefaultAzureCredential()); // Next we get a resource group object // ResourceGroup is a {ResourceName}Resource object from above SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync("myRgName"); // Next we get the collection for the virtual machines // vmCollection is a {ResourceName}Collection object from above VirtualMachineCollection virtualMachineCollection = await resourceGroup.GetVirtualMachines(); // Next we loop over all vms in the collection // Each vm is a {ResourceName}Resource object from above await foreach(VirtualMachineResource virtualMachine in virtualMachineCollection) { // We access the {ResourceName}Data properties from vm.Data if(!virtualMachine.Data.Tags.ContainsKey("owner")) { // We can also access all operations from vm since it is already scoped for us await virtualMachine.AddTagAsync("owner", GetOwner()); } } ``` -------------------------------- ### Create Azure Resource Group Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/resource-management Provides a C# code example for creating a new Azure resource group. It initializes the `ArmClient`, gets the default subscription, defines the resource group name and location, creates `ResourceGroupData`, and then uses `CreateOrUpdateAsync` to create the resource group. ```csharp // First, initialize the ArmClient and get the default subscription ArmClient client = new ArmClient(new DefaultAzureCredential()); // Now we get a ResourceGroup collection for that subscription SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); ResourceGroupCollection resourceGroupCollection = subscription.GetResourceGroups(); // With the collection, we can create a new resource group with an specific name string resourceGroupName = "myRgName"; AzureLocation location = AzureLocation.WestUS2; ResourceGroupData resourceGroupData = new ResourceGroupData(location); ResourceGroupResource resourceGroup = (await resourceGroupCollection.CreateOrUpdateAsync(resourceGroupName, resourceGroupData)).Value; ``` -------------------------------- ### Install Azure SDK packages for demonstration Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_tabs=web-app-builder Installs specific Azure SDK packages for demonstration purposes, including libraries for Key Vault Secrets, Blob Storage, Service Bus, and Azure OpenAI. ```.NET CLI dotnet add package Azure.Security.KeyVault.Secrets dotnet add package Azure.Storage.Blobs dotnet add package Azure.Messaging.ServiceBus dotnet add package Azure.AI.OpenAI ``` -------------------------------- ### Authenticate to Azure Storage Blobs using InteractiveBrowserCredential in C# Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/additional-methods This example demonstrates how to use the `InteractiveBrowserCredential` class from the Azure Identity library to authenticate a `BlobServiceClient` for accessing Azure Storage Blobs. It shows the basic setup and how to retrieve blob container names. ```C# using Azure.Identity; using Azure.Storage.Blobs; namespace InteractiveBrokeredAuthSample { public partial class InteractiveBrowserAuth : Form { public InteractiveBrowserAuth() { InitializeComponent(); } private void testInteractiveBrowserAuth_Click(object sender, EventArgs e) { var client = new BlobServiceClient( new Uri("https://.blob.core.windows.net"), new InteractiveBrowserCredential()); foreach (var blobItem in client.GetBlobContainers()) { Console.WriteLine(blobItem.Name); } } } } ``` -------------------------------- ### Configure VS Code for Azure Development (Cross-Platform) Source: https://learn.microsoft.com/en-us/dotnet/azure/azure-tools This guide explains how to set up Visual Studio Code for developing Azure applications across different operating systems. It includes instructions for installing relevant extensions and configuring the environment for cross-platform Azure development. ```text Configure VS Code for Azure development (cross-platform) ``` -------------------------------- ### Configure VS Code for Azure Development (Cross-Platform) Source: https://learn.microsoft.com/en-us/dotnet/azure/configure-vs-code This guide explains how to set up Visual Studio Code for developing Azure applications across different operating systems. It includes instructions for installing relevant extensions and configuring the environment for cross-platform Azure development. ```text Configure VS Code for Azure development (cross-platform) ``` -------------------------------- ### Install Azure Storage Explorer Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist_source=recommendations Details on installing Azure Storage Explorer, a graphical tool for managing Azure storage resources like blobs, queues, tables, and Cosmos DB. It facilitates uploading, downloading, and data management. ```bash Install Azure Storage Explorer ``` -------------------------------- ### Configure VS Code for Azure Development (Cross-Platform) Source: https://learn.microsoft.com/en-us/dotnet/azure/configure-visual-studio_source=recommendations This guide explains how to set up Visual Studio Code for developing Azure applications across different operating systems. It includes instructions for installing relevant extensions and configuring the environment for cross-platform Azure development. ```text Configure VS Code for Azure development (cross-platform) ``` -------------------------------- ### Configure VS Code for Azure Development (Cross-Platform) Source: https://learn.microsoft.com/en-us/dotnet/azure/configure-vs-code_source=recommendations This guide explains how to set up Visual Studio Code for developing Azure applications across different operating systems. It includes instructions for installing relevant extensions and configuring the environment for cross-platform Azure development. ```text Configure VS Code for Azure development (cross-platform) ``` -------------------------------- ### Manage Service Bus Namespace (C#) Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/resource-management Provides C# code examples for interacting with Azure Service Bus namespaces using the Azure SDK for .NET. It shows how to authenticate, get subscription and resource group information, and perform operations like creating, listing, and deleting Service Bus namespaces. ```csharp using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.ServiceBus; ArmClient client = new ArmClient(new DefaultAzureCredential()); SubscriptionResource subscription = client.GetDefaultSubscription(); ResourceGroupResource resourceGroup = client.GetDefaultSubscription().GetResourceGroup(resourceGroupName); ``` -------------------------------- ### Install Azure CLI on macOS Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli Instructions for installing the Azure CLI on macOS. This can be done using Homebrew or by downloading an installer. ```bash # Example command for installing Azure CLI on macOS using Homebrew brew install azure-cli ``` -------------------------------- ### Use Azure Cloud Shell Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations Information on accessing and using the Azure Cloud Shell, a browser-based command-line environment for managing Azure resources without local installation. ```bash # Access Azure Cloud Shell via browser # Navigate to https://shell.azure.com ``` -------------------------------- ### Install Azure CLI on Windows Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli Instructions for installing the Azure CLI on Windows operating systems. This typically involves downloading an installer or using a package manager. ```bash # Example command for installing Azure CLI on Windows using Winget winget install -e --id Microsoft.AzureCLI ``` -------------------------------- ### Install Azure Identity Packages Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-broker Installs the necessary Azure Identity packages for brokered authentication. ```dotnetcli dotnet add package Azure.Identity dotnet add package Azure.Identity.Broker ``` -------------------------------- ### Add Azure SDK Packages using .NET CLI Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps_source=recommendations&tabs=azure-portal%2Cvisual-studio%2Ccommand-line Installs the necessary Azure SDK packages, `Azure.Identity` and `Microsoft.Extensions.Azure`, into a .NET project using the .NET CLI. ```bash dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### Install Microsoft.Extensions.Azure package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_source=recommendations Installs the Microsoft.Extensions.Azure package, which is required for registering and configuring Azure service clients for dependency injection in .NET applications. ```.NET CLI dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### ASP.NET Core Guidance for Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods_tabs=convenience-methods%2Csystem-clientmodel Find guidance on developing and deploying ASP.NET Core applications on Azure. This includes best practices for performance, scalability, and integration with Azure services. ```text ASP.NET Core guidance ``` -------------------------------- ### Install Azure.Identity package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_tabs=web-app-builder Installs the Azure.Identity package, enabling the configuration of a TokenCredential type for authenticating registered Azure clients. ```.NET CLI dotnet add package Azure.Identity ``` -------------------------------- ### Install Microsoft.Extensions.Azure package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_source=recommendations&tabs=web-app-builder Installs the Microsoft.Extensions.Azure package, which is required to register and configure Azure service clients in a .NET project for dependency injection. ```dotnetcli dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### ASP.NET Core Guidance for Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/protocol-convenience-methods Find guidance on developing and deploying ASP.NET Core applications on Azure. This includes best practices for performance, scalability, and integration with Azure services. ```text ASP.NET Core guidance ``` -------------------------------- ### Install Azure PowerShell Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Guidance on installing Azure PowerShell, a module for managing Azure resources using PowerShell scripting. ```powershell Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force ``` -------------------------------- ### Install Azure CLI for Linux Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Instructions for installing the Azure Command-Line Interface (CLI) on Linux to manage Azure resources programmatically. ```bash az --version ``` -------------------------------- ### Azure SDK for .NET Overview Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps_source=recommendations&tabs=azure-portal%2Cvisual-studio%2Ccommand-line This section provides an overview of the Azure SDK for .NET, covering authentication methods, credential chains, best practices, and examples for integrating Azure services into .NET applications. ```.NET /* Overview of the Azure SDK for .NET This SDK simplifies the process of building and deploying applications on Azure. It provides tools for authentication, resource management, and interacting with various Azure services. Key Features: - Authentication from on-premises apps - Authentication via configuration files - Credential chains for seamless auth - Best practices for secure and efficient development - SDK examples for common scenarios */ // Example: Authenticating with DefaultAzureCredential // using Azure.Identity; // var credential = new DefaultAzureCredential(); // var client = new BlobServiceClient(new Uri("https://.blob.core.windows.net"), credential); ``` -------------------------------- ### Install Azure CLI for macOS Source: https://learn.microsoft.com/en-us/dotnet/azure/dotnet-dev-env-checklist Instructions for installing the Azure Command-Line Interface (CLI) on macOS to manage Azure resources programmatically. ```bash az --version ``` -------------------------------- ### ASP.NET Core Guidance for Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/logging_source=recommendations Find guidance on developing and deploying ASP.NET Core applications on Azure. This includes best practices for performance, scalability, and integration with Azure services. ```text ASP.NET Core guidance ``` -------------------------------- ### Install Microsoft.Extensions.Azure package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection_tabs=web-app-builder Installs the Microsoft.Extensions.Azure package, which is required for registering and configuring Azure service clients for dependency injection in .NET applications. ```.NET CLI dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### Install Microsoft.Extensions.Azure package Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/dependency-injection Installs the Microsoft.Extensions.Azure package, which is required to register and configure Azure service clients for dependency injection in a .NET project. ```.NET CLI dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### Install Azure CLI on Linux Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations Instructions for installing the Azure CLI on various Linux distributions. This often involves using package managers like apt or yum, or downloading a script. ```bash # Example commands for installing Azure CLI on Debian/Ubuntu curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash ``` ```bash # Example commands for installing Azure CLI on Fedora/CentOS/RHEL curl -sL https://aka.ms/InstallAzureCLIRpm | sudo bash ``` -------------------------------- ### Install Additional Tools for Azure Development Source: https://learn.microsoft.com/en-us/dotnet/azure/install-azure-cli_source=recommendations This documentation covers the installation of supplementary tools and utilities that enhance the .NET development experience when working with Microsoft Azure. These tools can improve productivity and streamline the development process. ```text Install additional tools ``` -------------------------------- ### Install Azure SDK Packages Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-service-principal_source=recommendations&tabs=azure-portal%2Cvisual-studio%2Ccommand-line Installs the necessary Azure SDK packages for .NET applications using the .NET CLI. This includes Azure.Identity for authentication and Microsoft.Extensions.Azure for integrating with ASP.NET Core. ```bash dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### SDK Example for .NET Azure Integration Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/on-premises-apps_source=recommendations Illustrates a practical example of using the Azure SDK for .NET to perform common operations, such as interacting with Azure Blob Storage or Azure Key Vault. ```.NET // Example: Uploading a file to Azure Blob Storage // using Azure.Storage.Blobs; // using System.IO; // // var blobServiceClient = new BlobServiceClient("YOUR_AZURE_STORAGE_CONNECTION_STRING"); // var containerClient = blobServiceClient.GetBlobContainerClient("mycontainer"); // var blobClient = containerClient.GetBlobClient("myblob.txt"); // // using (var fileStream = File.OpenRead("localfile.txt")) { // await blobClient.UploadAsync(fileStream, true); // } ``` -------------------------------- ### Install Azure SDK Packages Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/local-development-service-principal_tabs=azure-portal%2Cvisual-studio%2Ccommand-line Installs the necessary Azure SDK packages for .NET applications using the .NET CLI. This includes Azure.Identity for authentication and Microsoft.Extensions.Azure for integrating with ASP.NET Core. ```bash dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### ASP.NET Core Guidance for Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/aspnetcore-guidance_source=recommendations&tabs=api Find guidance on developing and deploying ASP.NET Core applications on Azure. This includes best practices for performance, scalability, and integration with Azure services. ```text ASP.NET Core guidance ``` -------------------------------- ### ASP.NET Core Guidance for Azure Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/pagination_source=recommendations Find guidance on developing and deploying ASP.NET Core applications on Azure. This includes best practices for performance, scalability, and integration with Azure services. ```text ASP.NET Core guidance ``` -------------------------------- ### Install the Azure CLI Source: https://learn.microsoft.com/en-us/dotnet/azure/configure-visual-studio_source=recommendations Instructions for installing the Azure Command-Line Interface (CLI), a tool that enables managing Azure resources from the command line. This is essential for automating and scripting Azure deployments and operations. ```text Install the Azure CLI ``` -------------------------------- ### SDK Example for .NET Azure Integration Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication/best-practices_source=recommendations&tabs=aspdotnet Illustrates a practical example of using the Azure SDK for .NET to perform common operations, such as interacting with Azure Blob Storage or Azure Key Vault. ```.NET // Example: Uploading a file to Azure Blob Storage // using Azure.Storage.Blobs; // using System.IO; // // var blobServiceClient = new BlobServiceClient("YOUR_AZURE_STORAGE_CONNECTION_STRING"); // var containerClient = blobServiceClient.GetBlobContainerClient("mycontainer"); // var blobClient = containerClient.GetBlobClient("myblob.txt"); // // using (var fileStream = File.OpenRead("localfile.txt")) { // await blobClient.UploadAsync(fileStream, true); // } ``` -------------------------------- ### Install Azure SDK Packages Source: https://learn.microsoft.com/en-us/dotnet/azure/sdk/resource-management_tabs=PowerShell Installs the necessary Azure Identity and Azure resource management NuGet packages for .NET using PowerShell and the .NET CLI. ```PowerShell Install-Package Azure.Identity Install-Package Azure.ResourceManager Install-Package Azure.ResourceManager.Resources Install-Package Azure.ResourceManager.Compute Install-Package Azure.ResourceManager.Network ``` ```.NET CLI dotnet add package Azure.Identity dotnet add package Azure.ResourceManager dotnet add package Azure.ResourceManager.Resources dotnet add package Azure.ResourceManager.Compute dotnet add package Azure.ResourceManager.Network ```