Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Member Functions | List of all members
azure::storage::blob_request_options Class Reference

Represents a set of timeout and retry policy options that may be specified on a request against the Blob service. More...

Inheritance diagram for azure::storage::blob_request_options:
azure::storage::request_options

Public Member Functions

 blob_request_options ()
 Initializes a new instance of the azure::storage::blob_request_options class. More...
 
void apply_defaults (const blob_request_options &other, blob_type type, bool apply_expiry=true)
 Applies the default set of request options. More...
 
bool use_transactional_md5 () const
 Gets a value indicating whether the content-MD5 hash will be calculated and validated for the request. More...
 
void set_use_transactional_md5 (bool value)
 Indicates whether to calculate and validate the content-MD5 hash for the request. More...
 
bool use_transactional_crc64 () const
 Gets a value indicating whether the content-CRC64 hash will be calculated and validated for the request. More...
 
void set_use_transactional_crc64 (bool value)
 Indicates whether to calculate and validate the content-CRC64 hash for the request. More...
 
bool store_blob_content_md5 () const
 Gets a value indicating whether the content-MD5 hash will be calculated and stored when uploading a blob. More...
 
void set_store_blob_content_md5 (bool value)
 Indicates whether to calculate and store the content-MD5 hash when uploading a blob. More...
 
bool disable_content_md5_validation () const
 Gets a value indicating whether content-MD5 validation will be disabled when downloading blobs. More...
 
void set_disable_content_md5_validation (bool value)
 Indicates whether to disable content-MD5 validation when downloading blobs. More...
 
bool disable_content_crc64_validation () const
 Gets a value indicating whether content-CRC64 validation will be disabled when downloading blobs. More...
 
void set_disable_content_crc64_validation (bool value)
 Indicates whether to disable content-CRC64 validation when downloading blobs. More...
 
utility::size64_t single_blob_upload_threshold_in_bytes () const
 Gets the maximum size of a blob in bytes that may be uploaded as a single blob. More...
 
void set_single_blob_upload_threshold_in_bytes (utility::size64_t value)
 Sets the maximum size of a blob in bytes that may be uploaded as a single blob. More...
 
int parallelism_factor () const
 Gets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than the value specified by the single_blob_upload_threshold_in_bytes property in size. More...
 
void set_parallelism_factor (int value)
 Sets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than the value specified by the single_blob_upload_threshold_in_bytes property in size. More...
 
option_with_default< size_t > stream_read_size_in_bytes () const
 Gets the minimum number of bytes to buffer when reading from a blob stream. More...
 
void set_stream_read_size_in_bytes (size_t value)
 Sets the minimum number of bytes to buffer when reading from a blob stream. More...
 
option_with_default< size_t > stream_write_size_in_bytes () const
 Gets the minimum number of bytes to buffer when writing to a blob stream. More...
 
void set_stream_write_size_in_bytes (size_t value)
 Sets the minimum number of bytes to buffer when writing to a blob stream. More...
 
bool absorb_conditional_errors_on_retry () const
 Gets the value that indicates whether a conditional failure should be absorbed on a retry attempt for the request. This option is only used by cloud_append_blob in upload_from methods and core::cloud_append_blob_ostreambuf. By default, it is set to false. Set this to true only for single writer scenario. Setting this to true in a multi writer scenario could lead to a corrupted blob on the service. More...
 
void set_absorb_conditional_errors_on_retry (bool value)
 Sets the value that indicates whether a conditional failure should be absorbed on a retry attempt for the request. This option is only used by cloud_append_blob in upload_from methods and core::cloud_append_blob_ostreambuf. By default, it is set to false. Set this to true only for single writer scenario. Setting this to true in a multi writer scenario could lead to a corrupted blob on the service. More...
 
const std::vector< uint8_t > & encryption_key () const
 Gets the customer provided encryption key. More...
 
void set_encryption_key (std::vector< uint8_t > encryption_key)
 Sets the customer provided encryption key. More...
 
- Public Member Functions inherited from azure::storage::request_options
azure::storage::retry_policy retry_policy () const
 Gets the retry policy for the request. More...
 
void set_retry_policy (azure::storage::retry_policy retry_policy)
 Sets the retry policy for the request. More...
 
const std::chrono::seconds noactivity_timeout () const
 
void set_noactivity_timeout (std::chrono::seconds noactivity_timeout)
 
const std::chrono::seconds server_timeout () const
 Gets the server timeout for the request. More...
 
void set_server_timeout (std::chrono::seconds server_timeout)
 Sets the server timeout for the request. More...
 
