BedrockAgentCore / Client / update_ab_test
update_ab_test¶
- BedrockAgentCore.Client.update_ab_test(**kwargs)¶
Updates an A/B test’s configuration, including variants, traffic allocation, evaluation settings, or execution status.
See also: AWS API Documentation
Request Syntax
response = client.update_ab_test( abTestId='string', clientToken='string', name='string', description='string', variants=[ { 'name': 'string', 'weight': 123, 'variantConfiguration': { 'configurationBundle': { 'bundleArn': 'string', 'bundleVersion': 'string' }, 'target': { 'name': 'string' } } }, ], gatewayFilter={ 'targetPaths': [ 'string', ] }, evaluationConfig={ 'onlineEvaluationConfigArn': 'string', 'perVariantOnlineEvaluationConfig': [ { 'name': 'string', 'onlineEvaluationConfigArn': 'string' }, ] }, roleArn='string', executionStatus='PAUSED'|'RUNNING'|'STOPPED'|'NOT_STARTED' )
- Parameters:
abTestId (string) –
[REQUIRED]
The unique identifier of the A/B test to update.
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.
This field is autopopulated if not provided.
name (string) – The updated name of the A/B test.
description (string) – The updated description of the A/B test.
variants (list) –
The updated list of variants.
(dict) –
A variant in an A/B test, representing either the control (C) or treatment (T1) configuration.
name (string) – [REQUIRED]
The name of the variant. Must be
Cfor control orT1for treatment.weight (integer) – [REQUIRED]
The percentage of traffic to route to this variant. Weights across all variants must sum to 100.
variantConfiguration (dict) – [REQUIRED]
The configuration for this variant, including the configuration bundle or target reference.
configurationBundle (dict) –
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 (dict) –
A reference to a gateway target to route traffic to for this variant.
name (string) – [REQUIRED]
The name of the gateway target.
gatewayFilter (dict) –
The updated gateway filter.
targetPaths (list) –
A list of target path patterns to include in the A/B test.
(string) –
evaluationConfig (dict) –
The updated evaluation configuration.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
onlineEvaluationConfigArn,perVariantOnlineEvaluationConfig.onlineEvaluationConfigArn (string) –
The Amazon Resource Name (ARN) of a single online evaluation configuration to use for both variants.
perVariantOnlineEvaluationConfig (list) –
Per-variant online evaluation configurations, allowing different evaluation settings for each variant.
(dict) –
An online evaluation configuration associated with a specific A/B test 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 (string) – The updated execution status to enable or disable the A/B test.
- Return type:
dict
- Returns:
Response Syntax
{ 'abTestId': 'string', 'abTestArn': 'string', 'status': 'CREATING'|'ACTIVE'|'CREATE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'DELETING'|'DELETE_FAILED'|'FAILED', 'executionStatus': 'PAUSED'|'RUNNING'|'STOPPED'|'NOT_STARTED', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
abTestId (string) –
The unique identifier of the updated A/B test.
abTestArn (string) –
The Amazon Resource Name (ARN) of the updated A/B test.
status (string) –
The status of the A/B test.
executionStatus (string) –
The execution status of the A/B test.
updatedAt (datetime) –
The timestamp when the A/B test was updated.
Exceptions
BedrockAgentCore.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCore.Client.exceptions.UnauthorizedExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ConflictExceptionBedrockAgentCore.Client.exceptions.ThrottlingExceptionBedrockAgentCore.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCore.Client.exceptions.InternalServerException