在 Amazon Bedrock 中刪除代理程式的別名 - Amazon Bedrock

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

在 Amazon Bedrock 中刪除代理程式的別名

若要了解如何刪除代理程式的別名,請選擇您偏好方法的標籤,然後遵循下列步驟:

Console
刪除別名
  1. 使用具有 Amazon Bedrock 主控台使用許可的 IAM 身分登入AWS 管理主控台。接著,開啟位於 https://console.aws.amazon.com/bedrock 的 Amazon Bedrock 主控台。

  2. 從左側導覽窗格選取代理程式。接著,在代理程式區段中選擇代理程式。

  3. 若要選擇要刪除的別名,請在別名區段中,選擇您要刪除之別名旁的選項按鈕。

  4. 選擇 刪除

  5. 此時會出現對話方塊,警告您刪除的後果。若確認要刪除別名,請在輸入欄位中輸入 delete,然後選擇刪除

  6. 橫幅即會出現,通知您正在刪除別名。刪除完成時,會出現成功橫幅。

API

若要刪除代理程式的別名,請使用 Amazon Bedrock 代理程式建置時期端點傳送 DeleteAgentAlias 請求。依預設,skipResourceInUseCheck 參數為 false,如果資源正在使用中,則會停止刪除。如果將 skipResourceInUseCheck 設定為 true,即使資源正在使用中,也會刪除資源。

def delete_agent_alias(self, agent_id, agent_alias_id): """ Deletes an alias of an Amazon Bedrock agent. :param agent_id: The unique identifier of the agent that the alias belongs to. :param agent_alias_id: The unique identifier of the alias to delete. :return: The response from Amazon Bedrock Agents if successful, otherwise raises an exception. """ try: response = self.client.delete_agent_alias( agentId=agent_id, agentAliasId=agent_alias_id ) except ClientError as e: logger.error(f"Couldn't delete agent alias. {e}") raise else: return response

如需詳細資訊,請參閱 Hello Amazon Bedrock 代理人