Skip to content

Commit 8976cf3

Browse files
Merge pull request #231359 from pauljewellmsft/pauljewell-dotnet-setup
Update dev guide getting started pages
2 parents 5fcc9af + 9ba7a8c commit 8976cf3

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

articles/storage/blobs/storage-blob-dotnet-get-started.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: pauljewellmsft
88
ms.author: pauljewell
99
ms.service: storage
1010
ms.topic: how-to
11-
ms.date: 01/30/2023
11+
ms.date: 03/20/2023
1212
ms.subservice: blobs
1313
ms.devlang: csharp
1414
ms.custom: template-how-to, devguide-csharp
@@ -18,7 +18,7 @@ ms.custom: template-how-to, devguide-csharp
1818

1919
This article shows you how to connect to Azure Blob Storage by using the Azure Blob Storage client library for .NET. Once connected, your code can operate on containers, blobs, and features of the Blob Storage service.
2020

21-
[Package (NuGet)](https://www.nuget.org/packages/Azure.Storage.Blobs) | [Samples](../common/storage-samples-dotnet.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [API reference](/dotnet/api/azure.storage.blobs) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/storage/Azure.Storage.Blobs) | [Give Feedback](https://github.com/Azure/azure-sdk-for-net/issues)
21+
[API reference](/dotnet/api/azure.storage.blobs) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/storage/Azure.Storage.Blobs) | [Package (NuGet)](https://www.nuget.org/packages/Azure.Storage.Blobs) | [Samples](../common/storage-samples-dotnet.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [Give feedback](https://github.com/Azure/azure-sdk-for-net/issues)
2222

2323
## Prerequisites
2424

@@ -30,22 +30,27 @@ This article shows you how to connect to Azure Blob Storage by using the Azure B
3030

3131
## Set up your project
3232

33-
Open a command prompt and change directory (`cd`) into your project folder. Then, install the Azure Blob Storage client library for .NET package by using the `dotnet add package` command.
33+
This section walks you through preparing a project to work with the Azure Blob Storage client library for .NET.
34+
35+
From your project directory, install packages for the Azure Blob Storage and Azure Identity client libraries using the `dotnet add package` command. The Azure.Identity package is needed for passwordless connections to Azure services.
3436

3537
```console
36-
cd myProject
3738
dotnet add package Azure.Storage.Blobs
39+
dotnet add package Azure.Identity
3840
```
3941

4042
Add these `using` statements to the top of your code file.
4143

4244
```csharp
45+
using Azure.Identity;
4346
using Azure.Storage.Blobs;
4447
using Azure.Storage.Blobs.Models;
4548
using Azure.Storage.Blobs.Specialized;
4649

4750
```
4851

52+
Blob client library information:
53+
4954
- [Azure.Storage.Blobs](/dotnet/api/azure.storage.blobs): Contains the primary classes (_client objects_) that you can use to operate on the service, containers, and blobs.
5055

5156
- [Azure.Storage.Blobs.Specialized](/dotnet/api/azure.storage.blobs.specialized): Contains classes that you can use to perform operations specific to a blob type, such as block blobs.
@@ -77,16 +82,16 @@ To authorize with Azure AD, you'll need to use a security principal. The type of
7782

7883
An easy and secure way to authorize access and connect to Blob Storage is to obtain an OAuth token by creating a [DefaultAzureCredential](/dotnet/api/azure.identity.defaultazurecredential) instance. You can then use that credential to create a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) object.
7984

80-
The following example creates a `BlobServiceClient` object using `DefaultAzureCredential`:
85+
The following example creates a `BlobServiceClient` object authorized using `DefaultAzureCredential`:
8186

8287
```csharp
83-
public static void GetBlobServiceClient(ref BlobServiceClient blobServiceClient, string accountName)
88+
public BlobServiceClient GetBlobServiceClient(string accountName)
8489
{
85-
TokenCredential credential = new DefaultAzureCredential();
86-
87-
string blobUri = "https://" + accountName + ".blob.core.windows.net";
90+
BlobServiceClient client = new(
91+
new Uri($"https://{accountName}.blob.core.windows.net"),
92+
new DefaultAzureCredential());
8893

89-
blobServiceClient = new BlobServiceClient(new Uri(blobUri), credential);
94+
return client;
9095
}
9196
```
9297

articles/storage/blobs/storage-blob-java-get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.custom: devx-track-java, devguide-java
1717

1818
This article shows you how to connect to Azure Blob Storage by using the Azure Blob Storage client library for Java. Once connected, your code can operate on containers, blobs, and features of the Blob Storage service.
1919

20-
[API reference documentation](/java/api/overview/azure/storage-blob-readme) | [Library source code](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage/azure-storage-blob) | [Package (Maven)](https://mvnrepository.com/artifact/com.azure/azure-storage-blob) | [Samples](../common/storage-samples-java.md?toc=/azure/storage/blobs/toc.json#blob-samples)
20+
[API reference](/java/api/overview/azure/storage-blob-readme) | [Package (Maven)](https://mvnrepository.com/artifact/com.azure/azure-storage-blob) | [Library source code](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/storage/azure-storage-blob) | [Samples](../common/storage-samples-java.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [Give feedback](https://github.com/Azure/azure-sdk-for-java/issues)
2121

2222
## Prerequisites
2323

articles/storage/blobs/storage-blob-javascript-get-started.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ ms.subservice: blobs
1313
ms.custom: template-how-to, devx-track-js, devguide-js, passwordless-js
1414
---
1515

16-
1716
# Get started with Azure Blob Storage and JavaScript
1817

1918
This article shows you how to connect to Azure Blob Storage by using the Azure Blob Storage client library v12 for JavaScript. Once connected, your code can operate on containers, blobs, and features of the Blob Storage service.
2019

2120
The [sample code snippets](https://github.com/Azure-Samples/AzureStorageSnippets/tree/master/blobs/howto/JavaScript/NodeJS-v12/dev-guide) are available in GitHub as runnable Node.js files.
2221

23-
[Package (npm)](https://www.npmjs.com/package/@azure/storage-blob) | [Samples](../common/storage-samples-javascript.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [API reference](/javascript/api/preview-docs/@azure/storage-blob) | [Library source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob) | [Give Feedback](https://github.com/Azure/azure-sdk-for-js/issues)
22+
[API reference](/javascript/api/preview-docs/@azure/storage-blob) | [Package (npm)](https://www.npmjs.com/package/@azure/storage-blob) | [Library source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob) | [Samples](../common/storage-samples-javascript.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [Give feedback](https://github.com/Azure/azure-sdk-for-js/issues)
2423

2524
## Prerequisites
2625

articles/storage/blobs/storage-blob-python-get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.custom: devx-track-python, devguide-python
1717

1818
This article shows you how to connect to Azure Blob Storage by using the Azure Blob Storage client library for Python. Once connected, your code can operate on containers, blobs, and features of the Blob Storage service.
1919

20-
[API reference documentation](/python/api/azure-storage-blob) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob) | [Package (PyPi)](https://pypi.org/project/azure-storage-blob/) | [Samples](../common/storage-samples-python.md?toc=/azure/storage/blobs/toc.json#blob-samples)
20+
[API reference](/python/api/azure-storage-blob) | [Package (PyPi)](https://pypi.org/project/azure-storage-blob/) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob) | [Samples](../common/storage-samples-python.md?toc=/azure/storage/blobs/toc.json#blob-samples) | [Give feedback](https://github.com/Azure/azure-sdk-for-python/issues)
2121

2222
## Prerequisites
2323

0 commit comments

Comments
 (0)