const std::chrono::milliseconds maximum_execution_time () const
 Gets the maximum execution time across all potential retries. More...
 
void set_maximum_execution_time (const std::chrono::milliseconds &maximum_execution_time)
 Sets the maximum execution time across all potential retries. More...
 
bool is_maximum_execution_time_customized () const
 Gets if the maximum execution time is set by customer. More...
 
azure::storage::location_mode location_mode () const
 Gets the location mode of the request. More...
 
void set_location_mode (azure::storage::location_mode location_mode)
 Sets the location mode of the request. More...
 
size_t http_buffer_size () const
 Gets the number of bytes to buffer when reading from and writing to a network stream. More...
 
void set_http_buffer_size (size_t http_buffer_size)
 Sets the number of bytes to buffer when reading from and writing to a network stream. More...
 
bool validate_certificates () const
 Gets the server certificate validation property. More...
 
void set_validate_certificates (bool validate_certificates)
 Sets the server certificate validation property. More...
 
std::chrono::time_point< std::chrono::system_clock > operation_expiry_time () const
 Gets the expiry time across all potential retries for the request. More...
 

Detailed Description

Represents a set of timeout and retry policy options that may be specified on a request against the Blob service.

Constructor & Destructor Documentation

◆ blob_request_options()

azure::storage::blob_request_options::blob_request_options ( )
inline

Initializes a new instance of the azure::storage::blob_request_options class.

Member Function Documentation

◆ absorb_conditional_errors_on_retry()

bool azure::storage::blob_request_options::absorb_conditional_errors_on_retry ( ) const
inline

Gets the value that indicates whether a conditional failure should be absorbed on a retry attempt for the request. This option is only used by cloud_append_blob in upload_from methods and core::cloud_append_blob_ostreambuf. By default, it is set to false. Set this to true only for single writer scenario. Setting this to true in a multi writer scenario could lead to a corrupted blob on the service.

Returns
true to absorb a conditional failure on a retry attempt for the request; otherwise, false.

◆ apply_defaults()

void azure::storage::blob_request_options::apply_defaults ( const blob_request_options other,
blob_type  type,
bool  apply_expiry = true 
)
inline

Applies the default set of request options.

Parameters
otherA reference to a set of azure::storage::blob_request_options.
typeThe blob type, specified by azure::storage::blob_type.
apply_expirySpecifies that an expiry time be applied to the request options. This parameter is used internally.

◆ disable_content_crc64_validation()

bool azure::storage::blob_request_options::disable_content_crc64_validation ( ) const
inline

Gets a value indicating whether content-CRC64 validation will be disabled when downloading blobs.

Returns
true to disable content-CRC64 validation; otherwise, false.

◆ disable_content_md5_validation()

bool azure::storage::blob_request_options::disable_content_md5_validation ( ) const
inline

Gets a value indicating whether content-MD5 validation will be disabled when downloading blobs.

Returns
true to disable content-MD5 validation; otherwise, false.

◆ encryption_key()

const std::vector<uint8_t>& azure::storage::blob_request_options::encryption_key ( ) const
inline

Gets the customer provided encryption key.

Returns
The customer provided encryption key.

◆ parallelism_factor()

int azure::storage::blob_request_options::parallelism_factor ( ) const
inline

Gets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than the value specified by the single_blob_upload_threshold_in_bytes property in size.

Returns
The number of parallel block or page upload or download operations that may proceed.

◆ set_absorb_conditional_errors_on_retry()

void azure::storage::blob_request_options::set_absorb_conditional_errors_on_retry ( bool  value)
inline

Sets the value that indicates whether a conditional failure should be absorbed on a retry attempt for the request. This option is only used by cloud_append_blob in upload_from methods and core::cloud_append_blob_ostreambuf. By default, it is set to false. Set this to true only for single writer scenario. Setting this to true in a multi writer scenario could lead to a corrupted blob on the service.

Parameters
valuetrue to absorb a conditional failure on a retry attempt for the request; otherwise, false.

◆ set_disable_content_crc64_validation()

void azure::storage::blob_request_options::set_disable_content_crc64_validation ( bool  value)
inline

Indicates whether to disable content-CRC64 validation when downloading blobs.

Parameters
valuetrue to disable content-CRC64 validation; otherwise, false.

◆ set_disable_content_md5_validation()

void azure::storage::blob_request_options::set_disable_content_md5_validation ( bool  value)
inline

Indicates whether to disable content-MD5 validation when downloading blobs.

