Share via


PageBlobClient.CreateAsync Methode

Definition

Der CreateAsync(Int64, PageBlobCreateOptions, CancellationToken) Vorgang erstellt ein neues Seitenblob des angegebenen size. Der Inhalt eines vorhandenen Blobs wird mit dem neu initialisierten Seitenblob überschrieben. Um dem Seitenblob Inhalte hinzuzufügen, rufen Sie den Vorgang auf Azure.Storage.Blobs.Specialized.PageBlobClient.UploadPages(System.IO.Stream,System.Int64,System.Byte[],Azure.Storage.Blobs.Models.PageBlobRequestConditions,System.IProgress{System.Int64},System.Threading.CancellationToken) .

Weitere Informationen finden Sie unter https://docs.microsoft.com/rest/api/storageservices/put-blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> CreateAsync (long size, Azure.Storage.Blobs.Models.PageBlobCreateOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAsync : int64 * Azure.Storage.Blobs.Models.PageBlobCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
override this.CreateAsync : int64 * Azure.Storage.Blobs.Models.PageBlobCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>>
Public Overridable Function CreateAsync (size As Long, options As PageBlobCreateOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobContentInfo))

Parameter

size
Int64

Gibt die maximale Größe für das Seitenblob an, bis zu 8 TB. Die Größe muss an einer 512-Byte-Grenze ausgerichtet werden.

options
PageBlobCreateOptions

Optionale Parameter.

cancellationToken
CancellationToken

Optional CancellationToken zur Weitergabe von Benachrichtigungen, dass der Vorgang abgebrochen werden soll.

Gibt zurück

Ein Response<T> , der das neu erstellte Seitenblob beschreibt.

Hinweise

Ein RequestFailedException wird ausgelöst, wenn ein Fehler auftritt.

Gilt für: