

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

# 在 AWS PCS 中取得運算節點群組詳細資訊
<a name="working-with_cng_get-details"></a>

您可以使用 AWS 管理主控台 或 AWS CLI 取得運算節點群組的詳細資訊，例如其運算節點群組 ID、Amazon Resource Name (ARN) 和 Amazon Machine Image (AMI) ID。這些詳細資訊通常是 AWS PCS API 動作和組態的必要值。

------
#### [ AWS 管理主控台 ]

**若要取得運算節點群組詳細資訊**

1.  開啟 [AWS PCS 主控台](https://console.aws.amazon.com/pcs/home#/clusters)。

1. 選取 叢集。

1. 選擇**運算節點群組**。

1.  從清單窗格中選擇運算節點群組。

------
#### [ AWS CLI ]

**若要取得運算節點群組詳細資訊**

1. 使用 [ListClusters](https://docs.aws.amazon.com/pcs/latest/APIReference/API_ListClusters.html) API 動作來尋找您的叢集名稱或 ID。

   ```
   aws pcs list-clusters
   ```

   **輸出範例：**

   ```
   {
       "clusters": [
           {
               "name": "get-started-cfn",
               "id": "pcs_abc1234567",
               "arn": "arn:aws:pcs:us-east-1:111122223333:cluster/pcs_abc1234567",
               "createdAt": "2025-04-01T20:11:22+00:00",
               "modifiedAt": "2025-04-01T20:11:22+00:00",
               "status": "ACTIVE"
           }
       ]
   }
   ```

1. 使用 [ListComputeNodeGroups](https://docs.aws.amazon.com/pcs/latest/APIReference/API_ListComputeNodeGroups.html) API 動作列出叢集中的運算節點群組。

   ```
   aws pcs list-compute-node-groups --cluster-identifier cluster-name-or-id
   ```

   **呼叫範例：**

   ```
   aws pcs list-compute-node-groups --cluster-identifier get-started-cfn
   ```

   **輸出範例：**

   ```
   {
       "computeNodeGroups": [
           {
               "name": "compute-1",
               "id": "pcs_abc123abc1",
               "arn": "arn:aws:pcs:us-east-1:111122223333:cluster/pcs_abc1234567/computenodegroup/pcs_abc123abc1",
               "clusterId": "pcs_abc1234567",
               "createdAt": "2025-04-01T20:19:25+00:00",
               "modifiedAt": "2025-04-01T20:19:25+00:00",
               "status": "ACTIVE"
           },
           {
               "name": "login",
               "id": "pcs_abc456abc7",
               "arn": "arn:aws:pcs:us-east-1:111122223333:cluster/pcs_abc1234567/computenodegroup/pcs_abc456abc7",
               "clusterId": "pcs_abc1234567",
               "createdAt": "2025-04-01T20:19:31+00:00",
               "modifiedAt": "2025-04-01T20:19:31+00:00",
               "status": "ACTIVE"
           }
       ]
   }
   ```

1. 使用 [GetComputeNodeGroup](https://docs.aws.amazon.com/pcs/latest/APIReference/API_GetComputeNodeGroup.html) API 動作以取得運算節點群組的其他詳細資訊。

   ```
   aws pcs get-compute-node-group --cluster-identifier cluster-name-or-id --compute-node-group-identifier compute-node-group-name-or-id
   ```

   **呼叫範例：**

   ```
   aws pcs get-compute-node-group --cluster-identifier get-started-cfn --compute-node-group-identifier compute-1
   ```

   **輸出範例：**

   ```
   {
       "computeNodeGroup": {
           "name": "compute-1",
           "id": "pcs_abc123abc1",
           "arn": "arn:aws:pcs:us-east-1:111122223333:cluster/pcs_abc1234567/computenodegroup/pcs_abc123abc1",
           "clusterId": "pcs_abc1234567",
           "createdAt": "2025-04-01T20:19:25+00:00",
           "modifiedAt": "2025-04-01T20:19:25+00:00",
           "status": "ACTIVE",
           "amiId": "ami-0123456789abcdef0",
           "subnetIds": [
               "subnet-abc012345789abc12"
           ],
           "purchaseOption": "ONDEMAND",
           "customLaunchTemplate": {
               "id": "lt-012345abcdef01234",
               "version": "1"
           },
           "iamInstanceProfileArn": "arn:aws:iam::111122223333:instance-profile/AWSPCS-get-started-cfn-us-east-1",
           "scalingConfiguration": {
               "minInstanceCount": 0,
               "maxInstanceCount": 4
           },
           "instanceConfigs": [
               {
                   "instanceType": "c6i.xlarge"
               }
           ]
       }
   }
   ```

------