Parse az postgres server show

Sara 1 Reputation point
2021-03-09T17:12:25.18+00:00

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 for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,586 Reputation points
    2021-03-10T04:06:20.383+00:00

    Hi @Sara , 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'

    0 comments No comments