Skip to content

Commit 61f0e8a

Browse files
Merge pull request #220256 from pauljewellmsft/pauljewell-dotnet-dev-guide-container
Update note blocks for .NET dev guide articles
2 parents bc0b62d + be4ae0b commit 61f0e8a

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

articles/storage/blobs/storage-blob-container-create.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ ms.custom: devx-track-csharp, devguide-csharp
1818

1919
Blobs in Azure Storage are organized into containers. Before you can upload a blob, you must first create a container. This article shows how to create containers with the [Azure Storage client library for .NET](/dotnet/api/overview/azure/storage).
2020

21+
> [!NOTE]
22+
> The examples in this article assume that you've created a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) object by using the guidance in the [Get started with Azure Blob Storage and .NET](storage-blob-dotnet-get-started.md) article.
23+
2124
## Name a container
2225

2326
A container name must be a valid DNS name, as it forms part of the unique URI used to address the container or its blobs. Follow these rules when naming a container:
@@ -32,16 +35,21 @@ The URI for a container is in this format:
3235

3336
## Create a container
3437

35-
To create a container, call one of the following methods:
38+
To create a container, call one of the following methods from the `BlobServiceClient` class:
3639

3740
- [CreateBlobContainer](/dotnet/api/azure.storage.blobs.blobserviceclient.createblobcontainer)
3841
- [CreateBlobContainerAsync](/dotnet/api/azure.storage.blobs.blobserviceclient.createblobcontainerasync)
3942

43+
You can also create a container using one of the following methods from the `BlobContainerClient` class:
44+
45+
- [Create](/dotnet/api/azure.storage.blobs.blobcontainerclient.create)
46+
- [CreateAsync](/dotnet/api/azure.storage.blobs.blobcontainerclient.createasync)
47+
4048
These methods throw an exception if a container with the same name already exists.
4149

4250
Containers are created immediately beneath the storage account. It's not possible to nest one container beneath another.
4351

44-
The following example creates a container asynchronously:
52+
The following example uses a `BlobServiceClient` object to create a container asynchronously:
4553

4654
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Containers.cs" id="CreateSampleContainerAsync":::
4755

articles/storage/blobs/storage-blob-container-delete.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ ms.custom: devx-track-csharp, devguide-csharp
1919

2020
This article shows how to delete containers with the [Azure Storage client library for .NET](/dotnet/api/overview/azure/storage). If you've enabled container soft delete, you can restore deleted containers.
2121

22+
> [!NOTE]
23+
> The examples in this article assume that you've created a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) object by using the guidance in the [Get started with Azure Blob Storage and .NET](storage-blob-dotnet-get-started.md) article.
24+
2225
## Delete a container
2326

2427
To delete a container in .NET, use one of the following methods:

articles/storage/blobs/storage-blob-containers-list.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ ms.custom: devx-track-csharp, devguide-csharp
1818

1919
When you list the containers in an Azure Storage account from your code, you can specify a number of options to manage how results are returned from Azure Storage. This article shows how to list containers using the [Azure Storage client library for .NET](/dotnet/api/overview/azure/storage).
2020

21+
> [!NOTE]
22+
> The examples in this article assume that you've created a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) object by using the guidance in the [Get started with Azure Blob Storage and .NET](storage-blob-dotnet-get-started.md) article.
23+
2124
## Understand container listing options
2225

2326
To list containers in your storage account, call one of the following methods:

articles/storage/blobs/storage-blob-upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.custom: devx-track-csharp, devguide-csharp
1818
You can upload a blob, open a blob stream and write to that, or upload large blobs in blocks.
1919

2020
> [!NOTE]
21-
> The examples in this article assume that you've created a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) object by using the guidance in the [Get started with Azure Blob Storage and .NET](storage-blob-dotnet-get-started.md) article. Blobs in Azure Storage are organized into containers. Before you can upload a blob, you must first create a container. To learn how to create a container, see [Create a container in Azure Storage with .NET](storage-blob-container-create.md).
21+
> Blobs in Azure Storage are organized into containers. Before you can upload a blob, you must first create a container. You can create a container in a storage account using methods from [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient) or [BlobContainerClient](/dotnet/api/azure.storage.blobs.blobcontainerclient). To learn how to create a container in your storage account, see [Create a container in Azure Storage with .NET](storage-blob-container-create.md).
2222
2323
To upload a blob by using a file path, a stream, a binary object or a text string, use either of the following methods:
2424

0 commit comments

Comments
 (0)