CloudBlobContainer.GetBlockBlobReference Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
GetBlockBlobReference(String) |
Obtém uma referência a um blob de bloco neste contêiner. |
GetBlockBlobReference(String, Nullable<DateTimeOffset>) |
Obtém uma referência a um blob de bloco neste contêiner. |
GetBlockBlobReference(String)
Obtém uma referência a um blob de bloco neste contêiner.
public virtual Microsoft.Azure.Storage.Blob.CloudBlockBlob GetBlockBlobReference (string blobName);
abstract member GetBlockBlobReference : string -> Microsoft.Azure.Storage.Blob.CloudBlockBlob
override this.GetBlockBlobReference : string -> Microsoft.Azure.Storage.Blob.CloudBlockBlob
Public Overridable Function GetBlockBlobReference (blobName As String) As CloudBlockBlob
Parâmetros
- blobName
- String
Uma cadeia de caracteres que contém o nome do blob de bloco.
Retornos
Um objeto CloudBlockBlob.
Exemplos
// This is one common way of creating a CloudStorageAccount object. You can get
// your Storage Account Name and Key from the Azure Portal.
StorageCredentials credentials = new StorageCredentials(accountName, accountKey);
CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, useHttps: true);
// Another common way to create a CloudStorageAccount object is to use a connection string:
// CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// This call creates a local CloudBlobContainer object, but does not make a network call
// to the Azure Storage Service. The container on the service that this object represents may
// or may not exist at this point. If it does exist, the properties will not yet have been
// popluated on this object.
CloudBlobContainer blobContainer = blobClient.GetContainerReference(containerName);
// This makes an actual service call to the Azure Storage service. Unless this call fails,
// the container will have been created.
blobContainer.Create();
// This also does not make a service call, it only creates a local object.
CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName);
// This transfers data in the file to the blob on the service.
blob.UploadFromFile(inputFileName);
Aplica-se a
GetBlockBlobReference(String, Nullable<DateTimeOffset>)
Obtém uma referência a um blob de bloco neste contêiner.
public virtual Microsoft.Azure.Storage.Blob.CloudBlockBlob GetBlockBlobReference (string blobName, DateTimeOffset? snapshotTime);
abstract member GetBlockBlobReference : string * Nullable<DateTimeOffset> -> Microsoft.Azure.Storage.Blob.CloudBlockBlob
override this.GetBlockBlobReference : string * Nullable<DateTimeOffset> -> Microsoft.Azure.Storage.Blob.CloudBlockBlob
Public Overridable Function GetBlockBlobReference (blobName As String, snapshotTime As Nullable(Of DateTimeOffset)) As CloudBlockBlob
Parâmetros
- blobName
- String
Uma cadeia de caracteres que contém o nome do blob de bloco.
- snapshotTime
- Nullable<DateTimeOffset>
Um DateTimeOffset especificando um carimbo de data e hora instantâneo, se o blob for um instantâneo.
Retornos
Um objeto CloudBlockBlob.
Aplica-se a
Azure SDK for .NET
Comentários
https://aka.ms/ContentUserFeedback.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulteEnviar e exibir comentários de