

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

# `pcluster get-cluster-stack-events`
<a name="pcluster.get-cluster-stack-events-v3"></a>

擷取與指定叢集之堆疊相關聯的事件。

**注意**  
從 3.6.0 版開始， AWS ParallelCluster 會使用巢狀堆疊來建立與佇列和運算資源相關聯的資源。`GetClusterStackEvents` API 和 `pcluster get-cluster-stack-events`命令只會傳回叢集主要堆疊事件。您可以在 CloudFormation 主控台中檢視叢集堆疊事件，包括與佇列和運算資源相關的事件。

```
pcluster get-cluster-stack-events [-h] 
                 --cluster-name {{CLUSTER_NAME}}
                [--debug]
                [--next-token {{NEXT_TOKEN}}]
                [--query {{QUERY}}]
                [--region {{REGION}}]
```

## 具名引數
<a name="pcluster-v3.get-cluster-stack-events.namedargs"></a>

**-h, --help**  
顯示 的說明文字`pcluster get-cluster-stack-events`。

**--cluster-name, -n {{CLUSTER\_NAME}}**  
指定叢集的名稱。

**--debug**  
啟用偵錯記錄。

**--next-token {{NEXT\_TOKEN}}**  
下一組結果的字符。

**--query {{QUERY}}**  
指定要在輸出上執行的 JMESPath 查詢。

**--region, -r {{REGION}}**  
指定 AWS 區域 要使用的 。 AWS 區域 必須使用 `AWS_DEFAULT_REGION`環境變數、 `~/.aws/config` 檔案 `[default]`區段中的 `region`設定或 `--region` 參數來指定 。

**使用 3.1.4 AWS ParallelCluster 版的範例：**

```
$ pcluster get-cluster-stack-events \
    -n {{cluster-v3}} \
    -r {{us-east-1}} \
    --query {{"events[0]"}}
{
  "eventId": "1234abcd-56ef-78gh-90ij-abcd1234efgh",
  "physicalResourceId": "arn:aws:cloudformation:us-east-1:123456789012:stack/cluster-v3/1234abcd-56ef-78gh-90ij-abcd1234efgh",
  "resourceStatus": "CREATE_COMPLETE",
  "stackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/cluster-v3/1234abcd-56ef-78gh-90ij-abcd1234efgh",
  "stackName": "cluster-v3",
  "logicalResourceId": "cluster-v3",
  "resourceType": "AWS::CloudFormation::Stack",
  "timestamp": "2022-07-12T18:29:12.140Z"
}
```