Skip to content

Commit 926503e

Browse files
committed
docs(backups): add backup_id provenance hint in create_index_from_backup
## Purpose Users calling `create_index_from_backup` have no indication of how to obtain a valid `backup_id`, which is a required parameter with no obvious default. Missing navigation hint violates the convention that second-step methods must reference their prerequisites. ## Solution Added a one-sentence prose reference to the `backup_id` parameter description in both the sync (`Pinecone`) and async (`AsyncPinecone`) clients pointing to `backups.create` and `backups.list` as the two canonical sources for a backup identifier. Chose prose over inline workflow example to keep the docstring focused on this method.
1 parent 4622a1c commit 926503e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pinecone/_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ def create_index_from_backup(
474474
475475
Args:
476476
name (str): Name for the new index.
477-
backup_id (str): Identifier of the backup to restore from.
477+
backup_id (str): Identifier of the backup to restore from. Obtain this
478+
from :meth:`Pinecone.backups.create` or :meth:`Pinecone.backups.list`.
478479
deletion_protection (DeletionProtection | str | None): ``"enabled"`` or
479480
``"disabled"``. Defaults to ``"disabled"`` server-side when omitted.
480481
tags (Mapping[str, str] | None): Optional key-value tags for the new index.

pinecone/async_client/pinecone.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ async def create_index_from_backup(
368368
369369
Args:
370370
name (str): Name for the new index.
371-
backup_id (str): Identifier of the backup to restore from.
371+
backup_id (str): Identifier of the backup to restore from. Obtain this
372+
from :meth:`AsyncPinecone.backups.create` or :meth:`AsyncPinecone.backups.list`.
372373
deletion_protection (DeletionProtection | str | None): ``"enabled"`` or
373374
``"disabled"``. Defaults to ``"disabled"`` server-side when omitted.
374375
tags (Mapping[str, str] | None): Optional key-value tags for the new index.

0 commit comments

Comments
 (0)