Files
2025-03-07 19:22:02 +01:00

53 lines
2.2 KiB
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 { StorageManagementClient } from "@azure/arm-storage";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/FileSharesGet_Stats.json
*/
function getShareStats() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const expand = "stats";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.fileShares.get(resourceGroupName, accountName, shareName, options);
console.log(result);
});
}
getShareStats().catch(console.error);
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/FileSharesGet.json
*/
function getShares() {
return __awaiter(this, void 0, void 0, function* () {
const subscriptionId = "{subscription-id}";
const resourceGroupName = "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = yield client.fileShares.get(resourceGroupName, accountName, shareName);
console.log(result);
});
}
getShares().catch(console.error);
//# sourceMappingURL=fileSharesGetSample.js.map