POST https://management.azure.com/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix?api-version=2025-08-01
/**
* Samples for PrivateDnsZoneSuffix Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/
* PrivateDnsZoneSuffixGet.json
*/
/**
* Sample code: Get the private DNS suffix.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void
getThePrivateDNSSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE);
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python private_dns_zone_suffix_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.private_dns_zone_suffix.get()
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/PrivateDnsZoneSuffixGet.json
if __name__ == "__main__":
main()
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets the private DNS zone suffix.
*
* @summary Gets the private DNS zone suffix.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/PrivateDnsZoneSuffixGet.json
*/
async function getThePrivateDnsSuffix() {
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential);
const result = await client.privateDnsZoneSuffix.get();
console.log(result);
}