/* * 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 Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * * @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/FileSharesPut_NFS.json */ function createNfsShares() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "{subscription-id}"; const resourceGroupName = "res346"; const accountName = "sto666"; const shareName = "share1235"; const fileShare = { enabledProtocols: "NFS" }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = yield client.fileShares.create(resourceGroupName, accountName, shareName, fileShare); console.log(result); }); } createNfsShares().catch(console.error); /** * This sample demonstrates how to Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * * @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/FileSharesPut.json */ function putShares() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "{subscription-id}"; const resourceGroupName = "res3376"; const accountName = "sto328"; const shareName = "share6185"; const fileShare = {}; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = yield client.fileShares.create(resourceGroupName, accountName, shareName, fileShare); console.log(result); }); } putShares().catch(console.error); /** * This sample demonstrates how to Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * * @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2021-09-01/examples/FileSharesPut_AccessTier.json */ function putSharesWithAccessTier() { return __awaiter(this, void 0, void 0, function* () { const subscriptionId = "{subscription-id}"; const resourceGroupName = "res346"; const accountName = "sto666"; const shareName = "share1235"; const fileShare = { accessTier: "Hot" }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = yield client.fileShares.create(resourceGroupName, accountName, shareName, fileShare); console.log(result); }); } putSharesWithAccessTier().catch(console.error); //# sourceMappingURL=fileSharesCreateSample.js.map