@@ -98,7 +98,7 @@ def _azure_ai_assets(self) -> AzureAiAssetsClient042024:
98
98
return self .__azure_ai_assets_client
99
99
100
100
@monitor_with_activity (ops_logger , "Index.CreateOrUpdate" , ActivityType .PUBLICAPI )
101
- def create_or_update (self , index : Index ) -> Index :
101
+ def create_or_update (self , index : Index , ** kwargs ) -> Index :
102
102
"""Returns created or updated index asset.
103
103
104
104
If not already in storage, asset will be uploaded to the workspace's default datastore.
@@ -154,12 +154,12 @@ def create_or_update(self, index: Index) -> Index:
154
154
155
155
return Index ._from_rest_object (
156
156
self ._azure_ai_assets .indexes .create_or_update (
157
- name = index .name , version = index .version , body = index ._to_rest_object ()
157
+ name = index .name , version = index .version , body = index ._to_rest_object (), ** kwargs
158
158
)
159
159
)
160
160
161
161
@monitor_with_activity (ops_logger , "Index.Get" , ActivityType .PUBLICAPI )
162
- def get (self , name : str , * , version : Optional [str ] = None , label : Optional [str ] = None ) -> Index :
162
+ def get (self , name : str , * , version : Optional [str ] = None , label : Optional [str ] = None , ** kwargs ) -> Index :
163
163
"""Returns information about the specified index asset.
164
164
165
165
:param str name: Name of the index asset.
@@ -193,7 +193,7 @@ def get(self, name: str, *, version: Optional[str] = None, label: Optional[str]
193
193
error_type = ValidationErrorType .MISSING_FIELD ,
194
194
)
195
195
196
- index_version_resource = self ._azure_ai_assets .indexes .get (name = name , version = version )
196
+ index_version_resource = self ._azure_ai_assets .indexes .get (name = name , version = version , ** kwargs )
197
197
198
198
return Index ._from_rest_object (index_version_resource )
199
199
@@ -202,7 +202,7 @@ def _get_latest_version(self, name: str) -> Index:
202
202
203
203
@monitor_with_activity (ops_logger , "Index.List" , ActivityType .PUBLICAPI )
204
204
def list (
205
- self , name : Optional [str ] = None , * , list_view_type : ListViewType = ListViewType .ACTIVE_ONLY
205
+ self , name : Optional [str ] = None , * , list_view_type : ListViewType = ListViewType .ACTIVE_ONLY , ** kwargs
206
206
) -> Iterable [Index ]:
207
207
"""List all Index assets in workspace.
208
208
@@ -221,6 +221,6 @@ def cls(rest_indexes: Iterable[RestIndex]) -> List[Index]:
221
221
return [Index ._from_rest_object (i ) for i in rest_indexes ]
222
222
223
223
if name is None :
224
- return self ._azure_ai_assets .indexes .list_latest (cls = cls )
224
+ return self ._azure_ai_assets .indexes .list_latest (cls = cls , ** kwargs )
225
225
226
- return self ._azure_ai_assets .indexes .list (name , list_view_type = list_view_type , cls = cls )
226
+ return self ._azure_ai_assets .indexes .list (name , list_view_type = list_view_type , cls = cls , ** kwargs )
0 commit comments