01 Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers (IDs):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd"
]
03 Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to examine as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az account set
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
04 Run postgres flexible-server list command (Windows/macOS/Linux) with custom output filters to list the names of all PostgreSQL flexible servers (and the name of their associated resource groups) available in the selected Azure subscription:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az postgres flexible-server list
--output table
--query '[*].{name:name, resourceGroup:resourceGroup}'
05 The command output should return a table with requested PostgreSQL server information:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
Name ResourceGroup
----------------------- ------------------------------
cc-postgres-flexible-db cloud-shell-storage-westeurope
cc-project5-flexible-db cloud-shell-storage-westeurope
06 Run postgres flexible-server parameter show command (Windows/macOS/Linux) with the name of the Azure PostgreSQL flexible server that you want to examine and its associated resource group as the identifier parameters, to get the connection_throttle.enable parameter value for the selected PostgreSQL server in order to determine the connection throttling feature status:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az postgres flexible-server parameter show
--server-name "cc-postgres-flexible-db"
--resource-group "cloud-shell-storage-westeurope"
--name connection_throttle.enable
--query 'value'
07 The command output should return the requested configuration value ("ON" or "on" for enabled, "OFF" or "off" for disabled):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
"off"
If the
postgres flexible-server parameter show command output returns
"OFF", as shown in the example above, connection throttling is not enabled for the selected Azure PostgreSQL flexible database server.
08 Repeat steps no. 6 and 7 for each PostgreSQL flexible server provisioned in the selected Azure subscription.
09 Repeat steps no. 3 – 8 for each subscription available within your Microsoft Azure cloud account.