---
title: "PUT /ab-tests/{abTestId}"
method: PUT
path: "/ab-tests/{abTestId}"
---

# PUT /ab-tests/{abTestId}

`PUT /ab-tests/{abTestId}`

Updates an A/B test's configuration, including variants, traffic allocation, evaluation settings, or execution status.

## Path parameters

- `abTestId` string, required

## Request body

- object
  - `clientToken` string — 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.
  - `name` string — The updated name of the A/B test.
  - `description` string — The updated description of the A/B test.
  - `variants` Variant[] — The updated list of variants.
    - `name` string, required — The name of the variant. Must be <code>C</code> for control or <code>T1</code> for treatment.
    - `weight` integer, required — The percentage of traffic to route to this variant. Weights across all variants must sum to 100.
    - `variantConfiguration` object, required — The configuration for this variant, including the configuration bundle or target reference.
      - `configurationBundle` object — A reference to a configuration bundle version to use for this variant.
        - `bundleArn` string, required — The Amazon Resource Name (ARN) of the configuration bundle.
        - `bundleVersion` string, required — The version of the configuration bundle.
      - `target` object — A reference to a gateway target to route traffic to for this variant.
        - `name` string, required — The name of the gateway target.
  - `gatewayFilter` object — A filter to restrict which gateway target paths are included in the A/B test.
    - `targetPaths` PathPattern[] — A list of target path patterns to include in the A/B test.
  - `evaluationConfig` object — The evaluation configuration for an A/B test, specifying which online evaluation configurations to use for measuring variant performance.
    - `onlineEvaluationConfigArn` string — The Amazon Resource Name (ARN) of a single online evaluation configuration to use for both variants.
    - `perVariantOnlineEvaluationConfig` PerVariantOnlineEvaluationConfig[] — Per-variant online evaluation configurations, allowing different evaluation settings for each variant.
      - `name` string, required — The name of the variant this evaluation configuration applies to.
      - `onlineEvaluationConfigArn` string, required — The Amazon Resource Name (ARN) of the online evaluation configuration for this variant.
  - `roleArn` string — The updated IAM role ARN.
  - `executionStatus` 'PAUSED' | 'RUNNING' | 'STOPPED' | 'NOT_STARTED' — The updated execution status to enable or disable the A/B test.

## Response `202`

Success

- UpdateABTestResponse
  - `abTestId` string, required — The unique identifier of the updated A/B test.
  - `abTestArn` string, required — The Amazon Resource Name (ARN) of the updated A/B test.
  - `status` 'CREATING' | 'ACTIVE' | 'CREATE_FAILED' | 'UPDATING' | 'UPDATE_FAILED' | 'DELETING' | 'DELETE_FAILED' | 'FAILED', required — The status of the A/B test.
  - `executionStatus` 'PAUSED' | 'RUNNING' | 'STOPPED' | 'NOT_STARTED', required — The execution status of the A/B test.
  - `updatedAt` string, date-time, required — The timestamp when the A/B test was updated.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — UnauthorizedException
- `482` — ValidationException
- `483` — AccessDeniedException
- `484` — ConflictException
- `485` — ThrottlingException
- `486` — ResourceNotFoundException
- `487` — InternalServerException

---

[API](https://skmtc.net/aws/apis/bedrock-agentcore.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agentcore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agentcore/versions/79623b33d495/schema)
