

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

# 更新 API
<a name="api-reference-update-v3"></a>

在本節中，您將了解如何使用兩個可用選項之一來更新 API。

**升級到較新的 AWS ParallelCluster 版本**

選項 1：若要移除現有的 API，請刪除對應的 CloudFormation 堆疊並部署新的 API，如上所示。

選項 2：若要更新現有的 API，請執行下列命令：

```
$ REGION=<region>
$ API_STACK_NAME=<stack-name>  # This needs to correspond to the existing API stack name
$ VERSION=3.15.0
$ aws cloudformation update-stack \
    --region ${REGION} \
    --stack-name ${API_STACK_NAME} \
    --template-url https://${REGION}-aws-parallelcluster.s3.${REGION}.amazonaws.com/parallelcluster/${VERSION}/api/parallelcluster-api.yaml \
    --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND
$ aws cloudformation wait stack-update-complete --stack-name ${API_STACK_NAME} --region ${REGION}
```