Skip to content

Commit ab121ca

Browse files
committed
fix: OpenSearch API breaking changes
1 parent c1c768c commit ab121ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

awswrangler/opensearch/_write.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def create_index(
232232
body = None # type: ignore[assignment]
233233

234234
# ignore 400 cause by IndexAlreadyExistsException when creating an index
235-
response: dict[str, Any] = client.indices.create(index, body=body, ignore=400)
235+
response: dict[str, Any] = client.indices.create(index=index, body=body, ignore=400)
236236
if "error" in response:
237237
_logger.warning(response)
238238
if str(response["error"]).startswith("MapperParsingException"):
@@ -268,7 +268,7 @@ def delete_index(client: "opensearchpy.OpenSearch", index: str) -> dict[str, Any
268268
269269
"""
270270
# ignore 400/404 IndexNotFoundError exception
271-
response: dict[str, Any] = client.indices.delete(index, ignore=[400, 404])
271+
response: dict[str, Any] = client.indices.delete(index=index, ignore=[400, 404])
272272
if "error" in response:
273273
_logger.warning(response)
274274
return response

0 commit comments

Comments
 (0)