

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 棄用登錄檔記錄
<a name="registry-deprecating-records"></a>

**遷移現已開啟**  
 AWS 代理程式登錄檔已在新的`agent-registry`命名空間下啟動。公有預覽`bedrock-agentcore`命名空間的支援將於 2026 年 9 月 17 日停止。如需遷移說明，請參閱[綜合登錄遷移指南](registry-faq.md)。

## 概觀
<a name="registry-deprecating-overview"></a>

當您棄用登錄檔記錄時，您會將其從可探索的資料平面 APIs (`SearchDiscoverableRegistryRecords`、`ListDiscoverableRegistryRecords`、`BatchGetDiscoverableRegistryRecord`) 和從登錄檔的 MCP 端點中移除。已棄用是終止狀態 - 在記錄達到此狀態後，您無法對其進行編輯或將其轉換為任何其他狀態。您仍然可以使用 `ListRegistryRecords`和 `GetRegistryRecord` APIs進行稽核來尋找記錄，但無法將其取消棄用。

基於下列原因棄用記錄：您停用資源、發佈較新版本的資源 （在登錄檔中具有獨立記錄）、資源已知您不希望其他建置器探索資源的問題，或內部政策需要移除資源記錄。

## 棄用記錄
<a name="registry-deprecating-deprecate"></a>

### 主控台
<a name="registry-deprecating-console"></a>

1. 開啟記錄詳細資訊頁面。

1. 選擇**更新狀態**下拉式清單，然後選擇**棄用**。

1. 在**更新狀態**對話方塊中，輸入棄用**的原因**。

1. 選擇**更新**。

**注意**  
棄用可從任何記錄狀態使用。

### AWS CLI
<a name="registry-deprecating-cli"></a>

**Example**  

```
aws agent-registry-control update-registry-record-status \
  --registry-id "<registryId>" \
  --record-id "<recordId>" \
  --status DEPRECATED \
  --status-reason "Replaced by v2" \
  --region us-east-1
```

```
aws bedrock-agentcore-control update-registry-record-status \
  --registry-id "<registryId>" \
  --record-id "<recordId>" \
  --status DEPRECATED \
  --status-reason "Replaced by v2" \
  --region us-east-1
```

### AWS 開發套件
<a name="registry-deprecating-sdk"></a>

**Example**  

```
import boto3

client = boto3.client('agent-registry-control')

response = client.update_registry_record_status(
    registryId='<registryId>',
    recordId='<recordId>',
    status='DEPRECATED',
    statusReason='Replaced by v2'
)
print(f"Status: {response['status']}")  # DEPRECATED
print(f"StatusReason: {response['statusReason']}")
```

```
import boto3

client = boto3.client('bedrock-agentcore-control')

response = client.update_registry_record_status(
    registryId='<registryId>',
    recordId='<recordId>',
    status='DEPRECATED',
    statusReason='Replaced by v2'
)
print(f"Status: {response['status']}")  # DEPRECATED
print(f"StatusReason: {response['statusReason']}")
```