updateFlow method
Modifies a flow. Include both fields that you want to keep and fields that you want to change. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter executionRoleArn :
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.
Parameter flowIdentifier :
The unique identifier of the flow.
Parameter name :
A name for the flow.
Parameter customerEncryptionKeyArn :
The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
Parameter definition :
A definition of the nodes and the connections between the nodes in the
flow.
Parameter description :
A description for the flow.
Implementation
Future<UpdateFlowResponse> updateFlow({
required String executionRoleArn,
required String flowIdentifier,
required String name,
String? customerEncryptionKeyArn,
FlowDefinition? definition,
String? description,
}) async {
final $payload = <String, dynamic>{
'executionRoleArn': executionRoleArn,
'name': name,
if (customerEncryptionKeyArn != null)
'customerEncryptionKeyArn': customerEncryptionKeyArn,
if (definition != null) 'definition': definition,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/flows/${Uri.encodeComponent(flowIdentifier)}/',
exceptionFnMap: _exceptionFns,
);
return UpdateFlowResponse.fromJson(response);
}