Files

34 lines
1.2 KiB
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Returns the summary of the AzureDevOps Connector Stats.
*
* @summary Returns the summary of the AzureDevOps Connector Stats.
* x-ms-original-file: specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorStatsGet.json
*/
import { MicrosoftSecurityDevOps } from "@azure/arm-securitydevops";
import { DefaultAzureCredential } from "@azure/identity";
import "dotenv/config";
async function azureDevOpsConnectorStatsGet(): Promise<void> {
const subscriptionId =
process.env["SECURITYDEVOPS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["SECURITYDEVOPS_RESOURCE_GROUP"] || "westusrg";
const azureDevOpsConnectorName = "testconnector";
const credential = new DefaultAzureCredential();
const client = new MicrosoftSecurityDevOps(credential, subscriptionId);
const result = await client.azureDevOpsConnectorStatsOperations.get(
resourceGroupName,
azureDevOpsConnectorName,
);
console.log(result);
}
async function main(): Promise<void> {
await azureDevOpsConnectorStatsGet();
}
main().catch(console.error);