Skip to content

create_flow

Operation

create_flow

create_flow(request: CreateFlowInput | CreateFlowInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateFlowInputDict]) -> CreateFlowOutput

Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Parameters:

Name Type Description Default
request CreateFlowInput | CreateFlowInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateFlowInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateFlowOutput

An instance of CreateFlowOutput.

create_flow async

create_flow(request: CreateFlowInput | CreateFlowInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateFlowInputDict]) -> CreateFlowOutput

Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Parameters:

Name Type Description Default
request CreateFlowInput | CreateFlowInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateFlowInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateFlowOutput

An instance of CreateFlowOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateFlowInputDict

Bases: TypedDict

Dictionary form of CreateFlowInput.

Attributes

client_token instance-attribute
client_token: str | None

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

This field is autopopulated if not provided.

customer_encryption_key_arn instance-attribute
customer_encryption_key_arn: str | None

The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.

definition instance-attribute
definition: FlowDefinition | FlowDefinitionDict | None

A definition of the nodes and connections between nodes in the flow.

description instance-attribute
description: str | None

A description for the flow.

execution_role_arn instance-attribute
execution_role_arn: Required[str]

The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.

name instance-attribute
name: Required[str]

A name for the flow.

tags instance-attribute
tags: Mapping[str, str] | None

Any tags that you want to attach to the flow. For more information, see Tagging resources in Amazon Bedrock.

CreateFlowInput dataclass

Bases: _SerdeShape

Dataclass for CreateFlowInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

This field is autopopulated if not provided.

customer_encryption_key_arn class-attribute instance-attribute
customer_encryption_key_arn: str | None = ...

The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.

definition class-attribute instance-attribute
definition: FlowDefinition | None = ...

A definition of the nodes and connections between nodes in the flow.

description class-attribute instance-attribute
description: str | None = ...

A description for the flow.

execution_role_arn class-attribute instance-attribute
execution_role_arn: str | None = ...

The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.

name class-attribute instance-attribute
name: str | None = ...

A name for the flow.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

Any tags that you want to attach to the flow. For more information, see Tagging resources in Amazon Bedrock.

Output

CreateFlowOutput dataclass

Bases: _SerdeShape

Dataclass for CreateFlowOutput structure.

Attributes

arn instance-attribute
arn: str

The Amazon Resource Name (ARN) of the flow.

created_at instance-attribute
created_at: datetime

The time at which the flow was created.

customer_encryption_key_arn class-attribute instance-attribute
customer_encryption_key_arn: str | None = ...

The Amazon Resource Name (ARN) of the KMS key that you encrypted the flow with.

definition class-attribute instance-attribute
definition: FlowDefinition | None = ...

A definition of the nodes and connections between nodes in the flow.

description class-attribute instance-attribute
description: str | None = ...

The description of the flow.

execution_role_arn instance-attribute
execution_role_arn: str

The Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.

id instance-attribute
id: str

The unique identifier of the flow.

name instance-attribute
name: str

The name of the flow.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status instance-attribute
status: str

The status of the flow. When you submit this request, the status will be NotPrepared. If creation fails, the status becomes Failed.

updated_at instance-attribute
updated_at: datetime

The time at which the flow was last updated.

version instance-attribute
version: str

The version of the flow. When you create a flow, the version created is the DRAFT version.