AWS SDK DeleteFlowVersionで を使用する - AWS SDK コードの例

Doc AWS SDK Examples GitHub リポジトリには、他にも SDK の例があります。 AWS

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

AWS SDK DeleteFlowVersionで を使用する

次の例は、DeleteFlowVersion を使用する方法を説明しています。

アクション例は、より大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。次のコード例で、このアクションのコンテキストを確認できます。

Python
SDK for Python (Boto3)
注記

GitHub には、その他のリソースもあります。AWS コード例リポジトリ で全く同じ例を見つけて、設定と実行の方法を確認してください。

Amazon Bedrock フローのバージョンを削除します。

def delete_flow_version(client, flow_id, flow_version): """ Deletes a version of an Amazon Bedrock flow. Args: client: Amazon Bedrock agent boto3 client. flow_id (str): The identifier of the flow. Returns: dict: The response from DeleteFlowVersion. """ try: logger.info("Deleting flow version %s for flow: %s.",flow_version, flow_id) # Call DeleteFlowVersion operation response = client.delete_flow_version( flowIdentifier=flow_id, flowVersion=flow_version ) logging.info("Successfully deleted flow version %s for %s.", flow_version, flow_id) return response except ClientError as e: logging.exception("Client error deleting flow version: %s ", str(e)) raise except Exception as e: logging.exception("Unexpected deleting flow version: %s", str(e)) raise
  • API の詳細については、 AWS SDK for Python (Boto3) API リファレンスDeleteFlowVersion」を参照してください。