@azure/arm-security
Version:
A generated SDK for SecurityCenter.
32 lines • 1.58 kB
JavaScript
/*
* 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.
*/
import { __awaiter } from "tslib";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SecurityCenter } from "@azure/arm-security";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the list of all possible traffic between resources for the subscription and location, based on connection type.
*
* @summary Gets the list of all possible traffic between resources for the subscription and location, based on connection type.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnections_example.json
*/
function getAllowedConnections() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "3eeab341-f466-499c-a8be-85427e154bad";
const resourceGroupName = "myResourceGroup";
const ascLocation = "centralus";
const connectionType = "Internal";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const result = yield client.allowedConnections.get(resourceGroupName, ascLocation, connectionType);
console.log(result);
});
}
getAllowedConnections().catch(console.error);
//# sourceMappingURL=allowedConnectionsGetSample.js.map