Parameters
valuetrue to disable content-MD5 validation; otherwise, false.

◆ set_encryption_key()

void azure::storage::blob_request_options::set_encryption_key ( std::vector< uint8_t >  encryption_key)
inline

Sets the customer provided encryption key.

Parameters
encryption_keyThe customer provided encryption key.

◆ set_parallelism_factor()

void azure::storage::blob_request_options::set_parallelism_factor ( int  value)
inline

Sets the number of blocks or pages that may be simultaneously uploaded or downloaded when uploading or downloading a blob that is greater than the value specified by the single_blob_upload_threshold_in_bytes property in size.

Parameters
valueThe number of parallel block or page upload or download operations that may proceed.

◆ set_single_blob_upload_threshold_in_bytes()

void azure::storage::blob_request_options::set_single_blob_upload_threshold_in_bytes ( utility::size64_t  value)
inline

Sets the maximum size of a blob in bytes that may be uploaded as a single blob.

Parameters
valueThe maximum size of a blob, in bytes, that may be uploaded as a single blob, ranging from between 1 and 5000 MB inclusive.

◆ set_store_blob_content_md5()

void azure::storage::blob_request_options::set_store_blob_content_md5 ( bool  value)
inline

Indicates whether to calculate and store the content-MD5 hash when uploading a blob.

Parameters
valuetrue to calculate and store the content-MD5 hash when uploading a blob; otherwise, false.

◆ set_stream_read_size_in_bytes()

void azure::storage::blob_request_options::set_stream_read_size_in_bytes ( size_t  value)
inline

Sets the minimum number of bytes to buffer when reading from a blob stream.

Parameters
valueThe minimum number of bytes to buffer, being at least 16KB.

◆ set_stream_write_size_in_bytes()

void azure::storage::blob_request_options::set_stream_write_size_in_bytes ( size_t  value)
inline

Sets the minimum number of bytes to buffer when writing to a blob stream.

Parameters
valueThe minimum number of bytes to buffer, ranging from between 16 KB and 4000 MB inclusive.

◆ set_use_transactional_crc64()

void azure::storage::blob_request_options::set_use_transactional_crc64 ( bool  value)
inline

Indicates whether to calculate and validate the content-CRC64 hash for the request.

Parameters
valuetrue to calculate and validate the content-CRC64 hash for the request; otherwise, false.

◆ set_use_transactional_md5()

void azure::storage::blob_request_options::set_use_transactional_md5 ( bool  value)
inline

Indicates whether to calculate and validate the content-MD5 hash for the request.

Parameters
valuetrue to calculate and validate the content-MD5 hash for the request; otherwise, false.

◆ single_blob_upload_threshold_in_bytes()

utility::size64_t azure::storage::blob_request_options::single_blob_upload_threshold_in_bytes ( ) const
inline

Gets the maximum size of a blob in bytes that may be uploaded as a single blob.

Returns
The maximum size of a blob, in bytes, that may be uploaded as a single blob, ranging from between 1 and 5000 MB inclusive.

◆ store_blob_content_md5()

bool azure::storage::blob_request_options::store_blob_content_md5 ( ) const
inline

Gets a value indicating whether the content-MD5 hash will be calculated and stored when uploading a blob.

Returns
true to calculate and store the content-MD5 hash when uploading a blob; otherwise, false.

◆ stream_read_size_in_bytes()

option_with_default<size_t> azure::storage::blob_request_options::stream_read_size_in_bytes ( ) const
inline

Gets the minimum number of bytes to buffer when reading from a blob stream.

Returns
The minimum number of bytes to buffer, being at least 16KB.

◆ stream_write_size_in_bytes()

option_with_default<size_t> azure::storage::blob_request_options::stream_write_size_in_bytes ( ) const
inline

Gets the minimum number of bytes to buffer when writing to a blob stream.

Returns
The minimum number of bytes to buffer, ranging from between 16 KB and 4000 MB inclusive.

◆ use_transactional_crc64()

bool azure::storage::blob_request_options::use_transactional_crc64 ( ) const
inline

Gets a value indicating whether the content-CRC64 hash will be calculated and validated for the request.

Returns
true if the content-CRC64 hash will be calculated and validated for the request; otherwise, false.

◆ use_transactional_md5()

bool azure::storage::blob_request_options::use_transactional_md5 ( ) const
inline

Gets a value indicating whether the content-MD5 hash will be calculated and validated for the request.

Returns
true if the content-MD5 hash will be calculated and validated for the request; otherwise, false.