createFlowVersion method
Creates a version of the flow that you can deploy. For more information, see Deploy 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 flowIdentifier :
The unique identifier of the flow that you want to create a version of.
Parameter clientToken :
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.
Parameter description :
A description of the version of the flow.
Implementation
Future<CreateFlowVersionResponse> createFlowVersion({
required String flowIdentifier,
String? clientToken,
String? description,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/flows/${Uri.encodeComponent(flowIdentifier)}/versions',
exceptionFnMap: _exceptionFns,
);
return CreateFlowVersionResponse.fromJson(response);
}