ExMicrosoftAzureStorage.Storage.Blob (ex_microsoft_azure_storage v2.0.0)

Copy Markdown View Source

Blob

Summary

Functions

copy(source, target, opts \\ [])

copy_stream(source, target, opts \\ [])

delete_blob(blob, opts \\ [])

get_blob(blob, opts \\ [])

get_blob_properties(blob)

get_block_list(blob, block_list_type \\ :all, snapshot \\ nil)

new(container, blob_name)

put_blob(blob, blob_data, opts \\ [])

put_blob_from_url(blob, url, opts \\ [])

put_block(blob, block_id, content)

The put_block operation creates a new block to be committed as part of a blob.

put_block_list(blob, block_list, headers \\ [])

The put_block_list operation writes a blob by specifying the list of block IDs that make up the blob.

set_blob_properties(blob, blob_properties)

Sets blob properties.

Follows the same behaviour as the underlying REST API where setting one property will also implicitly set others to nil, unless you explitly set them in this request.

See https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties

to_block_id(block_id)

update_blob_properties(blob, blob_properties)

Updates blob properties.

Similar to set_blob_properties/2 but keeps existing values by first performing get_blob_properties/2, merging the result and handing it over to set_blob_properties/2.

upload_file(container, source_path, blob_name \\ nil, blob_properties \\ nil)

@spec upload_file(
  ExMicrosoftAzureStorage.Storage.Container.t(),
  String.t(),
  String.t() | nil,
  map() | nil
) :: {:ok, map()} | {:error, map()}

url(blob)