You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@@ -30,22 +30,27 @@ This article shows you how to connect to Azure Blob Storage by using the Azure B
30
30
31
31
## Set up your project
32
32
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.
34
36
35
37
```console
36
-
cd myProject
37
38
dotnet add package Azure.Storage.Blobs
39
+
dotnet add package Azure.Identity
38
40
```
39
41
40
42
Add these `using` statements to the top of your code file.
41
43
42
44
```csharp
45
+
usingAzure.Identity;
43
46
usingAzure.Storage.Blobs;
44
47
usingAzure.Storage.Blobs.Models;
45
48
usingAzure.Storage.Blobs.Specialized;
46
49
47
50
```
48
51
52
+
Blob client library information:
53
+
49
54
-[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.
50
55
51
56
-[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
77
82
78
83
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.
79
84
80
-
The following example creates a `BlobServiceClient` object using `DefaultAzureCredential`:
85
+
The following example creates a `BlobServiceClient` object authorized using `DefaultAzureCredential`:
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.
# Get started with Azure Blob Storage and JavaScript
18
17
19
18
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.
20
19
21
20
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.
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.
0 commit comments