

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 停止批量评估
<a name="batch-evaluations-stop"></a>

停止正在运行的批量评估作业。任务过渡到`STOPPING`然后`STOPPED`。已经评估过的会话的部分结果可能会出现在答复中。

当您意识到任务是使用不正确的参数启动的，或者当您不再需要结果时，停止批量评估很有用。

## 代码示例
<a name="stop-batch-eval-examples"></a>

**Example**  

```
agentcore stop batch-evaluation --id <batch-evaluation-id> [--region <region>] [--json]
```
你可以用`-i`作简短的别名`--id`。该`--region`标志指定 Amazon 区域（如果省略则自动检测），并将响应`--json`输出为 JSON。

```
import boto3

client = boto3.client("bedrock-agentcore", region_name="us-west-2")

response = client.stop_batch_evaluation(batchEvaluationId=batch_eval_id)
print(f"Status: {response['status']}")  # STOPPING or STOPPED
```

## 请求参数
<a name="stop-batch-eval-params"></a>


| 参数 | Type | 必需 | 描述 | 
| --- | --- | --- | --- | 
|  `batchEvaluationId`  | 字符串 | 是 | 要停止的批量评估 ID。作为路径参数传递。 | 

## 响应
<a name="stop-batch-eval-response"></a>


| 字段 | Type | 说明 | 
| --- | --- | --- | 
|  `batchEvaluationId`  | 字符串 | 批量评估 ID。 | 
|  `batchEvaluationArn`  | 字符串 | 批量评估的 ARN。 | 
|  `status`  | 字符串 | 更新状态:`STOPPING`或`STOPPED`. | 

## 错误
<a name="stop-batch-eval-errors"></a>


| 错误 | HTTP 状态 | 说明 | 
| --- | --- | --- | 
|  `ResourceNotFoundException`  | 404 | 未找到具有指定 ID 的批量评估。 | 
|  `ConflictException`  | 409 | 批量评估未处于可以停止的状态（例如，已经完成或停止）。 | 
|  `ValidationException`  | 400 | 批量评估 ID 格式无效。 | 
|  `AccessDeniedException`  | 403 | 权限不足。 | 
|  `ThrottlingException`  | 429 | 超出请求速率。 | 
|  `InternalServerException`  | 500 | Service-side 错误。 | 