Azure Blob Storage

Frends.AzureBlobStorage.WriteBlob / 3.0.0

Summary

Creates a blob directly from content held in the Process, as text or bytes, and can create the container if it is missing.

Typical use — storing a generated payload without a temporary file, which keeps the agent's disk out of the picture

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Input parameters.

Name Type Default Example Description
SourceType SourceType Bytes SourceType.String

Selection of source types.

Possible values:

  • String: Selection of source types.

  • Bytes: Selection of source types.

ContentString String This is test content

Source content in string format.

ContentBytes Byte[] VGhpcyBpcyB0ZXN0

Source content in byte array.

Encoding FileEncoding UTF8 utf8

Set desired content-encoding. Defaults to UTF8 BOM.

Possible values:

  • UTF8: Set desired content-encoding. Defaults to UTF8 BOM.

  • Default: Set desired content-encoding. Defaults to UTF8 BOM.

  • ASCII: Set desired content-encoding. Defaults to UTF8 BOM.

  • WINDOWS1252: Set desired content-encoding. Defaults to UTF8 BOM.

  • Other: Other enables users to add other encoding options as string.

EnableBOM Boolean True true

Enables BOM for UTF-8.

FileEncodingString String windows-1252

Content encoding as string. A partial list of possible encodings: https://en.wikipedia.org/wiki/Windows_code_page#List.

ContainerName String examplecontainer

Name of the Azure Blob Storage container. Task will convert all letters to lowercase. See more info: https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names

BlobName String myblob.txt

Name of the blob. Blob name can also be folder structure and folders will be created to Blob Storage. See more info: https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names

Tags Tag[] {name, value}

Tags for the block or append blob.

CreateContainerIfItDoesNotExist Boolean False false

Determines if the container should be created if it does not exist. See https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata for naming rules.

HandleExistingFile HandleExistingFile Error HandleExistingFile.Error

How the existing blob will be handled. Append: Append the blob with Source.SourceFile. Block and Page blobs will be downloaded as a temp file which will be deleted after local append and upload processes are complete. No downloading needed for Append Blob. Overwrite: The original blob will be deleted before uploading the new one. Error: Depending on Options.ThrowErrorOnFailure, throw an exception or Result will contain an error message instead of the blob's URL.

Possible values:

  • Error: An error.

  • Overwrite: Overwrite with source file.

  • Append: Append blob with 'Source File'. Block and Page blob will be downloaded as temp file which will be deleted after local append and reupload processes are complete. No downloading needed for Append Blob.

Compress Boolean False false

Should the content be compressed before sending?

An unhandled error has occurred. Reload 🗙