question

Sara-8613 avatar image
0 Votes"
Sara-8613 asked AnuragSharma-MSFT commented

Parse az postgres server show

Hi,Currently, this is the JSON for 'az postgres server show'. I want to know how I can use this JSON to parse for minimal-tls-version ?


 { 
   "administratorLogin": "myadmin", 
   "earliestRestoreDate": null, 
   "fullyQualifiedDomainName": "mydemoserver.postgres.database.azure.com", 
   "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/mydemoserver", 
   "location": "westus", 
   "name": "mydemoserver", 
   "resourceGroup": "myresourcegroup", 
   "sku": { 
     "capacity": 2, 
     "family": "Gen5", 
     "name": "GP_Gen5_2", 
     "size": null, 
     "tier": "GeneralPurpose" 
   }, 
   "sslEnforcement": "Enabled", 
   "storageProfile": { 
     "backupRetentionDays": 7, 
     "geoRedundantBackup": "Disabled", 
     "storageMb": 5120 
   }, 
   "tags": null, 
   "type": "Microsoft.DBforPostgreSQL/servers", 
   "userVisibleState": "Ready", 
   "version": "9.6" 
 } 
azure-database-postgresql
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Sara-8613, just wanted to follow up on this thread. Please let us know if the answer helped or we can discuss further.

0 Votes 0 ·

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

Hi @Sara-8613, welcome to Microsoft Q&A forum.

I have added the JSON part for minimum TLS version in your code:

  { 
    "administratorLogin": "myadmin", 
    "earliestRestoreDate": null, 
    "fullyQualifiedDomainName": "mydemoserver.postgres.database.azure.com", 
    "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/mydemoserver", 
    "location": "westus", 
    "name": "mydemoserver", 
    "resourceGroup": "myresourcegroup", 
    "sku": { 
      "capacity": 2, 
      "family": "Gen5", 
      "name": "GP_Gen5_2", 
      "size": null, 
      "tier": "GeneralPurpose" 
    }, 
    "properties": {
                 "storageProfile": {
                     "storageMB": 102400,
                     "backupRetentionDays": 7,
                     "geoRedundantBackup": "Disabled",
                     "storageAutogrow": "Enabled"
                 },
                 "version": "11",
                 "sslEnforcement": "Enabled",
                 "minimalTlsVersion": "TLS1_0",
                 "infrastructureEncryption": "Disabled",
                 "publicNetworkAccess": "Enabled"
            },
    "tags": null, 
    "type": "Microsoft.DBforPostgreSQL/servers", 
    "userVisibleState": "Ready", 
    "version": "9.6" 
  } 

Please let me know if this helps or else we can discuss further.


If answer helps, please mark it as 'Accept Answer'


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.