Cómo utilizar GetFlowVersion con un AWS SDK - Ejemplos de código de AWS SDK

Hay más ejemplos de AWS SDK disponibles en el repositorio de GitHub de ejemplos de AWS SDK de documentos.

Cómo utilizar GetFlowVersion con un AWS SDK

En el siguiente ejemplo de código, se muestra cómo utilizar GetFlowVersion.

Los ejemplos de acciones son extractos de código de programas más grandes y deben ejecutarse en contexto. Puede ver esta acción en contexto en el siguiente ejemplo de código:

Python
SDK para Python (Boto3)
nota

Hay más en GitHub. Busque el ejemplo completo y aprenda a configurar y ejecutar en el Repositorio de ejemplos de código de AWS.

Obtener una versión de un flujo de Amazon Bedrock.

def get_flow_version(client, flow_id, flow_version): """ Gets information about a version of an Amazon Bedrock flow. Args: client: Amazon Bedrock agent boto3 client. flow_id (str): The identifier of the flow. flow_version (str): The flow version of the flow. Returns: dict: The response from the call to GetFlowVersion. """ try: logger.info("Deleting flow version for flow: %s.", flow_id) # Call GetFlowVersion operation response = client.get_flow_version( flowIdentifier=flow_id, flowVersion=flow_version ) logging.info("Successfully got flow version %s information for flow %s.", flow_version, flow_id) return response except ClientError as e: logging.exception("Client error getting flow version: %s", str(e)) raise except Exception as e: logging.exception("Unexpected error getting flow version: %s", str(e)) raise
  • Para obtener información sobre la API, consulte GetFlowVersion en Referencia de la API de AWS SDK para Python (Boto3).