Azure SDK for Rust (June 2026)
The Azure SDK team is pleased to announce our June 2026 client library releases.
21 packages released this month.
Stable Packages (12)
-
Core
-
Core - AMQP
-
Core - Macros
-
Core - OpenTelemetry
-
Identity
-
Key Vault - Certificates
-
Key Vault - Keys
-
Key Vault - Secrets
-
Storage - Blobs
-
TypeSpec Client Core
-
TypeSpec Core
-
TypeSpec Core Macros
Beta Packages (7)
-
Core Test
-
Core Test Macros
-
Cosmos DB
-
Cosmos DB Client Driver
-
Event Hubs
-
EventHubs Checkpoint Store for Azure Blob Storage
-
Key Vault - Certificates
Release highlights
Core 1.0.0 Changelog
Breaking Changes
- Added
#[non_exhaustive]toAttributeArray,AttributeValue,SpanStatus, andSpanKind. - Bearer token authorization now requires TLS (https).
Features Added
- Initial stable release.
Core - AMQP 1.0.0 Changelog
Features Added
- Initial stable release.
Core - Macros 1.0.0 Changelog
Features Added
- Initial stable release.
Core - OpenTelemetry 1.0.0 Changelog
Features Added
- Initial stable release.
Core Test 0.1.0 Changelog
Features Added
- Initial release.
Core Test Macros 0.1.0 Changelog
Features Added
- Initial release.
Cosmos DB 0.34.0 Changelog
Bugs Fixed
- Fixed
CosmosClientBuilder::with_user_agent_suffixnot propagating the suffix to data-plane requests. The suffix was only applied to the SDK’s account-metadata pipeline; requests issued through the driver transport pipeline (the vast majority of operations) had aUser-Agentheader without the configured suffix. The suffix is now forwarded toCosmosDriverRuntimeBuilderso it appears on every outgoing request. (#4368)
Breaking Changes
- All fallible public APIs now return
azure_data_cosmos::Result<T>(=Result<T, CosmosError>) instead ofazure_core::Result<T>, and the error type was renamedError→CosmosError(withCosmosErrorBuilderfor construction). Categorization moved from aKindenum to predicates onCosmosStatus(is_not_found(),is_throttled(),is_transient(), …); the underlyingazure_core::Erroris still reachable viastd::error::Error::source(). (#4442) - Moved
QueryOptions::max_item_countandQueryOptions::continuation_tokeninto the newQueryOptions::feed: FeedOptionsfield. Callers that read or assign these fields directly should switch tooptions.feed.max_item_count/options.feed.continuation_token. Thewith_max_item_count/with_continuation_tokenconvenience setters onQueryOptionscontinue to work unchanged. (#4447) -
ThroughputPropertiesis now#[non_exhaustive]and no longer derivesDefault. TheDefaultimpl produced a meaningless wire payload (no manual throughput and no autoscale settings, which would send an empty offer body). Callers should useThroughputProperties::manual(throughput)orThroughputProperties::autoscale(starting_maximum_throughput, increment_percent)instead. (#4447) - Marked the following public model enums and response wrappers as
#[non_exhaustive]to allow future variants/fields to be added without further breaking changes:VectorDataType,VectorDistanceFunction,ConflictResolutionMode,IndexingMode,SpatialType,CompositeIndexOrder,VectorIndexType,BatchResponse,ItemResponse,ResourceResponse<T>,ResponseBody,ResponseHeaders,PartitionKeyVersionandCosmosStatus. Callers must use..wildcard arms inmatches over these enums and cannot construct these structs via struct-literal syntax (the SDK already provides constructors / setters for the constructable types). (#4447) -
CosmosClientBuilder::buildnow takesAccountReferencedirectly instead ofimpl Into<AccountReference>. Callers should construct anAccountReferenceexplicitly viaAccountReference::with_credentialorAccountReference::with_authentication_keyand pass it in. (#4447) - Replaced
EffectivePartitionKey::min()/EffectivePartitionKey::max()with associated constantsEffectivePartitionKey::MIN/EffectivePartitionKey::MAX. The inner storage also changed fromStringtoCow<'static, str>so the constants can borrow static strings without allocating. Callers should rewriteEffectivePartitionKey::min()asEffectivePartitionKey::MIN.clone()(or just&EffectivePartitionKey::MINfor comparisons). (#4447) - Removed
PartitionKeyValue::undefined()(use the existingPartitionKeyValue::UNDEFINEDassociated constant instead) and replaced the test-onlyPartitionKeyValue::infinity()constructor with a publicly-availablePartitionKeyValue::INFINITYassociated constant. (#4447) - Removed
FeedRange::can_merge()andFeedRange::merge_with(). These are SDK-internal helpers used only by the session-token coalescing pipeline and are now implemented internally. (#4447) - Renamed
CosmosAccountEndpoint→AccountEndpointandCosmosAccountReference→AccountReference. TheCosmosprefix is implied by the containingazure_data_cosmoscrate. (#4447) - Renamed
CosmosAccountReference::with_master_key()towith_authentication_key(). (#4447) - Renamed
FeedPageIterator→QueryPageIteratorandFeedItemIterator→QueryItemIterator. These iterators are only produced by query APIs today; theFeed*names are reserved for future non-query feed APIs. (#4447) - Removed the
request_charge()andsession_token()convenience accessors fromFeedPageandQueryFeedPage. Usepage.headers().request_charge()andpage.headers().session_token()instead — the parsedResponseHeadersalready exposes these values and provides full typed access to every other response header. (#4447) - Tightened
AccountReferenceconstructors.with_credentialnow acceptsimpl Into<AccountEndpoint>instead of a concreteAccountEndpoint. The formerwith_master_keyis renamed towith_authentication_keyand now takesAccountEndpoint(which hasFromStrandFrom<Url>impls) andimpl Into<Secret>for the key. The twoFrom<(AccountEndpoint, _)>/From<(Url, _)>tuple conversions are removed; construct aAccountReferencevia the named constructors instead. (#4447) - Removed
azure_data_cosmos::ConnectionStringfrom the public API. The type was a parsing helper not consumed by any public SDK API. Users who still need support for Connection String parsing can parse the connection string themselves and construct anAccountReferencevia the named constructors. (#4447) - Refactored the response surface to be SDK-owned.
ItemResponsedrops its type parameter (useresponse.into_model::<MyItem>()orresponse.into_body().into_single::<MyItem>());ResourceResponse<T>keeps its parameter so.into_model()?still works without a turbofish.status()now returnsCosmosStatus,headers()returns&ResponseHeaders(typed accessors only —etag(),request_charge(),session_token(),continuation(),activity_id(),substatus(),index_metrics(),query_metrics(),offer_replace_pending(),server_duration_ms(),lsn(),item_lsn(),item_count(), …), andinto_body()returns the SDK-ownedResponseBodyenum (NoPayload/Bytes/Items) withsingle(),items(),into_single::<T>(),into_items::<T>(), andis_empty()helpers.FeedPage::headers()/QueryFeedPage::headers()now return&ResponseHeadersinstead of&azure_core::http::headers::Headers. TheItemResponse::etag()convenience accessor is removed (useresponse.headers().etag()).CosmosStatusis re-exported from the driver and implementsPartialEq<StatusCode>andFrom<CosmosStatus> for StatusCode/u16, so existing comparisons keep working. (#4401)
Features Added
-
CosmosErrorcan capture a stack backtrace on construction. Capture is opt-in (off by default; on whenRUST_BACKTRACEis set or when explicit capacities are supplied) and protected against error storms by two configurable per-second limiters on the runtime builder. (#4442) - Introduced
azure_data_cosmos::CosmosErrorand the crate-wideazure_data_cosmos::Result<T>alias, surfacing typedCosmosStatus(with predicate accessors likeis_not_found()/is_throttled()/is_transient()), the originatingCosmosResponse, and the operationDiagnosticsContexton every failure.From<CosmosError> for azure_core::Erroris provided so callers using?againstazure_core::Errorcontinue to compose. (#4442) - Added
RoutingStrategy::PreferredRegionsto allow specifying a fixed region preference order for failover, hedging, and retry. (#4485) - Standardized every client-method options type with a public
operation: OperationOptionsfield andwith_operation_options(OperationOptions) -> Selfsetter, so any per-requestOperationOptionssetting can be configured via any options type. The following options types previously had no way to attachOperationOptionsand now do:ReadContainerOptions,ReadDatabaseOptions,ReplaceContainerOptions,CreateContainerOptions,CreateDatabaseOptions,DeleteContainerOptions,DeleteDatabaseOptions,QueryContainersOptions,QueryDatabasesOptions,ThroughputOptions,ReadFeedRangesOptions. ForCreateContainerOptions/CreateDatabaseOptions/ReplaceContainerOptions, the SDK still forcescontent_response_on_write = Enabledon the resolved options because control-plane mutations require the response body.ReadFeedRangesOptions::operationis currently inert (the underlying routing-map cache does not go through the operation pipeline) but is added for shape consistency with the other options types. (#4447) - Added
new()constructors andwith_xconsuming setters to multi-required-field model types so callers can build them declaratively without struct-literal syntax (which is now blocked by#[non_exhaustive]):VectorEmbedding::new(path, data_type, dimensions, distance_function)+with_path/with_data_type/with_dimensions/with_distance_function;ConflictResolutionPolicy::new(mode)+with_resolution_path/with_resolution_procedure;SpatialIndex::new(path)+with_type(singular pusher ontotypes);CompositeIndexProperty::new(path, order)+with_path/with_order;VectorIndex::new(path, index_type)+with_path/with_index_type. These types do not implementDefault— their constructors require values that have no meaningful default. (#4447) - Derived
DefaultonVectorEmbeddingPolicy,UniqueKeyPolicy,UniqueKey,PropertyPath, andCompositeIndex, and added singularwith_xpushers / setters:VectorEmbeddingPolicy::with_embedding,UniqueKeyPolicy::with_unique_key,UniqueKey::with_path,PropertyPath::with_path, andCompositeIndex::with_property. This matches the existingIndexingPolicy::with_included_pathstyle and lets callers build these policies declaratively without constructing intermediateVecs. (#4447) - Added
QueryFeedPage::as_feed_page()returning&FeedPage<T>, so a query page can be passed to APIs that accept the more generalFeedPagetype. Query-specific metadata (index/query metrics) remains accessible on theQueryFeedPageitself. (#4447) - Added
QueryOptions::with_populate_index_metrics(bool),with_populate_query_metrics(bool), andwith_max_item_count(MaxItemCountHint)setters. These replace the previous pattern of passing rawx-ms-cosmos-populateindexmetrics,x-ms-documentdb-populatequerymetrics, andx-ms-max-item-countvalues throughOperationOptions::with_custom_headersfor query execution.max_item_counttakes the newMaxItemCountHintenum withServerDecidesandLimit(NonZeroU32)variants, so callers don’t have to traffic in the-1wire sentinel directly. (#4401) - Added
ContainerClient::patch_item()for applying JSON-Patch-style mutations to a single item. Supportsadd/set/replace/remove/increment/moveops via the newPatchInstructions/PatchOperation/CosmosNumbertypes. AddedPatchItemOptionsfor per-request configuration (max_attempts,session_token, etc.).PatchItemOptionsintentionally does not expose aPreconditionor SQL filter predicate — the driver-side PATCH handler owns the internalIf-Matchend-to-end, and predicate evaluation is out of scope for this preview. The method’s rustdoc documents the non-idempotent-under-transport-failure caveat. (#4386) - Support for simple cross-partition queries with
SELECTprojections andWHEREfilters. Cross-partition queries are now done through fan-out in the client, and provide a client-generated continuation token that can be used to resume the query. SeeContainerClient::query_items()andFeedScopefor details. (#4440) - Added
QueryOptions::continuation_tokenandQueryOptions::with_continuation_token(...)for resuming queries from a continuation token. (#4440) - Added a new
FeedOptionstype that wraps the paging knobs (max_item_count,continuation_token) common to feed-style operations, so future feed APIs (change feed, read-feed, etc.) can adopt the same shape without redeclaring fields.QueryOptionsnow embeds it as apub feed: FeedOptionsfield with awith_feed_options(FeedOptions)setter. The existingQueryOptions::with_max_item_countandQueryOptions::with_continuation_tokensetters are retained as convenience functions that mutate the embeddedfeed(they’re expected to be used commonly enough to warrant the shortcut). (#4447)
Cosmos DB 0.35.0 Changelog
Bugs Fixed
- Writes to multi-write Cosmos accounts now send the
x-ms-cosmos-allow-tentative-writes: truerequest header. Without it, satellite write regions returned403 / 3 (WriteForbidden), breaking write failover to non-primary regions. (#4500)
Features Added
- Exposed cross-regional read hedging. Enable it by attaching an
OperationOptionsbuilt withOperationOptionsBuilder::with_availability_strategy(AvailabilityStrategy::Hedging(HedgingStrategy::new(HedgeThreshold::new(threshold)?)))to a request (e.g.ItemReadOptions::with_operation_options) or to the client defaults viaCosmosClientBuilder::with_operation_options. TheAvailabilityStrategy,HedgingStrategy, andHedgeThresholdtypes are now re-exported fromazure_data_cosmos. When enabled, the driver speculatively dispatches the read to a second preferred region after the configured threshold elapses and returns whichever response classifies as final first, cancelling the losing leg structurally (no detached tasks);AvailabilityStrategy::Disabledturns hedging off for that scope, and when no strategy is configured the driver applies a built-in default for multi-region reads. (#4432) - Added configurable retry limits for throttled (HTTP 429, rate-limited) requests, mirroring the .NET and Java SDKs’
ThrottlingRetryOptions. A new nestedThrottlingRetryOptionsgroup onOperationOptions(fieldthrottling_retry_options) carriesmax_retry_count(envAZURE_COSMOS_MAX_THROTTLE_RETRY_COUNT, default9,0disables throttle retries) andmax_retry_wait_time(default30s), settable per-request viaOperationOptions/OperationOptionsBuilderandThrottlingRetryOptionsBuilder. New client-wide setterCosmosClientBuilder::with_throttling_retry_options(ThrottlingRetryOptions)forwards the group as runtime-layer defaults. Both budgets apply per transport-pipeline invocation, not per logical operation — an operation that fans out across regions (failover, hedging) starts a fresh budget per leg; useOperationOptions::end_to_end_latency_policyto bound total per-operation wall-clock time. (#4544)
Cosmos DB Client Driver 0.3.0 Changelog
Bugs Fixed
-
build_transport_error(the abort wrap on the retry-budget-exhausted transport path) now forwards the inner cosmos error’s diagnostics onto the synthesized outer error. Previously the wrap passedNone, soouter.diagnostics()returnedNoneeven when the underlying transport error carried a fullArc<DiagnosticsContext>; consumers had to walksource().diagnostics()to recover it. The operation diagnostics are now reachable directly on the error surfaced to callers. - Aborted operations now carry the operation’s completed
DiagnosticsContext(retry history, region attempts, per-request events) onto the returnedError. Previously the abort branch of the operation pipeline mutated the localDiagnosticsContextBuilderand dropped it, soerr.diagnostics()returnedNoneon every aborted operation even though the success path had always attached diagnostics to theCosmosResponse. Added a builder path to re-decorate an existing error with diagnostics —CosmosError::builder().from_error(err).with_diagnostics(ctx).build()— so the abort site can attach the operation’s completedDiagnosticsContextwithout losing the original error’s wire payload, headers, status, or source chain. -
infer_request_sent_statusnow classifiesTRANSPORT_DNS_FAILEDandTRANSPORT_HTTP2_INCOMPATIBLE(HTTP/2 protocol-negotiation failures such asHTTP_1_1_REQUIRED) asRequestSentStatus::NotSent, alongside the existingTRANSPORT_CONNECTION_FAILEDcase. Both failure modes provably precede any request bytes going onto the wire (DNS resolution happens before connect; H2 negotiation happens during the preface, before the request frame is emitted), so non-idempotent writes (Create / Replace / PATCH) may be retried safely. This restores the pre-refactor contract that callers used to rely on underazure_core::ErrorKind::Connection; the new typed boundary mapper had been refining those same chains into the more specific sub-statuses, which were falling through toRequestSentStatus::Unknownand disabling safe retries. GenericTRANSPORT_IO_FAILEDcontinues to map toUnknown(it can fire mid-stream after request bytes left the socket). -
CosmosResponseHeadersnow parsesx-ms-offer-replace-pendingcase-insensitively (true/True/TRUEandfalse/False/FALSEare all accepted). Previously the field used strictbool::FromStrparsing, which would silently drop Pascal-case values the service may emit and cause the throughput-replace poller to treat in-progress replacements as completed. - Restored periodic database-account metadata refresh on long-running clients. The per-operation lookup in
CosmosDriver::execute_operationwas caching the first response forever, soGET <account-endpoint>/fired exactly once per process and the cached regional endpoint information was never updated. EachCosmosDrivernow spawns a background loop inLocationStateStore::start_account_refresh_loopthat re-fetches account metadata every 5 minutes. The loop is owned by the driver’sBackgroundTaskManagerand is aborted automatically when the driver is dropped. (#4407) - Account-metadata refresh failures from the periodic background loop in
LocationStateStoreare now logged attracing::warn!instead of being silently swallowed, so operators can detect that the SDK is serving stale account metadata. Behavior is unchanged — operations still succeed against the cached endpoints. (#4407) - PATCH RMW loop now reconciles the synthesized response body’s
_etagsystem property with the inner Replace’s response header. Previously the post-image returned to callers carried the Read’s_etag, soresponse.into_model::<T>()on a type with an_etagfield would yield a stale tag that no longer matchedresponse.headers().etag— breaking optimistic-concurrency round-tripping. When the inner Replace returns a non-empty body (caller enabledcontent_response_on_write), the service’s authoritative post-image is now surfaced verbatim. (#4386) - PATCH RMW loop now folds the 412 response’s
x-ms-session-token(viaSessionToken::merge) into the carry-forward token threaded into the next attempt’s Read. Previously only the Read response’s token was carried forward, so a retry could regress to a strictly older session view than the failed Replace already observed. (#4386) - PPCB now records every 5xx failure for the affected partition, including the final failure that exhausts the failover retry budget. Previously the budget-exhausted abort path skipped emitting
MarkPartitionUnavailable, causing the most diagnostic failure to be silently dropped from PPCB’s per-partition counter. (#4156)
Breaking Changes
- Renamed the error surface:
Error→CosmosError,ErrorBuilder→CosmosErrorBuilder. Categorization moved from aKindenum to predicates onCosmosStatus(is_not_found(),is_throttled(),is_transient(), …); error details are reached viastatus()andresponse()instead of the previous flat accessors. (#4442) - Renamed
MaxItemCounttoMaxItemCountHintto better reflect that the value is a hint to the service (which may return fewer items) rather than a strict cap. The SDK already exposed the type under the new name via ause ... as MaxItemCountHint; the rename makes the canonical name consistent across both crates. Update callers that referenceazure_data_cosmos_driver::models::MaxItemCount,CosmosRequestHeaders::max_item_counttypings, orCosmosOperation::with_max_item_countargument types accordingly. - Marked
PartitionKeyVersionandCosmosStatusas#[non_exhaustive]to allow future variants/fields to be added without further breaking changes. Callers must use..wildcard arms when matching onPartitionKeyVersion;CosmosStatusalready had private fields and is constructed viaCosmosStatus::new/with_sub_status, so the attribute is primarily a forward-compat signal. - Slimmed the cached
PartitionKeyRangeto six fields, dropping eight metadata fields the routing-map cache never reads (resource_id,self_link,etag,timestamp,rid_prefix,target_throughput,lsn,owned_archival_pk_range_ids). The struct now retains the four fields the routing layer consults (id,min_inclusive,max_exclusive,status) plusthroughput_fractionandparents, kept on the cached representation for downstream consumers that read them directly. As part of this change,PartialEqandHashno longer hashresource_id: two ranges with the sameid/min_inclusive/max_exclusiveare now equal regardless of their_rid. Internal callers never usedPartitionKeyRangeas a hash-map key, but downstream consumers that did so should review their assumptions. Service responses are unchanged on the wire — the dropped JSON fields are silently ignored by serde on deserialization. (#4393) - Changed
CosmosResponse::diagnostics()to returnArc<DiagnosticsContext>instead of&DiagnosticsContext. The returnedArcderefs transparently for read-only inspection (existing call patterns likeresponse.diagnostics().activity_id()continue to work), but bindings of the formlet d = response.diagnostics();now own a clonedArchandle rather than a borrow — letting callers retain operation diagnostics acrossinto_body(). Replaces the additiveCosmosResponse::diagnostics_arc()accessor introduced earlier in this preview cycle. - Removed
CosmosResponse::body() -> &[u8]. The previous accessor panicked on multi-item feed bodies, which is unsafe for a public API. The non-consumingbody_parts() -> &ResponseBodyaccessor has been renamed tobody(). Callers needing borrowed access should pattern-match onResponseBody::Bytes(b)/ResponseBody::Items(items); consuming callers can useinto_body().single_item::<T>()orinto_body().single(). - Replaced
EffectivePartitionKey::min()/EffectivePartitionKey::max()with associated constantsEffectivePartitionKey::MIN/EffectivePartitionKey::MAX. The inner storage also changed fromStringtoCow<'static, str>so the constants can borrow static strings without allocating. Callers should rewriteEffectivePartitionKey::min()asEffectivePartitionKey::MIN.clone()(or just&EffectivePartitionKey::MINfor comparisons). - Removed
PartitionKeyValue::undefined()(use the existingPartitionKeyValue::UNDEFINEDassociated constant instead) and replaced the test-onlyPartitionKeyValue::infinity()constructor with a publicly-availablePartitionKeyValue::INFINITYassociated constant. - Removed
FeedRange::can_merge()andFeedRange::merge_with(). These were SDK-internal helpers used only by the session-token coalescing pipeline and are now implemented as private free functions insideazure_data_cosmos’s session helpers. AddedFeedRange::is_logical_partition()as the minimum public predicate needed for external callers that wish to implement their own merge logic.FeedRange::is_subset_of()andFeedRange::overlaps()remain public informational APIs. - Removed
ResponseBody::as_contiguous_bytes(),ResponseBody::into_bytes(), andCosmosResponse::into_bytes(). These helpers silently concatenated feed items into a single buffer, which is semantically wrong (feed items are independent JSON documents, not pieces of a larger byte stream). Callers should explicitly handle theResponseBody::BytesandResponseBody::Itemsvariants based on the operation type, or useResponseBody::single()for single-payload responses.ResponseBody::into_string()now returns an error for feed bodies instead of concatenating items.
Features Added
-
CosmosErrorcan capture a stack backtrace on construction. Capture is opt-in (off by default; on whenRUST_BACKTRACEis set or when explicit capacities are supplied) and protected against error storms by two configurable per-second limiters on the runtime builder. See the README for details. (#4442) - Introduced
CosmosErrorand the crate-wideResult<T>alias as the driver’s first-class error type, always exposing the typedCosmosStatus(with predicates likeis_not_found()/is_throttled()/is_transient()), the originatingCosmosResponse(when received), and the operationDiagnosticsContext. Construction goes through the fluentCosmosErrorBuilder. (#4442) - Added
PartitionKeyDefinition::with_kind(PartitionKeyKind)andPartitionKeyDefinition::with_version(PartitionKeyVersion)consuming setters so callers can override the auto-inferred kind and the defaultV2version without resorting to private-field workarounds.PartitionKeyDefinition::new(paths)continues to auto-infer the kind from the path count. - Reshaped
PatchInstructionsAPI so thatPatchInstructions::new()creates an empty instruction set, where individual operations can be added viawith_operation(). ThePatchInstructionstype also implementsFrom<Vec<PatchOperation>>for ergonomic construction from a vector. - Refactored the driver response surface: introduced
ResponseBody(aNoPayload/Bytes(Bytes)/Items(Vec<Bytes>)enum withsingle(),items(),into_single::<T>(),into_items::<T>(), andis_empty()helpers), added typedCosmosRequestHeadersfields for query / changefeed headers (max_item_count,incremental_feed,populate_index_metrics,populate_query_metrics,enable_cross_partition_query) so callers no longer need rawcustom_headers, the pipeline now auto-emitsx-ms-documentdb-isquery: TrueandContent-Type: application/query+jsonforOperationType::Query, andCosmosStatusgainedPartialEq<StatusCode>,From<CosmosStatus> for StatusCode/u16, and aCosmosStatus::new(StatusCode)constructor. (#4401) - Added support for the
x-ms-cosmos-hub-region-processing-onlyrequest header on retries after a404 / 1002 (READ_SESSION_NOT_AVAILABLE)response on single-master data-plane Cosmos operations. The header asks the backend to route only to a region that has caught up to the requested LSN, reducing the chance of a follow-up retry hitting a region whose session is also behind. The header is scoped to single-master accounts (multi-master accounts already have a different recovery path) and to data-plane operations (metadata-pipeline operations are out of scope per the design spec). Once latched on the first 1002 within an operation, the header is emitted on every subsequent retry for that operation. (#4389) - Added local query-plan generator scaffolding under
crate::query(lexer, parser, AST, planner, and in-memory evaluator). The scaffolding is not wired into the production query path yet — production callers still issue Gateway query-plan requests viaCosmosOperation::query_plan. The__internal_testingcargo feature exposesquery::__test_only_generate_query_plan_for_pk_paths,query::__TEST_ONLY_SUPPORTED_QUERY_FEATURES, andCosmosOperation::query_planfor cross-crate gateway-comparison tests; this feature is intentionally unstable and not covered by SemVer. - Added per-partition automatic failover (PPAF) for writes on single-master accounts. On 403/3 WriteForbidden, 503 ServiceUnavailable, 429/3092 SystemResourceUnavailable, 410/1022 Gone, or 408 RequestTimeout from a region, the affected partition is failed over to the next preferred region; subsequent writes for that partition skip the failed region. (#4156)
- Added per-partition circuit breaker (PPCB) for reads (any account) and writes (multi-master accounts). Tracks failure counts per
(partition_key_range_id, region)and routes to an alternate region once the threshold (default 10 reads, 5 writes) is exceeded. A background failback loop probes the original region for recovery. (#4156) - Added
OperationOptionsfields for tuning PPCB:circuit_breaker_failure_count_for_reads,circuit_breaker_failure_count_for_writes,circuit_breaker_timeout_counter_reset_window_in_minutes,allowed_partition_unavailability_duration_in_seconds,ppcb_stale_partition_unavailability_refresh_interval_in_seconds, andper_partition_circuit_breaker_enabled(each also configurable via the correspondingAZURE_COSMOS_*environment variable). (#4156) - Added
CosmosDriverRuntimeBuilder::with_wrapping_sdk_identifier(impl Into<String>)so higher-level SDKs can prepend their own identifier (e.g.,azsdk-rust-cosmos/0.34.0) to the driver’sUser-Agentprefix. The driver only sanitizes ASCII and trims whitespace; the wrapping SDK is responsible for the full token format. When set, theUser-Agentbecomes<wrapping> azsdk-rust-cosmos-driver/<ver> <os>/<arch> rustc/<ver> [suffix]; when unset, the existing format is unchanged. (#4465) - Added
OperationType::PatchplusCosmosOperation::patch_item()and thePatchOperation/CosmosNumber/PatchDocumentmodel types. Patches are executed driver-side as a Read-Modify-Write loop via a dedicatedpatch_handlerpipeline stage; seedocs/PATCH_HANDLER_SPEC.mdfor the full contract. The handler owns the internalIf-Matchprecondition end-to-end and rejects any caller-setPreconditionon the outer PATCH operation with a clear error before issuing any sub-operation. (#4386)
Cosmos DB Client Driver 0.4.0 Changelog
Bugs Fixed
- Data-plane and non-account metadata operations now fall back to the hub/primary write region endpoint instead of the global account endpoint when all regional endpoints are excluded or unavailable. (#4503)
- Writes to multi-write Cosmos accounts now send the
x-ms-cosmos-allow-tentative-writes: truerequest header (gated onenableMultipleWriteLocationsfrom the account metadata). Without this header satellite write regions returned403 / 3 (WriteForbidden), breaking write failover. (#4500) - Bootstrap account-metadata fetches now surface non-2xx responses as
CosmosErrorwith the wire status and body, instead of amissing field _selfserde error. Diagnostics are populated on the same envelope used by the operation pipeline. (#4500) - A transient failure while refreshing the partition key range cache no longer replaces a known-good cached routing map with an empty placeholder; the previous map is preserved until the next successful refresh. (#4549)
Breaking Changes
- Removed
CosmosDriver::resolve_container_by_ridand the supportingCosmosOperation::read_container_by_ridfactory andContainerCache::get_or_fetch_by_rid. These RID-keyed entry points had no callers; container resolution now goes exclusively throughresolve_container/resolve_container_by_name. (#4506)
Features Added
- Added cross regional hedging for reads on single and multi-master accounts. Using
AvailabilityStrategy::Hedgingthe user now has the option to pass a threshold, and the driver speculatively dispatches the same request to a second preferred region after the threshold hits and returns whichever response classifies as final first. The losing leg is cancelled structurally (no detached tasks). (#4432) - Added
OperationOptions::consecutive_hedge_win_threshold(and theAZURE_COSMOS_CONSECUTIVE_HEDGE_WIN_THRESHOLDenvironment variable) to tune how aggressively cross-region hedging drives per-partition failover. This option does not enable hedging — hedging is turned on by settingOperationOptions::availability_strategytoAvailabilityStrategy::Hedging(HedgingStrategy::new(threshold))(at the operation, account, or runtime layer); when no strategy is configured the driver applies a built-in default, andAvailabilityStrategy::Disabledturns it off. Once hedging is active, the driver speculatively dispatches a read to an alternate preferred region after the threshold elapses, and a “hedge win” is recorded whenever that alternate returns the final response before the primary.consecutive_hedge_win_thresholdsets how many consecutive hedge wins on the same(partition, primary_region)pair are tolerated before the per-partition circuit breaker (PPCB) trips the partition away from its primary region (default5, matching the .NET v3 SDK). Lower values trip the partition sooner when the primary is chronically slow but the alternate is healthy; higher values tolerate occasional latency spikes that the hedge happens to win, avoiding spurious failovers when both regions are healthy. (#4432) - Added configurable throttle (HTTP 429, rate-limited) retry limits to
OperationOptionsvia the nestedThrottlingRetryOptionsgroup (mirroring the .NET and Java SDKs’ThrottlingRetryOptions):max_retry_count(envAZURE_COSMOS_MAX_THROTTLE_RETRY_COUNT, default9,0disables retries) caps the number of 429 retries, andmax_retry_wait_time(default30s) caps the cumulative wait across them. Each field resolves independently through the standard operation → account → runtime → env layering and is threaded into the transport-level throttle retry loop viaThrottleRetryState::with_limits. The one-shot forced-final-retry safety net inexecute_transport_pipelineis gated onattempt_count < max_attempts, so a configuredmax_retry_count = Nproduces at mostN + 1total requests on the wire (1 initial + N retries) — matching the .NET-parityMaxRetryAttemptsOnRateLimitedRequestscontract. The forced-final retry remains active when the cumulative-wait budget is the limiter rather than the count. Both budgets are scoped perexecute_transport_pipelineinvocation; an operation that fans out across regions (failover, hedging) starts a fresh throttle budget per leg, so per-operation total wall-clock time should be bounded viaOperationOptions::end_to_end_latency_policy. (#4544)
Event Hubs 0.15.0 Changelog
Breaking Changes
- On the receive path, the
amqp:link:stolenAMQP condition is no longer auto-retried. A receiver displaced by a higher-or-equal-epoch attacher now surfaces the error (translated toEventHubsError::ConsumerDisconnectedbyEventReceiver::stream_events) instead of silently re-attaching. Sender, CBS, and management operations retain the historical retry-on-stolen behavior.
Features Added
- The
EventProcessornow opens every partition receiver with AMQP epoch (owner level)0and surfaces broker-initiated displacement as the newEventHubsError::ConsumerDisconnectederror kind. When a secondEventProcessorinstance claims a partition this instance is currently holding, the broker disconnects this instance’s receiver and the consumer’sstream_events()resolves withConsumerDisconnected. This matches the behavior ofEventProcessorClientin the .NET and Java Azure SDKs. Consumers should pattern-match onErrorKind::ConsumerDisconnectedto detect a stolen partition and re-acquire a client vianext_partition_client(). - Added
EventHubsError::ConsumerDisconnected(Option<AmqpDescribedError>)error variant.
Bugs Fixed
- Increased
DEFAULT_PARTITION_EXPIRATION_DURATIONfrom 10 seconds to 60 seconds. The previous default was shorter thanDEFAULT_UPDATE_INTERVAL(30 seconds), so ownership records expired between load-balancing cycles. The load balancer perpetually sawcurrent=0for every consumer and continuously re-claimed partitions, causing widespread duplicate event processing.EventProcessorBuilder::buildnow rejects configurations wherepartition_expiration_duration <= update_interval. (#3851) - The
EventProcessor’s load-balancer reconciliation now closes the underlying AMQP receiver for any partition that has been reassigned to another consumer, so the consumer’sstream_events()resolves and the loop can terminate. Previously a stolen partition’s client could continue to attempt receives until the broker tore down the link.
EventHubs Checkpoint Store for Azure Blob Storage 0.9.0 Changelog
Breaking Changes
Features Added
Bugs Fixed
Identity 1.0.0 Changelog
Features Added
- Initial stable release.
Breaking Changes
- Added
#[non_exhaustive]toUserAssignedId.
Key Vault - Certificates 1.0.0 Changelog
Features Added
- Initial stable release.
Breaking Changes
- Bearer token authentication now requires TLS (https).
- Renamed
CertificateClient::create_certificate()tobegin_create_certificate()per guidelines. - Vault URLs must use TLS (https).
Key Vault - Certificates 1.1.0-beta.1 Changelog
Features Added
- Added an experimental
PlatformManagedproperty onCertificatePolicyfor Azure Key Vault internal usage. Any calls using this property will fail and it is not recommended to be used at this point. #4539.
Key Vault - Keys 1.0.0 Changelog
Features Added
- Initial stable release.
Breaking Changes
- Vault URLs must use TLS (https).
Key Vault - Secrets 1.0.0 Changelog
Features Added
- Initial stable release.
Breaking Changes
- Vault URLs must use TLS (https).
Storage - Blobs 1.0.0 Changelog
Breaking Changes
- Consolidated client constructors: the existing
from_url()constructors have been renamed tonew(), replacing the previous endpoint-plus-name string overloads. Each client now has a singlenew()that takes a fully-formedUrl: BlobClient::new(blob_url: Url, ...)BlockBlobClient::new(blob_url: Url, ...)AppendBlobClient::new(blob_url: Url, ...)PageBlobClient::new(blob_url: Url, ...)BlobContainerClient::new(container_url: Url, ...)BlobServiceClient::new(service_url: Url, ...)-
BlobServiceClient::find_blobs_by_tags()is now pageable and returnsResult<Pager<FilteredBlobResponse, XmlFormat>>instead ofResult<Response<FilterBlobSegment, XmlFormat>>. -
BlobContainerClient::find_blobs_by_tags()is now pageable and returnsResult<Pager<FilteredBlobResponse, XmlFormat>>instead ofResult<Response<FilteredBlobResponse, XmlFormat>>. - Renamed
FilterBlobSegmenttoFilteredBlobResponse. - Renamed
FilteredBlobResponse.blobstoFilteredBlobResponse.blob_items. - Changed
FilteredBlobResponse.blob_itemsfromOption<Vec<FilterBlobItem>>toVec<FilterBlobItem>. - Renamed
ListContainersSegmentResponsetoListContainersResponse. - Removed
BlobFlatListSegmentwrapper;ListBlobsResponse.blob_itemsis nowVec<BlobItem>directly (previously accessed via.segment.blob_items). - Renamed
BlobProperties.customer_provided_key_sha256toencryption_key_sha256. - Renamed
BlobMetadata.additional_propertiestovalues. - Renamed
PageBlobClientCreateOptions::with_if_not_exists()toif_not_exists(). - Renamed
AppendBlobClientCreateOptions::with_if_not_exists()toif_not_exists(). - Renamed
BlockBlobClientUploadBlobFromUrlOptions::with_if_not_exists()toif_not_exists(). - Renamed
BlockBlobClientUploadOptions::with_if_not_exists()toif_not_exists(). - Removed the
endpoint()method from all clients. Useurl()instead. - Removed
PageBlobClient::get_page_ranges()along with thePageList,PageRange,ClearRange,PageBlobClientGetPageRangesOptions, andPageListHeaderstypes. - Removed the
azure_storage_blob::errorandazure_storage_blob::models::errormodule paths. Use the re-exportedazure_storage_blob::{Result, StorageError}instead.
Bugs Fixed
- All client constructors (
BlobClient::new(),BlobContainerClient::new(),BlobServiceClient::new(),AppendBlobClient::new(),BlockBlobClient::new(),PageBlobClient::new()) now reject non-base URLs (e.g.data:,mailto:).
Features Added
- Added
with_tags()helpers to set blob tags on create/upload options by acceptingBlobTagsorHashMap<String, String>and encoding them into thex-ms-tagsheader format: PageBlobClientCreateOptions::with_tags()AppendBlobClientCreateOptions::with_tags()BlockBlobClientUploadOptions::with_tags()BlockBlobClientUploadBlobFromUrlOptions::with_tags()BlockBlobClientCommitBlockListOptions::with_tags()
TypeSpec Client Core 1.0.0 Changelog
Breaking Changes
- Added
#[non_exhaustive]toAttributeArray,AttributeValue,SpanStatus, andSpanKind. -
new_http_client()now panics if thereqwestfeature is not enabled.
Features Added
- Initial stable release.
TypeSpec Core 1.0.0 Changelog
Features Added
- Initial stable release.
TypeSpec Core Macros 1.0.0 Changelog
Features Added
- Initial stable release.
Latest Releases
View all the latest versions of Rust crates here.
Installation Instructions
To install any of our crates, copy and paste the following commands into a terminal:
$> cargo add azure_core@1.0.0
$> cargo add azure_core_amqp@1.0.0
$> cargo add azure_core_macros@1.0.0
$> cargo add azure_core_opentelemetry@1.0.0
$> cargo add azure_core_test@0.1.0
$> cargo add azure_core_test_macros@0.1.0
$> cargo add azure_data_cosmos@0.34.0
$> cargo add azure_data_cosmos@0.35.0
$> cargo add azure_data_cosmos_driver@0.3.0
$> cargo add azure_data_cosmos_driver@0.4.0
$> cargo add azure_identity@1.0.0
$> cargo add azure_messaging_eventhubs@0.15.0
$> cargo add azure_messaging_eventhubs_checkpointstore_blob@0.9.0
$> cargo add azure_security_keyvault_certificates@1.0.0
$> cargo add azure_security_keyvault_certificates@1.1.0-beta.1
$> cargo add azure_security_keyvault_keys@1.0.0
$> cargo add azure_security_keyvault_secrets@1.0.0
$> cargo add azure_storage_blob@1.0.0
$> cargo add typespec@1.0.0
$> cargo add typespec_client_core@1.0.0
$> cargo add typespec_macros@1.0.0
Feedback
If you have a bug or feature request for one of the libraries, please post an issue to GitHub.