RDSのDBパラメータをワンライナーで取得
RDSのパラメータグループの設定値をawscliを通じて取得する。下記のようなCSVを取得するイメージ。
"名前","値","許可された値","変更可能","送信元","適用タイプ","データ型","説明","ApplyMethod","MinimumEngineVersion"
"application_name",,,true,"engine-default","dynamic","string","Sets the application name to be reported in statistics and logs.","pending-reboot",
"archive_command","/etc/rds/dbbin/pgscripts/rds_wal_archive %p",,false,"system","dynamic","string","Sets the shell command that will be called to archive a WAL file.","pending-reboot",
"archive_timeout","300","0-2147483647",false,"system","dynamic","integer","(s) Forces a switch to the next xlog file if a new file has not been started within N seconds.","pending-reboot",
"array_nulls",,"0,1",true,"engine-default","dynamic","boolean","Enable input of NULL elements in arrays.","pending-reboot",
~中略~
jqのインストール
[root@bastin ~]# yum -y install jq
aws rds describe-db-parametersで実行
[root@bastin ~]# aws rds describe-db-parameters --db-parameter-group-name db-prm-postgres10 \
| jq -r '["名前","値","許可された値","変更可能","送信元","適用タイプ","データ型","説明","ApplyMethod","MinimumEngineVersion"], (.Parameters[] | [.ParameterName,.ParameterValue,.AllowedValues,.IsModifiable,.Source,.ApplyType,.DataType,.Description,.ApplyMethod,.MinimumEngineVersion]) | @csv'
関連しているかもしれない記事
- RDS(Oracle)にData Pumpでインポートする
- Aurora(PostgreSQL)とRDS(PostgreSQL)の環境で論理レプリケーションする
- PostgreSQL論理レプリケーションの遅延監視
- RDS(PostgreSQL)の論理レプリケーションの競合エラーを解消する
- RDS(PostgreSQL)でpg_replication_origin_statusにアクセス出来ない(permission denied)