

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

# 在 檢視資料庫叢集參數群組的參數值
<a name="USER_WorkingWithParamGroups.ViewingCluster"></a>

您可以從資料庫叢集參數群組取得所有參數與其值的清單。

## 主控台
<a name="USER_WorkingWithParamGroups.ViewingCluster.CON"></a>

**檢視資料庫叢集參數群組的參數值**

1. 登入 AWS 管理主控台 並開啟位於 https：//[https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/) 的 Amazon RDS 主控台。

1. 在導覽窗格中，選擇 **Parameter groups (參數群組)**。

   資料庫叢集參數群組會以 **DB cluster parameter group (資料庫叢集參數群組)** 出現在 **Type (類型)** 清單中。

1. 選擇資料庫叢集參數群組的名稱，以查看參數清單。

## AWS CLI
<a name="USER_WorkingWithParamGroups.ViewingCluster.CLI"></a>

若要檢視資料庫叢集參數群組的參數值，請使用 AWS CLI [https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html) 命令搭配下列必要參數。
+ `--db-cluster-parameter-group-name`

**Example**  
以下範例列出資料庫叢集參數群組 *mydbclusterparametergroup*​ 的參數和參數值，為 JSON 格式。  
此命令會傳回類似以下的回應：  

```
aws rds describe-db-cluster-parameters --db-cluster-parameter-group-name mydbclusterparametergroup
```

```
{
    "Parameters": [
        {
            "ParameterName": "activate_all_roles_on_login",
            "ParameterValue": "0",
            "Description": "Automatically set all granted roles as active after the user has authenticated successfully.",
            "Source": "engine-default",
            "ApplyType": "dynamic",
            "DataType": "boolean",
            "AllowedValues": "0,1",
            "IsModifiable": true,
            "ApplyMethod": "pending-reboot",
            "SupportedEngineModes": [
                "provisioned"
            ]
        },
        {
            "ParameterName": "allow-suspicious-udfs",
            "Description": "Controls whether user-defined functions that have only an xxx symbol for the main function can be loaded",
            "Source": "engine-default",
            "ApplyType": "static",
            "DataType": "boolean",
            "AllowedValues": "0,1",
            "IsModifiable": false,
            "ApplyMethod": "pending-reboot",
            "SupportedEngineModes": [
                "provisioned"
            ]
        },
...
```

## RDS API
<a name="USER_WorkingWithParamGroups.ViewingCluster.API"></a>

若要檢視資料庫叢集參數群組的參數值，請搭配下列必要參數使用 RDS API [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBParameters.html) 命令。
+ `DBClusterParameterGroupName`

在某些情況下，不會顯示允許的參數值。這些一律為參數，其中來源是資料庫引擎預設值。

若要檢視這些參數的值，您可以執行下列 SQL 陳述式：
+ MySQL：

  ```
  -- Show the value of a particular parameter
  mysql$ SHOW VARIABLES LIKE '%parameter_name%';
  
  -- Show the values of all parameters
  mysql$ SHOW VARIABLES;
  ```
+ PostgreSQL：

  ```
  -- Show the value of a particular parameter
  postgresql=> SHOW parameter_name;
  
  -- Show the values of all parameters
  postgresql=> SHOW ALL;
  ```