

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 弃用注册表记录
<a name="registry-deprecating-records"></a>

**迁移现已开放**  
 Amazon 代理注册表已在新`agent-registry`命名空间下启动。2026 年 10 月 30 日将停止对公共预览版`bedrock-agentcore`命名空间的支持。有关迁移说明，请参阅[注册表迁移综合指南](registry-faq.md)。

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

弃用注册表记录时，会将其从可发现的数据平面 API (`SearchDiscoverableRegistryRecords`、`ListDiscoverableRegistryRecords`、`BatchGetDiscoverableRegistryRecord`) 和注册表的 MCP 端点中删除。Deprecated 是一种终止状态 — 记录达到此状态后，您无法对其进行编辑或将其转换为任何其他状态。出于审计目的，您仍然可以通过使用`ListRegistryRecords`和 `GetRegistryRecord` API 来查找记录，但不能取消弃用。

弃用记录的原因包括：您已停用该资源、发布了较新版本的资源（注册表中有独立记录）、该资源存在已知问题，您不希望其他构建者发现该资源，或者内部政策要求删除该资源记录。

## 弃用记录
<a name="registry-deprecating-deprecate"></a>

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

1. 打开记录详情页面。

1. 选择 “**更新状态**” 下拉列表，然后选择 “**弃用**”。

1. 在 “**更新状态**” 对话框中，输入弃用**原因**。

1. 选择**更新**。

**注意**  
任何记录状态均可弃用。

### Amazon 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
```

### Amazon SDK
<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']}")
```