

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 更新非同步端點
<a name="async-inference-update-endpoint"></a>

使用 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html) API 更新非同步端點。更新端點時，SageMaker AI 會先佈建並切換至您指定的新端點組態，然後再刪除先前端點組態中佈建的資源。請勿在端點處於活動狀態或正在對端點進行 `UpdateEndpoint`、`CreateEndpoint` 操作時刪除 `EndpointConfig`。

```
# The name of the endpoint. The name must be unique within an AWS Region in your AWS account.
endpoint_name='<endpoint-name>'

# The name of the endpoint configuration associated with this endpoint.
endpoint_config_name='<endpoint-config-name>'

sagemaker_client.update_endpoint(
                                EndpointConfigName=endpoint_config_name,
                                EndpointName=endpoint_name
                                )
```

當 Amazon SageMaker AI 收到請求時，它會將端點狀態設為**更新**。更新非同步端點之後，它會將狀態設定為 **InService**。若要檢查端點的狀態，請使用 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeEndpoint.html) API。有關更新終端節點時可以指定的參數的完整清單，請參閱 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateEndpoint.html) API。