

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

# 範例：主要版本從 1.1.1.0 升級至 1.2.0.2，其中具有預設參數群組
<a name="cfn-engine-update-1110-1202-default"></a>

尋找您要升級的 `DBCluster`，以及您用來建立它的範本。例如：

```
Description: Base Template to create Neptune Stack with Engine Version 1.1.1.0 using default Parameter Groups
Parameters:
  DbInstanceType:
    Description: Neptune DB instance type
    Type: String
    Default: db.r5.large
Resources:
  NeptuneDBCluster:
    Type: 'AWS::Neptune::DBCluster'
    Properties:
      EngineVersion: 1.1.1.0
  NeptuneDBInstance:
    Type: 'AWS::Neptune::DBInstance'
    Properties:
      DBClusterIdentifier:
        Ref: NeptuneDBCluster
      DBInstanceClass:
        Ref: DbInstanceType
    DependsOn:
      - NeptuneDBCluster
Outputs:
  DBClusterId:
    Description: Neptune Cluster Identifier
    Value:
      Ref: NeptuneDBCluster
```
+ 將預設 `DBClusterParameterGroup` 更新為新引擎版本使用的參數群組系列中的參數群組 (此處的 `default.neptune1.2`)。
+ 對於附加至 `DBCluster` 的每個 `DBInstance`，將預設 `DBParameterGroup` 更新為新引擎版本使用的系列中的參數群組 (此處的 `default.neptune1.2`)。
+ 將 `DBInstanceParameterGroupName` 屬性設定為該系列中的預設參數群組 (此處的 `default.neptune1.2`)。
+ 將 `EngineVersion` 屬性從 `1.1.0.0` 更新為 `1.2.0.2`。

範本應如下所示：

```
Description: Template to upgrade major engine version to 1.2.0.2 by using upgraded default parameter groups
Parameters:
  DbInstanceType:
    Description: Neptune DB instance type
    Type: String
    Default: db.r5.large
Resources:
  NeptuneDBCluster:
    Type: 'AWS::Neptune::DBCluster'
    Properties:
      EngineVersion: 1.2.0.2
      DBClusterParameterGroupName: default.neptune1.2
      DBInstanceParameterGroupName: default.neptune1.2
  NeptuneDBInstance:
    Type: 'AWS::Neptune::DBInstance'
    Properties:
      DBClusterIdentifier:
        Ref: NeptuneDBCluster
      DBInstanceClass:
        Ref: DbInstanceType
      DBParameterGroupName: default.neptune1.2
    DependsOn:
      - NeptuneDBCluster
Outputs:
  DBClusterId:
    Description: Neptune Cluster Identifier
    Value:
```

現在使用 CloudFormation 執行修訂後的範本。