@@ -122,7 +122,7 @@ async def read(
122
122
range statistics in response headers.
123
123
:keyword bool populate_quota_info: Enable returning collection storage quota information in response headers.
124
124
:keyword str session_token: Token for use with Session consistency.
125
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
125
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
126
126
:keyword response_hook: A callable invoked with the response metadata.
127
127
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], None]
128
128
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: Raised if the container couldn't be retrieved.
@@ -160,23 +160,17 @@ async def create_item(
160
160
To update or replace an existing item, use the
161
161
:func:`ContainerProxy.upsert_item` method.
162
162
163
- :param Dict[str, str] body: A dict-like object representing the item to create.
164
- :keyword pre_trigger_include: trigger id to be used as pre operation trigger.
165
- :paramtype pre_trigger_include: str
166
- :keyword post_trigger_include: trigger id to be used as post operation trigger.
167
- :paramtype post_trigger_include: str
163
+ :param dict[str, str] body: A dict-like object representing the item to create.
164
+ :keyword str pre_trigger_include: trigger id to be used as pre operation trigger.
165
+ :keyword str post_trigger_include: trigger id to be used as post operation trigger.
168
166
:keyword indexing_directive: Enumerates the possible values to indicate whether the document should
169
167
be omitted from indexing. Possible values include: 0 for Default, 1 for Exclude, or 2 for Include.
170
- :paramtype indexing_directive: int or ~azure.cosmos.documents.IndexingDirective
171
- :keyword enable_automatic_id_generation: Enable automatic id generation if no id present.
172
- :paramtype enable_automatic_id_generation: bool
173
- :keyword session_token: Token for use with Session consistency.
174
- :paramtype session_token: str
175
- :keyword initial_headers: Initial headers to be sent as part of the request.
176
- :paramtype initial_headers: dict[str,str]
168
+ :paramtype indexing_directive: Union[int, ~azure.cosmos.documents.IndexingDirective]
169
+ :keyword bool enable_automatic_id_generation: Enable automatic id generation if no id present.
170
+ :keyword str session_token: Token for use with Session consistency.
171
+ :keyword dict[str, str] initial_headers: Initial headers to be sent as part of the request.
177
172
:keyword str etag: An ETag value, or the wildcard character (*). Used to check if the resource
178
173
has changed, and act according to the condition specified by the `match_condition` parameter.
179
- :paramtype etag: str
180
174
:keyword match_condition: The match condition to use upon the etag.
181
175
:paramtype match_condition: ~azure.core.MatchConditions
182
176
:keyword response_hook: A callable invoked with the response metadata.
@@ -219,8 +213,9 @@ async def read_item(
219
213
:type item: Union[str, Dict[str, Any]]
220
214
:param partition_key: Partition key for the item to retrieve.
221
215
:type partition_key: Union[str, int, float, bool]
216
+ :keyword str post_trigger_include: trigger id to be used as post operation trigger.
222
217
:keyword str session_token: Token for use with Session consistency.
223
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
218
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
224
219
:keyword response_hook: A callable invoked with the response metadata.
225
220
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], None]
226
221
**Provisional** keyword argument max_integrated_cache_staleness_in_ms
@@ -245,6 +240,9 @@ async def read_item(
245
240
request_options = _build_options (kwargs )
246
241
response_hook = kwargs .pop ('response_hook' , None )
247
242
request_options ["partitionKey" ] = self ._set_partition_key (partition_key )
243
+ post_trigger_include = kwargs .pop ('post_trigger_include' , None )
244
+ if post_trigger_include is not None :
245
+ request_options ["postTriggerInclude" ] = post_trigger_include
248
246
max_integrated_cache_staleness_in_ms = kwargs .pop ('max_integrated_cache_staleness_in_ms' , None )
249
247
if max_integrated_cache_staleness_in_ms is not None :
250
248
validate_cache_staleness_value (max_integrated_cache_staleness_in_ms )
@@ -264,7 +262,7 @@ def read_all_items(
264
262
265
263
:keyword int max_item_count: Max number of items to be returned in the enumeration operation.
266
264
:keyword str session_token: Token for use with Session consistency.
267
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
265
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
268
266
:keyword response_hook: A callable invoked with the response metadata.
269
267
:paramtype response_hook: Callable[[Dict[str, str], AsyncItemPaged[Dict[str, Any]]], None]
270
268
**Provisional** keyword argument max_integrated_cache_staleness_in_ms
@@ -320,7 +318,7 @@ def query_items(
320
318
indexing was opted out on the requested paths.
321
319
:keyword bool populate_query_metrics: Enable returning query metrics in response headers.
322
320
:keyword str session_token: Token for use with Session consistency.
323
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
321
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
324
322
:keyword response_hook: A callable invoked with the response metadata.
325
323
:paramtype response_hook: Callable[[Dict[str, str], AsyncItemPaged[Dict[str, Any]]], None]
326
324
**Provisional** keyword argument max_integrated_cache_staleness_in_ms
@@ -447,8 +445,7 @@ async def upsert_item(
447
445
:keyword str pre_trigger_include: trigger id to be used as pre operation trigger.
448
446
:keyword str post_trigger_include: trigger id to be used as post operation trigger.
449
447
:keyword str session_token: Token for use with Session consistency.
450
- :paramtype session_token: str
451
- :keyword Dict[str, str] initial_headers: Initial headers to be sent as part of the request.
448
+ :keyword dict[str, str] initial_headers: Initial headers to be sent as part of the request.
452
449
:keyword str etag: An ETag value, or the wildcard character (*). Used to check if the resource
453
450
has changed, and act according to the condition specified by the `match_condition` parameter.
454
451
:keyword match_condition: The match condition to use upon the etag.
@@ -496,7 +493,7 @@ async def replace_item(
496
493
:keyword str pre_trigger_include: trigger id to be used as pre operation trigger.
497
494
:keyword str post_trigger_include: trigger id to be used as post operation trigger.
498
495
:keyword str session_token: Token for use with Session consistency.
499
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
496
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
500
497
:keyword str etag: An ETag value, or the wildcard character (*). Used to check if the resource
501
498
has changed, and act according to the condition specified by the `match_condition` parameter.
502
499
:keyword match_condition: The match condition to use upon the etag.
@@ -544,7 +541,7 @@ async def delete_item(
544
541
:keyword str pre_trigger_include: trigger id to be used as pre operation trigger.
545
542
:keyword str post_trigger_include: trigger id to be used as post operation trigger.
546
543
:keyword str session_token: Token for use with Session consistency.
547
- :keyword Dict [str, str] initial_headers: Initial headers to be sent as part of the request.
544
+ :keyword dict [str, str] initial_headers: Initial headers to be sent as part of the request.
548
545
:keyword str etag: An ETag value, or the wildcard character (*). Used to check if the resource
549
546
has changed, and act according to the condition specified by the `match_condition` parameter.
550
547
:keyword match_condition: The match condition to use upon the etag.
@@ -581,7 +578,7 @@ async def get_throughput(self, **kwargs: Any) -> ThroughputProperties:
581
578
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: No throughput properties exist for the container
582
579
or the throughput properties could not be retrieved.
583
580
:returns: ThroughputProperties for the container.
584
- :rtype: ~azure.cosmos.ThroughputProperties
581
+ :rtype: ~azure.cosmos.offer. ThroughputProperties
585
582
"""
586
583
response_hook = kwargs .pop ('response_hook' , None )
587
584
properties = await self ._get_properties ()
@@ -615,7 +612,7 @@ async def replace_throughput(self, throughput: int, **kwargs: Any) -> Throughput
615
612
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: No throughput properties exist for the container
616
613
or the throughput properties could not be updated.
617
614
:returns: ThroughputProperties for the container, updated with new throughput.
618
- :rtype: ~azure.cosmos.ThroughputProperties
615
+ :rtype: ~azure.cosmos.offer. ThroughputProperties
619
616
"""
620
617
response_hook = kwargs .pop ('response_hook' , None )
621
618
properties = await self ._get_properties ()
0 commit comments