Skip to content

Update Flow

bedrockagent_update_flow R Documentation

Modifies a flow

Description

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.

Usage

bedrockagent_update_flow(name, description, executionRoleArn,
  customerEncryptionKeyArn, definition, flowIdentifier)

Arguments

name

[required] A name for the flow.

description

A description for the flow.

executionRoleArn

[required] 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.

customerEncryptionKeyArn

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

definition

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

flowIdentifier

[required] The unique identifier of the flow.

Value

A list with the following syntax:

list(
  name = "string",
  description = "string",
  executionRoleArn = "string",
  customerEncryptionKeyArn = "string",
  id = "string",
  arn = "string",
  status = "Failed"|"Prepared"|"Preparing"|"NotPrepared",
  createdAt = as.POSIXct(
    "2015-01-01"
  ),
  updatedAt = as.POSIXct(
    "2015-01-01"
  ),
  version = "string",
  definition = list(
    nodes = list(
      list(
        name = "string",
        type = "Input"|"Output"|"KnowledgeBase"|"Condition"|"Lex"|"Prompt"|"LambdaFunction"|"Storage"|"Agent"|"Retrieval"|"Iterator"|"Collector"|"InlineCode"|"Loop"|"LoopInput"|"LoopController",
        configuration = list(
          input = list(),
          output = list(),
          knowledgeBase = list(
            knowledgeBaseId = "string",
            modelId = "string",
            guardrailConfiguration = list(
              guardrailIdentifier = "string",
              guardrailVersion = "string"
            ),
            numberOfResults = 123,
            promptTemplate = list(
              textPromptTemplate = "string"
            ),
            inferenceConfiguration = list(
              text = list(
                temperature = 123.0,
                topP = 123.0,
                maxTokens = 123,
                stopSequences = list(
                  "string"
                )
              )
            ),
            rerankingConfiguration = list(
              type = "BEDROCK_RERANKING_MODEL",
              bedrockRerankingConfiguration = list(
                modelConfiguration = list(
                  modelArn = "string",
                  additionalModelRequestFields = list(
                    list()
                  )
                ),
                numberOfRerankedResults = 123,
                metadataConfiguration = list(
                  selectionMode = "SELECTIVE"|"ALL",
                  selectiveModeConfiguration = list(
                    fieldsToInclude = list(
                      list(
                        fieldName = "string"
                      )
                    ),
                    fieldsToExclude = list(
                      list(
                        fieldName = "string"
                      )
                    )
                  )
                )
              )
            ),
            orchestrationConfiguration = list(
              promptTemplate = list(
                textPromptTemplate = "string"
              ),
              inferenceConfig = list(
                text = list(
                  temperature = 123.0,
                  topP = 123.0,
                  maxTokens = 123,
                  stopSequences = list(
                    "string"
                  )
                )
              ),
              additionalModelRequestFields = list(
                list()
              ),
              performanceConfig = list(
                latency = "standard"|"optimized"
              )
            )
          ),
          condition = list(
            conditions = list(
              list(
                name = "string",
                expression = "string"
              )
            )
          ),
          lex = list(
            botAliasArn = "string",
            localeId = "string"
          ),
          prompt = list(
            sourceConfiguration = list(
              resource = list(
                promptArn = "string"
              ),
              inline = list(
                templateType = "TEXT"|"CHAT",
                templateConfiguration = list(
                  text = list(
                    text = "string",
                    cachePoint = list(
                      type = "default"
                    ),
                    inputVariables = list(
                      list(
                        name = "string"
                      )
                    )
                  ),
                  chat = list(
                    messages = list(
                      list(
                        role = "user"|"assistant",
                        content = list(
                          list(
                            text = "string",
                            cachePoint = list(
                              type = "default"
                            )
                          )
                        )
                      )
                    ),
                    system = list(
                      list(
                        text = "string",
                        cachePoint = list(
                          type = "default"
                        )
                      )
                    ),
                    inputVariables = list(
                      list(
                        name = "string"
                      )
                    ),
                    toolConfiguration = list(
                      tools = list(
                        list(
                          toolSpec = list(
                            name = "string",
                            description = "string",
                            inputSchema = list(
                              json = list()
                            ),
                            strict = TRUE|FALSE
                          ),
                          cachePoint = list(
                            type = "default"
                          )
                        )
                      ),
                      toolChoice = list(
                        auto = list(),
                        any = list(),
                        tool = list(
                          name = "string"
                        )
                      )
                    )
                  )
                ),
                modelId = "string",
                inferenceConfiguration = list(
                  text = list(
                    temperature = 123.0,
                    topP = 123.0,
                    maxTokens = 123,
                    stopSequences = list(
                      "string"
                    )
                  )
                ),
                additionalModelRequestFields = list()
              )
            ),
            guardrailConfiguration = list(
              guardrailIdentifier = "string",
              guardrailVersion = "string"
            )
          ),
          lambdaFunction = list(
            lambdaArn = "string"
          ),
          storage = list(
            serviceConfiguration = list(
              s3 = list(
                bucketName = "string"
              )
            )
          ),
          agent = list(
            agentAliasArn = "string"
          ),
          retrieval = list(
            serviceConfiguration = list(
              s3 = list(
                bucketName = "string"
              )
            )
          ),
          iterator = list(),
          collector = list(),
          inlineCode = list(
            code = "string",
            language = "Python_3"
          ),
          loop = list(
            definition = list()
          ),
          loopInput = list(),
          loopController = list(
            continueCondition = list(
              name = "string",
              expression = "string"
            ),
            maxIterations = 123
          )
        ),
        inputs = list(
          list(
            name = "string",
            type = "String"|"Number"|"Boolean"|"Object"|"Array",
            expression = "string",
            category = "LoopCondition"|"ReturnValueToLoopStart"|"ExitLoop"
          )
        ),
        outputs = list(
          list(
            name = "string",
            type = "String"|"Number"|"Boolean"|"Object"|"Array"
          )
        )
      )
    ),
    connections = list(
      list(
        type = "Data"|"Conditional",
        name = "string",
        source = "string",
        target = "string",
        configuration = list(
          data = list(
            sourceOutput = "string",
            targetInput = "string"
          ),
          conditional = list(
            condition = "string"
          )
        )
      )
    )
  )
)

