Files

33 lines
1.0 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { PostgreSQLManagementFlexibleServerClient } from "@azure/arm-postgresql-flexible";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to lists the tuning options of a server.
*
* @summary lists the tuning options of a server.
* x-ms-original-file: 2026-04-01-preview/TuningOptionsListByServer.json
*/
async function listTheTuningOptionsOfAServer(): Promise<void> {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.tuningOptionsOperations.listByServer(
"exampleresourcegroup",
"exampleserver",
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main(): Promise<void> {
await listTheTuningOptionsOfAServer();
}
main().catch(console.error);