Skip to content

Create Ab Test

bedrockagentcore_create_ab_test R Documentation

Creates an A/B test for comparing agent configurations

Description

Creates an A/B test for comparing agent configurations. A/B tests split traffic between a control variant and a treatment variant through a gateway, then evaluate performance using online evaluation configurations to determine which variant performs better.

Usage

bedrockagentcore_create_ab_test(name, description, gatewayArn, variants,
  gatewayFilter, evaluationConfig, roleArn, enableOnCreate, clientToken)

Arguments

name

[required] The name of the A/B test. Must be unique within your account.

description

The description of the A/B test.

gatewayArn

[required] The Amazon Resource Name (ARN) of the gateway to use for traffic splitting.

variants

[required] The list of variants for the A/B test. Must contain exactly two variants: a control (C) and a treatment (T1), each with a configuration bundle or target reference and a traffic weight.

gatewayFilter

Optional filter to restrict which gateway target paths are included in the A/B test.

evaluationConfig

[required] The evaluation configuration specifying which online evaluation configurations to use for measuring variant performance.

roleArn

[required] The IAM role ARN that grants permissions for the A/B test to access gateway and evaluation resources.

enableOnCreate

Whether to enable the A/B test immediately upon creation. If true, traffic splitting begins automatically.

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, the service ignores the request, but does not return an error.

Value

A list with the following syntax:

list(
  abTestId = "string",
  abTestArn = "string",
  name = "string",
  status = "CREATING"|"ACTIVE"|"CREATE_FAILED"|"UPDATING"|"UPDATE_FAILED"|"DELETING"|"DELETE_FAILED"|"FAILED",
  executionStatus = "PAUSED"|"RUNNING"|"STOPPED"|"NOT_STARTED",
  createdAt = as.POSIXct(
    "2015-01-01"
  )
)

Request syntax

svc$create_ab_test(
  name = "string",
  description = "string",
  gatewayArn = "string",
  variants = list(
    list(
      name = "string",
      weight = 123,
      variantConfiguration = list(
        configurationBundle = list(
          bundleArn = "string",
          bundleVersion = "string"
        ),
        target = list(
          name = "string"
        )
      )
    )
  ),
  gatewayFilter = list(
    targetPaths = list(
      "string"
    )
  ),
  evaluationConfig = list(
    onlineEvaluationConfigArn = "string",
    perVariantOnlineEvaluationConfig = list(
      list(
        name = "string",
        onlineEvaluationConfigArn = "string"
      )
    )
  ),
  roleArn = "string",
  enableOnCreate = TRUE|FALSE,
  clientToken = "string"
)