Request syntax

svc$update_flow(
  name = "string",
  description = "string",
  executionRoleArn = "string",
  customerEncryptionKeyArn = "string",
  definition = list(
    nodes = list(
      list(
        name = "string",
        type = "Input"|"Output"|"KnowledgeBase"|"Condition"|"Lex"|"Prompt"|"LambdaFunction"|"Storage"|"Agent"|"Retrieval"|"Iterator"|"Collector"|"InlineCode"|"Loop"|"LoopInput"|"LoopController",
        configuration = list(
          input = list(),
          output = list(),
          knowledgeBase = list(
            knowledgeBaseId = "string",
            modelId = "string",
            guardrailConfiguration = list(
              guardrailIdentifier = "string",
              guardrailVersion = "string"
            ),
            numberOfResults = 123,
            promptTemplate = list(
              textPromptTemplate = "string"
            ),
            inferenceConfiguration = list(
              text = list(
                temperature = 123.0,
                topP = 123.0,
                maxTokens = 123,
                stopSequences = list(
                  "string"
                )
              )
            ),
            rerankingConfiguration = list(
              type = "BEDROCK_RERANKING_MODEL",
              bedrockRerankingConfiguration = list(
                modelConfiguration = list(
                  modelArn = "string",
                  additionalModelRequestFields = list(
                    list()
                  )
                ),
                numberOfRerankedResults = 123,
                metadataConfiguration = list(
                  selectionMode = "SELECTIVE"|"ALL",
                  selectiveModeConfiguration = list(
                    fieldsToInclude = list(
                      list(
                        fieldName = "string"
                      )
                    ),
                    fieldsToExclude = list(
                      list(
                        fieldName = "string"
                      )
                    )
                  )
                )
              )
            ),
            orchestrationConfiguration = list(
              promptTemplate = list(
                textPromptTemplate = "string"
              ),
              inferenceConfig = list(
                text = list(
                  temperature = 123.0,
                  topP = 123.0,
                  maxTokens = 123,
                  stopSequences = list(
                    "string"
                  )
                )
              ),
              additionalModelRequestFields = list(
                list()
              ),
              performanceConfig = list(
                latency = "standard"|"optimized"
              )
            )
          ),
          condition = list(
            conditions = list(
              list(
                name = "string",
                expression = "string"
              )
            )
          ),
          lex = list(
            botAliasArn = "string",
            localeId = "string"
          ),
          prompt = list(
            sourceConfiguration = list(
              resource = list(
                promptArn = "string"
              ),
              inline = list(
                templateType = "TEXT"|"CHAT",
                templateConfiguration = list(
                  text = list(
                    text = "string",
                    cachePoint = list(
                      type = "default"
                    ),
                    inputVariables = list(
                      list(
                        name = "string"
                      )
                    )
                  ),
                  chat = list(
                    messages = list(
                      list(
                        role = "user"|"assistant",
                        content = list(
                          list(
                            text = "string",
                            cachePoint = list(
                              type = "default"
                            )
                          )
                        )
                      )
                    ),
                    system = list(
                      list(
                        text = "string",
                        cachePoint = list(
                          type = "default"
                        )
                      )
                    ),
                    inputVariables = list(
                      list(
                        name = "string"
                      )
                    ),
                    toolConfiguration = list(
                      tools = list(
                        list(
                          toolSpec = list(
                            name = "string",
                            description = "string",
                            inputSchema = list(
                              json = list()
                            ),
                            strict = TRUE|FALSE
                          ),
                          cachePoint = list(
                            type = "default"
                          )
                        )
                      ),
                      toolChoice = list(
                        auto = list(),
                        any = list(),
                        tool = list(
                          name = "string"
                        )
                      )
                    )
                  )
                ),
                modelId = "string",
                inferenceConfiguration = list(
                  text = list(
                    temperature = 123.0,
                    topP = 123.0,
                    maxTokens = 123,
                    stopSequences = list(
                      "string"
                    )
                  )
                ),
                additionalModelRequestFields = list()
              )
            ),
            guardrailConfiguration = list(
              guardrailIdentifier = "string",
              guardrailVersion = "string"
            )
          ),
          lambdaFunction = list(
            lambdaArn = "string"
          ),
          storage = list(
            serviceConfiguration = list(
              s3 = list(
                bucketName = "string"
              )
            )
          ),
          agent = list(
            agentAliasArn = "string"
          ),
          retrieval = list(
            serviceConfiguration = list(
              s3 = list(
                bucketName = "string"
              )
            )
          ),
          iterator = list(),
          collector = list(),
          inlineCode = list(
            code = "string",
            language = "Python_3"
          ),
          loop = list(
            definition = list()
          ),
          loopInput = list(),
          loopController = list(
            continueCondition = list(
              name = "string",
              expression = "string"
            ),
            maxIterations = 123
          )
        ),
        inputs = list(
          list(
            name = "string",
            type = "String"|"Number"|"Boolean"|"Object"|"Array",
            expression = "string",
            category = "LoopCondition"|"ReturnValueToLoopStart"|"ExitLoop"
          )
        ),
        outputs = list(
          list(
            name = "string",
            type = "String"|"Number"|"Boolean"|"Object"|"Array"
          )
        )
      )
    ),
    connections = list(
      list(
        type = "Data"|"Conditional",
        name = "string",
        source = "string",
        target = "string",
        configuration = list(
          data = list(
            sourceOutput = "string",
            targetInput = "string"
          ),
          conditional = list(
            condition = "string"
          )
        )
      )
    )
  ),
  flowIdentifier = "string"
)