mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
/**
|
|
* This sample demonstrates how to Update a list of configurations in a given server.
|
|
*
|
|
* @summary Update a list of configurations in a given server.
|
|
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/examples/ConfigurationsUpdateByServer.json
|
|
*/
|
|
|
|
import type { ConfigurationListResult } from "@azure/arm-postgresql";
|
|
import { PostgreSQLManagementClient } from "@azure/arm-postgresql";
|
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
|
|
async function configurationList(): Promise<void> {
|
|
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
|
|
const resourceGroupName = "TestGroup";
|
|
const serverName = "testserver";
|
|
const value: ConfigurationListResult = {};
|
|
const credential = new DefaultAzureCredential();
|
|
const client = new PostgreSQLManagementClient(credential, subscriptionId);
|
|
const result = await client.serverParameters.beginListUpdateConfigurationsAndWait(
|
|
resourceGroupName,
|
|
serverName,
|
|
value,
|
|
);
|
|
console.log(result);
|
|
}
|
|
|
|
configurationList().catch(console.error);
|