Azure SDK for Embedded C
az_storage_blobs.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // SPDX-License-Identifier: MIT
3 
15 #ifndef _az_STORAGE_BLOBS_H
16 #define _az_STORAGE_BLOBS_H
17 
18 #include <azure/core/az_config.h>
19 #include <azure/core/az_context.h>
21 #include <azure/core/az_http.h>
23 #include <azure/core/az_result.h>
24 #include <azure/core/az_span.h>
25 #include <azure/core/internal/az_http_internal.h>
26 
27 #include <stdint.h>
28 
29 #include <azure/core/_az_cfg_prefix.h>
30 
34 static az_span const AZ_STORAGE_API_VERSION = AZ_SPAN_LITERAL_FROM_STR("2019-02-02");
35 
39 typedef struct
40 {
43 
44  struct
45  {
48  _az_http_policy_apiversion_options api_version;
49 
51  _az_http_policy_telemetry_options telemetry_options;
52  } _internal;
54 
58 typedef struct
59 {
60  struct
61  {
62  // buffer to copy customer url. Then it stays immutable
63  uint8_t endpoint_buffer[AZ_HTTP_REQUEST_URL_BUFFER_SIZE];
64  // this url will point to endpoint_buffer
65  az_span endpoint;
66  _az_http_pipeline pipeline;
68  _az_credential* credential;
69  } _internal;
71 
87  az_storage_blobs_blob_client* out_client,
88  az_span endpoint,
89  void* credential,
91 
95 typedef struct
96 {
98  struct
99  {
101  bool unused;
102  } _internal;
104 
115 
124 AZ_NODISCARD AZ_INLINE az_storage_blobs_blob_upload_options
126 {
128  ._internal = { .unused = false } };
129 }
130 
146  az_storage_blobs_blob_client* ref_client,
147  az_span content,
149  az_http_response* ref_response);
150 
151 #include <azure/core/_az_cfg_suffix.h>
152 
153 #endif // _az_STORAGE_BLOBS_H
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.
Definition: az_storage_blobs.h:125
az_result.h
Definition of az_result and helper functions.
az_storage_blobs_blob_client_options::api_version
_az_http_policy_apiversion_options api_version
Definition: az_storage_blobs.h:48
az_storage_blobs_blob_client_options::retry_options
az_http_policy_retry_options retry_options
Optional values used to override the default retry policy options.
Definition: az_storage_blobs.h:42
az_storage_blobs_blob_client_options
Allows customization of the blob client.
Definition: az_storage_blobs.h:40
az_result
az_result
The type represents the various success and error conditions.
Definition: az_result.h:53
az_context_application
az_context az_context_application
The application root az_context instances.
az_storage_blobs_blob_upload_options
Allows customization of the upload operation.
Definition: az_storage_blobs.h:96
az_storage_blobs_blob_client
Azure Storage Blobs Blob Client.
Definition: az_storage_blobs.h:59
az_context.h
Context for canceling long running operations.
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.
az_http_policy_retry_options
Allows you to customize the retry policy used by SDK clients whenever they perform an I/O operation.
Definition: az_http.h:126
AZ_HTTP_REQUEST_URL_BUFFER_SIZE
@ AZ_HTTP_REQUEST_URL_BUFFER_SIZE
The maximum buffer size for a URL.
Definition: az_config.h:26
az_span.h
An az_span represents a contiguous byte buffer and is used for string manipulations,...
az_credentials.h
Credentials used for authentication with many (not all) Azure SDK client libraries.
az_http.h
This header defines the types and functions your application uses to leverage HTTP request and respon...
az_storage_blobs_blob_upload_options::unused
bool unused
Currently, this is unused, but needed as a placeholder since we can't have an empty struct.
Definition: az_storage_blobs.h:101
az_storage_blobs_blob_client_options::telemetry_options
_az_http_policy_telemetry_options telemetry_options
Options for the telemetry policy.
Definition: az_storage_blobs.h:51
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.
az_context
A context is a node within a tree that represents expiration times and key/value pairs.
Definition: az_context.h:37
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.
az_storage_blobs_blob_upload_options::context
az_context * context
Operation context.
Definition: az_storage_blobs.h:97
az_http_transport.h
Utilities to be used by HTTP transport policy implementations.
az_config.h
Configurable constants used by the Azure SDK.
AZ_SPAN_LITERAL_FROM_STR
#define AZ_SPAN_LITERAL_FROM_STR(STRING_LITERAL)
Returns a literal az_span over a literal string. The size of the az_span is equal to the length of th...
Definition: az_span.h:105
az_http_response
Allows you to parse an HTTP response's status line, headers, and body.
Definition: az_http.h:157
az_span
Represents a "view" over a byte buffer that represents a contiguous region of memory....
Definition: az_span.h:33