

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

# 更新 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}
```