Azure SDK for Embedded C
Data Structures | Functions
az_storage_blobs.h File Reference

Definition for the Azure Storage Blobs client. More...

#include <azure/core/az_config.h>
#include <azure/core/az_context.h>
#include <azure/core/az_credentials.h>
#include <azure/core/az_http.h>
#include <azure/core/az_http_transport.h>
#include <azure/core/az_result.h>
#include <azure/core/az_span.h>
#include <azure/core/internal/az_http_internal.h>
#include <stdint.h>
#include <azure/core/_az_cfg_prefix.h>
#include <azure/core/_az_cfg_suffix.h>

Go to the source code of this file.

Data Structures

struct  az_storage_blobs_blob_client_options
 Allows customization of the blob client. More...
 
struct  az_storage_blobs_blob_client
 Azure Storage Blobs Blob Client. More...
 
struct  az_storage_blobs_blob_upload_options
 Allows customization of the upload operation. More...
 

Functions

AZ_NODISCARD az_result az_storage_blobs_blob_client_init (az_storage_blobs_blob_client *out_client, az_span endpoint, void *credential, az_storage_blobs_blob_client_options const *options)
 Initialize a client with default options. More...
 
AZ_NODISCARD az_storage_blobs_blob_client_options az_storage_blobs_blob_client_options_default ()
 Gets the default blob storage options. More...
 
AZ_NODISCARD AZ_INLINE az_storage_blobs_blob_upload_options az_storage_blobs_blob_upload_options_default ()
 Gets the default blob upload options. More...
 
AZ_NODISCARD az_result az_storage_blobs_blob_upload (az_storage_blobs_blob_client *ref_client, az_span content, az_storage_blobs_blob_upload_options const *options, az_http_response *ref_response)
 Uploads the contents to blob storage. More...
 

Detailed Description

Definition for the Azure Storage Blobs client.

Note
You MUST NOT use any symbols (macros, functions, structures, enums, etc.) prefixed with an underscore ('_') directly in your application code. These symbols are part of Azure SDK's internal implementation; we do not document these symbols and they are subject to change in future versions of the SDK which would break your code.

Function Documentation

◆ az_storage_blobs_blob_client_init()

AZ_NODISCARD az_result az_storage_blobs_blob_client_init ( az_storage_blobs_blob_client out_client,
az_span  endpoint,
void *  credential,
az_storage_blobs_blob_client_options const *  options 
)

Initialize a client with default options.

Parameters
[out]out_clientThe blob client instance to initialize.
[in]endpointA URL to a blob storage account.
credentialThe object used for authentication. AZ_CREDENTIAL_ANONYMOUS should be used for SAS.
[in]optionsA reference to an az_storage_blobs_blob_client_options structure which defines custom behavior of the client.
Returns
An az_result value indicating the result of the operation.
Return values
AZ_OKSuccess.
otherFailure.

◆ az_storage_blobs_blob_client_options_default()

AZ_NODISCARD az_storage_blobs_blob_client_options az_storage_blobs_blob_client_options_default ( )

Gets the default blob storage options.

Call this to obtain an initialized az_storage_blobs_blob_client_options structure that can be modified and passed to az_storage_blobs_blob_client_init().

Remarks
Use this, for instance, when only caring about setting one option by calling this function and then overriding that specific option.

◆ az_storage_blobs_blob_upload()

AZ_NODISCARD az_result az_storage_blobs_blob_upload ( az_storage_blobs_blob_client ref_client,
az_span  content,
az_storage_blobs_blob_upload_options const *  options,
az_http_response ref_response 
)

Uploads the contents to blob storage.

Parameters
[in,out]ref_clientAn az_storage_blobs_blob_client structure.
[in]contentThe blob content to upload.
[in]options[nullable] A reference to an az_storage_blobs_blob_upload_options structure which defines custom behavior for uploading the blob. If NULL is passed, the client will use the default options (i.e. az_storage_blobs_blob_upload_options_default()).
[in,out]ref_responseAn initialized az_http_response where to write HTTP response into.
Returns
An az_result value indicating the result of the operation.
Return values
AZ_OKSuccess.
otherFailure.

◆ az_storage_blobs_blob_upload_options_default()

AZ_NODISCARD AZ_INLINE az_storage_blobs_blob_upload_options az_storage_blobs_blob_upload_options_default ( )

Gets the default blob upload options.

Call this to obtain an initialized az_storage_blobs_blob_upload_options structure.

Remarks
Use this, for instance, when only caring about setting one option by calling this function and then overriding that specific option.