- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Hello,
Thanks for posting to AWS re:Post. Viewing of these parameters can be done by describe-db-parameters https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-parameters.html
Example aws rds describe-db-parameters --db-parameter-group-name xxxx --query 'Parameters[].{ParameterName: ParameterName, ParameterValue: ParameterValue}' --output json https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html
You can also output to a file ">filename.txt" at the end
Modify by aws rds modify-db-parameter-group --db-parameter-group-name xxxx --parameters "ParameterName='xxxx',ParameterValue=xxxx,ApplyMethod=immediate" https://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-parameter-group.html
Hi,
Is there no option for the command below to just show all the information instead of having to itemize each entry in {}?
aws rds describe-db-parameters --db-parameter-group-name blah --query 'Parameters[].{ParameterName: ParameterName, ParameterValue: ParameterValue}'
For example am trying to run
aws rds describe-db-cluster-parameters \
--db-cluster-parameter-group-name blah
--query "Parameters[?ParameterName == 'password_encryption'].{ParameterName: ParameterName, ParameterValue: ParameterValue}"
The output is as below:
[
[
"md5"
]
]
And I just want it to output the whole lot like below instead of having to list each and every item :(
{
"ParameterName": "password_encryption",
"ParameterValue": "md5",
"Description": "Encrypt passwords.",
"Source": "system",
"ApplyType": "dynamic",
"DataType": "string",
"AllowedValues": "md5,scram-sha-256",
"IsModifiable": true,
"ApplyMethod": "pending-reboot",
"SupportedEngineModes": [
"provisioned"
]
},
I can run
aws rds describe-db-cluster-parameters \
--db-cluster-parameter-group-name blah \
--query "Parameters[?ParameterName == 'password_encryption'].*"
And the output is below but without the labels? :(
[
[
"password_encryption",
"md5",
"Encrypt passwords.",
"system",
"dynamic",
"string",
"md5,scram-sha-256",
true,
"pending-reboot",
[
"provisioned"
]
]
]
Perhaps the jq utility might help you here.
aws rds describe-db-parameters \
--db-parameter-group-name default.mysql8.0 \
--output json | jq '.Parameters[] | select(.ParameterName == "wait_timeout")'
{
"ParameterName": "wait_timeout",
"Description": "The number of seconds the server waits for activity on a non-interactive TCP/IP or UNIX File connection before closing it.",
"Source": "engine-default",
"ApplyType": "dynamic",
"DataType": "integer",
"AllowedValues": "1-31536000",
"IsModifiable": true,
"ApplyMethod": "pending-reboot"
}
