@@ -210,15 +210,15 @@ async def create_item(
210
210
async def read_item (
211
211
self ,
212
212
item : Union [str , Dict [str , Any ]],
213
- partition_key : Union [ str , int , float , bool ] ,
213
+ partition_key : str ,
214
214
** kwargs : Any
215
215
) -> Dict [str , Any ]:
216
216
"""Get the item identified by `item`.
217
217
218
218
:param item: The ID (name) or dict representing item to retrieve.
219
219
:type item: Union[str, Dict[str, Any]]
220
- :param partition_key: Partition key for the item to retrieve.
221
- :type partition_key: Union[str, int, float, bool]
220
+ :param str partition_key: Partition key for the item to retrieve.
221
+
222
222
:keyword str session_token: Token for use with Session consistency.
223
223
:keyword Dict[str, str] initial_headers: Initial headers to be sent as part of the request.
224
224
:keyword response_hook: A callable invoked with the response metadata.
@@ -314,7 +314,7 @@ def query_items(
314
314
Each parameter is a dict() with 'name' and 'value' keys.
315
315
Ignored if no query is provided.
316
316
:type parameters: Optional[List[Dict[str, Any]]]
317
- :param partition_key: Specifies the partition key value for the item. If none is provided,
317
+ :param str partition_key: Specifies the partition key value for the item. If none is provided,
318
318
a cross-partition query will be executed.
319
319
:type partition_key: Optional[Union[str, int, float, bool]]
320
320
:keyword int max_item_count: Max number of items to be returned in the enumeration operation.
@@ -400,8 +400,7 @@ def query_items_change_feed(
400
400
beginning (true) or from current (false). By default it's start from current (false).
401
401
:keyword str continuation: e_tag value to be used as continuation for reading change feed.
402
402
:keyword int max_item_count: Max number of items to be returned in the enumeration operation.
403
- :keyword partition_key: partition key at which ChangeFeed requests are targeted.
404
- :paramtype partition_key: Union[str, int, float, bool]
403
+ :keyword str partition_key: partition key at which ChangeFeed requests are targeted.
405
404
:keyword response_hook: A callable invoked with the response metadata.
406
405
:paramtype response_hook: Callable[[Dict[str, str], AsyncItemPaged[Dict[str, Any]]], Any]
407
406
:returns: An AsyncItemPaged of items (dicts).
@@ -531,7 +530,7 @@ async def replace_item(
531
530
async def delete_item (
532
531
self ,
533
532
item : Union [str , Dict [str , Any ]],
534
- partition_key : Union [ str , int , float , bool ] ,
533
+ partition_key : str ,
535
534
** kwargs : Any
536
535
) -> None :
537
536
"""Delete the specified item from the container.
@@ -540,8 +539,7 @@ async def delete_item(
540
539
541
540
:param item: The ID (name) or dict representing item to be deleted.
542
541
:type item: Union[str, Dict[str, Any]]
543
- :param partition_key: Specifies the partition key value for the item.
544
- :type partition_key: Union[str, int, float, bool]
542
+ :param str partition_key: Specifies the partition key value for the item.
545
543
:keyword str pre_trigger_include: trigger id to be used as pre operation trigger.
546
544
:keyword str post_trigger_include: trigger id to be used as post operation trigger.
547
545
:keyword str session_token: Token for use with Session consistency.
@@ -673,9 +671,8 @@ def query_conflicts(
673
671
:param str query: The Azure Cosmos DB SQL query to execute.
674
672
:param parameters: Optional array of parameters to the query. Ignored if no query is provided.
675
673
:type parameters: Optional[List[Dict[str, Any]]]
676
- :param partition_key: Specifies the partition key value for the item. If none is passed in, a
674
+ :param str partition_key: Specifies the partition key value for the item. If none is passed in, a
677
675
cross partition query will be executed.
678
- :type partition_key: Union[str, int, float, bool]
679
676
:keyword int max_item_count: Max number of items to be returned in the enumeration operation.
680
677
:keyword response_hook: A callable invoked with the response metadata.
681
678
:paramtype response_hook: Callable[[Dict[str, str], AsyncItemPaged[Dict[str, Any]]], Any]
@@ -706,15 +703,14 @@ def query_conflicts(
706
703
async def read_conflict (
707
704
self ,
708
705
conflict : Union [str , Dict [str , Any ]],
709
- partition_key : Union [ str , int , float , bool ] ,
706
+ partition_key : str ,
710
707
** kwargs : Any ,
711
708
) -> Dict [str , Any ]:
712
709
"""Get the conflict identified by `conflict`.
713
710
714
711
:param conflict: The ID (name) or dict representing the conflict to retrieve.
715
712
:type conflict: Union[str, Dict[str, Any]]
716
- :param partition_key: Partition key for the conflict to retrieve.
717
- :type partition_key: Union[str, int, float, bool]
713
+ :param str partition_key: Partition key for the conflict to retrieve.
718
714
:keyword response_hook: A callable invoked with the response metadata.
719
715
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], Any]
720
716
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: The given conflict couldn't be retrieved.
@@ -735,7 +731,7 @@ async def read_conflict(
735
731
async def delete_conflict (
736
732
self ,
737
733
conflict : Union [str , Dict [str , Any ]],
738
- partition_key : Union [ str , int , float , bool ] ,
734
+ partition_key : str ,
739
735
** kwargs : Any ,
740
736
) -> None :
741
737
"""Delete a specified conflict from the container.
@@ -744,8 +740,7 @@ async def delete_conflict(
744
740
745
741
:param conflict: The ID (name) or dict representing the conflict to retrieve.
746
742
:type conflict: Union[str, Dict[str, Any]]
747
- :param partition_key: Partition key for the conflict to retrieve.
748
- :type partition_key: Union[str, int, float, bool]
743
+ :param str partition_key: Partition key for the conflict to retrieve.
749
744
:keyword response_hook: A callable invoked with the response metadata.
750
745
:paramtype response_hook: Callable[[Dict[str, str], None], Any]
751
746
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: The conflict wasn't deleted successfully.
0 commit comments