azure-sdk-for-js/sdk/synapse/arm-synapse/samples-dev/sqlPoolBlobAuditingPolicies...

39 строки
1.3 KiB
TypeScript
Исходник Обычный вид История

2022-04-20 11:17:25 +03:00
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SynapseManagementClient } from "@azure/arm-synapse";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists auditing settings of a Sql pool.
*
* @summary Lists auditing settings of a Sql pool.
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolAuditingSettingsList.json
*/
async function listAuditSettingsOfADatabase() {
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const resourceGroupName = "blobauditingtest-6852";
const workspaceName = "blobauditingtest-2080";
const sqlPoolName = "testdb";
const credential = new DefaultAzureCredential();
const client = new SynapseManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.sqlPoolBlobAuditingPolicies.listBySqlPool(
resourceGroupName,
workspaceName,
sqlPoolName
)) {
resArray.push(item);
}
console.log(resArray);
}
listAuditSettingsOfADatabase().catch(console.error);