azure-sdk-for-js/sdk/storagesync/arm-storagesync/samples-dev/privateEndpointConnectionsG...

36 строки
1.4 KiB
TypeScript

/*
* 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.
/**
* This sample demonstrates how to Gets the specified private endpoint connection associated with the storage sync service.
*
* @summary Gets the specified private endpoint connection associated with the storage sync service.
* x-ms-original-file: specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-09-01/examples/PrivateEndpointConnections_Get.json
*/
import { MicrosoftStorageSync } from "@azure/arm-storagesync";
import { DefaultAzureCredential } from "@azure/identity";
async function privateEndpointConnectionsGet() {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res6977";
const storageSyncServiceName = "sss2527";
const privateEndpointConnectionName = "{privateEndpointConnectionName}";
const credential = new DefaultAzureCredential();
const client = new MicrosoftStorageSync(credential, subscriptionId);
const result = await client.privateEndpointConnections.get(
resourceGroupName,
storageSyncServiceName,
privateEndpointConnectionName
);
console.log(result);
}
privateEndpointConnectionsGet().catch(console.error);