View a markdown version of this page

弃用注册表记录 - 亚马逊基岩 AgentCore

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

弃用注册表记录

迁移现已开放

AWS 代理注册表已在新agent-registry命名空间下启动。对公共预览bedrock-agentcore命名空间的支持将于 2026 年 9 月 17 日停止。有关迁移说明,请参阅综合注册表迁移指南。

概述

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

出于以下原因弃用记录:您已停用该资源、发布了资源的更新版本(注册表中有独立记录)、该资源存在您不希望其他生成器发现该资源的已知问题,或者内部政策要求删除该资源记录。

弃用记录

控制台

  1. 打开记录详情页面。

  2. 选择 “更新状态” 下拉列表,然后选择 “弃用”。

  3. 在 “更新状态” 对话框中,输入弃用原因。

  4. 选择更新。

注意

任何记录状态均可弃用。

AWS CLI

例
AWS Agent Registry namespace
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
Amazon Bedrock AgentCore namespace (to be deprecated)
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 SDK

例
AWS Agent Registry namespace
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']}")
Amazon Bedrock AgentCore namespace (to be deprecated)
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']}")