mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
25 lines
985 B
TypeScript
25 lines
985 B
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Gets information about a AAD server administrator.
|
|
*
|
|
* @summary Gets information about a AAD server administrator.
|
|
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ServerAdminGet.json
|
|
*/
|
|
|
|
import { PostgreSQLManagementClient } from "@azure/arm-postgresql";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function serverAdministratorGet(): Promise<void> {
|
|
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
|
const resourceGroupName = "testrg";
|
|
const serverName = "pgtestsvc4";
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new PostgreSQLManagementClient(credential, subscriptionId);
|
|
const result = await client.serverAdministrators.get(resourceGroupName, serverName);
|
|
console.log(result);
|
|
}
|
|
|
|
serverAdministratorGet().catch(console.error);
|