AzureStorageAlias.

DeleteBlob(ICakeContext, AzureStorageSettings) Method

Summary

Deletes an Azure Storage blob
Assembly
Cake.AzureStorage.dll
Namespace
Cake.AzureStorage
Containing Type
AzureStorageAlias

Syntax

public static void DeleteBlob(this ICakeContext context, AzureStorageSettings settings)

Examples

Task("PackageAfterDelete")
 .Does(() => {
  var settings = new AzureStorageSettings();
  settings.AccountName = "AccountName";
  settings.Key = "API KEY";
  settings.ContainerName = "ContainerName";
  settings.BlobName = "NameToDelete";
  DeleteBlob(settings);
  
  settings.BlobName = "NameToUploadAs";
   var filePath = new FilePath("./location/of/file/to/upload");
  UploadFileToBlob(settings, filePath));
});

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings AzureStorageSettings Azure Storage Settings.

Return Value

Type Description
void