diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7ad6eb1de9d5..23d114b1e215 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2558,7 +2558,7 @@ packages: version: 0.0.0 '@rush-temp/ai-text-analytics@file:projects/ai-text-analytics.tgz': - resolution: {integrity: sha512-1jGgJPXpBnqpTnDegMjesgQibCkWWP+sIHe9EH3z+SW5Z3EJ53VljlaafiWwNz+9z+8a+P0lnsC0J07hwnVINQ==, tarball: file:projects/ai-text-analytics.tgz} + resolution: {integrity: sha512-gkyef86U6fABbjY5iPYkRyjDu+KvYLoGMbZRQ+N6rTvDM8pE8XxZ8ll54rRk0lxqMAO3wHBhuFfAuNgDhhTluw==, tarball: file:projects/ai-text-analytics.tgz} version: 0.0.0 '@rush-temp/ai-translation-document@file:projects/ai-translation-document.tgz': @@ -2574,7 +2574,7 @@ packages: version: 0.0.0 '@rush-temp/ai-vision-image-analysis@file:projects/ai-vision-image-analysis.tgz': - resolution: {integrity: sha512-C7u702obHICqMaeFPSXIZNsmxVX/WH2izXwXmCdVVepetjRgFaqEHqT5qPYSHJkfKOO+0rPPbfF2DfefCiD4hg==, tarball: file:projects/ai-vision-image-analysis.tgz} + resolution: {integrity: sha512-818aPAYE2nBY0rMl1Qj2o9QkGi8NiK2N5SzZ1ByScuEO/y7yBpjwKOA/+6oIrOwEhszzTAal9HUB47rFZ1OWpA==, tarball: file:projects/ai-vision-image-analysis.tgz} version: 0.0.0 '@rush-temp/api-management-custom-widgets-scaffolder@file:projects/api-management-custom-widgets-scaffolder.tgz': @@ -2786,11 +2786,11 @@ packages: version: 0.0.0 '@rush-temp/arm-containerregistry@file:projects/arm-containerregistry.tgz': - resolution: {integrity: sha512-7quK6b+ahtmfuADOaiKoo+RKZkLl9ePSqMKrCb6H2R4RE1YFfj9scUsD4JF8wYxBkG8agzgPg32EtcD7fRlyFQ==, tarball: file:projects/arm-containerregistry.tgz} + resolution: {integrity: sha512-4Zdv4QnGOh91Dl7bpuu5mZQSZq5yd706p323rJ4FRmCP/eYeCPO73zKMmZ/dy+LXR+Jyko0pVz/m8Gk9s6lYEA==, tarball: file:projects/arm-containerregistry.tgz} version: 0.0.0 '@rush-temp/arm-containerservice-1@file:projects/arm-containerservice-1.tgz': - resolution: {integrity: sha512-3lTnhOIkXo566mFG1Hr9eBW5ptLClRN5W9PEml+yOI6/Z83/C+wNoVE3VZJ3L0To2q85wP5k0u5taurTGWIJ4w==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-+YaxjagnIDZ0i6eppousHV69r9ess4dAQqvm9z+W49bZxAdxbtxSKNQsg0ugY5pCp8mQyfLfeurQtlfPwRtnMA==, tarball: file:projects/arm-containerservice-1.tgz} version: 0.0.0 '@rush-temp/arm-containerservice@file:projects/arm-containerservice.tgz': @@ -3202,7 +3202,7 @@ packages: version: 0.0.0 '@rush-temp/arm-netapp@file:projects/arm-netapp.tgz': - resolution: {integrity: sha512-VssJen0QUPIgME5nHkHkuhDMZN1XIlsOt6nl/m+RwoHsaHMqH9MukCrmds5WOrVncvEKxPS5Nfb4Ke2xcsUKFw==, tarball: file:projects/arm-netapp.tgz} + resolution: {integrity: sha512-U9XGKtb3RuqnF9rAU8XeHTQONFK5GDQ3lmUhstyjxHbLM5kEA7LsLs5mjyv7j3lJOwRlwyioRJuJYaNRhSUDRA==, tarball: file:projects/arm-netapp.tgz} version: 0.0.0 '@rush-temp/arm-network-1@file:projects/arm-network-1.tgz': @@ -3482,7 +3482,7 @@ packages: version: 0.0.0 '@rush-temp/arm-storage@file:projects/arm-storage.tgz': - resolution: {integrity: sha512-f7cvMajOmje52oArIw8e3SbxYz4MrArhvAsXBkp52pXhEyp53YlA2FHEdsXfRGYZ8FWkgdzjnr7MDcgwf+PvbA==, tarball: file:projects/arm-storage.tgz} + resolution: {integrity: sha512-u6zVKzsvKeAmSqPeR1cBmh9YoG+XZrHikZz3Cl4Af6x4wkK7fzA0z9gFg+AECNxAnKQEJRfMfmAz0Kjmou+JGg==, tarball: file:projects/arm-storage.tgz} version: 0.0.0 '@rush-temp/arm-storageactions@file:projects/arm-storageactions.tgz': @@ -3766,7 +3766,7 @@ packages: version: 0.0.0 '@rush-temp/functions-authentication-events@file:projects/functions-authentication-events.tgz': - resolution: {integrity: sha512-3z+Wn2tFhy1O3WnYtoshPxE8VZmpkx/LCJCQsP1kqYPotgzBWU92XQ1vVex4akjvDMaDiqL5sbs5kfmmDT7LBQ==, tarball: file:projects/functions-authentication-events.tgz} + resolution: {integrity: sha512-SancGMuk0aVOLc2LqvEqXKdkohnaud5TIHxy1D5x/AWaDlA88RCsdWfMwAutVVz972Dpf0v5w88w3pqsTiCAMw==, tarball: file:projects/functions-authentication-events.tgz} version: 0.0.0 '@rush-temp/health-deidentification@file:projects/health-deidentification.tgz': @@ -4022,19 +4022,19 @@ packages: version: 0.0.0 '@rush-temp/quantum-jobs@file:projects/quantum-jobs.tgz': - resolution: {integrity: sha512-zHtPe9OjzXX4THRvBVecPTzBM/VsSsjguLMgSQYk0Uy4Ll4myk/LoUpZZwc9nIblkPCiePJh8270MZO5H6KOOA==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-x6bNUk9vu8zvYVXAVFfol08i1y10LkjNUzJZWK5219WTOFHX0YkDjmZk7ZOEOoqBl9lA+/iBWSEu5ejYUQbYAw==, tarball: file:projects/quantum-jobs.tgz} version: 0.0.0 '@rush-temp/schema-registry-avro@file:projects/schema-registry-avro.tgz': - resolution: {integrity: sha512-pXsOSqgPhJlk4sQdIe5htRBCNPm4HnaZFgtcoEq1wFBJ2rQ/2sVV9YssxvsHBZwjcl+68iRpRMzfHq0xXN7pyg==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-hdHZ0SJ7TRPDoof/ywC1v5P5T4Qtz6npoA4P2yFaNlhXIHEbmpxSS8bdk9t9oBOe5+wTx1Syz1CWbPNhpoGjdQ==, tarball: file:projects/schema-registry-avro.tgz} version: 0.0.0 '@rush-temp/schema-registry-json@file:projects/schema-registry-json.tgz': - resolution: {integrity: sha512-ZwFbFtIFKLrC3h+7A7Ct8dPokgFmUaCKXsxIIFETiJCMcoBGxAvvAmP59/E5S8l4AgeE7RcQuw4FdN/ySLbwBg==, tarball: file:projects/schema-registry-json.tgz} + resolution: {integrity: sha512-d/3GcklBP2GOnxwkWrBmQJrpJsEOTZzK7cqlzXavChVF2HfOy/a+DpNfF8APLp43f7PVpXeqkToFHXSkdEG9bg==, tarball: file:projects/schema-registry-json.tgz} version: 0.0.0 '@rush-temp/schema-registry@file:projects/schema-registry.tgz': - resolution: {integrity: sha512-N8FsEoIwUNgbuQGPFtJ90JTn7qYPpk2HD7AmhgGD5SlLS6Im9t8cc+/5A74nzrSKdPiko7p8Ht2LWSGzI6WWxw==, tarball: file:projects/schema-registry.tgz} + resolution: {integrity: sha512-oI5hZC61oj/rnBpFxm7PdT9EefXIWFNZF5wQfFOjKL75XUP4TXpr7cRU5G/jLYM7CDYOrQVPgrRZN0iuNFy0VQ==, tarball: file:projects/schema-registry.tgz} version: 0.0.0 '@rush-temp/search-documents@file:projects/search-documents.tgz': @@ -18215,12 +18215,12 @@ snapshots: dependencies: '@azure/core-lro': 2.7.2 '@types/node': 18.19.76 - '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.7.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) + '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.6.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) '@vitest/coverage-istanbul': 3.0.6(vitest@3.0.6) dotenv: 16.4.7 playwright: 1.50.1 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.6.3 vitest: 3.0.6(@types/debug@4.1.12)(@types/node@18.19.76)(@vitest/browser@3.0.6)(msw@2.7.2(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - '@edge-runtime/vm' diff --git a/sdk/batch/arm-batch/assets.json b/sdk/batch/arm-batch/assets.json index 2dc0a2fbfd8d..76964ebcb8eb 100644 --- a/sdk/batch/arm-batch/assets.json +++ b/sdk/batch/arm-batch/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/batch/arm-batch", - "Tag": "js/batch/arm-batch_20f166d6fc" + "Tag": "js/batch/arm-batch_b0c61dc3f9" } diff --git a/sdk/monitor/arm-monitor/assets.json b/sdk/monitor/arm-monitor/assets.json index 32c4b0253dd1..fc96d4919d56 100644 --- a/sdk/monitor/arm-monitor/assets.json +++ b/sdk/monitor/arm-monitor/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/monitor/arm-monitor", - "Tag": "js/monitor/arm-monitor_ac7d3f3bb5" + "Tag": "js/monitor/arm-monitor_86ac674e4d" } diff --git a/sdk/monitor/arm-monitor/test/monitor.spec.ts b/sdk/monitor/arm-monitor/test/monitor.spec.ts index 213907543396..01902a48688a 100644 --- a/sdk/monitor/arm-monitor/test/monitor.spec.ts +++ b/sdk/monitor/arm-monitor/test/monitor.spec.ts @@ -105,14 +105,13 @@ describe("Monitor test", () => { const res = await logic_client.workflows.createOrUpdate(resourceGroup, workflowName, { location: location, definition: { - $schema: - "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - contentVersion: "1.0.0.0", - parameters: {}, - triggers: {}, - actions: {}, - outputs: {}, - }, + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "triggers": {}, + "actions": {}, + "outputs": {} + } }); workflowsId = (res.id || "/").substring(1); @@ -149,6 +148,17 @@ describe("Monitor test", () => { storageId = storageaccount.id || ""; // namespaces.beginCreateOrUpdateAndWait + await eventhub_client.namespaces.beginCreateOrUpdateAndWait(resourceGroup, namespaceName, { + sku: { + name: "Standard", + tier: "Standard", + }, + location: location, + tags: { + tag1: "value1", + tag2: "value2", + } + }, testPollingOptions) // namespaces.createOrUpdateAuthorizationRule const authorization = await eventhub_client.namespaces.createOrUpdateAuthorizationRule( resourceGroup, @@ -179,23 +189,29 @@ describe("Monitor test", () => { // skip this case as no data plane write permissions it.skip("eventhub create test", async () => { // eventHubs.createOrUpdate - }); + await eventhub_client.eventHubs.createOrUpdate(resourceGroup, namespaceName, eventhubName, { + messageRetentionInDays: 4, + partitionCount: 4, + status: "Active", + captureDescription: { + enabled: true, + encoding: "Avro", + intervalInSeconds: 120, + sizeLimitInBytes: 10485763, + destination: { + name: "EventHubArchive.AzureBlockBlob", + storageAccountResourceId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/" + storageAccountName, + blobContainer: "container", + archiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}", + } + } + }); + }) it("diagnosticSettings create test", async () => { - workflowsId = ( - (await logic_client.workflows.get(resourceGroup, workflowName)).id || "/" - ).substring(1); - storageId = - (await storage_client.storageAccounts.getProperties(resourceGroup, storageAccountName)).id || - ""; - authorizationId = - ( - await eventhub_client.namespaces.getAuthorizationRule( - resourceGroup, - namespaceName, - authorizationRuleName, - ) - ).id || ""; + workflowsId = ((await logic_client.workflows.get(resourceGroup, workflowName)).id || "/").substring(1) + storageId = (await storage_client.storageAccounts.getProperties(resourceGroup, storageAccountName)).id || ""; + authorizationId = (await eventhub_client.namespaces.getAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName)).id || ""; workspaceId = (await op_client.workspaces.get(resourceGroup, workspaceName)).id || ""; const res = await client.diagnosticSettings.createOrUpdate(workflowsId, diagnosticName, { storageAccountId: storageId, @@ -209,11 +225,11 @@ describe("Monitor test", () => { enabled: true, retentionPolicy: { enabled: false, - days: 0, - }, - }, - ], - }); + days: 0 + } + } + ] + }) assert.equal(res.name, diagnosticName); }); @@ -222,29 +238,41 @@ describe("Monitor test", () => { assert.equal(res.name, diagnosticName); }); - it("diagnosticSettings list test", async () => {}); + it("diagnosticSettings list test", async () => { + const res = await client.diagnosticSettings.list(workflowsId); + assert.ok(res); + }); - it("diagnosticSettings delete test", async () => {}); + it("diagnosticSettings delete test", async () => { + const res = await client.diagnosticSettings.delete(workflowsId, diagnosticName); + assert.ok(res); + }); it("logProfiles create test", async () => { - // delete sample logfile + //delete sample logfile const resArray = new Array(); for await (const item of client.logProfiles.list()) { resArray.push(item); } if (resArray.length >= 1) { - await client.logProfiles.delete("sample-log-profile"); + await client.logProfiles.delete("sample-log-profile") } const res = await client.logProfiles.createOrUpdate(logProfileName, { location: "", - locations: ["global"], - categories: ["Write", "Delete", "Action"], + locations: [ + "global" + ], + categories: [ + "Write", + "Delete", + "Action" + ], retentionPolicy: { enabled: true, - days: 3, + days: 3 }, - storageAccountId: storageId, - }); + storageAccountId: storageId + }) assert.equal(res.name, logProfileName); }); @@ -266,9 +294,8 @@ describe("Monitor test", () => { resourceGroup, azureMonitorWorkspaceName, { - location, - }, - ); + location + }); assert.equal(res.name, azureMonitorWorkspaceName); }); @@ -287,23 +314,44 @@ describe("Monitor test", () => { it("workspace delete test", async () => { const resArray = new Array(); + await client.azureMonitorWorkspaces.beginDeleteAndWait(resourceGroup, azureMonitorWorkspaceName); for await (const item of client.azureMonitorWorkspaces.listByResourceGroup(resourceGroup)) { resArray.push(item); } assert.equal(resArray.length, 0); }); - it("metric listAtSubscriptionScope test", async () => {}); + it("metric listAtSubscriptionScope test", async () => { + await client.metricsOperations.listAtSubscriptionScope( + location, + { + metricnamespace: "microsoft.compute/virtualmachines" + } + ); + }); - it("metric list test", async () => {}); + it("metric list test", async () => { + await client.metricsOperations.list( + "subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/" + storageAccountName + "/blobServices/default", + { + metricnamespace: "Microsoft.Storage/storageAccounts/blobServices" + } + ); + }); - it("delete parameters for diagnosticSettings", async () => {}); + it("delete parameters for diagnosticSettings", async () => { + await logic_client.workflows.delete(resourceGroup, workflowName); + await storage_client.storageAccounts.delete(resourceGroup, storageAccountName); + await eventhub_client.namespaces.beginDeleteAndWait(resourceGroup, namespaceName, testPollingOptions); + await op_client.workspaces.beginDeleteAndWait(resourceGroup, workspaceName, testPollingOptions); + }); it("logProfiles delete test", async () => { + await client.logProfiles.delete(logProfileName); const resArray = new Array(); for await (const item of client.logProfiles.list()) { resArray.push(item); } - assert.equal(resArray.length, 1); // still exist sample logfile + assert.equal(resArray.length, 1); //still exist sample logfile }); }); diff --git a/sdk/storage/arm-storage/CHANGELOG.md b/sdk/storage/arm-storage/CHANGELOG.md index 1d29b387388c..a43801f8def0 100644 --- a/sdk/storage/arm-storage/CHANGELOG.md +++ b/sdk/storage/arm-storage/CHANGELOG.md @@ -1,15 +1,53 @@ # Release History - -## 18.3.1 (Unreleased) - + +## 18.4.0 (2025-02-27) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation FileServices.getServiceUsage + - Added operation FileServices.listServiceUsages + - Added Interface AccountLimits + - Added Interface AccountUsage + - Added Interface AccountUsageElements + - Added Interface BurstingConstants + - Added Interface FileServicesGetServiceUsageOptionalParams + - Added Interface FileServicesListServiceUsagesNextOptionalParams + - Added Interface FileServicesListServiceUsagesOptionalParams + - Added Interface FileServiceUsage + - Added Interface FileServiceUsageProperties + - Added Interface FileServiceUsages + - Added Interface FileShareLimits + - Added Interface FileSharePropertiesFileSharePaidBursting + - Added Interface FileShareRecommendations + - Added Interface ObjectReplicationPolicyPropertiesMetrics + - Added Type Alias FileServicesGetServiceUsageResponse + - Added Type Alias FileServicesListServiceUsagesNextResponse + - Added Type Alias FileServicesListServiceUsagesResponse + - Interface FileShare has a new optional parameter fileSharePaidBursting + - Interface FileShare has a new optional parameter includedBurstIops + - Interface FileShare has a new optional parameter maxBurstCreditsForIops + - Interface FileShare has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime + - Interface FileShare has a new optional parameter nextAllowedProvisionedIopsDowngradeTime + - Interface FileShare has a new optional parameter nextAllowedQuotaDowngradeTime + - Interface FileShare has a new optional parameter provisionedBandwidthMibps + - Interface FileShare has a new optional parameter provisionedIops + - Interface FileShareItem has a new optional parameter fileSharePaidBursting + - Interface FileShareItem has a new optional parameter includedBurstIops + - Interface FileShareItem has a new optional parameter maxBurstCreditsForIops + - Interface FileShareItem has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime + - Interface FileShareItem has a new optional parameter nextAllowedProvisionedIopsDowngradeTime + - Interface FileShareItem has a new optional parameter nextAllowedQuotaDowngradeTime + - Interface FileShareItem has a new optional parameter provisionedBandwidthMibps + - Interface FileShareItem has a new optional parameter provisionedIops + - Interface ObjectReplicationPolicy has a new optional parameter metrics + - Enum KnownSkuName has a new value PremiumV2LRS + - Enum KnownSkuName has a new value PremiumV2ZRS + - Enum KnownSkuName has a new value StandardV2GRS + - Enum KnownSkuName has a new value StandardV2Gzrs + - Enum KnownSkuName has a new value StandardV2LRS + - Enum KnownSkuName has a new value StandardV2ZRS + + ## 18.3.0 (2024-06-27) ### Features Added diff --git a/sdk/storage/arm-storage/LICENSE b/sdk/storage/arm-storage/LICENSE index b2f52a2bad4e..2ad4de7b17f0 100644 --- a/sdk/storage/arm-storage/LICENSE +++ b/sdk/storage/arm-storage/LICENSE @@ -1,6 +1,6 @@ -Copyright (c) Microsoft Corporation. +The MIT License (MIT) -MIT License +Copyright (c) 2025 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/storage/arm-storage/README.md b/sdk/storage/arm-storage/README.md index ad83d1e5dfd8..8fbf2b4e3707 100644 --- a/sdk/storage/arm-storage/README.md +++ b/sdk/storage/arm-storage/README.md @@ -44,6 +44,9 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure StorageManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). + +For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -109,7 +112,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - [azure_cli]: https://learn.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ diff --git a/sdk/storage/arm-storage/_meta.json b/sdk/storage/arm-storage/_meta.json index fe2525b00223..a9cc43c3ab14 100644 --- a/sdk/storage/arm-storage/_meta.json +++ b/sdk/storage/arm-storage/_meta.json @@ -1,8 +1,8 @@ { - "commit": "43f10d3b8bacd5fc6b01254b5050c613f26c3573", + "commit": "2d73bd7fb1c68a8b6829fac1760bd0fc84ca5554", "readme": "specification/storage/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storage\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storage\\resource-manager\\readme.md --use=@autorest/typescript@6.0.34 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.10", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.19", + "use": "@autorest/typescript@6.0.34" } \ No newline at end of file diff --git a/sdk/storage/arm-storage/assets.json b/sdk/storage/arm-storage/assets.json index 74228f340904..db155e40647b 100644 --- a/sdk/storage/arm-storage/assets.json +++ b/sdk/storage/arm-storage/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/storage/arm-storage", - "Tag": "js/storage/arm-storage_adfbe43177" + "Tag": "js/storage/arm-storage_b99ac78b1e" } diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index ce7e4c34f434..7f554be14745 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageManagementClient.", - "version": "18.3.1", + "version": "18.4.0", "engines": { "node": ">=18.0.0" }, @@ -32,15 +32,15 @@ "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", + "@azure/identity": "^4.7.0", "@azure/logger": "^1.1.4", "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.5", - "@vitest/coverage-istanbul": "^3.0.5", + "@vitest/browser": "^3.0.6", + "@vitest/coverage-istanbul": "^3.0.6", "dotenv": "^16.0.0", "playwright": "^1.50.1", - "typescript": "~5.7.2", - "vitest": "^3.0.5" + "typescript": "~5.6.2", + "vitest": "^3.0.6" }, "repository": { "type": "git", @@ -80,7 +80,7 @@ "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "dev-tool run update-snippets" + "update-snippets": "echo skipped" }, "sideEffects": false, "//metadata": { diff --git a/sdk/storage/arm-storage/review/arm-storage.api.md b/sdk/storage/arm-storage/review/arm-storage.api.md index 752160f8f4db..64600f32a934 100644 --- a/sdk/storage/arm-storage/review/arm-storage.api.md +++ b/sdk/storage/arm-storage/review/arm-storage.api.md @@ -30,6 +30,14 @@ export interface AccountImmutabilityPolicyProperties { // @public export type AccountImmutabilityPolicyState = string; +// @public +export interface AccountLimits { + readonly maxFileShares?: number; + readonly maxProvisionedBandwidthMiBPerSec?: number; + readonly maxProvisionedIops?: number; + readonly maxProvisionedStorageGiB?: number; +} + // @public export interface AccountSasParameters { iPAddressOrRange?: string; @@ -48,6 +56,20 @@ export type AccountStatus = "available" | "unavailable"; // @public export type AccountType = string; +// @public +export interface AccountUsage { + readonly liveShares?: AccountUsageElements; + readonly softDeletedShares?: AccountUsageElements; +} + +// @public +export interface AccountUsageElements { + readonly fileShareCount?: number; + readonly provisionedBandwidthMiBPerSec?: number; + readonly provisionedIops?: number; + readonly provisionedStorageGiB?: number; +} + // @public export interface ActiveDirectoryProperties { accountType?: AccountType; @@ -410,6 +432,13 @@ export interface BlobServicesSetServicePropertiesOptionalParams extends coreClie // @public export type BlobServicesSetServicePropertiesResponse = BlobServiceProperties; +// @public +export interface BurstingConstants { + readonly burstFloorIops?: number; + readonly burstIOScalar?: number; + readonly burstTimeframeSeconds?: number; +} + // @public export type Bypass = string; @@ -746,7 +775,9 @@ export interface FileServiceProperties extends Resource { // @public export interface FileServices { getServiceProperties(resourceGroupName: string, accountName: string, options?: FileServicesGetServicePropertiesOptionalParams): Promise; + getServiceUsage(resourceGroupName: string, accountName: string, options?: FileServicesGetServiceUsageOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: FileServicesListOptionalParams): Promise; + listServiceUsages(resourceGroupName: string, accountName: string, options?: FileServicesListServiceUsagesOptionalParams): PagedAsyncIterableIterator; setServiceProperties(resourceGroupName: string, accountName: string, parameters: FileServiceProperties, options?: FileServicesSetServicePropertiesOptionalParams): Promise; } @@ -757,6 +788,13 @@ export interface FileServicesGetServicePropertiesOptionalParams extends coreClie // @public export type FileServicesGetServicePropertiesResponse = FileServiceProperties; +// @public +export interface FileServicesGetServiceUsageOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileServicesGetServiceUsageResponse = FileServiceUsage; + // @public export interface FileServicesListOptionalParams extends coreClient.OperationOptions { } @@ -764,6 +802,21 @@ export interface FileServicesListOptionalParams extends coreClient.OperationOpti // @public export type FileServicesListResponse = FileServiceItems; +// @public +export interface FileServicesListServiceUsagesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileServicesListServiceUsagesNextResponse = FileServiceUsages; + +// @public +export interface FileServicesListServiceUsagesOptionalParams extends coreClient.OperationOptions { + maxpagesize?: number; +} + +// @public +export type FileServicesListServiceUsagesResponse = FileServiceUsages; + // @public export interface FileServicesSetServicePropertiesOptionalParams extends coreClient.OperationOptions { } @@ -771,6 +824,26 @@ export interface FileServicesSetServicePropertiesOptionalParams extends coreClie // @public export type FileServicesSetServicePropertiesResponse = FileServiceProperties; +// @public +export interface FileServiceUsage extends Resource { + readonly properties?: FileServiceUsageProperties; +} + +// @public +export interface FileServiceUsageProperties { + readonly burstingConstants?: BurstingConstants; + readonly fileShareLimits?: FileShareLimits; + readonly fileShareRecommendations?: FileShareRecommendations; + readonly storageAccountLimits?: AccountLimits; + readonly storageAccountUsage?: AccountUsage; +} + +// @public +export interface FileServiceUsages { + readonly nextLink?: string; + readonly value?: FileServiceUsage[]; +} + // @public export interface FileShare extends AzureEntityResource { accessTier?: ShareAccessTier; @@ -779,13 +852,21 @@ export interface FileShare extends AzureEntityResource { readonly deleted?: boolean; readonly deletedTime?: Date; enabledProtocols?: EnabledProtocols; + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; + readonly includedBurstIops?: number; readonly lastModifiedTime?: Date; readonly leaseDuration?: LeaseDuration; readonly leaseState?: LeaseState; readonly leaseStatus?: LeaseStatus; + readonly maxBurstCreditsForIops?: number; metadata?: { [propertyName: string]: string; }; + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + readonly nextAllowedQuotaDowngradeTime?: Date; + provisionedBandwidthMibps?: number; + provisionedIops?: number; readonly remainingRetentionDays?: number; rootSquash?: RootSquashType; shareQuota?: number; @@ -803,13 +884,21 @@ export interface FileShareItem extends AzureEntityResource { readonly deleted?: boolean; readonly deletedTime?: Date; enabledProtocols?: EnabledProtocols; + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; + readonly includedBurstIops?: number; readonly lastModifiedTime?: Date; readonly leaseDuration?: LeaseDuration; readonly leaseState?: LeaseState; readonly leaseStatus?: LeaseStatus; + readonly maxBurstCreditsForIops?: number; metadata?: { [propertyName: string]: string; }; + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + readonly nextAllowedQuotaDowngradeTime?: Date; + provisionedBandwidthMibps?: number; + provisionedIops?: number; readonly remainingRetentionDays?: number; rootSquash?: RootSquashType; shareQuota?: number; @@ -825,6 +914,31 @@ export interface FileShareItems { readonly value?: FileShareItem[]; } +// @public +export interface FileShareLimits { + readonly maxProvisionedBandwidthMiBPerSec?: number; + readonly maxProvisionedIops?: number; + readonly maxProvisionedStorageGiB?: number; + readonly minProvisionedBandwidthMiBPerSec?: number; + readonly minProvisionedIops?: number; + readonly minProvisionedStorageGiB?: number; +} + +// @public +export interface FileSharePropertiesFileSharePaidBursting { + paidBurstingEnabled?: boolean; + paidBurstingMaxBandwidthMibps?: number; + paidBurstingMaxIops?: number; +} + +// @public +export interface FileShareRecommendations { + readonly bandwidthScalar?: number; + readonly baseBandwidthMiBPerSec?: number; + readonly baseIops?: number; + readonly ioScalar?: number; +} + // @public export interface FileShares { create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesCreateOptionalParams): Promise; @@ -1483,12 +1597,18 @@ export enum KnownSkuConversionStatus { // @public export enum KnownSkuName { PremiumLRS = "Premium_LRS", + PremiumV2LRS = "PremiumV2_LRS", + PremiumV2ZRS = "PremiumV2_ZRS", PremiumZRS = "Premium_ZRS", StandardGRS = "Standard_GRS", StandardGzrs = "Standard_GZRS", StandardLRS = "Standard_LRS", StandardRagrs = "Standard_RAGRS", StandardRagzrs = "Standard_RAGZRS", + StandardV2GRS = "StandardV2_GRS", + StandardV2Gzrs = "StandardV2_GZRS", + StandardV2LRS = "StandardV2_LRS", + StandardV2ZRS = "StandardV2_ZRS", StandardZRS = "Standard_ZRS" } @@ -2020,6 +2140,7 @@ export interface ObjectReplicationPoliciesOperations { export interface ObjectReplicationPolicy extends Resource { destinationAccount?: string; readonly enabledTime?: Date; + metrics?: ObjectReplicationPolicyPropertiesMetrics; readonly policyId?: string; rules?: ObjectReplicationPolicyRule[]; sourceAccount?: string; @@ -2031,6 +2152,11 @@ export interface ObjectReplicationPolicyFilter { prefixMatch?: string[]; } +// @public +export interface ObjectReplicationPolicyPropertiesMetrics { + enabled?: boolean; +} + // @public export interface ObjectReplicationPolicyRule { destinationContainer: string; diff --git a/sdk/storage/arm-storage/sample.env b/sdk/storage/arm-storage/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/storage/arm-storage/sample.env +++ b/sdk/storage/arm-storage/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersClearLegalHoldSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersClearLegalHoldSample.ts index b0e7ea7e03c5..4967342d931b 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersClearLegalHoldSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersClearLegalHoldSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LegalHold } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { LegalHold, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. * * @summary Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersClearLegalHold.json */ async function clearLegalHoldContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4303"; const accountName = "sto7280"; const containerName = "container8723"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts index 7820074e1a8b..486b5923c08f 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersCreateOrUpdateImmutabilityPolicySample.ts @@ -5,11 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { + +import { ImmutabilityPolicy, BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams, + StorageManagementClient, } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -17,10 +18,11 @@ import "dotenv/config"; * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicy.json */ async function createOrUpdateImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res1782"; const accountName = "sto7069"; const containerName = "container6397"; @@ -28,7 +30,8 @@ async function createOrUpdateImmutabilityPolicy(): Promise { allowProtectedAppendWrites: true, immutabilityPeriodSinceCreationInDays: 3, }; - const options: BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams = { parameters }; + const options: BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams = + { parameters }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = await client.blobContainers.createOrUpdateImmutabilityPolicy( @@ -44,10 +47,11 @@ async function createOrUpdateImmutabilityPolicy(): Promise { * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json */ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res1782"; const accountName = "sto7069"; const containerName = "container6397"; @@ -55,7 +59,8 @@ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll allowProtectedAppendWritesAll: true, immutabilityPeriodSinceCreationInDays: 3, }; - const options: BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams = { parameters }; + const options: BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams = + { parameters }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const result = await client.blobContainers.createOrUpdateImmutabilityPolicy( diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersCreateSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersCreateSample.ts index b8d56dec5575..1adf7016997e 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersCreateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobContainer } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { BlobContainer, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutDefaultEncryptionScope.json */ async function putContainerWithDefaultEncryptionScope(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; @@ -40,10 +41,11 @@ async function putContainerWithDefaultEncryptionScope(): Promise { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutObjectLevelWorm.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutObjectLevelWorm.json */ async function putContainerWithObjectLevelWorm(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; @@ -65,10 +67,11 @@ async function putContainerWithObjectLevelWorm(): Promise { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPut.json */ async function putContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersDeleteImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersDeleteImmutabilityPolicySample.ts index ac103cd0a2df..cf32102b99f5 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersDeleteImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersDeleteImmutabilityPolicySample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. * * @summary Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDeleteImmutabilityPolicy.json */ async function deleteImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res1581"; const accountName = "sto9621"; const containerName = "container4910"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersDeleteSample.ts index a8d6c03ad1de..204155ebc7b0 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Deletes specified container under its account. * * @summary Deletes specified container under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDelete.json */ async function deleteContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4079"; const accountName = "sto4506"; const containerName = "container9689"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.blobContainers.delete(resourceGroupName, accountName, containerName); + const result = await client.blobContainers.delete( + resourceGroupName, + accountName, + containerName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersExtendImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersExtendImmutabilityPolicySample.ts index 0d4b5cceef5c..a9dd437d00e2 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersExtendImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersExtendImmutabilityPolicySample.ts @@ -5,11 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { + +import { ImmutabilityPolicy, BlobContainersExtendImmutabilityPolicyOptionalParams, + StorageManagementClient, } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -17,10 +18,11 @@ import "dotenv/config"; * This sample demonstrates how to Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. * * @summary Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersExtendImmutabilityPolicy.json */ async function extendImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6238"; const accountName = "sto232"; const containerName = "container5023"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersGetImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersGetImmutabilityPolicySample.ts index 08be36b33a6d..e6169d5bf3cc 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersGetImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersGetImmutabilityPolicySample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the existing immutability policy along with the corresponding ETag in response headers and body. * * @summary Gets the existing immutability policy along with the corresponding ETag in response headers and body. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetImmutabilityPolicy.json */ async function getImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res5221"; const accountName = "sto9177"; const containerName = "container3489"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersGetSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersGetSample.ts index 048d2b99c2b1..08530e89e31f 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json */ async function getBlobContainersGetWithAllowProtectedAppendWritesAll(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; const accountName = "sto6217"; const containerName = "container1634"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.blobContainers.get(resourceGroupName, accountName, containerName); + const result = await client.blobContainers.get( + resourceGroupName, + accountName, + containerName, + ); console.log(result); } @@ -30,16 +36,21 @@ async function getBlobContainersGetWithAllowProtectedAppendWritesAll(): Promise< * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGet.json */ async function getContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; const accountName = "sto6217"; const containerName = "container1634"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.blobContainers.get(resourceGroupName, accountName, containerName); + const result = await client.blobContainers.get( + resourceGroupName, + accountName, + containerName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersLeaseSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersLeaseSample.ts index ca27ddcaec7e..c6da803cae60 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersLeaseSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersLeaseSample.ts @@ -5,8 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LeaseContainerRequest, BlobContainersLeaseOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + LeaseContainerRequest, + BlobContainersLeaseOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +18,11 @@ import "dotenv/config"; * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Acquire.json */ async function acquireALeaseOnAContainer(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; @@ -44,10 +49,11 @@ async function acquireALeaseOnAContainer(): Promise { * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Break.json */ async function breakALeaseOnAContainer(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersListSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersListSample.ts index 9dbaa53ae214..b4f7e0887ca7 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersListSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobContainersListOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + BlobContainersListOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,16 +17,20 @@ import "dotenv/config"; * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersList.json */ async function listContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.blobContainers.list(resourceGroupName, accountName)) { + for await (const item of client.blobContainers.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); @@ -33,10 +40,11 @@ async function listContainers(): Promise { * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedBlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedBlobContainersList.json */ async function listDeletedContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const include = "deleted"; @@ -44,7 +52,11 @@ async function listDeletedContainers(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.blobContainers.list(resourceGroupName, accountName, options)) { + for await (const item of client.blobContainers.list( + resourceGroupName, + accountName, + options, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersLockImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersLockImmutabilityPolicySample.ts index 8360aa3bbcdb..c353976df2cd 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersLockImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersLockImmutabilityPolicySample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. * * @summary Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLockImmutabilityPolicy.json */ async function lockImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res2702"; const accountName = "sto5009"; const containerName = "container1631"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersObjectLevelWormSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersObjectLevelWormSample.ts index e746e2232866..d92e27c22c68 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersObjectLevelWormSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersObjectLevelWormSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. * * @summary This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/ObjectLevelWormContainerMigration.json */ async function versionLevelWormContainerMigration(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res1782"; const accountName = "sto7069"; const containerName = "container6397"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersSetLegalHoldSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersSetLegalHoldSample.ts index e7d467b965f1..82ebc85e0883 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersSetLegalHoldSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersSetLegalHoldSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LegalHold } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { LegalHold, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHold.json */ async function setLegalHoldContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4303"; const accountName = "sto7280"; const containerName = "container8723"; @@ -37,10 +38,11 @@ async function setLegalHoldContainers(): Promise { * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json */ async function setLegalHoldContainersWithAllowProtectedAppendWritesAll(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4303"; const accountName = "sto7280"; const containerName = "container8723"; diff --git a/sdk/storage/arm-storage/samples-dev/blobContainersUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/blobContainersUpdateSample.ts index 92b2f5aa2435..04532774418f 100644 --- a/sdk/storage/arm-storage/samples-dev/blobContainersUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobContainersUpdateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobContainer } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { BlobContainer, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. * * @summary Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPatch.json */ async function updateContainers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const containerName = "container6185"; diff --git a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.ts index c3f5adada4dc..e9524b5b5860 100644 --- a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesCreateOrUpdateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobInventoryPolicy } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + BlobInventoryPolicy, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicy.json */ async function storageAccountSetBlobInventoryPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const blobInventoryPolicyName = "default"; @@ -96,10 +100,11 @@ async function storageAccountSetBlobInventoryPolicy(): Promise { * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const blobInventoryPolicyName = "default"; @@ -196,10 +201,11 @@ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForH * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const blobInventoryPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesDeleteSample.ts index 42947d1dc457..f88d1e9f3a25 100644 --- a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the blob inventory policy associated with the specified storage account. * * @summary Deletes the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteBlobInventoryPolicy.json */ async function storageAccountDeleteBlobInventoryPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const blobInventoryPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesGetSample.ts b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesGetSample.ts index fe99ca6b3e30..36d2746b19e0 100644 --- a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const blobInventoryPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesListSample.ts b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesListSample.ts index 39e390c94efd..ab2ff547ddf3 100644 --- a/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobInventoryPoliciesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,20 @@ import "dotenv/config"; * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.blobInventoryPolicies.list(resourceGroupName, accountName)) { + for await (const item of client.blobInventoryPolicies.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/blobServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/blobServicesGetServicePropertiesSample.ts index f994d04c4079..81295412fd53 100644 --- a/sdk/storage/arm-storage/samples-dev/blobServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobServicesGetServicePropertiesSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesGet.json */ async function getBlobServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.blobServices.getServiceProperties(resourceGroupName, accountName); + const result = await client.blobServices.getServiceProperties( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/blobServicesListSample.ts b/sdk/storage/arm-storage/samples-dev/blobServicesListSample.ts index 6b81f68b67db..d938f4acf863 100644 --- a/sdk/storage/arm-storage/samples-dev/blobServicesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobServicesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,20 @@ import "dotenv/config"; * This sample demonstrates how to List blob services of storage account. It returns a collection of one object named default. * * @summary List blob services of storage account. It returns a collection of one object named default. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesList.json */ async function listBlobServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.blobServices.list(resourceGroupName, accountName)) { + for await (const item of client.blobServices.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/blobServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/blobServicesSetServicePropertiesSample.ts index 769ae7d4c34c..fde1c0b0e59a 100644 --- a/sdk/storage/arm-storage/samples-dev/blobServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/blobServicesSetServicePropertiesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobServiceProperties } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + BlobServiceProperties, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutAllowPermanentDelete.json */ async function blobServicesPutAllowPermanentDelete(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: BlobServiceProperties = { @@ -42,10 +46,11 @@ async function blobServicesPutAllowPermanentDelete(): Promise { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json */ async function blobServicesPutLastAccessTimeBasedTracking(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: BlobServiceProperties = { @@ -70,10 +75,11 @@ async function blobServicesPutLastAccessTimeBasedTracking(): Promise { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPut.json */ async function putBlobServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: BlobServiceProperties = { @@ -81,7 +87,11 @@ async function putBlobServices(): Promise { cors: { corsRules: [ { - allowedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], allowedMethods: ["GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT"], allowedOrigins: ["http://www.contoso.com", "http://www.fabrikam.com"], exposedHeaders: ["x-ms-meta-*"], @@ -97,8 +107,15 @@ async function putBlobServices(): Promise { { allowedHeaders: ["x-ms-meta-12345675754564*"], allowedMethods: ["GET", "PUT"], - allowedOrigins: ["http://www.abc23.com", "https://www.fabrikam.com/*"], - exposedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x -ms-meta-target*"], + allowedOrigins: [ + "http://www.abc23.com", + "https://www.fabrikam.com/*", + ], + exposedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*", + ], maxAgeInSeconds: 2000, }, ], diff --git a/sdk/storage/arm-storage/samples-dev/deletedAccountsGetSample.ts b/sdk/storage/arm-storage/samples-dev/deletedAccountsGetSample.ts index ae9ef96d52ff..bf8fd59f2988 100644 --- a/sdk/storage/arm-storage/samples-dev/deletedAccountsGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/deletedAccountsGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Get properties of specified deleted account resource. * * @summary Get properties of specified deleted account resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountGet.json */ async function deletedAccountGet(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const deletedAccountName = "sto1125"; const location = "eastus"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/deletedAccountsListSample.ts b/sdk/storage/arm-storage/samples-dev/deletedAccountsListSample.ts index a7c7f7422a25..485f34a3ef33 100644 --- a/sdk/storage/arm-storage/samples-dev/deletedAccountsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/deletedAccountsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Lists deleted accounts under the subscription. * * @summary Lists deleted accounts under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountList.json */ async function deletedAccountList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/storage/arm-storage/samples-dev/encryptionScopesGetSample.ts b/sdk/storage/arm-storage/samples-dev/encryptionScopesGetSample.ts index ddbc56b9cc3a..82cc83a8ed3c 100644 --- a/sdk/storage/arm-storage/samples-dev/encryptionScopesGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/encryptionScopesGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,13 @@ import "dotenv/config"; * This sample demonstrates how to Returns the properties for the specified encryption scope. * * @summary Returns the properties for the specified encryption scope. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetEncryptionScope.json */ async function storageAccountGetEncryptionScope(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const encryptionScopeName = "{encryption-scope-name}"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/encryptionScopesListSample.ts b/sdk/storage/arm-storage/samples-dev/encryptionScopesListSample.ts index 93da6e8059d7..f0e9308b9aa0 100644 --- a/sdk/storage/arm-storage/samples-dev/encryptionScopesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/encryptionScopesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the encryption scopes available under the specified storage account. * * @summary Lists all the encryption scopes available under the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEncryptionScopeList.json */ async function storageAccountEncryptionScopeList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.encryptionScopes.list(resourceGroupName, accountName)) { + for await (const item of client.encryptionScopes.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/encryptionScopesPatchSample.ts b/sdk/storage/arm-storage/samples-dev/encryptionScopesPatchSample.ts index 2d5177adffcb..bcecdf13df51 100644 --- a/sdk/storage/arm-storage/samples-dev/encryptionScopesPatchSample.ts +++ b/sdk/storage/arm-storage/samples-dev/encryptionScopesPatchSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { EncryptionScope } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { EncryptionScope, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,16 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. * * @summary Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPatchEncryptionScope.json */ async function storageAccountPatchEncryptionScope(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const encryptionScopeName = "{encryption-scope-name}"; const encryptionScope: EncryptionScope = { keyVaultProperties: { - keyUri: "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + keyUri: + "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", }, source: "Microsoft.KeyVault", }; diff --git a/sdk/storage/arm-storage/samples-dev/encryptionScopesPutSample.ts b/sdk/storage/arm-storage/samples-dev/encryptionScopesPutSample.ts index 1f3cb02556f8..600badcdd566 100644 --- a/sdk/storage/arm-storage/samples-dev/encryptionScopesPutSample.ts +++ b/sdk/storage/arm-storage/samples-dev/encryptionScopesPutSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { EncryptionScope } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { EncryptionScope, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,11 +14,13 @@ import "dotenv/config"; * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScope.json */ async function storageAccountPutEncryptionScope(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const encryptionScopeName = "{encryption-scope-name}"; const encryptionScope: EncryptionScope = {}; @@ -37,11 +39,13 @@ async function storageAccountPutEncryptionScope(): Promise { * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json */ async function storageAccountPutEncryptionScopeWithInfrastructureEncryption(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const encryptionScopeName = "{encryption-scope-name}"; const encryptionScope: EncryptionScope = { diff --git a/sdk/storage/arm-storage/samples-dev/fileServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/fileServicesGetServicePropertiesSample.ts index e70448633301..c5d8cf5b8480 100644 --- a/sdk/storage/arm-storage/samples-dev/fileServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileServicesGetServicePropertiesSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGet.json */ async function getFileServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileServices.getServiceProperties(resourceGroupName, accountName); + const result = await client.fileServices.getServiceProperties( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/fileServicesGetServiceUsageSample.ts b/sdk/storage/arm-storage/samples-dev/fileServicesGetServiceUsageSample.ts new file mode 100644 index 000000000000..efc19f8ff3aa --- /dev/null +++ b/sdk/storage/arm-storage/samples-dev/fileServicesGetServiceUsageSample.ts @@ -0,0 +1,38 @@ +/* + * 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 { StorageManagementClient } from "@azure/arm-storage"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * + * @summary Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGetUsage.json + */ +async function getFileServiceUsage(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileServices.getServiceUsage( + resourceGroupName, + accountName, + ); + console.log(result); +} + +async function main(): Promise { + await getFileServiceUsage(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples-dev/fileServicesListSample.ts b/sdk/storage/arm-storage/samples-dev/fileServicesListSample.ts index 8376b6e4379d..06a8af3ed5a9 100644 --- a/sdk/storage/arm-storage/samples-dev/fileServicesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileServicesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to List all file services in storage accounts * * @summary List all file services in storage accounts - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesList.json */ async function listFileServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/fileServicesListServiceUsagesSample.ts b/sdk/storage/arm-storage/samples-dev/fileServicesListServiceUsagesSample.ts new file mode 100644 index 000000000000..6395a31b62c9 --- /dev/null +++ b/sdk/storage/arm-storage/samples-dev/fileServicesListServiceUsagesSample.ts @@ -0,0 +1,41 @@ +/* + * 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 { StorageManagementClient } from "@azure/arm-storage"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the usages of file service in storage account. + * + * @summary Gets the usages of file service in storage account. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesListUsages.json + */ +async function listFileServiceUsages(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileServices.listServiceUsages( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main(): Promise { + await listFileServiceUsages(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples-dev/fileServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/fileServicesSetServicePropertiesSample.ts index 63c515de07d0..5179abc28cad 100644 --- a/sdk/storage/arm-storage/samples-dev/fileServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileServicesSetServicePropertiesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { FileServiceProperties } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + FileServiceProperties, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +17,22 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut.json */ async function putFileServices(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: FileServiceProperties = { cors: { corsRules: [ { - allowedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], allowedMethods: ["GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT"], allowedOrigins: ["http://www.contoso.com", "http://www.fabrikam.com"], exposedHeaders: ["x-ms-meta-*"], @@ -40,8 +48,15 @@ async function putFileServices(): Promise { { allowedHeaders: ["x-ms-meta-12345675754564*"], allowedMethods: ["GET", "PUT"], - allowedOrigins: ["http://www.abc23.com", "https://www.fabrikam.com/*"], - exposedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedOrigins: [ + "http://www.abc23.com", + "https://www.fabrikam.com/*", + ], + exposedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], maxAgeInSeconds: 2000, }, ], @@ -61,10 +76,11 @@ async function putFileServices(): Promise { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSMBMultichannel.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSMBMultichannel.json */ async function putFileServicesEnableSmbMultichannel(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: FileServiceProperties = { @@ -84,10 +100,11 @@ async function putFileServicesEnableSmbMultichannel(): Promise { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSecureSmbFeatures.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSecureSmbFeatures.json */ async function putFileServicesEnableSecureSmbFeatures(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: FileServiceProperties = { diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesCreateSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesCreateSample.ts index 4aadcfd5463b..165fb4d593cd 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesCreateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { FileShare } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { FileShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * 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/2023-05-01/examples/FileSharesPut_NFS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json */ async function createNfsShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; const accountName = "sto666"; const shareName = "share1235"; @@ -37,10 +38,11 @@ async function createNfsShares(): Promise { * 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/2023-05-01/examples/FileSharesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json */ async function putShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share6185"; @@ -60,10 +62,11 @@ async function putShares(): Promise { * 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/2023-05-01/examples/FileSharesPut_AccessTier.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json */ async function putSharesWithAccessTier(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; const accountName = "sto666"; const shareName = "share1235"; @@ -79,10 +82,70 @@ async function putSharesWithAccessTier(): Promise { console.log(result); } +/** + * 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/2024-01-01/examples/FileSharesPut_PaidBursting.json + */ +async function putSharesWithPaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare: FileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesPut_ProvisionedV2.json + */ +async function putSharesProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare: FileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + async function main(): Promise { await createNfsShares(); await putShares(); await putSharesWithAccessTier(); + await putSharesWithPaidBursting(); + await putSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesDeleteSample.ts index a14d84c91c21..5d4bb049f60e 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Deletes specified share under its account. * * @summary Deletes specified share under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesDelete.json */ async function deleteShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4079"; const accountName = "sto4506"; const shareName = "share9689"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileShares.delete(resourceGroupName, accountName, shareName); + const result = await client.fileShares.delete( + resourceGroupName, + accountName, + shareName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesGetSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesGetSample.ts index 775a47576dde..34edecd688bb 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesGetSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { FileSharesGetOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + FileSharesGetOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,55 @@ import "dotenv/config"; * 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/2023-05-01/examples/FileSharesGet_Stats.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet_PaidBursting.json + */ +async function getSharePaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_ProvisionedV2.json + */ +async function getShareProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_Stats.json */ async function getShareStats(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; const accountName = "sto6217"; const shareName = "share1634"; @@ -25,7 +73,12 @@ async function getShareStats(): Promise { const options: FileSharesGetOptionalParams = { expand }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileShares.get(resourceGroupName, accountName, shareName, options); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + options, + ); console.log(result); } @@ -33,20 +86,27 @@ async function getShareStats(): Promise { * 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/2023-05-01/examples/FileSharesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet.json */ async function getShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; const accountName = "sto6217"; const shareName = "share1634"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileShares.get(resourceGroupName, accountName, shareName); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + ); console.log(result); } async function main(): Promise { + await getSharePaidBursting(); + await getShareProvisionedV2(); await getShareStats(); await getShares(); } diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesLeaseSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesLeaseSample.ts index 9cf2b9c1f77d..1c7fdfa772f3 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesLeaseSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesLeaseSample.ts @@ -5,8 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LeaseShareRequest, FileSharesLeaseOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + LeaseShareRequest, + FileSharesLeaseOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +18,11 @@ import "dotenv/config"; * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Acquire.json */ async function acquireALeaseOnAShare(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share124"; @@ -31,7 +36,12 @@ async function acquireALeaseOnAShare(): Promise { const options: FileSharesLeaseOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileShares.lease(resourceGroupName, accountName, shareName, options); + const result = await client.fileShares.lease( + resourceGroupName, + accountName, + shareName, + options, + ); console.log(result); } @@ -39,10 +49,11 @@ async function acquireALeaseOnAShare(): Promise { * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Break.json */ async function breakALeaseOnAShare(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share12"; @@ -56,7 +67,12 @@ async function breakALeaseOnAShare(): Promise { const options: FileSharesLeaseOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.fileShares.lease(resourceGroupName, accountName, shareName, options); + const result = await client.fileShares.lease( + resourceGroupName, + accountName, + shareName, + options, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesListSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesListSample.ts index 661c27017a09..0a321872d29f 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesListSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { FileSharesListOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + FileSharesListOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedFileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedFileSharesList.json */ async function listDeletedShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const expand = "deleted"; @@ -25,7 +29,11 @@ async function listDeletedShares(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.fileShares.list(resourceGroupName, accountName, options)) { + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + options, + )) { resArray.push(item); } console.log(resArray); @@ -35,10 +43,11 @@ async function listDeletedShares(): Promise { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareSnapshotsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareSnapshotsList.json */ async function listShareSnapshots(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const expand = "snapshots"; @@ -46,7 +55,11 @@ async function listShareSnapshots(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.fileShares.list(resourceGroupName, accountName, options)) { + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + options, + )) { resArray.push(item); } console.log(resArray); @@ -56,16 +69,66 @@ async function listShareSnapshots(): Promise { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList.json */ async function listShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_PaidBursting.json + */ +async function listSharesPaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_ProvisionedV2.json + */ +async function listSharesProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.fileShares.list(resourceGroupName, accountName)) { + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); @@ -75,6 +138,8 @@ async function main(): Promise { await listDeletedShares(); await listShareSnapshots(); await listShares(); + await listSharesPaidBursting(); + await listSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesRestoreSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesRestoreSample.ts index 658d938183da..591004933d38 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesRestoreSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesRestoreSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { DeletedShare } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { DeletedShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Restore a file share within a valid retention days if share soft delete is enabled * * @summary Restore a file share within a valid retention days if share soft delete is enabled - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesRestore.json */ async function restoreShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share1249"; diff --git a/sdk/storage/arm-storage/samples-dev/fileSharesUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/fileSharesUpdateSample.ts index 95a8ced30f5c..72c9aab95ffc 100644 --- a/sdk/storage/arm-storage/samples-dev/fileSharesUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/fileSharesUpdateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { FileShare } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { FileShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareAclsPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareAclsPatch.json */ async function updateShareAcls(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share6185"; @@ -48,10 +49,69 @@ async function updateShareAcls(): Promise { * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_PaidBursting.json + */ +async function updateSharePaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare: FileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_ProvisionedV2.json + */ +async function updateShareProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare: FileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch.json */ async function updateShares(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const shareName = "share6185"; @@ -69,6 +129,8 @@ async function updateShares(): Promise { async function main(): Promise { await updateShareAcls(); + await updateSharePaidBursting(); + await updateShareProvisionedV2(); await updateShares(); } diff --git a/sdk/storage/arm-storage/samples-dev/localUsersCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersCreateOrUpdateSample.ts index 98ca1b785ac9..1b4466cf0532 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersCreateOrUpdateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LocalUser } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { LocalUser, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreate.json */ async function createLocalUser(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; @@ -30,7 +31,9 @@ async function createLocalUser(): Promise { { permissions: "rwd", resourceName: "share1", service: "file" }, { permissions: "rw", resourceName: "share2", service: "file" }, ], - sshAuthorizedKeys: [{ description: "key name", key: "ssh-rsa keykeykeykeykey=" }], + sshAuthorizedKeys: [ + { description: "key name", key: "ssh-rsa keykeykeykeykey=" }, + ], }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); @@ -47,10 +50,11 @@ async function createLocalUser(): Promise { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreateNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreateNFSv3Enabled.json */ async function createNfSv3EnabledLocalUser(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; @@ -73,10 +77,11 @@ async function createNfSv3EnabledLocalUser(): Promise { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserUpdate.json */ async function updateLocalUser(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; diff --git a/sdk/storage/arm-storage/samples-dev/localUsersDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersDeleteSample.ts index 389af3ba8c14..425a895de45c 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the local user associated with the specified storage account. * * @summary Deletes the local user associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserDelete.json */ async function deleteLocalUser(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.localUsersOperations.delete(resourceGroupName, accountName, username); + const result = await client.localUsersOperations.delete( + resourceGroupName, + accountName, + username, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/localUsersGetSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersGetSample.ts index ef4c57663d9d..f05ce258095e 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Get the local user of the storage account by username. * * @summary Get the local user of the storage account by username. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserGet.json */ async function getLocalUser(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.localUsersOperations.get(resourceGroupName, accountName, username); + const result = await client.localUsersOperations.get( + resourceGroupName, + accountName, + username, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/localUsersListKeysSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersListKeysSample.ts index 6b9a9366a2f0..028638e3c3aa 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersListKeysSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersListKeysSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to List SSH authorized keys and shared key of the local user. * * @summary List SSH authorized keys and shared key of the local user. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserListKeys.json */ async function listLocalUserKeys(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; diff --git a/sdk/storage/arm-storage/samples-dev/localUsersListSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersListSample.ts index 1fca19c229b1..d5b926546e53 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersListSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { LocalUsersListOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + LocalUsersListOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,16 +17,20 @@ import "dotenv/config"; * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersList.json */ async function listLocalUsers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.localUsersOperations.list(resourceGroupName, accountName)) { + for await (const item of client.localUsersOperations.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); @@ -33,10 +40,11 @@ async function listLocalUsers(): Promise { * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersListNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersListNFSv3Enabled.json */ async function listNfSv3EnabledLocalUsers(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const include = "nfsv3"; diff --git a/sdk/storage/arm-storage/samples-dev/localUsersRegeneratePasswordSample.ts b/sdk/storage/arm-storage/samples-dev/localUsersRegeneratePasswordSample.ts index 4193c2abdde7..5ba03b48b0e5 100644 --- a/sdk/storage/arm-storage/samples-dev/localUsersRegeneratePasswordSample.ts +++ b/sdk/storage/arm-storage/samples-dev/localUsersRegeneratePasswordSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Regenerate the local user SSH password. * * @summary Regenerate the local user SSH password. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserRegeneratePassword.json */ async function regenerateLocalUserPassword(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const username = "user1"; diff --git a/sdk/storage/arm-storage/samples-dev/managementPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/managementPoliciesCreateOrUpdateSample.ts index d581443bb320..6267d933b30b 100644 --- a/sdk/storage/arm-storage/samples-dev/managementPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/managementPoliciesCreateOrUpdateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { ManagementPolicy } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { ManagementPolicy, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy.json */ async function storageAccountSetManagementPolicies(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -83,10 +84,11 @@ async function storageAccountSetManagementPolicies(): Promise { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyColdTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyColdTierActions.json */ async function storageAccountSetManagementPolicyColdTierActions(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -138,10 +140,11 @@ async function storageAccountSetManagementPolicyColdTierActions(): Promise * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json */ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -182,10 +185,11 @@ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs(): Promis * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyHotTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyHotTierActions.json */ async function storageAccountSetManagementPolicyHotTierActions(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -226,10 +230,11 @@ async function storageAccountSetManagementPolicyHotTierActions(): Promise * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json */ async function storageAccountSetManagementPolicyWithSnapshotAndVersion(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -282,10 +287,11 @@ async function storageAccountSetManagementPolicyWithSnapshotAndVersion(): Promis * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json */ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -328,10 +334,11 @@ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json */ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; @@ -376,10 +383,11 @@ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json */ async function storageAccountSetManagementPolicyLastTierChangeTimeActions(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const managementPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/managementPoliciesDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/managementPoliciesDeleteSample.ts index 636fe56ec1c1..d9de0042d754 100644 --- a/sdk/storage/arm-storage/samples-dev/managementPoliciesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/managementPoliciesDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the managementpolicy associated with the specified storage account. * * @summary Deletes the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteManagementPolicy.json */ async function storageAccountDeleteManagementPolicies(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const managementPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/managementPoliciesGetSample.ts b/sdk/storage/arm-storage/samples-dev/managementPoliciesGetSample.ts index c97c7da94aeb..51290952f60c 100644 --- a/sdk/storage/arm-storage/samples-dev/managementPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/managementPoliciesGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the managementpolicy associated with the specified storage account. * * @summary Gets the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetManagementPolicy.json */ async function storageAccountGetManagementPolicies(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const managementPolicyName = "default"; diff --git a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts index 57647945daf7..978fe8b8d09a 100644 --- a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Gets effective NetworkSecurityPerimeterConfiguration for association * * @summary Gets effective NetworkSecurityPerimeterConfiguration for association - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationGet.json */ async function networkSecurityPerimeterConfigurationGet(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const networkSecurityPerimeterConfigurationName = diff --git a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts index f742aec33f7d..e17ae822c5c0 100644 --- a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Gets list of effective NetworkSecurityPerimeterConfiguration for storage account * * @summary Gets list of effective NetworkSecurityPerimeterConfiguration for storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationList.json */ async function networkSecurityPerimeterConfigurationList(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts index 38879f146d65..87320811beb6 100644 --- a/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/storage/arm-storage/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,22 +14,24 @@ import "dotenv/config"; * This sample demonstrates how to Refreshes any information about the association. * * @summary Refreshes any information about the association. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json */ async function networkSecurityPerimeterConfigurationReconcile(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const networkSecurityPerimeterConfigurationName = "dbedb4e0-40e6-4145-81f3-f1314c150774.resourceAssociation1"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( - resourceGroupName, - accountName, - networkSecurityPerimeterConfigurationName, - ); + const result = + await client.networkSecurityPerimeterConfigurations.beginReconcileAndWait( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.ts index bbd136ba337c..c7aa731b31b2 100644 --- a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesCreateOrUpdateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { ObjectReplicationPolicy } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + ObjectReplicationPolicy, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,15 +17,17 @@ import "dotenv/config"; * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json */ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "dst112"; const objectReplicationPolicyId = "default"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -34,12 +39,13 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promi }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.objectReplicationPoliciesOperations.createOrUpdate( - resourceGroupName, - accountName, - objectReplicationPolicyId, - properties, - ); + const result = + await client.objectReplicationPoliciesOperations.createOrUpdate( + resourceGroupName, + accountName, + objectReplicationPolicyId, + properties, + ); console.log(result); } @@ -47,15 +53,17 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promi * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json */ async function storageAccountCreateObjectReplicationPolicyOnSource(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "src1122"; const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -71,12 +79,13 @@ async function storageAccountCreateObjectReplicationPolicyOnSource(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "dst112"; const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -106,12 +117,13 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination(): Promi }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.objectReplicationPoliciesOperations.createOrUpdate( - resourceGroupName, - accountName, - objectReplicationPolicyId, - properties, - ); + const result = + await client.objectReplicationPoliciesOperations.createOrUpdate( + resourceGroupName, + accountName, + objectReplicationPolicyId, + properties, + ); console.log(result); } @@ -119,15 +131,17 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination(): Promi * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json */ async function storageAccountUpdateObjectReplicationPolicyOnSource(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "src1122"; const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -145,12 +159,13 @@ async function storageAccountUpdateObjectReplicationPolicyOnSource(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const objectReplicationPolicyId = "{objectReplicationPolicy-Id}"; diff --git a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesGetSample.ts b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesGetSample.ts index 46dec956c676..625b7da24f92 100644 --- a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Get the object replication policy of the storage account by policy ID. * * @summary Get the object replication policy of the storage account by policy ID. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetObjectReplicationPolicy.json */ async function storageAccountGetObjectReplicationPolicies(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const objectReplicationPolicyId = "{objectReplicationPolicy-Id}"; diff --git a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesListSample.ts b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesListSample.ts index a7f0d4f1610e..8a54edaf75ea 100644 --- a/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/objectReplicationPoliciesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to List the object replication policies associated with the storage account. * * @summary List the object replication policies associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListObjectReplicationPolicies.json */ async function storageAccountListObjectReplicationPolicies(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/operationsListSample.ts b/sdk/storage/arm-storage/samples-dev/operationsListSample.ts index 4d010540a16d..54a58df14467 100644 --- a/sdk/storage/arm-storage/samples-dev/operationsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/operationsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Lists all of the available Storage Rest API operations. * * @summary Lists all of the available Storage Rest API operations. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/OperationsList.json */ async function operationsList(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsDeleteSample.ts index 01ab5759190f..3feb417baf3c 100644 --- a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the specified private endpoint connection associated with the storage account. * * @summary Deletes the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeletePrivateEndpointConnection.json */ async function storageAccountDeletePrivateEndpointConnection(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const privateEndpointConnectionName = "{privateEndpointConnectionName}"; diff --git a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsGetSample.ts index 07bf1bda7c74..904958f4e75d 100644 --- a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the specified private endpoint connection associated with the storage account. * * @summary Gets the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPrivateEndpointConnection.json */ async function storageAccountGetPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const privateEndpointConnectionName = "{privateEndpointConnectionName}"; diff --git a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsListSample.ts index 786ed678066b..36460f987dcb 100644 --- a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,20 @@ import "dotenv/config"; * This sample demonstrates how to List all the private endpoint connections associated with the storage account. * * @summary List all the private endpoint connections associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateEndpointConnections.json */ async function storageAccountListPrivateEndpointConnections(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateEndpointConnections.list(resourceGroupName, accountName)) { + for await (const item of client.privateEndpointConnections.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsPutSample.ts b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsPutSample.ts index 96c3f5ef40dd..d3525d919de1 100644 --- a/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsPutSample.ts +++ b/sdk/storage/arm-storage/samples-dev/privateEndpointConnectionsPutSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { PrivateEndpointConnection } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + PrivateEndpointConnection, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Update the state of specified private endpoint connection associated with the storage account. * * @summary Update the state of specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutPrivateEndpointConnection.json */ async function storageAccountPutPrivateEndpointConnection(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7687"; const accountName = "sto9699"; const privateEndpointConnectionName = "{privateEndpointConnectionName}"; diff --git a/sdk/storage/arm-storage/samples-dev/privateLinkResourcesListByStorageAccountSample.ts b/sdk/storage/arm-storage/samples-dev/privateLinkResourcesListByStorageAccountSample.ts index ad932a05c92a..d53ee1354272 100644 --- a/sdk/storage/arm-storage/samples-dev/privateLinkResourcesListByStorageAccountSample.ts +++ b/sdk/storage/arm-storage/samples-dev/privateLinkResourcesListByStorageAccountSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the private link resources that need to be created for a storage account. * * @summary Gets the private link resources that need to be created for a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateLinkResources.json */ async function storageAccountListPrivateLinkResources(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6977"; const accountName = "sto2527"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/queueCreateSample.ts b/sdk/storage/arm-storage/samples-dev/queueCreateSample.ts index 0d69a3aab613..c4ef401735b5 100644 --- a/sdk/storage/arm-storage/samples-dev/queueCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueCreateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageQueue } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { StorageQueue, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +14,23 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPut.json */ async function queueOperationPut(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const queueName = "queue6185"; const queue: StorageQueue = {}; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queue.create(resourceGroupName, accountName, queueName, queue); + const result = await client.queue.create( + resourceGroupName, + accountName, + queueName, + queue, + ); console.log(result); } @@ -32,10 +38,11 @@ async function queueOperationPut(): Promise { * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPutWithMetadata.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPutWithMetadata.json */ async function queueOperationPutWithMetadata(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const queueName = "queue6185"; @@ -44,7 +51,12 @@ async function queueOperationPutWithMetadata(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queue.create(resourceGroupName, accountName, queueName, queue); + const result = await client.queue.create( + resourceGroupName, + accountName, + queueName, + queue, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/queueDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/queueDeleteSample.ts index ddb0fcfa7ae8..1f8f1eb19970 100644 --- a/sdk/storage/arm-storage/samples-dev/queueDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the queue with the specified queue name, under the specified account if it exists. * * @summary Deletes the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationDelete.json */ async function queueOperationDelete(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const queueName = "queue6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queue.delete(resourceGroupName, accountName, queueName); + const result = await client.queue.delete( + resourceGroupName, + accountName, + queueName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/queueGetSample.ts b/sdk/storage/arm-storage/samples-dev/queueGetSample.ts index 56e6528cb39b..8400d546b9c1 100644 --- a/sdk/storage/arm-storage/samples-dev/queueGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Gets the queue with the specified queue name, under the specified account if it exists. * * @summary Gets the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationGet.json */ async function queueOperationGet(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const queueName = "queue6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queue.get(resourceGroupName, accountName, queueName); + const result = await client.queue.get( + resourceGroupName, + accountName, + queueName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/queueListSample.ts b/sdk/storage/arm-storage/samples-dev/queueListSample.ts index 601071bb98ef..94fab086d7f3 100644 --- a/sdk/storage/arm-storage/samples-dev/queueListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets a list of all the queues under the specified storage account * * @summary Gets a list of all the queues under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationList.json */ async function queueOperationList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto328"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/queueServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/queueServicesGetServicePropertiesSample.ts index daf189648b14..a810d900359f 100644 --- a/sdk/storage/arm-storage/samples-dev/queueServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueServicesGetServicePropertiesSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesGet.json */ async function queueServicesGet(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queueServices.getServiceProperties(resourceGroupName, accountName); + const result = await client.queueServices.getServiceProperties( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/queueServicesListSample.ts b/sdk/storage/arm-storage/samples-dev/queueServicesListSample.ts index 69f41a6fa334..8e8a7de4adcf 100644 --- a/sdk/storage/arm-storage/samples-dev/queueServicesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueServicesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to List all queue services for the storage account * * @summary List all queue services for the storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesList.json */ async function queueServicesList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queueServices.list(resourceGroupName, accountName); + const result = await client.queueServices.list( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/queueServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/queueServicesSetServicePropertiesSample.ts index 0570379d94af..8e39566d3fd9 100644 --- a/sdk/storage/arm-storage/samples-dev/queueServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueServicesSetServicePropertiesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { QueueServiceProperties } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + QueueServiceProperties, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +17,22 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesPut.json */ async function queueServicesPut(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: QueueServiceProperties = { cors: { corsRules: [ { - allowedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], allowedMethods: ["GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT"], allowedOrigins: ["http://www.contoso.com", "http://www.fabrikam.com"], exposedHeaders: ["x-ms-meta-*"], @@ -40,8 +48,15 @@ async function queueServicesPut(): Promise { { allowedHeaders: ["x-ms-meta-12345675754564*"], allowedMethods: ["GET", "PUT"], - allowedOrigins: ["http://www.abc23.com", "https://www.fabrikam.com/*"], - exposedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedOrigins: [ + "http://www.abc23.com", + "https://www.fabrikam.com/*", + ], + exposedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], maxAgeInSeconds: 2000, }, ], diff --git a/sdk/storage/arm-storage/samples-dev/queueUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/queueUpdateSample.ts index 6cbf9df5440a..0c147cf4559d 100644 --- a/sdk/storage/arm-storage/samples-dev/queueUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/queueUpdateSample.ts @@ -5,8 +5,8 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageQueue } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { StorageQueue, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +14,23 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPatch.json */ async function queueOperationPatch(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const queueName = "queue6185"; const queue: StorageQueue = {}; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.queue.update(resourceGroupName, accountName, queueName, queue); + const result = await client.queue.update( + resourceGroupName, + accountName, + queueName, + queue, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/skusListSample.ts b/sdk/storage/arm-storage/samples-dev/skusListSample.ts index 846326f4a1cd..c894ee882503 100644 --- a/sdk/storage/arm-storage/samples-dev/skusListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/skusListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Lists the available SKUs supported by Microsoft.Storage for given subscription. * * @summary Lists the available SKUs supported by Microsoft.Storage for given subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/SKUList.json */ async function skuList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts index 8241457e8b64..3fc303bbc6c3 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,18 +14,20 @@ import "dotenv/config"; * This sample demonstrates how to Abort live Migration of storage account to enable Hns * * @summary Abort live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json */ async function storageAccountAbortHierarchicalNamespaceMigration(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto2434"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.beginAbortHierarchicalNamespaceMigrationAndWait( - resourceGroupName, - accountName, - ); + const result = + await client.storageAccounts.beginAbortHierarchicalNamespaceMigrationAndWait( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsCheckNameAvailabilitySample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsCheckNameAvailabilitySample.ts index 3aec03cbb5fd..7771a100c45a 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsCheckNameAvailabilitySample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsCheckNameAvailabilitySample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountCheckNameAvailabilityParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountCheckNameAvailabilityParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +17,19 @@ import "dotenv/config"; * This sample demonstrates how to Checks that the storage account name is valid and is not already in use. * * @summary Checks that the storage account name is valid and is not already in use. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCheckNameAvailability.json */ async function storageAccountCheckNameAvailability(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const accountName: StorageAccountCheckNameAvailabilityParameters = { name: "sto3363", type: "Microsoft.Storage/storageAccounts", }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.checkNameAvailability(accountName); + const result = + await client.storageAccounts.checkNameAvailability(accountName); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsCreateSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsCreateSample.ts index 1c18204bf4b2..466c7be8121b 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsCreateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountCreateParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountCreateParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NfsV3AccountCreate.json */ async function nfsV3AccountCreate(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -54,10 +58,11 @@ async function nfsV3AccountCreate(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreate.json */ async function storageAccountCreate(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -102,10 +107,11 @@ async function storageAccountCreate(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json */ async function storageAccountCreateAllowedCopyScopeToAad(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -148,10 +154,11 @@ async function storageAccountCreateAllowedCopyScopeToAad(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json */ async function storageAccountCreateAllowedCopyScopeToPrivateLink(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -194,10 +201,11 @@ async function storageAccountCreateAllowedCopyScopeToPrivateLink(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -241,10 +249,11 @@ async function storageAccountCreateDisallowPublicNetworkAccess(): Promise * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json */ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -290,10 +299,11 @@ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -339,10 +349,11 @@ async function storageAccountCreateDnsEndpointTypeToStandard(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json */ async function storageAccountCreateEnablePublicNetworkAccess(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -386,10 +397,11 @@ async function storageAccountCreateEnablePublicNetworkAccess(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json */ async function storageAccountCreatePremiumBlockBlobStorage(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -422,10 +434,11 @@ async function storageAccountCreatePremiumBlockBlobStorage(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { @@ -470,16 +483,19 @@ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk(): Prom * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res131918"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "res131918"; const accountName = "sto131918"; const parameters: StorageAccountCreateParameters = { encryption: { encryptionIdentity: { - encryptionFederatedIdentityClientId: "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + encryptionFederatedIdentityClientId: + "f83c6b1b-4d34-47e4-bb34-9d83df58b540", encryptionUserAssignedIdentity: "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}", }, @@ -519,10 +535,11 @@ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateWithImmutabilityPolicy.json */ async function storageAccountCreateWithImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountCreateParameters = { diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsCustomerInitiatedMigrationSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsCustomerInitiatedMigrationSample.ts index 4fb1338b5f5c..c30b3844f0a5 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsCustomerInitiatedMigrationSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsCustomerInitiatedMigrationSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountMigration } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountMigration, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,20 +17,23 @@ import "dotenv/config"; * This sample demonstrates how to Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. * * @summary Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPostMigration.json */ async function storageAccountPostMigration(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const parameters: StorageAccountMigration = { targetSkuName: "Standard_ZRS" }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.beginCustomerInitiatedMigrationAndWait( - resourceGroupName, - accountName, - parameters, - ); + const result = + await client.storageAccounts.beginCustomerInitiatedMigrationAndWait( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsDeleteSample.ts index 691176fea8aa..e869c4f05b83 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Deletes a storage account in Microsoft Azure. * * @summary Deletes a storage account in Microsoft Azure. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDelete.json */ async function storageAccountDelete(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto2434"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.delete(resourceGroupName, accountName); + const result = await client.storageAccounts.delete( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsFailoverSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsFailoverSample.ts index 3499fd35cc42..015e080b2c8f 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsFailoverSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsFailoverSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailover.json */ async function storageAccountFailover(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto2434"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.beginFailoverAndWait(resourceGroupName, accountName); + const result = await client.storageAccounts.beginFailoverAndWait( + resourceGroupName, + accountName, + ); console.log(result); } @@ -29,15 +34,19 @@ async function storageAccountFailover(): Promise { * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailoverPlanned.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailoverPlanned.json */ async function storageAccountFailoverPlanned(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto2434"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.beginFailoverAndWait(resourceGroupName, accountName); + const result = await client.storageAccounts.beginFailoverAndWait( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsGetCustomerInitiatedMigrationSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsGetCustomerInitiatedMigrationSample.ts index 806001026873..75d0f48474c8 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsGetCustomerInitiatedMigrationSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsGetCustomerInitiatedMigrationSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,13 @@ import "dotenv/config"; * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationFailed.json */ async function storageAccountGetMigrationFailed(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const migrationName = "default"; const credential = new DefaultAzureCredential(); @@ -34,11 +37,13 @@ async function storageAccountGetMigrationFailed(): Promise { * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationInProgress.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationInProgress.json */ async function storageAccountGetMigrationInProgress(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "resource-group-name"; const accountName = "accountname"; const migrationName = "default"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsGetPropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsGetPropertiesSample.ts index 9845c3f47ecb..dccb39f7d96d 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsGetPropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsGetPropertiesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountsGetPropertiesOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountsGetPropertiesOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,15 +17,19 @@ import "dotenv/config"; * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetAsyncSkuConversionStatus.json */ async function storageAccountGetAsyncSkuConversionStatus(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.getProperties(resourceGroupName, accountName); + const result = await client.storageAccounts.getProperties( + resourceGroupName, + accountName, + ); console.log(result); } @@ -30,15 +37,19 @@ async function storageAccountGetAsyncSkuConversionStatus(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetProperties.json */ async function storageAccountGetProperties(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.getProperties(resourceGroupName, accountName); + const result = await client.storageAccounts.getProperties( + resourceGroupName, + accountName, + ); console.log(result); } @@ -46,15 +57,19 @@ async function storageAccountGetProperties(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKEnabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKEnabled.json */ async function storageAccountGetPropertiesCmkEnabled(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.getProperties(resourceGroupName, accountName); + const result = await client.storageAccounts.getProperties( + resourceGroupName, + accountName, + ); console.log(result); } @@ -62,15 +77,19 @@ async function storageAccountGetPropertiesCmkEnabled(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json */ async function storageAccountGetPropertiesCmkVersionExpirationTime(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.getProperties(resourceGroupName, accountName); + const result = await client.storageAccounts.getProperties( + resourceGroupName, + accountName, + ); console.log(result); } @@ -78,10 +97,11 @@ async function storageAccountGetPropertiesCmkVersionExpirationTime(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const expand = "geoReplicationStats"; @@ -100,10 +120,11 @@ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(): * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json */ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const expand = "geoReplicationStats"; diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsHierarchicalNamespaceMigrationSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsHierarchicalNamespaceMigrationSample.ts index e9a1ac8fc487..0b988e5d2f72 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsHierarchicalNamespaceMigrationSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsHierarchicalNamespaceMigrationSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,20 +14,22 @@ import "dotenv/config"; * This sample demonstrates how to Live Migration of storage account to enable Hns * * @summary Live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountHierarchicalNamespaceMigration.json */ async function storageAccountHierarchicalNamespaceMigration(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto2434"; const requestType = "HnsOnValidationRequest"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.beginHierarchicalNamespaceMigrationAndWait( - resourceGroupName, - accountName, - requestType, - ); + const result = + await client.storageAccounts.beginHierarchicalNamespaceMigrationAndWait( + resourceGroupName, + accountName, + requestType, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsListAccountSasSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsListAccountSasSample.ts index 3387b345aeec..f55ad886babf 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsListAccountSasSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsListAccountSasSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { AccountSasParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + AccountSasParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to List SAS credentials of a storage account. * * @summary List SAS credentials of a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListAccountSAS.json */ async function storageAccountListAccountSas(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7985"; const accountName = "sto8588"; const parameters: AccountSasParameters = { diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsListByResourceGroupSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsListByResourceGroupSample.ts index 68b0250c5e11..d317d208173d 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsListByResourceGroupSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsListByResourceGroupSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,18 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListByResourceGroup.json */ async function storageAccountListByResourceGroup(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res6117"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.storageAccounts.listByResourceGroup(resourceGroupName)) { + for await (const item of client.storageAccounts.listByResourceGroup( + resourceGroupName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsListKeysSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsListKeysSample.ts index cc20884dac0b..34080cb4772e 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsListKeysSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsListKeysSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @summary Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListKeys.json */ async function storageAccountListKeys(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res418"; const accountName = "sto2220"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.listKeys(resourceGroupName, accountName); + const result = await client.storageAccounts.listKeys( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsListSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsListSample.ts index f332a3af5715..a1a0397ae819 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountList.json */ async function storageAccountList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsListServiceSasSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsListServiceSasSample.ts index 58632b6b9a4f..1e10621de854 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsListServiceSasSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsListServiceSasSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { ServiceSasParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + ServiceSasParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to List service SAS credentials of a specific resource. * * @summary List service SAS credentials of a specific resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListServiceSAS.json */ async function storageAccountListServiceSas(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res7439"; const accountName = "sto1299"; const parameters: ServiceSasParameters = { diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsRegenerateKeySample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsRegenerateKeySample.ts index cb689234cc96..840dae654ae4 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsRegenerateKeySample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsRegenerateKeySample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountRegenerateKeyParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountRegenerateKeyParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKerbKey.json */ async function storageAccountRegenerateKerbKey(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167"; const accountName = "sto3539"; const regenerateKey: StorageAccountRegenerateKeyParameters = { @@ -37,10 +41,11 @@ async function storageAccountRegenerateKerbKey(): Promise { * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKey.json */ async function storageAccountRegenerateKey(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167"; const accountName = "sto3539"; const regenerateKey: StorageAccountRegenerateKeyParameters = { diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsRestoreBlobRangesSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsRestoreBlobRangesSample.ts index 840c8615dcdb..e86d408825fe 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsRestoreBlobRangesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsRestoreBlobRangesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { BlobRestoreParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + BlobRestoreParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to Restore blobs in the specified blob ranges * * @summary Restore blobs in the specified blob ranges - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobRangesRestore.json */ async function blobRangesRestore(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: BlobRestoreParameters = { diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts index 3050a83d443f..b01e3119f2db 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsRevokeUserDelegationKeysSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Revoke user delegation keys. * * @summary Revoke user delegation keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRevokeUserDelegationKeys.json */ async function storageAccountRevokeUserDelegationKeys(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4167"; const accountName = "sto3539"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/storageAccountsUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/storageAccountsUpdateSample.ts index 43615ab1dba5..437e160ffb8a 100644 --- a/sdk/storage/arm-storage/samples-dev/storageAccountsUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageAccountsUpdateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageAccountUpdateParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageAccountUpdateParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,10 +17,11 @@ import "dotenv/config"; * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableAD.json */ async function storageAccountEnableAd(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -37,7 +41,11 @@ async function storageAccountEnableAd(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -45,10 +53,11 @@ async function storageAccountEnableAd(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableCMK.json */ async function storageAccountEnableCmk(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -67,7 +76,11 @@ async function storageAccountEnableCmk(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -75,10 +88,11 @@ async function storageAccountEnableCmk(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdate.json */ async function storageAccountUpdate(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -116,7 +130,11 @@ async function storageAccountUpdate(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -124,10 +142,11 @@ async function storageAccountUpdate(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json */ async function storageAccountUpdateAllowedCopyScopeToAad(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -162,7 +181,11 @@ async function storageAccountUpdateAllowedCopyScopeToAad(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -170,10 +193,11 @@ async function storageAccountUpdateAllowedCopyScopeToAad(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json */ async function storageAccountUpdateDisablePublicNetworkAccess(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -208,7 +232,11 @@ async function storageAccountUpdateDisablePublicNetworkAccess(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -216,10 +244,11 @@ async function storageAccountUpdateDisablePublicNetworkAccess(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9101"; const accountName = "sto4445"; const parameters: StorageAccountUpdateParameters = { @@ -251,7 +280,11 @@ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(): Prom }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -259,16 +292,19 @@ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(): Prom * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; - const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res131918"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = + process.env["STORAGE_RESOURCE_GROUP"] || "res131918"; const accountName = "sto131918"; const parameters: StorageAccountUpdateParameters = { encryption: { encryptionIdentity: { - encryptionFederatedIdentityClientId: "3109d1c4-a5de-4d84-8832-feabb916a4b6", + encryptionFederatedIdentityClientId: + "3109d1c4-a5de-4d84-8832-feabb916a4b6", encryptionUserAssignedIdentity: "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}", }, @@ -295,7 +331,11 @@ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClie }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } @@ -303,10 +343,11 @@ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json */ async function storageAccountUpdateWithImmutabilityPolicy(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9407"; const accountName = "sto8596"; const parameters: StorageAccountUpdateParameters = { @@ -321,7 +362,11 @@ async function storageAccountUpdateWithImmutabilityPolicy(): Promise { }; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.storageAccounts.update(resourceGroupName, accountName, parameters); + const result = await client.storageAccounts.update( + resourceGroupName, + accountName, + parameters, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentInstancesReportListSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentInstancesReportListSample.ts index bbb509dbed79..bbde81a91211 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentInstancesReportListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentInstancesReportListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Fetch the report summary of a single storage task assignment's instances * * @summary Fetch the report summary of a single storage task assignment's instances - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json */ async function listStorageTaskAssignmentInstancesReportSummary(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsCreateSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsCreateSample.ts index a3235b6caff8..c7266c083890 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsCreateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageTaskAssignment } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageTaskAssignment, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,11 +17,12 @@ import "dotenv/config"; * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json */ async function putStorageTaskAssignment(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; @@ -53,11 +57,12 @@ async function putStorageTaskAssignment(): Promise { * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json */ async function putStorageTaskAssignmentRequiredProperties(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsDeleteSample.ts index 4694a2ce3a95..191421d318b4 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Delete the storage task assignment sub-resource * * @summary Delete the storage task assignment sub-resource - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json */ async function deleteStorageTaskAssignment(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsGetSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsGetSample.ts index 588a402de5b4..6dc7d1176505 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Get the storage task assignment properties * * @summary Get the storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json */ async function getStorageTaskAssignment(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsInstancesReportListSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsInstancesReportListSample.ts index 20d556355f8f..f08dcc4a35c6 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsInstancesReportListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsInstancesReportListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,11 +14,12 @@ import "dotenv/config"; * This sample demonstrates how to Fetch the report summary of all the storage task assignments and instances in an account * * @summary Fetch the report summary of all the storage task assignments and instances in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json */ async function listStorageTaskAssignmentsInstancesReportSummary(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const credential = new DefaultAzureCredential(); diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsListSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsListSample.ts index 7aa6b0b6d0b2..11852755b960 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,17 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to List all the storage task assignments in an account * * @summary List all the storage task assignments in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json */ async function listStorageTaskAssignmentsForAccount(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.storageTaskAssignments.list(resourceGroupName, accountName)) { + for await (const item of client.storageTaskAssignments.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsUpdateSample.ts index 00808d419963..d45039eb9793 100644 --- a/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/storageTaskAssignmentsUpdateSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { StorageTaskAssignmentUpdateParameters } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + StorageTaskAssignmentUpdateParameters, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,11 +17,12 @@ import "dotenv/config"; * This sample demonstrates how to Update storage task assignment properties * * @summary Update storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json */ async function patchStorageTaskAssignment(): Promise { const subscriptionId = - process.env["STORAGE_SUBSCRIPTION_ID"] || "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; + process.env["STORAGE_SUBSCRIPTION_ID"] || + "1f31ba14-ce16-4281-b9b4-3e78da6e1616"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4228"; const accountName = "sto4445"; const storageTaskAssignmentName = "myassignment1"; diff --git a/sdk/storage/arm-storage/samples-dev/tableCreateSample.ts b/sdk/storage/arm-storage/samples-dev/tableCreateSample.ts index ae04fe3d97b5..f3a00bcfb84b 100644 --- a/sdk/storage/arm-storage/samples-dev/tableCreateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableCreateSample.ts @@ -5,8 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { Table, TableCreateOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + Table, + TableCreateOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,16 +18,21 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPut.json */ async function tableOperationPut(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableOperations.create(resourceGroupName, accountName, tableName); + const result = await client.tableOperations.create( + resourceGroupName, + accountName, + tableName, + ); console.log(result); } @@ -31,10 +40,11 @@ async function tableOperationPut(): Promise { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; diff --git a/sdk/storage/arm-storage/samples-dev/tableDeleteSample.ts b/sdk/storage/arm-storage/samples-dev/tableDeleteSample.ts index 43ecd1e7e14f..d260d5f22af5 100644 --- a/sdk/storage/arm-storage/samples-dev/tableDeleteSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableDeleteSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the table with the specified table name, under the specified account if it exists. * * @summary Deletes the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationDelete.json */ async function tableOperationDelete(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableOperations.delete(resourceGroupName, accountName, tableName); + const result = await client.tableOperations.delete( + resourceGroupName, + accountName, + tableName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/tableGetSample.ts b/sdk/storage/arm-storage/samples-dev/tableGetSample.ts index 7b74f047ec77..f5fd247f412b 100644 --- a/sdk/storage/arm-storage/samples-dev/tableGetSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableGetSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,21 @@ import "dotenv/config"; * This sample demonstrates how to Gets the table with the specified table name, under the specified account if it exists. * * @summary Gets the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationGet.json */ async function tableOperationGet(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableOperations.get(resourceGroupName, accountName, tableName); + const result = await client.tableOperations.get( + resourceGroupName, + accountName, + tableName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/tableListSample.ts b/sdk/storage/arm-storage/samples-dev/tableListSample.ts index 30052dcd0647..ed28d4fc35dd 100644 --- a/sdk/storage/arm-storage/samples-dev/tableListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,16 +14,20 @@ import "dotenv/config"; * This sample demonstrates how to Gets a list of all the tables under the specified storage account * * @summary Gets a list of all the tables under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationList.json */ async function tableOperationList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto328"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tableOperations.list(resourceGroupName, accountName)) { + for await (const item of client.tableOperations.list( + resourceGroupName, + accountName, + )) { resArray.push(item); } console.log(resArray); diff --git a/sdk/storage/arm-storage/samples-dev/tableServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/tableServicesGetServicePropertiesSample.ts index ea6c9cd531fb..f50763243c7c 100644 --- a/sdk/storage/arm-storage/samples-dev/tableServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableServicesGetServicePropertiesSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesGet.json */ async function tableServicesGet(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableServices.getServiceProperties(resourceGroupName, accountName); + const result = await client.tableServices.getServiceProperties( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/tableServicesListSample.ts b/sdk/storage/arm-storage/samples-dev/tableServicesListSample.ts index f63cadad9ca6..b86ae01f23f1 100644 --- a/sdk/storage/arm-storage/samples-dev/tableServicesListSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableServicesListSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,15 +14,19 @@ import "dotenv/config"; * This sample demonstrates how to List all table services for the storage account. * * @summary List all table services for the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesList.json */ async function tableServicesList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; const accountName = "sto1590"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableServices.list(resourceGroupName, accountName); + const result = await client.tableServices.list( + resourceGroupName, + accountName, + ); console.log(result); } diff --git a/sdk/storage/arm-storage/samples-dev/tableServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples-dev/tableServicesSetServicePropertiesSample.ts index 18ae0bde0684..f580946bef7a 100644 --- a/sdk/storage/arm-storage/samples-dev/tableServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableServicesSetServicePropertiesSample.ts @@ -5,8 +5,11 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { TableServiceProperties } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + TableServiceProperties, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,17 +17,22 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesPut.json */ async function tableServicesPut(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; const accountName = "sto8607"; const parameters: TableServiceProperties = { cors: { corsRules: [ { - allowedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], allowedMethods: ["GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT"], allowedOrigins: ["http://www.contoso.com", "http://www.fabrikam.com"], exposedHeaders: ["x-ms-meta-*"], @@ -40,8 +48,15 @@ async function tableServicesPut(): Promise { { allowedHeaders: ["x-ms-meta-12345675754564*"], allowedMethods: ["GET", "PUT"], - allowedOrigins: ["http://www.abc23.com", "https://www.fabrikam.com/*"], - exposedHeaders: ["x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*"], + allowedOrigins: [ + "http://www.abc23.com", + "https://www.fabrikam.com/*", + ], + exposedHeaders: [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*", + ], maxAgeInSeconds: 2000, }, ], diff --git a/sdk/storage/arm-storage/samples-dev/tableUpdateSample.ts b/sdk/storage/arm-storage/samples-dev/tableUpdateSample.ts index b00c3db99954..b02f5fe1babd 100644 --- a/sdk/storage/arm-storage/samples-dev/tableUpdateSample.ts +++ b/sdk/storage/arm-storage/samples-dev/tableUpdateSample.ts @@ -5,8 +5,12 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import type { Table, TableUpdateOptionalParams } from "@azure/arm-storage"; -import { StorageManagementClient } from "@azure/arm-storage"; + +import { + Table, + TableUpdateOptionalParams, + StorageManagementClient, +} from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -14,16 +18,21 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPatch.json */ async function tableOperationPatch(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); - const result = await client.tableOperations.update(resourceGroupName, accountName, tableName); + const result = await client.tableOperations.update( + resourceGroupName, + accountName, + tableName, + ); console.log(result); } @@ -31,10 +40,11 @@ async function tableOperationPatch(): Promise { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; const accountName = "sto328"; const tableName = "table6185"; diff --git a/sdk/storage/arm-storage/samples-dev/usagesListByLocationSample.ts b/sdk/storage/arm-storage/samples-dev/usagesListByLocationSample.ts index 75b2327caa45..e1401a1dfbff 100644 --- a/sdk/storage/arm-storage/samples-dev/usagesListByLocationSample.ts +++ b/sdk/storage/arm-storage/samples-dev/usagesListByLocationSample.ts @@ -5,6 +5,7 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -13,10 +14,11 @@ import "dotenv/config"; * This sample demonstrates how to Gets the current usage count and the limit for the resources of the location under the subscription. * * @summary Gets the current usage count and the limit for the resources of the location under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListLocationUsage.json */ async function usageList(): Promise { - const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const location = "eastus2(stage)"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/README.md b/sdk/storage/arm-storage/samples/v18/javascript/README.md index 701513d15f42..04198c63d46a 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/README.md +++ b/sdk/storage/arm-storage/samples/v18/javascript/README.md @@ -4,108 +4,110 @@ These sample programs show how to use the JavaScript client libraries for in som | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [blobContainersClearLegalHoldSample.js][blobcontainersclearlegalholdsample] | Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json | -| [blobContainersCreateOrUpdateImmutabilityPolicySample.js][blobcontainerscreateorupdateimmutabilitypolicysample] | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json | -| [blobContainersCreateSample.js][blobcontainerscreatesample] | Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json | -| [blobContainersDeleteImmutabilityPolicySample.js][blobcontainersdeleteimmutabilitypolicysample] | Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json | -| [blobContainersDeleteSample.js][blobcontainersdeletesample] | Deletes specified container under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json | -| [blobContainersExtendImmutabilityPolicySample.js][blobcontainersextendimmutabilitypolicysample] | Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json | -| [blobContainersGetImmutabilityPolicySample.js][blobcontainersgetimmutabilitypolicysample] | Gets the existing immutability policy along with the corresponding ETag in response headers and body. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json | -| [blobContainersGetSample.js][blobcontainersgetsample] | Gets properties of a specified container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json | -| [blobContainersLeaseSample.js][blobcontainersleasesample] | The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json | -| [blobContainersListSample.js][blobcontainerslistsample] | Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json | -| [blobContainersLockImmutabilityPolicySample.js][blobcontainerslockimmutabilitypolicysample] | Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json | -| [blobContainersObjectLevelWormSample.js][blobcontainersobjectlevelwormsample] | This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json | -| [blobContainersSetLegalHoldSample.js][blobcontainerssetlegalholdsample] | Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json | -| [blobContainersUpdateSample.js][blobcontainersupdatesample] | Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json | -| [blobInventoryPoliciesCreateOrUpdateSample.js][blobinventorypoliciescreateorupdatesample] | Sets the blob inventory policy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json | -| [blobInventoryPoliciesDeleteSample.js][blobinventorypoliciesdeletesample] | Deletes the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json | -| [blobInventoryPoliciesGetSample.js][blobinventorypoliciesgetsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json | -| [blobInventoryPoliciesListSample.js][blobinventorypolicieslistsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json | -| [blobServicesGetServicePropertiesSample.js][blobservicesgetservicepropertiessample] | Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json | -| [blobServicesListSample.js][blobserviceslistsample] | List blob services of storage account. It returns a collection of one object named default. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json | -| [blobServicesSetServicePropertiesSample.js][blobservicessetservicepropertiessample] | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json | -| [deletedAccountsGetSample.js][deletedaccountsgetsample] | Get properties of specified deleted account resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json | -| [deletedAccountsListSample.js][deletedaccountslistsample] | Lists deleted accounts under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json | -| [encryptionScopesGetSample.js][encryptionscopesgetsample] | Returns the properties for the specified encryption scope. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json | -| [encryptionScopesListSample.js][encryptionscopeslistsample] | Lists all the encryption scopes available under the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json | -| [encryptionScopesPatchSample.js][encryptionscopespatchsample] | Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json | -| [encryptionScopesPutSample.js][encryptionscopesputsample] | Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json | -| [fileServicesGetServicePropertiesSample.js][fileservicesgetservicepropertiessample] | Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json | -| [fileServicesListSample.js][fileserviceslistsample] | List all file services in storage accounts x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json | -| [fileServicesSetServicePropertiesSample.js][fileservicessetservicepropertiessample] | Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json | -| [fileSharesCreateSample.js][filesharescreatesample] | 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/2023-05-01/examples/FileSharesPut_NFS.json | -| [fileSharesDeleteSample.js][filesharesdeletesample] | Deletes specified share under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesDelete.json | -| [fileSharesGetSample.js][filesharesgetsample] | Gets properties of a specified share. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesGet_Stats.json | -| [fileSharesLeaseSample.js][filesharesleasesample] | The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Acquire.json | -| [fileSharesListSample.js][fileshareslistsample] | Lists all shares. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedFileSharesList.json | -| [fileSharesRestoreSample.js][filesharesrestoresample] | Restore a file share within a valid retention days if share soft delete is enabled x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesRestore.json | -| [fileSharesUpdateSample.js][filesharesupdatesample] | Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareAclsPatch.json | -| [localUsersCreateOrUpdateSample.js][localuserscreateorupdatesample] | Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json | -| [localUsersDeleteSample.js][localusersdeletesample] | Deletes the local user associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json | -| [localUsersGetSample.js][localusersgetsample] | Get the local user of the storage account by username. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json | -| [localUsersListKeysSample.js][localuserslistkeyssample] | List SSH authorized keys and shared key of the local user. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json | -| [localUsersListSample.js][localuserslistsample] | List the local users associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json | -| [localUsersRegeneratePasswordSample.js][localusersregeneratepasswordsample] | Regenerate the local user SSH password. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json | -| [managementPoliciesCreateOrUpdateSample.js][managementpoliciescreateorupdatesample] | Sets the managementpolicy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json | -| [managementPoliciesDeleteSample.js][managementpoliciesdeletesample] | Deletes the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json | -| [managementPoliciesGetSample.js][managementpoliciesgetsample] | Gets the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json | -| [networkSecurityPerimeterConfigurationsGetSample.js][networksecurityperimeterconfigurationsgetsample] | Gets effective NetworkSecurityPerimeterConfiguration for association x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json | -| [networkSecurityPerimeterConfigurationsListSample.js][networksecurityperimeterconfigurationslistsample] | Gets list of effective NetworkSecurityPerimeterConfiguration for storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json | -| [networkSecurityPerimeterConfigurationsReconcileSample.js][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json | -| [objectReplicationPoliciesCreateOrUpdateSample.js][objectreplicationpoliciescreateorupdatesample] | Create or update the object replication policy of the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json | -| [objectReplicationPoliciesDeleteSample.js][objectreplicationpoliciesdeletesample] | Deletes the object replication policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteObjectReplicationPolicy.json | -| [objectReplicationPoliciesGetSample.js][objectreplicationpoliciesgetsample] | Get the object replication policy of the storage account by policy ID. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json | -| [objectReplicationPoliciesListSample.js][objectreplicationpolicieslistsample] | List the object replication policies associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available Storage Rest API operations. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | List all the private endpoint connections associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.js][privateendpointconnectionsputsample] | Update the state of specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json | -| [privateLinkResourcesListByStorageAccountSample.js][privatelinkresourceslistbystorageaccountsample] | Gets the private link resources that need to be created for a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json | -| [queueCreateSample.js][queuecreatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json | -| [queueDeleteSample.js][queuedeletesample] | Deletes the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json | -| [queueGetSample.js][queuegetsample] | Gets the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json | -| [queueListSample.js][queuelistsample] | Gets a list of all the queues under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json | -| [queueServicesGetServicePropertiesSample.js][queueservicesgetservicepropertiessample] | Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json | -| [queueServicesListSample.js][queueserviceslistsample] | List all queue services for the storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json | -| [queueServicesSetServicePropertiesSample.js][queueservicessetservicepropertiessample] | Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json | -| [queueUpdateSample.js][queueupdatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json | -| [skusListSample.js][skuslistsample] | Lists the available SKUs supported by Microsoft.Storage for given subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json | -| [storageAccountsAbortHierarchicalNamespaceMigrationSample.js][storageaccountsaborthierarchicalnamespacemigrationsample] | Abort live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json | -| [storageAccountsCheckNameAvailabilitySample.js][storageaccountschecknameavailabilitysample] | Checks that the storage account name is valid and is not already in use. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json | -| [storageAccountsCreateSample.js][storageaccountscreatesample] | Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json | -| [storageAccountsCustomerInitiatedMigrationSample.js][storageaccountscustomerinitiatedmigrationsample] | Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json | -| [storageAccountsDeleteSample.js][storageaccountsdeletesample] | Deletes a storage account in Microsoft Azure. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json | -| [storageAccountsFailoverSample.js][storageaccountsfailoversample] | A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json | -| [storageAccountsGetCustomerInitiatedMigrationSample.js][storageaccountsgetcustomerinitiatedmigrationsample] | Gets the status of the ongoing migration for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json | -| [storageAccountsGetPropertiesSample.js][storageaccountsgetpropertiessample] | Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json | -| [storageAccountsHierarchicalNamespaceMigrationSample.js][storageaccountshierarchicalnamespacemigrationsample] | Live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json | -| [storageAccountsListAccountSasSample.js][storageaccountslistaccountsassample] | List SAS credentials of a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json | -| [storageAccountsListByResourceGroupSample.js][storageaccountslistbyresourcegroupsample] | Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json | -| [storageAccountsListKeysSample.js][storageaccountslistkeyssample] | Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json | -| [storageAccountsListSample.js][storageaccountslistsample] | Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json | -| [storageAccountsListServiceSasSample.js][storageaccountslistservicesassample] | List service SAS credentials of a specific resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json | -| [storageAccountsRegenerateKeySample.js][storageaccountsregeneratekeysample] | Regenerates one of the access keys or Kerberos keys for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json | -| [storageAccountsRestoreBlobRangesSample.js][storageaccountsrestoreblobrangessample] | Restore blobs in the specified blob ranges x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json | -| [storageAccountsRevokeUserDelegationKeysSample.js][storageaccountsrevokeuserdelegationkeyssample] | Revoke user delegation keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json | -| [storageAccountsUpdateSample.js][storageaccountsupdatesample] | The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json | -| [storageTaskAssignmentInstancesReportListSample.js][storagetaskassignmentinstancesreportlistsample] | Fetch the report summary of a single storage task assignment's instances x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json | -| [storageTaskAssignmentsCreateSample.js][storagetaskassignmentscreatesample] | Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json | -| [storageTaskAssignmentsDeleteSample.js][storagetaskassignmentsdeletesample] | Delete the storage task assignment sub-resource x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json | -| [storageTaskAssignmentsGetSample.js][storagetaskassignmentsgetsample] | Get the storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json | -| [storageTaskAssignmentsInstancesReportListSample.js][storagetaskassignmentsinstancesreportlistsample] | Fetch the report summary of all the storage task assignments and instances in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json | -| [storageTaskAssignmentsListSample.js][storagetaskassignmentslistsample] | List all the storage task assignments in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json | -| [storageTaskAssignmentsUpdateSample.js][storagetaskassignmentsupdatesample] | Update storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json | -| [tableCreateSample.js][tablecreatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json | -| [tableDeleteSample.js][tabledeletesample] | Deletes the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json | -| [tableGetSample.js][tablegetsample] | Gets the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json | -| [tableListSample.js][tablelistsample] | Gets a list of all the tables under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json | -| [tableServicesGetServicePropertiesSample.js][tableservicesgetservicepropertiessample] | Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json | -| [tableServicesListSample.js][tableserviceslistsample] | List all table services for the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json | -| [tableServicesSetServicePropertiesSample.js][tableservicessetservicepropertiessample] | Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json | -| [tableUpdateSample.js][tableupdatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json | -| [usagesListByLocationSample.js][usageslistbylocationsample] | Gets the current usage count and the limit for the resources of the location under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json | +| [blobContainersClearLegalHoldSample.js][blobcontainersclearlegalholdsample] | Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersClearLegalHold.json | +| [blobContainersCreateOrUpdateImmutabilityPolicySample.js][blobcontainerscreateorupdateimmutabilitypolicysample] | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicy.json | +| [blobContainersCreateSample.js][blobcontainerscreatesample] | Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutDefaultEncryptionScope.json | +| [blobContainersDeleteImmutabilityPolicySample.js][blobcontainersdeleteimmutabilitypolicysample] | Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDeleteImmutabilityPolicy.json | +| [blobContainersDeleteSample.js][blobcontainersdeletesample] | Deletes specified container under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDelete.json | +| [blobContainersExtendImmutabilityPolicySample.js][blobcontainersextendimmutabilitypolicysample] | Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersExtendImmutabilityPolicy.json | +| [blobContainersGetImmutabilityPolicySample.js][blobcontainersgetimmutabilitypolicysample] | Gets the existing immutability policy along with the corresponding ETag in response headers and body. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetImmutabilityPolicy.json | +| [blobContainersGetSample.js][blobcontainersgetsample] | Gets properties of a specified container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json | +| [blobContainersLeaseSample.js][blobcontainersleasesample] | The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Acquire.json | +| [blobContainersListSample.js][blobcontainerslistsample] | Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersList.json | +| [blobContainersLockImmutabilityPolicySample.js][blobcontainerslockimmutabilitypolicysample] | Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLockImmutabilityPolicy.json | +| [blobContainersObjectLevelWormSample.js][blobcontainersobjectlevelwormsample] | This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/ObjectLevelWormContainerMigration.json | +| [blobContainersSetLegalHoldSample.js][blobcontainerssetlegalholdsample] | Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHold.json | +| [blobContainersUpdateSample.js][blobcontainersupdatesample] | Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPatch.json | +| [blobInventoryPoliciesCreateOrUpdateSample.js][blobinventorypoliciescreateorupdatesample] | Sets the blob inventory policy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicy.json | +| [blobInventoryPoliciesDeleteSample.js][blobinventorypoliciesdeletesample] | Deletes the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteBlobInventoryPolicy.json | +| [blobInventoryPoliciesGetSample.js][blobinventorypoliciesgetsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetBlobInventoryPolicy.json | +| [blobInventoryPoliciesListSample.js][blobinventorypolicieslistsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListBlobInventoryPolicy.json | +| [blobServicesGetServicePropertiesSample.js][blobservicesgetservicepropertiessample] | Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesGet.json | +| [blobServicesListSample.js][blobserviceslistsample] | List blob services of storage account. It returns a collection of one object named default. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesList.json | +| [blobServicesSetServicePropertiesSample.js][blobservicessetservicepropertiessample] | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutAllowPermanentDelete.json | +| [deletedAccountsGetSample.js][deletedaccountsgetsample] | Get properties of specified deleted account resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountGet.json | +| [deletedAccountsListSample.js][deletedaccountslistsample] | Lists deleted accounts under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountList.json | +| [encryptionScopesGetSample.js][encryptionscopesgetsample] | Returns the properties for the specified encryption scope. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetEncryptionScope.json | +| [encryptionScopesListSample.js][encryptionscopeslistsample] | Lists all the encryption scopes available under the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEncryptionScopeList.json | +| [encryptionScopesPatchSample.js][encryptionscopespatchsample] | Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPatchEncryptionScope.json | +| [encryptionScopesPutSample.js][encryptionscopesputsample] | Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScope.json | +| [fileServicesGetServicePropertiesSample.js][fileservicesgetservicepropertiessample] | Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGet.json | +| [fileServicesGetServiceUsageSample.js][fileservicesgetserviceusagesample] | Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGetUsage.json | +| [fileServicesListSample.js][fileserviceslistsample] | List all file services in storage accounts x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesList.json | +| [fileServicesListServiceUsagesSample.js][fileserviceslistserviceusagessample] | Gets the usages of file service in storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesListUsages.json | +| [fileServicesSetServicePropertiesSample.js][fileservicessetservicepropertiessample] | Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut.json | +| [fileSharesCreateSample.js][filesharescreatesample] | 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/2024-01-01/examples/FileSharesPut_NFS.json | +| [fileSharesDeleteSample.js][filesharesdeletesample] | Deletes specified share under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesDelete.json | +| [fileSharesGetSample.js][filesharesgetsample] | Gets properties of a specified share. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet_PaidBursting.json | +| [fileSharesLeaseSample.js][filesharesleasesample] | The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Acquire.json | +| [fileSharesListSample.js][fileshareslistsample] | Lists all shares. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedFileSharesList.json | +| [fileSharesRestoreSample.js][filesharesrestoresample] | Restore a file share within a valid retention days if share soft delete is enabled x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesRestore.json | +| [fileSharesUpdateSample.js][filesharesupdatesample] | Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareAclsPatch.json | +| [localUsersCreateOrUpdateSample.js][localuserscreateorupdatesample] | Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreate.json | +| [localUsersDeleteSample.js][localusersdeletesample] | Deletes the local user associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserDelete.json | +| [localUsersGetSample.js][localusersgetsample] | Get the local user of the storage account by username. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserGet.json | +| [localUsersListKeysSample.js][localuserslistkeyssample] | List SSH authorized keys and shared key of the local user. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserListKeys.json | +| [localUsersListSample.js][localuserslistsample] | List the local users associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersList.json | +| [localUsersRegeneratePasswordSample.js][localusersregeneratepasswordsample] | Regenerate the local user SSH password. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserRegeneratePassword.json | +| [managementPoliciesCreateOrUpdateSample.js][managementpoliciescreateorupdatesample] | Sets the managementpolicy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy.json | +| [managementPoliciesDeleteSample.js][managementpoliciesdeletesample] | Deletes the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteManagementPolicy.json | +| [managementPoliciesGetSample.js][managementpoliciesgetsample] | Gets the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetManagementPolicy.json | +| [networkSecurityPerimeterConfigurationsGetSample.js][networksecurityperimeterconfigurationsgetsample] | Gets effective NetworkSecurityPerimeterConfiguration for association x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListSample.js][networksecurityperimeterconfigurationslistsample] | Gets list of effective NetworkSecurityPerimeterConfiguration for storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.js][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json | +| [objectReplicationPoliciesCreateOrUpdateSample.js][objectreplicationpoliciescreateorupdatesample] | Create or update the object replication policy of the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json | +| [objectReplicationPoliciesDeleteSample.js][objectreplicationpoliciesdeletesample] | Deletes the object replication policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteObjectReplicationPolicy.json | +| [objectReplicationPoliciesGetSample.js][objectreplicationpoliciesgetsample] | Get the object replication policy of the storage account by policy ID. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetObjectReplicationPolicy.json | +| [objectReplicationPoliciesListSample.js][objectreplicationpolicieslistsample] | List the object replication policies associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListObjectReplicationPolicies.json | +| [operationsListSample.js][operationslistsample] | Lists all of the available Storage Rest API operations. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/OperationsList.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | List all the private endpoint connections associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateEndpointConnections.json | +| [privateEndpointConnectionsPutSample.js][privateendpointconnectionsputsample] | Update the state of specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutPrivateEndpointConnection.json | +| [privateLinkResourcesListByStorageAccountSample.js][privatelinkresourceslistbystorageaccountsample] | Gets the private link resources that need to be created for a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateLinkResources.json | +| [queueCreateSample.js][queuecreatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPut.json | +| [queueDeleteSample.js][queuedeletesample] | Deletes the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationDelete.json | +| [queueGetSample.js][queuegetsample] | Gets the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationGet.json | +| [queueListSample.js][queuelistsample] | Gets a list of all the queues under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationList.json | +| [queueServicesGetServicePropertiesSample.js][queueservicesgetservicepropertiessample] | Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesGet.json | +| [queueServicesListSample.js][queueserviceslistsample] | List all queue services for the storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesList.json | +| [queueServicesSetServicePropertiesSample.js][queueservicessetservicepropertiessample] | Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesPut.json | +| [queueUpdateSample.js][queueupdatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPatch.json | +| [skusListSample.js][skuslistsample] | Lists the available SKUs supported by Microsoft.Storage for given subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/SKUList.json | +| [storageAccountsAbortHierarchicalNamespaceMigrationSample.js][storageaccountsaborthierarchicalnamespacemigrationsample] | Abort live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json | +| [storageAccountsCheckNameAvailabilitySample.js][storageaccountschecknameavailabilitysample] | Checks that the storage account name is valid and is not already in use. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCheckNameAvailability.json | +| [storageAccountsCreateSample.js][storageaccountscreatesample] | Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NfsV3AccountCreate.json | +| [storageAccountsCustomerInitiatedMigrationSample.js][storageaccountscustomerinitiatedmigrationsample] | Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPostMigration.json | +| [storageAccountsDeleteSample.js][storageaccountsdeletesample] | Deletes a storage account in Microsoft Azure. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDelete.json | +| [storageAccountsFailoverSample.js][storageaccountsfailoversample] | A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailover.json | +| [storageAccountsGetCustomerInitiatedMigrationSample.js][storageaccountsgetcustomerinitiatedmigrationsample] | Gets the status of the ongoing migration for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationFailed.json | +| [storageAccountsGetPropertiesSample.js][storageaccountsgetpropertiessample] | Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetAsyncSkuConversionStatus.json | +| [storageAccountsHierarchicalNamespaceMigrationSample.js][storageaccountshierarchicalnamespacemigrationsample] | Live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountHierarchicalNamespaceMigration.json | +| [storageAccountsListAccountSasSample.js][storageaccountslistaccountsassample] | List SAS credentials of a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListAccountSAS.json | +| [storageAccountsListByResourceGroupSample.js][storageaccountslistbyresourcegroupsample] | Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListByResourceGroup.json | +| [storageAccountsListKeysSample.js][storageaccountslistkeyssample] | Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListKeys.json | +| [storageAccountsListSample.js][storageaccountslistsample] | Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountList.json | +| [storageAccountsListServiceSasSample.js][storageaccountslistservicesassample] | List service SAS credentials of a specific resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListServiceSAS.json | +| [storageAccountsRegenerateKeySample.js][storageaccountsregeneratekeysample] | Regenerates one of the access keys or Kerberos keys for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKerbKey.json | +| [storageAccountsRestoreBlobRangesSample.js][storageaccountsrestoreblobrangessample] | Restore blobs in the specified blob ranges x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobRangesRestore.json | +| [storageAccountsRevokeUserDelegationKeysSample.js][storageaccountsrevokeuserdelegationkeyssample] | Revoke user delegation keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRevokeUserDelegationKeys.json | +| [storageAccountsUpdateSample.js][storageaccountsupdatesample] | The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableAD.json | +| [storageTaskAssignmentInstancesReportListSample.js][storagetaskassignmentinstancesreportlistsample] | Fetch the report summary of a single storage task assignment's instances x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json | +| [storageTaskAssignmentsCreateSample.js][storagetaskassignmentscreatesample] | Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json | +| [storageTaskAssignmentsDeleteSample.js][storagetaskassignmentsdeletesample] | Delete the storage task assignment sub-resource x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json | +| [storageTaskAssignmentsGetSample.js][storagetaskassignmentsgetsample] | Get the storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json | +| [storageTaskAssignmentsInstancesReportListSample.js][storagetaskassignmentsinstancesreportlistsample] | Fetch the report summary of all the storage task assignments and instances in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json | +| [storageTaskAssignmentsListSample.js][storagetaskassignmentslistsample] | List all the storage task assignments in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json | +| [storageTaskAssignmentsUpdateSample.js][storagetaskassignmentsupdatesample] | Update storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json | +| [tableCreateSample.js][tablecreatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPut.json | +| [tableDeleteSample.js][tabledeletesample] | Deletes the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationDelete.json | +| [tableGetSample.js][tablegetsample] | Gets the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationGet.json | +| [tableListSample.js][tablelistsample] | Gets a list of all the tables under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationList.json | +| [tableServicesGetServicePropertiesSample.js][tableservicesgetservicepropertiessample] | Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesGet.json | +| [tableServicesListSample.js][tableserviceslistsample] | List all table services for the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesList.json | +| [tableServicesSetServicePropertiesSample.js][tableservicessetservicepropertiessample] | Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesPut.json | +| [tableUpdateSample.js][tableupdatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPatch.json | +| [usagesListByLocationSample.js][usageslistbylocationsample] | Gets the current usage count and the limit for the resources of the location under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListLocationUsage.json | ## Prerequisites @@ -173,7 +175,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [encryptionscopespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPatchSample.js [encryptionscopesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPutSample.js [fileservicesgetservicepropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServicePropertiesSample.js +[fileservicesgetserviceusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServiceUsageSample.js [fileserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListSample.js +[fileserviceslistserviceusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListServiceUsagesSample.js [fileservicessetservicepropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileServicesSetServicePropertiesSample.js [filesharescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileSharesCreateSample.js [filesharesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/javascript/fileSharesDeleteSample.js diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersClearLegalHoldSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersClearLegalHoldSample.js index 384ddbc957ed..53d0cf37f947 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersClearLegalHoldSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersClearLegalHoldSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. * * @summary Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersClearLegalHold.json */ async function clearLegalHoldContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -36,7 +34,7 @@ async function clearLegalHoldContainers() { } async function main() { - clearLegalHoldContainers(); + await clearLegalHoldContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateOrUpdateImmutabilityPolicySample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateOrUpdateImmutabilityPolicySample.js index 6c79feacd0cc..1060be901f15 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateOrUpdateImmutabilityPolicySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateOrUpdateImmutabilityPolicySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicy.json */ async function createOrUpdateImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -43,7 +41,7 @@ async function createOrUpdateImmutabilityPolicy() { * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json */ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -67,8 +65,8 @@ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll } async function main() { - createOrUpdateImmutabilityPolicy(); - createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(); + await createOrUpdateImmutabilityPolicy(); + await createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateSample.js index 4de29caea4de..da07287932d5 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutDefaultEncryptionScope.json */ async function putContainerWithDefaultEncryptionScope() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -42,7 +40,7 @@ async function putContainerWithDefaultEncryptionScope() { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutObjectLevelWorm.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutObjectLevelWorm.json */ async function putContainerWithObjectLevelWorm() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -67,7 +65,7 @@ async function putContainerWithObjectLevelWorm() { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPut.json */ async function putContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -87,9 +85,9 @@ async function putContainers() { } async function main() { - putContainerWithDefaultEncryptionScope(); - putContainerWithObjectLevelWorm(); - putContainers(); + await putContainerWithDefaultEncryptionScope(); + await putContainerWithObjectLevelWorm(); + await putContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteImmutabilityPolicySample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteImmutabilityPolicySample.js index ef77877c18c8..9a90746f0cf9 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteImmutabilityPolicySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteImmutabilityPolicySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. * * @summary Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDeleteImmutabilityPolicy.json */ async function deleteImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -36,7 +34,7 @@ async function deleteImmutabilityPolicy() { } async function main() { - deleteImmutabilityPolicy(); + await deleteImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteSample.js index 27f94d1421a6..9965c37b5522 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes specified container under its account. * * @summary Deletes specified container under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDelete.json */ async function deleteContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function deleteContainers() { } async function main() { - deleteContainers(); + await deleteContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersExtendImmutabilityPolicySample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersExtendImmutabilityPolicySample.js index cdeb9d2e8bce..28117ad48dfe 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersExtendImmutabilityPolicySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersExtendImmutabilityPolicySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. * * @summary Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersExtendImmutabilityPolicy.json */ async function extendImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -43,7 +41,7 @@ async function extendImmutabilityPolicy() { } async function main() { - extendImmutabilityPolicy(); + await extendImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetImmutabilityPolicySample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetImmutabilityPolicySample.js index 126ba1ca21ef..1ab573d39588 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetImmutabilityPolicySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetImmutabilityPolicySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the existing immutability policy along with the corresponding ETag in response headers and body. * * @summary Gets the existing immutability policy along with the corresponding ETag in response headers and body. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetImmutabilityPolicy.json */ async function getImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function getImmutabilityPolicy() { } async function main() { - getImmutabilityPolicy(); + await getImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetSample.js index 2cf8eb4330bc..8b6c44ab486b 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json */ async function getBlobContainersGetWithAllowProtectedAppendWritesAll() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -33,7 +31,7 @@ async function getBlobContainersGetWithAllowProtectedAppendWritesAll() { * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGet.json */ async function getContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -47,8 +45,8 @@ async function getContainers() { } async function main() { - getBlobContainersGetWithAllowProtectedAppendWritesAll(); - getContainers(); + await getBlobContainersGetWithAllowProtectedAppendWritesAll(); + await getContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLeaseSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLeaseSample.js index f709dc86f8f2..598edca65de7 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLeaseSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLeaseSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Acquire.json */ async function acquireALeaseOnAContainer() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -46,7 +44,7 @@ async function acquireALeaseOnAContainer() { * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Break.json */ async function breakALeaseOnAContainer() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -73,8 +71,8 @@ async function breakALeaseOnAContainer() { } async function main() { - acquireALeaseOnAContainer(); - breakALeaseOnAContainer(); + await acquireALeaseOnAContainer(); + await breakALeaseOnAContainer(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersListSample.js index ad2891ec71b7..76f1e64fb27c 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersList.json */ async function listContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,7 +23,7 @@ async function listContainers() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobContainers.list(resourceGroupName, accountName)) { + for await (const item of client.blobContainers.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); @@ -35,7 +33,7 @@ async function listContainers() { * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedBlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedBlobContainersList.json */ async function listDeletedContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -46,15 +44,15 @@ async function listDeletedContainers() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobContainers.list(resourceGroupName, accountName, options)) { + for await (const item of client.blobContainers.list(resourceGroupName, accountName, options)) { resArray.push(item); } console.log(resArray); } async function main() { - listContainers(); - listDeletedContainers(); + await listContainers(); + await listDeletedContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLockImmutabilityPolicySample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLockImmutabilityPolicySample.js index fee3ac738426..65e3fe4d6185 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLockImmutabilityPolicySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersLockImmutabilityPolicySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. * * @summary Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLockImmutabilityPolicy.json */ async function lockImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -36,7 +34,7 @@ async function lockImmutabilityPolicy() { } async function main() { - lockImmutabilityPolicy(); + await lockImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersObjectLevelWormSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersObjectLevelWormSample.js index a4e5130bf701..d8ba707b1c0f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersObjectLevelWormSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersObjectLevelWormSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. * * @summary This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/ObjectLevelWormContainerMigration.json */ async function versionLevelWormContainerMigration() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function versionLevelWormContainerMigration() { } async function main() { - versionLevelWormContainerMigration(); + await versionLevelWormContainerMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersSetLegalHoldSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersSetLegalHoldSample.js index 8b93f1cf8383..c3e2805df517 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersSetLegalHoldSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersSetLegalHoldSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHold.json */ async function setLegalHoldContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function setLegalHoldContainers() { * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json */ async function setLegalHoldContainersWithAllowProtectedAppendWritesAll() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -62,8 +60,8 @@ async function setLegalHoldContainersWithAllowProtectedAppendWritesAll() { } async function main() { - setLegalHoldContainers(); - setLegalHoldContainersWithAllowProtectedAppendWritesAll(); + await setLegalHoldContainers(); + await setLegalHoldContainersWithAllowProtectedAppendWritesAll(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersUpdateSample.js index ab125314b40f..71a9fd37d638 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobContainersUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobContainersUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. * * @summary Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPatch.json */ async function updateContainers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function updateContainers() { } async function main() { - updateContainers(); + await updateContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesCreateOrUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesCreateOrUpdateSample.js index 36277e5f4982..252c5b8e0082 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesCreateOrUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesCreateOrUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicy.json */ async function storageAccountSetBlobInventoryPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -98,7 +96,7 @@ async function storageAccountSetBlobInventoryPolicy() { * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -198,7 +196,7 @@ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForH * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -294,9 +292,9 @@ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForN } async function main() { - storageAccountSetBlobInventoryPolicy(); - storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(); - storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(); + await storageAccountSetBlobInventoryPolicy(); + await storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(); + await storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesDeleteSample.js index 32bc2c69766a..cb5e2831027a 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the blob inventory policy associated with the specified storage account. * * @summary Deletes the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteBlobInventoryPolicy.json */ async function storageAccountDeleteBlobInventoryPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountDeleteBlobInventoryPolicy() { } async function main() { - storageAccountDeleteBlobInventoryPolicy(); + await storageAccountDeleteBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesGetSample.js index eb8a30c20c31..c3b505137672 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountGetBlobInventoryPolicy() { } async function main() { - storageAccountGetBlobInventoryPolicy(); + await storageAccountGetBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesListSample.js index f5b7f792c33a..c25b0116130a 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobInventoryPoliciesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function storageAccountGetBlobInventoryPolicy() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobInventoryPolicies.list(resourceGroupName, accountName)) { + for await (const item of client.blobInventoryPolicies.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - storageAccountGetBlobInventoryPolicy(); + await storageAccountGetBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesGetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesGetServicePropertiesSample.js index fae4995eae3f..604f06b71c43 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesGetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesGetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesGet.json */ async function getBlobServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function getBlobServices() { } async function main() { - getBlobServices(); + await getBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesListSample.js index ccbf0ce1da2e..7ebabd43506d 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List blob services of storage account. It returns a collection of one object named default. * * @summary List blob services of storage account. It returns a collection of one object named default. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesList.json */ async function listBlobServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function listBlobServices() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobServices.list(resourceGroupName, accountName)) { + for await (const item of client.blobServices.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - listBlobServices(); + await listBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesSetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesSetServicePropertiesSample.js index e1de9715798e..888fb2e33969 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/blobServicesSetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/blobServicesSetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutAllowPermanentDelete.json */ async function blobServicesPutAllowPermanentDelete() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -44,7 +42,7 @@ async function blobServicesPutAllowPermanentDelete() { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json */ async function blobServicesPutLastAccessTimeBasedTracking() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -72,7 +70,7 @@ async function blobServicesPutLastAccessTimeBasedTracking() { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPut.json */ async function putBlobServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -120,9 +118,9 @@ async function putBlobServices() { } async function main() { - blobServicesPutAllowPermanentDelete(); - blobServicesPutLastAccessTimeBasedTracking(); - putBlobServices(); + await blobServicesPutAllowPermanentDelete(); + await blobServicesPutLastAccessTimeBasedTracking(); + await putBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsGetSample.js index 8a7d036a38d4..24d7fc5ce6f6 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get properties of specified deleted account resource. * * @summary Get properties of specified deleted account resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountGet.json */ async function deletedAccountGet() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function deletedAccountGet() { } async function main() { - deletedAccountGet(); + await deletedAccountGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsListSample.js index cef0123f6f75..f6e49cbade31 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/deletedAccountsListSample.js @@ -6,31 +6,29 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists deleted accounts under the subscription. * * @summary Lists deleted accounts under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountList.json */ async function deletedAccountList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.deletedAccounts.list()) { + for await (const item of client.deletedAccounts.list()) { resArray.push(item); } console.log(resArray); } async function main() { - deletedAccountList(); + await deletedAccountList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesGetSample.js index e8f4f5b7f84c..a19127bb72c6 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Returns the properties for the specified encryption scope. * * @summary Returns the properties for the specified encryption scope. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetEncryptionScope.json */ async function storageAccountGetEncryptionScope() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountGetEncryptionScope() { } async function main() { - storageAccountGetEncryptionScope(); + await storageAccountGetEncryptionScope(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesListSample.js index 46d284ce2c40..6c9d5750b890 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the encryption scopes available under the specified storage account. * * @summary Lists all the encryption scopes available under the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEncryptionScopeList.json */ async function storageAccountEncryptionScopeList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function storageAccountEncryptionScopeList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.encryptionScopes.list(resourceGroupName, accountName)) { + for await (const item of client.encryptionScopes.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - storageAccountEncryptionScopeList(); + await storageAccountEncryptionScopeList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPatchSample.js b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPatchSample.js index 5e28eb03f480..07bf60a0bca0 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPatchSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPatchSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. * * @summary Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPatchEncryptionScope.json */ async function storageAccountPatchEncryptionScope() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -41,7 +39,7 @@ async function storageAccountPatchEncryptionScope() { } async function main() { - storageAccountPatchEncryptionScope(); + await storageAccountPatchEncryptionScope(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPutSample.js b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPutSample.js index 6d50e6922c41..52c339e8e5ec 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPutSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/encryptionScopesPutSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScope.json */ async function storageAccountPutEncryptionScope() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function storageAccountPutEncryptionScope() { * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json */ async function storageAccountPutEncryptionScopeWithInfrastructureEncryption() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -61,8 +59,8 @@ async function storageAccountPutEncryptionScopeWithInfrastructureEncryption() { } async function main() { - storageAccountPutEncryptionScope(); - storageAccountPutEncryptionScopeWithInfrastructureEncryption(); + await storageAccountPutEncryptionScope(); + await storageAccountPutEncryptionScopeWithInfrastructureEncryption(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServicePropertiesSample.js index 16ccc26070e4..8cd36390feea 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGet.json */ async function getFileServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function getFileServices() { } async function main() { - getFileServices(); + await getFileServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServiceUsageSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServiceUsageSample.js new file mode 100644 index 000000000000..3ab54a67f632 --- /dev/null +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesGetServiceUsageSample.js @@ -0,0 +1,34 @@ +/* + * 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. + */ + +const { StorageManagementClient } = require("@azure/arm-storage"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * + * @summary Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGetUsage.json + */ +async function getFileServiceUsage() { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileServices.getServiceUsage(resourceGroupName, accountName); + console.log(result); +} + +async function main() { + await getFileServiceUsage(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListSample.js index 46f12f7c022d..85e685e53fda 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all file services in storage accounts * * @summary List all file services in storage accounts - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesList.json */ async function listFileServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function listFileServices() { } async function main() { - listFileServices(); + await listFileServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListServiceUsagesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListServiceUsagesSample.js new file mode 100644 index 000000000000..dea9b30ba762 --- /dev/null +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesListServiceUsagesSample.js @@ -0,0 +1,37 @@ +/* + * 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. + */ + +const { StorageManagementClient } = require("@azure/arm-storage"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv/config"); + +/** + * This sample demonstrates how to Gets the usages of file service in storage account. + * + * @summary Gets the usages of file service in storage account. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesListUsages.json + */ +async function listFileServiceUsages() { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileServices.listServiceUsages(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +async function main() { + await listFileServiceUsages(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesSetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesSetServicePropertiesSample.js index 57bb88267dfa..67ecef708a76 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileServicesSetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileServicesSetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut.json */ async function putFileServices() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -63,7 +61,7 @@ async function putFileServices() { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSMBMultichannel.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSMBMultichannel.json */ async function putFileServicesEnableSmbMultichannel() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -86,7 +84,7 @@ async function putFileServicesEnableSmbMultichannel() { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSecureSmbFeatures.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSecureSmbFeatures.json */ async function putFileServicesEnableSecureSmbFeatures() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -113,9 +111,9 @@ async function putFileServicesEnableSecureSmbFeatures() { } async function main() { - putFileServices(); - putFileServicesEnableSmbMultichannel(); - putFileServicesEnableSecureSmbFeatures(); + await putFileServices(); + await putFileServicesEnableSmbMultichannel(); + await putFileServicesEnableSecureSmbFeatures(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesCreateSample.js index 47ddd95261ba..bf0a129637c1 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * 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/2023-05-01/examples/FileSharesPut_NFS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json */ async function createNfsShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function createNfsShares() { * 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/2023-05-01/examples/FileSharesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json */ async function putShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -62,7 +60,7 @@ async function putShares() { * 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/2023-05-01/examples/FileSharesPut_AccessTier.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json */ async function putSharesWithAccessTier() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -81,10 +79,68 @@ async function putSharesWithAccessTier() { console.log(result); } +/** + * 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/2024-01-01/examples/FileSharesPut_PaidBursting.json + */ +async function putSharesWithPaidBursting() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesPut_ProvisionedV2.json + */ +async function putSharesProvisionedV2() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + async function main() { - createNfsShares(); - putShares(); - putSharesWithAccessTier(); + await createNfsShares(); + await putShares(); + await putSharesWithAccessTier(); + await putSharesWithPaidBursting(); + await putSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesDeleteSample.js index e9f61765d85c..ca48232cecb6 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes specified share under its account. * * @summary Deletes specified share under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesDelete.json */ async function deleteShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function deleteShares() { } async function main() { - deleteShares(); + await deleteShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesGetSample.js index bd8bdbd011cd..22a384a166f3 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesGetSample.js @@ -6,17 +6,49 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * 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/2023-05-01/examples/FileSharesGet_Stats.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet_PaidBursting.json + */ +async function getSharePaidBursting() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get(resourceGroupName, accountName, shareName); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_ProvisionedV2.json + */ +async function getShareProvisionedV2() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get(resourceGroupName, accountName, shareName); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_Stats.json */ async function getShareStats() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -35,7 +67,7 @@ async function getShareStats() { * 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/2023-05-01/examples/FileSharesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet.json */ async function getShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -49,8 +81,10 @@ async function getShares() { } async function main() { - getShareStats(); - getShares(); + await getSharePaidBursting(); + await getShareProvisionedV2(); + await getShareStats(); + await getShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesLeaseSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesLeaseSample.js index 29b821fdfd39..9f3d456ba7c0 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesLeaseSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesLeaseSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Acquire.json */ async function acquireALeaseOnAShare() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -41,7 +39,7 @@ async function acquireALeaseOnAShare() { * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Break.json */ async function breakALeaseOnAShare() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -63,8 +61,8 @@ async function breakALeaseOnAShare() { } async function main() { - acquireALeaseOnAShare(); - breakALeaseOnAShare(); + await acquireALeaseOnAShare(); + await breakALeaseOnAShare(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesListSample.js index 7639eb4f03c1..72bc52ab2dce 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedFileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedFileSharesList.json */ async function listDeletedShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -27,7 +25,7 @@ async function listDeletedShares() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list(resourceGroupName, accountName, options)) { + for await (const item of client.fileShares.list(resourceGroupName, accountName, options)) { resArray.push(item); } console.log(resArray); @@ -37,7 +35,7 @@ async function listDeletedShares() { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareSnapshotsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareSnapshotsList.json */ async function listShareSnapshots() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -48,7 +46,7 @@ async function listShareSnapshots() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list(resourceGroupName, accountName, options)) { + for await (const item of client.fileShares.list(resourceGroupName, accountName, options)) { resArray.push(item); } console.log(resArray); @@ -58,7 +56,7 @@ async function listShareSnapshots() { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList.json */ async function listShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -67,16 +65,56 @@ async function listShares() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list(resourceGroupName, accountName)) { + for await (const item of client.fileShares.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_PaidBursting.json + */ +async function listSharesPaidBursting() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list(resourceGroupName, accountName)) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_ProvisionedV2.json + */ +async function listSharesProvisionedV2() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - listDeletedShares(); - listShareSnapshots(); - listShares(); + await listDeletedShares(); + await listShareSnapshots(); + await listShares(); + await listSharesPaidBursting(); + await listSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesRestoreSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesRestoreSample.js index 2ff742938e99..7c99677b0d2b 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesRestoreSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesRestoreSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Restore a file share within a valid retention days if share soft delete is enabled * * @summary Restore a file share within a valid retention days if share soft delete is enabled - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesRestore.json */ async function restoreShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function restoreShares() { } async function main() { - restoreShares(); + await restoreShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesUpdateSample.js index 19890d58d1a3..55d3d2fade86 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/fileSharesUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/fileSharesUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareAclsPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareAclsPatch.json */ async function updateShareAcls() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -50,7 +48,63 @@ async function updateShareAcls() { * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_PaidBursting.json + */ +async function updateSharePaidBursting() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_ProvisionedV2.json + */ +async function updateShareProvisionedV2() { + const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch.json */ async function updateShares() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -70,8 +124,10 @@ async function updateShares() { } async function main() { - updateShareAcls(); - updateShares(); + await updateShareAcls(); + await updateSharePaidBursting(); + await updateShareProvisionedV2(); + await updateShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersCreateOrUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersCreateOrUpdateSample.js index 94625fe85073..dd66fd3729d2 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersCreateOrUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersCreateOrUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreate.json */ async function createLocalUser() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -49,7 +47,7 @@ async function createLocalUser() { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreateNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreateNFSv3Enabled.json */ async function createNfSv3EnabledLocalUser() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -75,7 +73,7 @@ async function createNfSv3EnabledLocalUser() { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserUpdate.json */ async function updateLocalUser() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -104,9 +102,9 @@ async function updateLocalUser() { } async function main() { - createLocalUser(); - createNfSv3EnabledLocalUser(); - updateLocalUser(); + await createLocalUser(); + await createNfSv3EnabledLocalUser(); + await updateLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersDeleteSample.js index 4377fafa62eb..7a8ca68cd2b8 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the local user associated with the specified storage account. * * @summary Deletes the local user associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserDelete.json */ async function deleteLocalUser() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function deleteLocalUser() { } async function main() { - deleteLocalUser(); + await deleteLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersGetSample.js index 1f92df37a4a4..d0d44b6555e7 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the local user of the storage account by username. * * @summary Get the local user of the storage account by username. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserGet.json */ async function getLocalUser() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function getLocalUser() { } async function main() { - getLocalUser(); + await getLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersListKeysSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersListKeysSample.js index d19b3cf34328..72597ecd1374 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersListKeysSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersListKeysSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List SSH authorized keys and shared key of the local user. * * @summary List SSH authorized keys and shared key of the local user. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserListKeys.json */ async function listLocalUserKeys() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function listLocalUserKeys() { } async function main() { - listLocalUserKeys(); + await listLocalUserKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersListSample.js index 8258057857a0..725cef92f513 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersList.json */ async function listLocalUsers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,7 +23,7 @@ async function listLocalUsers() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.localUsersOperations.list(resourceGroupName, accountName)) { + for await (const item of client.localUsersOperations.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); @@ -35,7 +33,7 @@ async function listLocalUsers() { * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersListNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersListNFSv3Enabled.json */ async function listNfSv3EnabledLocalUsers() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -46,7 +44,7 @@ async function listNfSv3EnabledLocalUsers() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.localUsersOperations.list( + for await (const item of client.localUsersOperations.list( resourceGroupName, accountName, options, @@ -57,8 +55,8 @@ async function listNfSv3EnabledLocalUsers() { } async function main() { - listLocalUsers(); - listNfSv3EnabledLocalUsers(); + await listLocalUsers(); + await listNfSv3EnabledLocalUsers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/localUsersRegeneratePasswordSample.js b/sdk/storage/arm-storage/samples/v18/javascript/localUsersRegeneratePasswordSample.js index 201912d7aebf..832d5c0dd6dd 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/localUsersRegeneratePasswordSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/localUsersRegeneratePasswordSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Regenerate the local user SSH password. * * @summary Regenerate the local user SSH password. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserRegeneratePassword.json */ async function regenerateLocalUserPassword() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function regenerateLocalUserPassword() { } async function main() { - regenerateLocalUserPassword(); + await regenerateLocalUserPassword(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesCreateOrUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesCreateOrUpdateSample.js index 4b0b06d55975..ab6eec4d7bfa 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesCreateOrUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesCreateOrUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy.json */ async function storageAccountSetManagementPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -85,7 +83,7 @@ async function storageAccountSetManagementPolicies() { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyColdTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyColdTierActions.json */ async function storageAccountSetManagementPolicyColdTierActions() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -140,7 +138,7 @@ async function storageAccountSetManagementPolicyColdTierActions() { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json */ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -184,7 +182,7 @@ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs() { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyHotTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyHotTierActions.json */ async function storageAccountSetManagementPolicyHotTierActions() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -228,7 +226,7 @@ async function storageAccountSetManagementPolicyHotTierActions() { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json */ async function storageAccountSetManagementPolicyWithSnapshotAndVersion() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -284,7 +282,7 @@ async function storageAccountSetManagementPolicyWithSnapshotAndVersion() { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json */ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -330,7 +328,7 @@ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json */ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -378,7 +376,7 @@ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json */ async function storageAccountSetManagementPolicyLastTierChangeTimeActions() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -436,14 +434,14 @@ async function storageAccountSetManagementPolicyLastTierChangeTimeActions() { } async function main() { - storageAccountSetManagementPolicies(); - storageAccountSetManagementPolicyColdTierActions(); - storageAccountSetManagementPolicyForBlockAndAppendBlobs(); - storageAccountSetManagementPolicyHotTierActions(); - storageAccountSetManagementPolicyWithSnapshotAndVersion(); - storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(); - storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(); - storageAccountSetManagementPolicyLastTierChangeTimeActions(); + await storageAccountSetManagementPolicies(); + await storageAccountSetManagementPolicyColdTierActions(); + await storageAccountSetManagementPolicyForBlockAndAppendBlobs(); + await storageAccountSetManagementPolicyHotTierActions(); + await storageAccountSetManagementPolicyWithSnapshotAndVersion(); + await storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(); + await storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(); + await storageAccountSetManagementPolicyLastTierChangeTimeActions(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesDeleteSample.js index 9f4758d38f9a..6ac6e59d34db 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the managementpolicy associated with the specified storage account. * * @summary Deletes the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteManagementPolicy.json */ async function storageAccountDeleteManagementPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountDeleteManagementPolicies() { } async function main() { - storageAccountDeleteManagementPolicies(); + await storageAccountDeleteManagementPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesGetSample.js index 388b3c376331..3136a5a91b8c 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/managementPoliciesGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the managementpolicy associated with the specified storage account. * * @summary Gets the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetManagementPolicy.json */ async function storageAccountGetManagementPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountGetManagementPolicies() { } async function main() { - storageAccountGetManagementPolicies(); + await storageAccountGetManagementPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsGetSample.js index 5eeeb5341178..121d8750d427 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets effective NetworkSecurityPerimeterConfiguration for association * * @summary Gets effective NetworkSecurityPerimeterConfiguration for association - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationGet.json */ async function networkSecurityPerimeterConfigurationGet() { const subscriptionId = @@ -36,7 +34,7 @@ async function networkSecurityPerimeterConfigurationGet() { } async function main() { - networkSecurityPerimeterConfigurationGet(); + await networkSecurityPerimeterConfigurationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsListSample.js index 031849506678..05ce3a8ef9f7 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets list of effective NetworkSecurityPerimeterConfiguration for storage account * * @summary Gets list of effective NetworkSecurityPerimeterConfiguration for storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationList.json */ async function networkSecurityPerimeterConfigurationList() { const subscriptionId = @@ -26,7 +24,7 @@ async function networkSecurityPerimeterConfigurationList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.networkSecurityPerimeterConfigurations.list( + for await (const item of client.networkSecurityPerimeterConfigurations.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function networkSecurityPerimeterConfigurationList() { } async function main() { - networkSecurityPerimeterConfigurationList(); + await networkSecurityPerimeterConfigurationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js index aebd13535a2d..cc9d66600ae0 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/networkSecurityPerimeterConfigurationsReconcileSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Refreshes any information about the association. * * @summary Refreshes any information about the association. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json */ async function networkSecurityPerimeterConfigurationReconcile() { const subscriptionId = @@ -36,7 +34,7 @@ async function networkSecurityPerimeterConfigurationReconcile() { } async function main() { - networkSecurityPerimeterConfigurationReconcile(); + await networkSecurityPerimeterConfigurationReconcile(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesCreateOrUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesCreateOrUpdateSample.js index f791ed8cfc6d..d0630b018a40 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesCreateOrUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesCreateOrUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json */ async function storageAccountCreateObjectReplicationPolicyOnDestination() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,6 +23,7 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination() { const objectReplicationPolicyId = "default"; const properties = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -49,7 +48,7 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination() { * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json */ async function storageAccountCreateObjectReplicationPolicyOnSource() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -58,6 +57,7 @@ async function storageAccountCreateObjectReplicationPolicyOnSource() { const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -86,7 +86,7 @@ async function storageAccountCreateObjectReplicationPolicyOnSource() { * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateObjectReplicationPolicyOnDestination.json */ async function storageAccountUpdateObjectReplicationPolicyOnDestination() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -95,6 +95,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination() { const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -121,7 +122,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination() { * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json */ async function storageAccountUpdateObjectReplicationPolicyOnSource() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -130,6 +131,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnSource() { const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -157,10 +159,10 @@ async function storageAccountUpdateObjectReplicationPolicyOnSource() { } async function main() { - storageAccountCreateObjectReplicationPolicyOnDestination(); - storageAccountCreateObjectReplicationPolicyOnSource(); - storageAccountUpdateObjectReplicationPolicyOnDestination(); - storageAccountUpdateObjectReplicationPolicyOnSource(); + await storageAccountCreateObjectReplicationPolicyOnDestination(); + await storageAccountCreateObjectReplicationPolicyOnSource(); + await storageAccountUpdateObjectReplicationPolicyOnDestination(); + await storageAccountUpdateObjectReplicationPolicyOnSource(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesDeleteSample.js index eba5182a5161..d79bfcfe108b 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the object replication policy associated with the specified storage account. * * @summary Deletes the object replication policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteObjectReplicationPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteObjectReplicationPolicy.json */ async function storageAccountDeleteObjectReplicationPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountDeleteObjectReplicationPolicies() { } async function main() { - storageAccountDeleteObjectReplicationPolicies(); + await storageAccountDeleteObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesGetSample.js index e0de326977d7..0145e4e5c83f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the object replication policy of the storage account by policy ID. * * @summary Get the object replication policy of the storage account by policy ID. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetObjectReplicationPolicy.json */ async function storageAccountGetObjectReplicationPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountGetObjectReplicationPolicies() { } async function main() { - storageAccountGetObjectReplicationPolicies(); + await storageAccountGetObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesListSample.js index e8b74f948f16..01922247d6b2 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/objectReplicationPoliciesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List the object replication policies associated with the storage account. * * @summary List the object replication policies associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListObjectReplicationPolicies.json */ async function storageAccountListObjectReplicationPolicies() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,7 +23,7 @@ async function storageAccountListObjectReplicationPolicies() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.objectReplicationPoliciesOperations.list( + for await (const item of client.objectReplicationPoliciesOperations.list( resourceGroupName, accountName, )) { @@ -35,7 +33,7 @@ async function storageAccountListObjectReplicationPolicies() { } async function main() { - storageAccountListObjectReplicationPolicies(); + await storageAccountListObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/operationsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/operationsListSample.js index 4f061750c5a5..0dc815b510ba 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/operationsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/operationsListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all of the available Storage Rest API operations. * * @summary Lists all of the available Storage Rest API operations. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/OperationsList.json */ async function operationsList() { const subscriptionId = @@ -24,14 +22,14 @@ async function operationsList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } console.log(resArray); } async function main() { - operationsList(); + await operationsList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/package.json b/sdk/storage/arm-storage/samples/v18/javascript/package.json index 0e69b6a87cb8..ac89013f2123 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/package.json +++ b/sdk/storage/arm-storage/samples/v18/javascript/package.json @@ -27,6 +27,6 @@ "dependencies": { "@azure/arm-storage": "latest", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.7.0" } } diff --git a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsDeleteSample.js index d877a65ba40c..16a7ff07d603 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the specified private endpoint connection associated with the storage account. * * @summary Deletes the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeletePrivateEndpointConnection.json */ async function storageAccountDeletePrivateEndpointConnection() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountDeletePrivateEndpointConnection() { } async function main() { - storageAccountDeletePrivateEndpointConnection(); + await storageAccountDeletePrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsGetSample.js index c8a375209203..6290e04a55c8 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the specified private endpoint connection associated with the storage account. * * @summary Gets the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPrivateEndpointConnection.json */ async function storageAccountGetPrivateEndpointConnection() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountGetPrivateEndpointConnection() { } async function main() { - storageAccountGetPrivateEndpointConnection(); + await storageAccountGetPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsListSample.js index 82b8d6791a0f..1617975e8a6c 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all the private endpoint connections associated with the storage account. * * @summary List all the private endpoint connections associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateEndpointConnections.json */ async function storageAccountListPrivateEndpointConnections() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function storageAccountListPrivateEndpointConnections() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.privateEndpointConnections.list(resourceGroupName, accountName)) { + for await (const item of client.privateEndpointConnections.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - storageAccountListPrivateEndpointConnections(); + await storageAccountListPrivateEndpointConnections(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsPutSample.js b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsPutSample.js index de67dd6340ee..125423364e7f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsPutSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/privateEndpointConnectionsPutSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update the state of specified private endpoint connection associated with the storage account. * * @summary Update the state of specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutPrivateEndpointConnection.json */ async function storageAccountPutPrivateEndpointConnection() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -41,7 +39,7 @@ async function storageAccountPutPrivateEndpointConnection() { } async function main() { - storageAccountPutPrivateEndpointConnection(); + await storageAccountPutPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/privateLinkResourcesListByStorageAccountSample.js b/sdk/storage/arm-storage/samples/v18/javascript/privateLinkResourcesListByStorageAccountSample.js index 65278ea752b6..2a72307052c4 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/privateLinkResourcesListByStorageAccountSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/privateLinkResourcesListByStorageAccountSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the private link resources that need to be created for a storage account. * * @summary Gets the private link resources that need to be created for a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateLinkResources.json */ async function storageAccountListPrivateLinkResources() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +30,7 @@ async function storageAccountListPrivateLinkResources() { } async function main() { - storageAccountListPrivateLinkResources(); + await storageAccountListPrivateLinkResources(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueCreateSample.js index b524c33ef4b3..18f59c5b8269 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPut.json */ async function queueOperationPut() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function queueOperationPut() { * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPutWithMetadata.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPutWithMetadata.json */ async function queueOperationPutWithMetadata() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -51,8 +49,8 @@ async function queueOperationPutWithMetadata() { } async function main() { - queueOperationPut(); - queueOperationPutWithMetadata(); + await queueOperationPut(); + await queueOperationPutWithMetadata(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueDeleteSample.js index 17cf96bc85ad..483cb443a518 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the queue with the specified queue name, under the specified account if it exists. * * @summary Deletes the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationDelete.json */ async function queueOperationDelete() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function queueOperationDelete() { } async function main() { - queueOperationDelete(); + await queueOperationDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueGetSample.js index 4422e1c4defe..5297ef5488f0 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the queue with the specified queue name, under the specified account if it exists. * * @summary Gets the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationGet.json */ async function queueOperationGet() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function queueOperationGet() { } async function main() { - queueOperationGet(); + await queueOperationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueListSample.js index ac46468d1092..d9220e715ecd 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets a list of all the queues under the specified storage account * * @summary Gets a list of all the queues under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationList.json */ async function queueOperationList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function queueOperationList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.queue.list(resourceGroupName, accountName)) { + for await (const item of client.queue.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - queueOperationList(); + await queueOperationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesGetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesGetServicePropertiesSample.js index a16c33b7e5a3..3b725473addd 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesGetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesGetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesGet.json */ async function queueServicesGet() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function queueServicesGet() { } async function main() { - queueServicesGet(); + await queueServicesGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesListSample.js index ff6f2835ea3a..6da2a1481042 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all queue services for the storage account * * @summary List all queue services for the storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesList.json */ async function queueServicesList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function queueServicesList() { } async function main() { - queueServicesList(); + await queueServicesList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesSetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesSetServicePropertiesSample.js index 0ae67bc5b606..498f3894e96f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueServicesSetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueServicesSetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesPut.json */ async function queueServicesPut() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -60,7 +58,7 @@ async function queueServicesPut() { } async function main() { - queueServicesPut(); + await queueServicesPut(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/queueUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/queueUpdateSample.js index de1ef2bef9cb..c10e82c0d740 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/queueUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/queueUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPatch.json */ async function queueOperationPatch() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -31,7 +29,7 @@ async function queueOperationPatch() { } async function main() { - queueOperationPatch(); + await queueOperationPatch(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/sample.env b/sdk/storage/arm-storage/samples/v18/javascript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/sample.env +++ b/sdk/storage/arm-storage/samples/v18/javascript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storage/arm-storage/samples/v18/javascript/skusListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/skusListSample.js index 15c2145fdee5..21d0954c993f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/skusListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/skusListSample.js @@ -6,31 +6,29 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the available SKUs supported by Microsoft.Storage for given subscription. * * @summary Lists the available SKUs supported by Microsoft.Storage for given subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/SKUList.json */ async function skuList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.skus.list()) { + for await (const item of client.skus.list()) { resArray.push(item); } console.log(resArray); } async function main() { - skuList(); + await skuList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsAbortHierarchicalNamespaceMigrationSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsAbortHierarchicalNamespaceMigrationSample.js index 3febb5cf3f6b..2a8e8d993f8e 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsAbortHierarchicalNamespaceMigrationSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsAbortHierarchicalNamespaceMigrationSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Abort live Migration of storage account to enable Hns * * @summary Abort live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json */ async function storageAccountAbortHierarchicalNamespaceMigration() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +30,7 @@ async function storageAccountAbortHierarchicalNamespaceMigration() { } async function main() { - storageAccountAbortHierarchicalNamespaceMigration(); + await storageAccountAbortHierarchicalNamespaceMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCheckNameAvailabilitySample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCheckNameAvailabilitySample.js index fe176b70b7d7..3344f20c6f4f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCheckNameAvailabilitySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCheckNameAvailabilitySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Checks that the storage account name is valid and is not already in use. * * @summary Checks that the storage account name is valid and is not already in use. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCheckNameAvailability.json */ async function storageAccountCheckNameAvailability() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -31,7 +29,7 @@ async function storageAccountCheckNameAvailability() { } async function main() { - storageAccountCheckNameAvailability(); + await storageAccountCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCreateSample.js index 156307d99b4a..f5652604e6b2 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NfsV3AccountCreate.json */ async function nfsV3AccountCreate() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -56,7 +54,7 @@ async function nfsV3AccountCreate() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreate.json */ async function storageAccountCreate() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -104,7 +102,7 @@ async function storageAccountCreate() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json */ async function storageAccountCreateAllowedCopyScopeToAad() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -150,7 +148,7 @@ async function storageAccountCreateAllowedCopyScopeToAad() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json */ async function storageAccountCreateAllowedCopyScopeToPrivateLink() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -196,7 +194,7 @@ async function storageAccountCreateAllowedCopyScopeToPrivateLink() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDisallowPublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateDisallowPublicNetworkAccess.json */ async function storageAccountCreateDisallowPublicNetworkAccess() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -243,7 +241,7 @@ async function storageAccountCreateDisallowPublicNetworkAccess() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json */ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -292,7 +290,7 @@ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToStandard.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateDnsEndpointTypeToStandard.json */ async function storageAccountCreateDnsEndpointTypeToStandard() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -341,7 +339,7 @@ async function storageAccountCreateDnsEndpointTypeToStandard() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json */ async function storageAccountCreateEnablePublicNetworkAccess() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -388,7 +386,7 @@ async function storageAccountCreateEnablePublicNetworkAccess() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json */ async function storageAccountCreatePremiumBlockBlobStorage() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -424,7 +422,7 @@ async function storageAccountCreatePremiumBlockBlobStorage() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -472,7 +470,7 @@ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk() { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -521,7 +519,7 @@ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateWithImmutabilityPolicy.json */ async function storageAccountCreateWithImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -552,18 +550,18 @@ async function storageAccountCreateWithImmutabilityPolicy() { } async function main() { - nfsV3AccountCreate(); - storageAccountCreate(); - storageAccountCreateAllowedCopyScopeToAad(); - storageAccountCreateAllowedCopyScopeToPrivateLink(); - storageAccountCreateDisallowPublicNetworkAccess(); - storageAccountCreateDnsEndpointTypeToAzureDnsZone(); - storageAccountCreateDnsEndpointTypeToStandard(); - storageAccountCreateEnablePublicNetworkAccess(); - storageAccountCreatePremiumBlockBlobStorage(); - storageAccountCreateUserAssignedEncryptionIdentityWithCmk(); - storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(); - storageAccountCreateWithImmutabilityPolicy(); + await nfsV3AccountCreate(); + await storageAccountCreate(); + await storageAccountCreateAllowedCopyScopeToAad(); + await storageAccountCreateAllowedCopyScopeToPrivateLink(); + await storageAccountCreateDisallowPublicNetworkAccess(); + await storageAccountCreateDnsEndpointTypeToAzureDnsZone(); + await storageAccountCreateDnsEndpointTypeToStandard(); + await storageAccountCreateEnablePublicNetworkAccess(); + await storageAccountCreatePremiumBlockBlobStorage(); + await storageAccountCreateUserAssignedEncryptionIdentityWithCmk(); + await storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(); + await storageAccountCreateWithImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCustomerInitiatedMigrationSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCustomerInitiatedMigrationSample.js index eac28262149f..51c3150dd78b 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCustomerInitiatedMigrationSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsCustomerInitiatedMigrationSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. * * @summary Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPostMigration.json */ async function storageAccountPostMigration() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountPostMigration() { } async function main() { - storageAccountPostMigration(); + await storageAccountPostMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsDeleteSample.js index 3ae07499e2d8..b28750542e7a 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes a storage account in Microsoft Azure. * * @summary Deletes a storage account in Microsoft Azure. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDelete.json */ async function storageAccountDelete() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function storageAccountDelete() { } async function main() { - storageAccountDelete(); + await storageAccountDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsFailoverSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsFailoverSample.js index 82f11471a840..a68784f6a95f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsFailoverSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsFailoverSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailover.json */ async function storageAccountFailover() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +30,7 @@ async function storageAccountFailover() { * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailoverPlanned.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailoverPlanned.json */ async function storageAccountFailoverPlanned() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -45,8 +43,8 @@ async function storageAccountFailoverPlanned() { } async function main() { - storageAccountFailover(); - storageAccountFailoverPlanned(); + await storageAccountFailover(); + await storageAccountFailoverPlanned(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetCustomerInitiatedMigrationSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetCustomerInitiatedMigrationSample.js index 012b15640bbe..1cf2e9786f0e 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetCustomerInitiatedMigrationSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetCustomerInitiatedMigrationSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationFailed.json */ async function storageAccountGetMigrationFailed() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -37,7 +35,7 @@ async function storageAccountGetMigrationFailed() { * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationInProgress.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationInProgress.json */ async function storageAccountGetMigrationInProgress() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -55,8 +53,8 @@ async function storageAccountGetMigrationInProgress() { } async function main() { - storageAccountGetMigrationFailed(); - storageAccountGetMigrationInProgress(); + await storageAccountGetMigrationFailed(); + await storageAccountGetMigrationInProgress(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetPropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetPropertiesSample.js index 2dc797454369..48d97664ab29 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetPropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsGetPropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetAsyncSkuConversionStatus.json */ async function storageAccountGetAsyncSkuConversionStatus() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +30,7 @@ async function storageAccountGetAsyncSkuConversionStatus() { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetProperties.json */ async function storageAccountGetProperties() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -48,7 +46,7 @@ async function storageAccountGetProperties() { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKEnabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKEnabled.json */ async function storageAccountGetPropertiesCmkEnabled() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -64,7 +62,7 @@ async function storageAccountGetPropertiesCmkEnabled() { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json */ async function storageAccountGetPropertiesCmkVersionExpirationTime() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -80,7 +78,7 @@ async function storageAccountGetPropertiesCmkVersionExpirationTime() { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverFalse.json */ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -102,7 +100,7 @@ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse() * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json */ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -121,12 +119,12 @@ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue() { } async function main() { - storageAccountGetAsyncSkuConversionStatus(); - storageAccountGetProperties(); - storageAccountGetPropertiesCmkEnabled(); - storageAccountGetPropertiesCmkVersionExpirationTime(); - storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(); - storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(); + await storageAccountGetAsyncSkuConversionStatus(); + await storageAccountGetProperties(); + await storageAccountGetPropertiesCmkEnabled(); + await storageAccountGetPropertiesCmkVersionExpirationTime(); + await storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(); + await storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsHierarchicalNamespaceMigrationSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsHierarchicalNamespaceMigrationSample.js index 10cb751286a9..993e5e83fb04 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsHierarchicalNamespaceMigrationSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsHierarchicalNamespaceMigrationSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Live Migration of storage account to enable Hns * * @summary Live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountHierarchicalNamespaceMigration.json */ async function storageAccountHierarchicalNamespaceMigration() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -34,7 +32,7 @@ async function storageAccountHierarchicalNamespaceMigration() { } async function main() { - storageAccountHierarchicalNamespaceMigration(); + await storageAccountHierarchicalNamespaceMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListAccountSasSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListAccountSasSample.js index 9e4b4ef0c48b..a3be4772f098 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListAccountSasSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListAccountSasSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List SAS credentials of a storage account. * * @summary List SAS credentials of a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListAccountSAS.json */ async function storageAccountListAccountSas() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -42,7 +40,7 @@ async function storageAccountListAccountSas() { } async function main() { - storageAccountListAccountSas(); + await storageAccountListAccountSas(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListByResourceGroupSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListByResourceGroupSample.js index 1dbd706b42e8..e315d829587d 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListByResourceGroupSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListByResourceGroupSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListByResourceGroup.json */ async function storageAccountListByResourceGroup() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -24,14 +22,14 @@ async function storageAccountListByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageAccounts.listByResourceGroup(resourceGroupName)) { + for await (const item of client.storageAccounts.listByResourceGroup(resourceGroupName)) { resArray.push(item); } console.log(resArray); } async function main() { - storageAccountListByResourceGroup(); + await storageAccountListByResourceGroup(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListKeysSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListKeysSample.js index 73811f40c5e7..27a77d2175e6 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListKeysSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListKeysSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @summary Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListKeys.json */ async function storageAccountListKeys() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function storageAccountListKeys() { } async function main() { - storageAccountListKeys(); + await storageAccountListKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListSample.js index a7dcc4be03a2..4afedd7b4e4c 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListSample.js @@ -6,31 +6,29 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountList.json */ async function storageAccountList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageAccounts.list()) { + for await (const item of client.storageAccounts.list()) { resArray.push(item); } console.log(resArray); } async function main() { - storageAccountList(); + await storageAccountList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListServiceSasSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListServiceSasSample.js index a1e9b58dc2fb..85ca807201a2 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListServiceSasSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsListServiceSasSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List service SAS credentials of a specific resource. * * @summary List service SAS credentials of a specific resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListServiceSAS.json */ async function storageAccountListServiceSas() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function storageAccountListServiceSas() { } async function main() { - storageAccountListServiceSas(); + await storageAccountListServiceSas(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRegenerateKeySample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRegenerateKeySample.js index c3d956c5118e..69d1e2bd96ae 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRegenerateKeySample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRegenerateKeySample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKerbKey.json */ async function storageAccountRegenerateKerbKey() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -39,7 +37,7 @@ async function storageAccountRegenerateKerbKey() { * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKey.json */ async function storageAccountRegenerateKey() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -59,8 +57,8 @@ async function storageAccountRegenerateKey() { } async function main() { - storageAccountRegenerateKerbKey(); - storageAccountRegenerateKey(); + await storageAccountRegenerateKerbKey(); + await storageAccountRegenerateKey(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRestoreBlobRangesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRestoreBlobRangesSample.js index 740eac515d4f..a8cf776107a5 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRestoreBlobRangesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRestoreBlobRangesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Restore blobs in the specified blob ranges * * @summary Restore blobs in the specified blob ranges - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobRangesRestore.json */ async function blobRangesRestore() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -40,7 +38,7 @@ async function blobRangesRestore() { } async function main() { - blobRangesRestore(); + await blobRangesRestore(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRevokeUserDelegationKeysSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRevokeUserDelegationKeysSample.js index b98dc59faf7f..afa0a95644cc 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRevokeUserDelegationKeysSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsRevokeUserDelegationKeysSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Revoke user delegation keys. * * @summary Revoke user delegation keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRevokeUserDelegationKeys.json */ async function storageAccountRevokeUserDelegationKeys() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -32,7 +30,7 @@ async function storageAccountRevokeUserDelegationKeys() { } async function main() { - storageAccountRevokeUserDelegationKeys(); + await storageAccountRevokeUserDelegationKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsUpdateSample.js index 6f3413b24142..356cc997c6be 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageAccountsUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableAD.json */ async function storageAccountEnableAd() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -47,7 +45,7 @@ async function storageAccountEnableAd() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableCMK.json */ async function storageAccountEnableCmk() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -77,7 +75,7 @@ async function storageAccountEnableCmk() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdate.json */ async function storageAccountUpdate() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -126,7 +124,7 @@ async function storageAccountUpdate() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json */ async function storageAccountUpdateAllowedCopyScopeToAad() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -172,7 +170,7 @@ async function storageAccountUpdateAllowedCopyScopeToAad() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json */ async function storageAccountUpdateDisablePublicNetworkAccess() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -218,7 +216,7 @@ async function storageAccountUpdateDisablePublicNetworkAccess() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -261,7 +259,7 @@ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk() { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -305,7 +303,7 @@ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json */ async function storageAccountUpdateWithImmutabilityPolicy() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -328,14 +326,14 @@ async function storageAccountUpdateWithImmutabilityPolicy() { } async function main() { - storageAccountEnableAd(); - storageAccountEnableCmk(); - storageAccountUpdate(); - storageAccountUpdateAllowedCopyScopeToAad(); - storageAccountUpdateDisablePublicNetworkAccess(); - storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(); - storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(); - storageAccountUpdateWithImmutabilityPolicy(); + await storageAccountEnableAd(); + await storageAccountEnableCmk(); + await storageAccountUpdate(); + await storageAccountUpdateAllowedCopyScopeToAad(); + await storageAccountUpdateDisablePublicNetworkAccess(); + await storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(); + await storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(); + await storageAccountUpdateWithImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentInstancesReportListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentInstancesReportListSample.js index c2b8d9ccb1a4..1b9590b53640 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentInstancesReportListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentInstancesReportListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Fetch the report summary of a single storage task assignment's instances * * @summary Fetch the report summary of a single storage task assignment's instances - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json */ async function listStorageTaskAssignmentInstancesReportSummary() { const subscriptionId = @@ -27,7 +25,7 @@ async function listStorageTaskAssignmentInstancesReportSummary() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignmentInstancesReport.list( + for await (const item of client.storageTaskAssignmentInstancesReport.list( resourceGroupName, accountName, storageTaskAssignmentName, @@ -38,7 +36,7 @@ async function listStorageTaskAssignmentInstancesReportSummary() { } async function main() { - listStorageTaskAssignmentInstancesReportSummary(); + await listStorageTaskAssignmentInstancesReportSummary(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsCreateSample.js index d912cce424f8..1184ca9ea92c 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json */ async function putStorageTaskAssignment() { const subscriptionId = @@ -55,7 +53,7 @@ async function putStorageTaskAssignment() { * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json */ async function putStorageTaskAssignmentRequiredProperties() { const subscriptionId = @@ -90,8 +88,8 @@ async function putStorageTaskAssignmentRequiredProperties() { } async function main() { - putStorageTaskAssignment(); - putStorageTaskAssignmentRequiredProperties(); + await putStorageTaskAssignment(); + await putStorageTaskAssignmentRequiredProperties(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsDeleteSample.js index 577efe7ca8ee..75b588ab6d8f 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Delete the storage task assignment sub-resource * * @summary Delete the storage task assignment sub-resource - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json */ async function deleteStorageTaskAssignment() { const subscriptionId = @@ -35,7 +33,7 @@ async function deleteStorageTaskAssignment() { } async function main() { - deleteStorageTaskAssignment(); + await deleteStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsGetSample.js index 07ceba1b048d..63859aaf05ae 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Get the storage task assignment properties * * @summary Get the storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json */ async function getStorageTaskAssignment() { const subscriptionId = @@ -35,7 +33,7 @@ async function getStorageTaskAssignment() { } async function main() { - getStorageTaskAssignment(); + await getStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsInstancesReportListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsInstancesReportListSample.js index dbe25e7ed8f3..71bf0890e0e5 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsInstancesReportListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsInstancesReportListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Fetch the report summary of all the storage task assignments and instances in an account * * @summary Fetch the report summary of all the storage task assignments and instances in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json */ async function listStorageTaskAssignmentsInstancesReportSummary() { const subscriptionId = @@ -26,7 +24,7 @@ async function listStorageTaskAssignmentsInstancesReportSummary() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignmentsInstancesReport.list( + for await (const item of client.storageTaskAssignmentsInstancesReport.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function listStorageTaskAssignmentsInstancesReportSummary() { } async function main() { - listStorageTaskAssignmentsInstancesReportSummary(); + await listStorageTaskAssignmentsInstancesReportSummary(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsListSample.js index a5cf297503c9..2d3d8f4693b3 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all the storage task assignments in an account * * @summary List all the storage task assignments in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json */ async function listStorageTaskAssignmentsForAccount() { const subscriptionId = @@ -26,14 +24,14 @@ async function listStorageTaskAssignmentsForAccount() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignments.list(resourceGroupName, accountName)) { + for await (const item of client.storageTaskAssignments.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - listStorageTaskAssignmentsForAccount(); + await listStorageTaskAssignmentsForAccount(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsUpdateSample.js index d5215c6f9de5..58c220e160d7 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/storageTaskAssignmentsUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Update storage task assignment properties * * @summary Update storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json */ async function patchStorageTaskAssignment() { const subscriptionId = @@ -50,7 +48,7 @@ async function patchStorageTaskAssignment() { } async function main() { - patchStorageTaskAssignment(); + await patchStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableCreateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableCreateSample.js index 2395f8cb2175..191554a1b989 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableCreateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableCreateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPut.json */ async function tableOperationPut() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -33,7 +31,7 @@ async function tableOperationPut() { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -73,8 +71,8 @@ async function tableOperationPutOrPatchAcls() { } async function main() { - tableOperationPut(); - tableOperationPutOrPatchAcls(); + await tableOperationPut(); + await tableOperationPutOrPatchAcls(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableDeleteSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableDeleteSample.js index c105a0b9fb1a..3316d9d95abf 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableDeleteSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableDeleteSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Deletes the table with the specified table name, under the specified account if it exists. * * @summary Deletes the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationDelete.json */ async function tableOperationDelete() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function tableOperationDelete() { } async function main() { - tableOperationDelete(); + await tableOperationDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableGetSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableGetSample.js index f3aec14885fc..103a0f913e75 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableGetSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableGetSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the table with the specified table name, under the specified account if it exists. * * @summary Gets the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationGet.json */ async function tableOperationGet() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -30,7 +28,7 @@ async function tableOperationGet() { } async function main() { - tableOperationGet(); + await tableOperationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableListSample.js index 38281a64c1f2..5d53aaafd67a 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets a list of all the tables under the specified storage account * * @summary Gets a list of all the tables under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationList.json */ async function tableOperationList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -25,14 +23,14 @@ async function tableOperationList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.tableOperations.list(resourceGroupName, accountName)) { + for await (const item of client.tableOperations.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main() { - tableOperationList(); + await tableOperationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesGetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesGetServicePropertiesSample.js index 4480ea35c36e..def04f04a482 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesGetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesGetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesGet.json */ async function tableServicesGet() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function tableServicesGet() { } async function main() { - tableServicesGet(); + await tableServicesGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesListSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesListSample.js index b20c2a16a753..7623c48cf375 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesListSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesListSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to List all table services for the storage account. * * @summary List all table services for the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesList.json */ async function tableServicesList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -29,7 +27,7 @@ async function tableServicesList() { } async function main() { - tableServicesList(); + await tableServicesList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesSetServicePropertiesSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesSetServicePropertiesSample.js index 421f5d7a6f4b..ac81d28eab33 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableServicesSetServicePropertiesSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableServicesSetServicePropertiesSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesPut.json */ async function tableServicesPut() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -60,7 +58,7 @@ async function tableServicesPut() { } async function main() { - tableServicesPut(); + await tableServicesPut(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/tableUpdateSample.js b/sdk/storage/arm-storage/samples/v18/javascript/tableUpdateSample.js index a648d1a03ea1..b7629262307d 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/tableUpdateSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/tableUpdateSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPatch.json */ async function tableOperationPatch() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -33,7 +31,7 @@ async function tableOperationPatch() { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -73,8 +71,8 @@ async function tableOperationPutOrPatchAcls() { } async function main() { - tableOperationPatch(); - tableOperationPutOrPatchAcls(); + await tableOperationPatch(); + await tableOperationPutOrPatchAcls(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/javascript/usagesListByLocationSample.js b/sdk/storage/arm-storage/samples/v18/javascript/usagesListByLocationSample.js index fbfbcd60da08..bc1c8f90ba77 100644 --- a/sdk/storage/arm-storage/samples/v18/javascript/usagesListByLocationSample.js +++ b/sdk/storage/arm-storage/samples/v18/javascript/usagesListByLocationSample.js @@ -6,17 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. const { StorageManagementClient } = require("@azure/arm-storage"); const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); +require("dotenv/config"); /** * This sample demonstrates how to Gets the current usage count and the limit for the resources of the location under the subscription. * * @summary Gets the current usage count and the limit for the resources of the location under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListLocationUsage.json */ async function usageList() { const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; @@ -24,14 +22,14 @@ async function usageList() { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.usages.listByLocation(location)) { + for await (const item of client.usages.listByLocation(location)) { resArray.push(item); } console.log(resArray); } async function main() { - usageList(); + await usageList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/README.md b/sdk/storage/arm-storage/samples/v18/typescript/README.md index 25255fcb7aed..f88c4117e676 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/README.md +++ b/sdk/storage/arm-storage/samples/v18/typescript/README.md @@ -4,108 +4,110 @@ These sample programs show how to use the TypeScript client libraries for in som | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [blobContainersClearLegalHoldSample.ts][blobcontainersclearlegalholdsample] | Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json | -| [blobContainersCreateOrUpdateImmutabilityPolicySample.ts][blobcontainerscreateorupdateimmutabilitypolicysample] | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json | -| [blobContainersCreateSample.ts][blobcontainerscreatesample] | Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json | -| [blobContainersDeleteImmutabilityPolicySample.ts][blobcontainersdeleteimmutabilitypolicysample] | Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json | -| [blobContainersDeleteSample.ts][blobcontainersdeletesample] | Deletes specified container under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json | -| [blobContainersExtendImmutabilityPolicySample.ts][blobcontainersextendimmutabilitypolicysample] | Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json | -| [blobContainersGetImmutabilityPolicySample.ts][blobcontainersgetimmutabilitypolicysample] | Gets the existing immutability policy along with the corresponding ETag in response headers and body. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json | -| [blobContainersGetSample.ts][blobcontainersgetsample] | Gets properties of a specified container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json | -| [blobContainersLeaseSample.ts][blobcontainersleasesample] | The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json | -| [blobContainersListSample.ts][blobcontainerslistsample] | Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json | -| [blobContainersLockImmutabilityPolicySample.ts][blobcontainerslockimmutabilitypolicysample] | Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json | -| [blobContainersObjectLevelWormSample.ts][blobcontainersobjectlevelwormsample] | This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json | -| [blobContainersSetLegalHoldSample.ts][blobcontainerssetlegalholdsample] | Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json | -| [blobContainersUpdateSample.ts][blobcontainersupdatesample] | Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json | -| [blobInventoryPoliciesCreateOrUpdateSample.ts][blobinventorypoliciescreateorupdatesample] | Sets the blob inventory policy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json | -| [blobInventoryPoliciesDeleteSample.ts][blobinventorypoliciesdeletesample] | Deletes the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json | -| [blobInventoryPoliciesGetSample.ts][blobinventorypoliciesgetsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json | -| [blobInventoryPoliciesListSample.ts][blobinventorypolicieslistsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json | -| [blobServicesGetServicePropertiesSample.ts][blobservicesgetservicepropertiessample] | Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json | -| [blobServicesListSample.ts][blobserviceslistsample] | List blob services of storage account. It returns a collection of one object named default. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json | -| [blobServicesSetServicePropertiesSample.ts][blobservicessetservicepropertiessample] | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json | -| [deletedAccountsGetSample.ts][deletedaccountsgetsample] | Get properties of specified deleted account resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json | -| [deletedAccountsListSample.ts][deletedaccountslistsample] | Lists deleted accounts under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json | -| [encryptionScopesGetSample.ts][encryptionscopesgetsample] | Returns the properties for the specified encryption scope. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json | -| [encryptionScopesListSample.ts][encryptionscopeslistsample] | Lists all the encryption scopes available under the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json | -| [encryptionScopesPatchSample.ts][encryptionscopespatchsample] | Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json | -| [encryptionScopesPutSample.ts][encryptionscopesputsample] | Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json | -| [fileServicesGetServicePropertiesSample.ts][fileservicesgetservicepropertiessample] | Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json | -| [fileServicesListSample.ts][fileserviceslistsample] | List all file services in storage accounts x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json | -| [fileServicesSetServicePropertiesSample.ts][fileservicessetservicepropertiessample] | Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json | -| [fileSharesCreateSample.ts][filesharescreatesample] | 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/2023-05-01/examples/FileSharesPut_NFS.json | -| [fileSharesDeleteSample.ts][filesharesdeletesample] | Deletes specified share under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesDelete.json | -| [fileSharesGetSample.ts][filesharesgetsample] | Gets properties of a specified share. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesGet_Stats.json | -| [fileSharesLeaseSample.ts][filesharesleasesample] | The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Acquire.json | -| [fileSharesListSample.ts][fileshareslistsample] | Lists all shares. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedFileSharesList.json | -| [fileSharesRestoreSample.ts][filesharesrestoresample] | Restore a file share within a valid retention days if share soft delete is enabled x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesRestore.json | -| [fileSharesUpdateSample.ts][filesharesupdatesample] | Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareAclsPatch.json | -| [localUsersCreateOrUpdateSample.ts][localuserscreateorupdatesample] | Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json | -| [localUsersDeleteSample.ts][localusersdeletesample] | Deletes the local user associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json | -| [localUsersGetSample.ts][localusersgetsample] | Get the local user of the storage account by username. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json | -| [localUsersListKeysSample.ts][localuserslistkeyssample] | List SSH authorized keys and shared key of the local user. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json | -| [localUsersListSample.ts][localuserslistsample] | List the local users associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json | -| [localUsersRegeneratePasswordSample.ts][localusersregeneratepasswordsample] | Regenerate the local user SSH password. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json | -| [managementPoliciesCreateOrUpdateSample.ts][managementpoliciescreateorupdatesample] | Sets the managementpolicy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json | -| [managementPoliciesDeleteSample.ts][managementpoliciesdeletesample] | Deletes the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json | -| [managementPoliciesGetSample.ts][managementpoliciesgetsample] | Gets the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json | -| [networkSecurityPerimeterConfigurationsGetSample.ts][networksecurityperimeterconfigurationsgetsample] | Gets effective NetworkSecurityPerimeterConfiguration for association x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json | -| [networkSecurityPerimeterConfigurationsListSample.ts][networksecurityperimeterconfigurationslistsample] | Gets list of effective NetworkSecurityPerimeterConfiguration for storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json | -| [networkSecurityPerimeterConfigurationsReconcileSample.ts][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json | -| [objectReplicationPoliciesCreateOrUpdateSample.ts][objectreplicationpoliciescreateorupdatesample] | Create or update the object replication policy of the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json | -| [objectReplicationPoliciesDeleteSample.ts][objectreplicationpoliciesdeletesample] | Deletes the object replication policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteObjectReplicationPolicy.json | -| [objectReplicationPoliciesGetSample.ts][objectreplicationpoliciesgetsample] | Get the object replication policy of the storage account by policy ID. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json | -| [objectReplicationPoliciesListSample.ts][objectreplicationpolicieslistsample] | List the object replication policies associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available Storage Rest API operations. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | List all the private endpoint connections associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json | -| [privateEndpointConnectionsPutSample.ts][privateendpointconnectionsputsample] | Update the state of specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json | -| [privateLinkResourcesListByStorageAccountSample.ts][privatelinkresourceslistbystorageaccountsample] | Gets the private link resources that need to be created for a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json | -| [queueCreateSample.ts][queuecreatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json | -| [queueDeleteSample.ts][queuedeletesample] | Deletes the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json | -| [queueGetSample.ts][queuegetsample] | Gets the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json | -| [queueListSample.ts][queuelistsample] | Gets a list of all the queues under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json | -| [queueServicesGetServicePropertiesSample.ts][queueservicesgetservicepropertiessample] | Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json | -| [queueServicesListSample.ts][queueserviceslistsample] | List all queue services for the storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json | -| [queueServicesSetServicePropertiesSample.ts][queueservicessetservicepropertiessample] | Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json | -| [queueUpdateSample.ts][queueupdatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json | -| [skusListSample.ts][skuslistsample] | Lists the available SKUs supported by Microsoft.Storage for given subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json | -| [storageAccountsAbortHierarchicalNamespaceMigrationSample.ts][storageaccountsaborthierarchicalnamespacemigrationsample] | Abort live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json | -| [storageAccountsCheckNameAvailabilitySample.ts][storageaccountschecknameavailabilitysample] | Checks that the storage account name is valid and is not already in use. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json | -| [storageAccountsCreateSample.ts][storageaccountscreatesample] | Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json | -| [storageAccountsCustomerInitiatedMigrationSample.ts][storageaccountscustomerinitiatedmigrationsample] | Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json | -| [storageAccountsDeleteSample.ts][storageaccountsdeletesample] | Deletes a storage account in Microsoft Azure. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json | -| [storageAccountsFailoverSample.ts][storageaccountsfailoversample] | A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json | -| [storageAccountsGetCustomerInitiatedMigrationSample.ts][storageaccountsgetcustomerinitiatedmigrationsample] | Gets the status of the ongoing migration for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json | -| [storageAccountsGetPropertiesSample.ts][storageaccountsgetpropertiessample] | Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json | -| [storageAccountsHierarchicalNamespaceMigrationSample.ts][storageaccountshierarchicalnamespacemigrationsample] | Live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json | -| [storageAccountsListAccountSasSample.ts][storageaccountslistaccountsassample] | List SAS credentials of a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json | -| [storageAccountsListByResourceGroupSample.ts][storageaccountslistbyresourcegroupsample] | Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json | -| [storageAccountsListKeysSample.ts][storageaccountslistkeyssample] | Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json | -| [storageAccountsListSample.ts][storageaccountslistsample] | Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json | -| [storageAccountsListServiceSasSample.ts][storageaccountslistservicesassample] | List service SAS credentials of a specific resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json | -| [storageAccountsRegenerateKeySample.ts][storageaccountsregeneratekeysample] | Regenerates one of the access keys or Kerberos keys for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json | -| [storageAccountsRestoreBlobRangesSample.ts][storageaccountsrestoreblobrangessample] | Restore blobs in the specified blob ranges x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json | -| [storageAccountsRevokeUserDelegationKeysSample.ts][storageaccountsrevokeuserdelegationkeyssample] | Revoke user delegation keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json | -| [storageAccountsUpdateSample.ts][storageaccountsupdatesample] | The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json | -| [storageTaskAssignmentInstancesReportListSample.ts][storagetaskassignmentinstancesreportlistsample] | Fetch the report summary of a single storage task assignment's instances x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json | -| [storageTaskAssignmentsCreateSample.ts][storagetaskassignmentscreatesample] | Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json | -| [storageTaskAssignmentsDeleteSample.ts][storagetaskassignmentsdeletesample] | Delete the storage task assignment sub-resource x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json | -| [storageTaskAssignmentsGetSample.ts][storagetaskassignmentsgetsample] | Get the storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json | -| [storageTaskAssignmentsInstancesReportListSample.ts][storagetaskassignmentsinstancesreportlistsample] | Fetch the report summary of all the storage task assignments and instances in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json | -| [storageTaskAssignmentsListSample.ts][storagetaskassignmentslistsample] | List all the storage task assignments in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json | -| [storageTaskAssignmentsUpdateSample.ts][storagetaskassignmentsupdatesample] | Update storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json | -| [tableCreateSample.ts][tablecreatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json | -| [tableDeleteSample.ts][tabledeletesample] | Deletes the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json | -| [tableGetSample.ts][tablegetsample] | Gets the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json | -| [tableListSample.ts][tablelistsample] | Gets a list of all the tables under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json | -| [tableServicesGetServicePropertiesSample.ts][tableservicesgetservicepropertiessample] | Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json | -| [tableServicesListSample.ts][tableserviceslistsample] | List all table services for the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json | -| [tableServicesSetServicePropertiesSample.ts][tableservicessetservicepropertiessample] | Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json | -| [tableUpdateSample.ts][tableupdatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json | -| [usagesListByLocationSample.ts][usageslistbylocationsample] | Gets the current usage count and the limit for the resources of the location under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json | +| [blobContainersClearLegalHoldSample.ts][blobcontainersclearlegalholdsample] | Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersClearLegalHold.json | +| [blobContainersCreateOrUpdateImmutabilityPolicySample.ts][blobcontainerscreateorupdateimmutabilitypolicysample] | Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicy.json | +| [blobContainersCreateSample.ts][blobcontainerscreatesample] | Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutDefaultEncryptionScope.json | +| [blobContainersDeleteImmutabilityPolicySample.ts][blobcontainersdeleteimmutabilitypolicysample] | Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDeleteImmutabilityPolicy.json | +| [blobContainersDeleteSample.ts][blobcontainersdeletesample] | Deletes specified container under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDelete.json | +| [blobContainersExtendImmutabilityPolicySample.ts][blobcontainersextendimmutabilitypolicysample] | Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersExtendImmutabilityPolicy.json | +| [blobContainersGetImmutabilityPolicySample.ts][blobcontainersgetimmutabilitypolicysample] | Gets the existing immutability policy along with the corresponding ETag in response headers and body. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetImmutabilityPolicy.json | +| [blobContainersGetSample.ts][blobcontainersgetsample] | Gets properties of a specified container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json | +| [blobContainersLeaseSample.ts][blobcontainersleasesample] | The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Acquire.json | +| [blobContainersListSample.ts][blobcontainerslistsample] | Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersList.json | +| [blobContainersLockImmutabilityPolicySample.ts][blobcontainerslockimmutabilitypolicysample] | Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLockImmutabilityPolicy.json | +| [blobContainersObjectLevelWormSample.ts][blobcontainersobjectlevelwormsample] | This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/ObjectLevelWormContainerMigration.json | +| [blobContainersSetLegalHoldSample.ts][blobcontainerssetlegalholdsample] | Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHold.json | +| [blobContainersUpdateSample.ts][blobcontainersupdatesample] | Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPatch.json | +| [blobInventoryPoliciesCreateOrUpdateSample.ts][blobinventorypoliciescreateorupdatesample] | Sets the blob inventory policy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicy.json | +| [blobInventoryPoliciesDeleteSample.ts][blobinventorypoliciesdeletesample] | Deletes the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteBlobInventoryPolicy.json | +| [blobInventoryPoliciesGetSample.ts][blobinventorypoliciesgetsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetBlobInventoryPolicy.json | +| [blobInventoryPoliciesListSample.ts][blobinventorypolicieslistsample] | Gets the blob inventory policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListBlobInventoryPolicy.json | +| [blobServicesGetServicePropertiesSample.ts][blobservicesgetservicepropertiessample] | Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesGet.json | +| [blobServicesListSample.ts][blobserviceslistsample] | List blob services of storage account. It returns a collection of one object named default. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesList.json | +| [blobServicesSetServicePropertiesSample.ts][blobservicessetservicepropertiessample] | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutAllowPermanentDelete.json | +| [deletedAccountsGetSample.ts][deletedaccountsgetsample] | Get properties of specified deleted account resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountGet.json | +| [deletedAccountsListSample.ts][deletedaccountslistsample] | Lists deleted accounts under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountList.json | +| [encryptionScopesGetSample.ts][encryptionscopesgetsample] | Returns the properties for the specified encryption scope. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetEncryptionScope.json | +| [encryptionScopesListSample.ts][encryptionscopeslistsample] | Lists all the encryption scopes available under the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEncryptionScopeList.json | +| [encryptionScopesPatchSample.ts][encryptionscopespatchsample] | Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPatchEncryptionScope.json | +| [encryptionScopesPutSample.ts][encryptionscopesputsample] | Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScope.json | +| [fileServicesGetServicePropertiesSample.ts][fileservicesgetservicepropertiessample] | Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGet.json | +| [fileServicesGetServiceUsageSample.ts][fileservicesgetserviceusagesample] | Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGetUsage.json | +| [fileServicesListSample.ts][fileserviceslistsample] | List all file services in storage accounts x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesList.json | +| [fileServicesListServiceUsagesSample.ts][fileserviceslistserviceusagessample] | Gets the usages of file service in storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesListUsages.json | +| [fileServicesSetServicePropertiesSample.ts][fileservicessetservicepropertiessample] | Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut.json | +| [fileSharesCreateSample.ts][filesharescreatesample] | 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/2024-01-01/examples/FileSharesPut_NFS.json | +| [fileSharesDeleteSample.ts][filesharesdeletesample] | Deletes specified share under its account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesDelete.json | +| [fileSharesGetSample.ts][filesharesgetsample] | Gets properties of a specified share. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet_PaidBursting.json | +| [fileSharesLeaseSample.ts][filesharesleasesample] | The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Acquire.json | +| [fileSharesListSample.ts][fileshareslistsample] | Lists all shares. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedFileSharesList.json | +| [fileSharesRestoreSample.ts][filesharesrestoresample] | Restore a file share within a valid retention days if share soft delete is enabled x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesRestore.json | +| [fileSharesUpdateSample.ts][filesharesupdatesample] | Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareAclsPatch.json | +| [localUsersCreateOrUpdateSample.ts][localuserscreateorupdatesample] | Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreate.json | +| [localUsersDeleteSample.ts][localusersdeletesample] | Deletes the local user associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserDelete.json | +| [localUsersGetSample.ts][localusersgetsample] | Get the local user of the storage account by username. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserGet.json | +| [localUsersListKeysSample.ts][localuserslistkeyssample] | List SSH authorized keys and shared key of the local user. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserListKeys.json | +| [localUsersListSample.ts][localuserslistsample] | List the local users associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersList.json | +| [localUsersRegeneratePasswordSample.ts][localusersregeneratepasswordsample] | Regenerate the local user SSH password. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserRegeneratePassword.json | +| [managementPoliciesCreateOrUpdateSample.ts][managementpoliciescreateorupdatesample] | Sets the managementpolicy to the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy.json | +| [managementPoliciesDeleteSample.ts][managementpoliciesdeletesample] | Deletes the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteManagementPolicy.json | +| [managementPoliciesGetSample.ts][managementpoliciesgetsample] | Gets the managementpolicy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetManagementPolicy.json | +| [networkSecurityPerimeterConfigurationsGetSample.ts][networksecurityperimeterconfigurationsgetsample] | Gets effective NetworkSecurityPerimeterConfiguration for association x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationGet.json | +| [networkSecurityPerimeterConfigurationsListSample.ts][networksecurityperimeterconfigurationslistsample] | Gets list of effective NetworkSecurityPerimeterConfiguration for storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationList.json | +| [networkSecurityPerimeterConfigurationsReconcileSample.ts][networksecurityperimeterconfigurationsreconcilesample] | Refreshes any information about the association. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json | +| [objectReplicationPoliciesCreateOrUpdateSample.ts][objectreplicationpoliciescreateorupdatesample] | Create or update the object replication policy of the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json | +| [objectReplicationPoliciesDeleteSample.ts][objectreplicationpoliciesdeletesample] | Deletes the object replication policy associated with the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteObjectReplicationPolicy.json | +| [objectReplicationPoliciesGetSample.ts][objectreplicationpoliciesgetsample] | Get the object replication policy of the storage account by policy ID. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetObjectReplicationPolicy.json | +| [objectReplicationPoliciesListSample.ts][objectreplicationpolicieslistsample] | List the object replication policies associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListObjectReplicationPolicies.json | +| [operationsListSample.ts][operationslistsample] | Lists all of the available Storage Rest API operations. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/OperationsList.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | List all the private endpoint connections associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateEndpointConnections.json | +| [privateEndpointConnectionsPutSample.ts][privateendpointconnectionsputsample] | Update the state of specified private endpoint connection associated with the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutPrivateEndpointConnection.json | +| [privateLinkResourcesListByStorageAccountSample.ts][privatelinkresourceslistbystorageaccountsample] | Gets the private link resources that need to be created for a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateLinkResources.json | +| [queueCreateSample.ts][queuecreatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPut.json | +| [queueDeleteSample.ts][queuedeletesample] | Deletes the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationDelete.json | +| [queueGetSample.ts][queuegetsample] | Gets the queue with the specified queue name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationGet.json | +| [queueListSample.ts][queuelistsample] | Gets a list of all the queues under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationList.json | +| [queueServicesGetServicePropertiesSample.ts][queueservicesgetservicepropertiessample] | Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesGet.json | +| [queueServicesListSample.ts][queueserviceslistsample] | List all queue services for the storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesList.json | +| [queueServicesSetServicePropertiesSample.ts][queueservicessetservicepropertiessample] | Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesPut.json | +| [queueUpdateSample.ts][queueupdatesample] | Creates a new queue with the specified queue name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPatch.json | +| [skusListSample.ts][skuslistsample] | Lists the available SKUs supported by Microsoft.Storage for given subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/SKUList.json | +| [storageAccountsAbortHierarchicalNamespaceMigrationSample.ts][storageaccountsaborthierarchicalnamespacemigrationsample] | Abort live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json | +| [storageAccountsCheckNameAvailabilitySample.ts][storageaccountschecknameavailabilitysample] | Checks that the storage account name is valid and is not already in use. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCheckNameAvailability.json | +| [storageAccountsCreateSample.ts][storageaccountscreatesample] | Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NfsV3AccountCreate.json | +| [storageAccountsCustomerInitiatedMigrationSample.ts][storageaccountscustomerinitiatedmigrationsample] | Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPostMigration.json | +| [storageAccountsDeleteSample.ts][storageaccountsdeletesample] | Deletes a storage account in Microsoft Azure. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDelete.json | +| [storageAccountsFailoverSample.ts][storageaccountsfailoversample] | A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailover.json | +| [storageAccountsGetCustomerInitiatedMigrationSample.ts][storageaccountsgetcustomerinitiatedmigrationsample] | Gets the status of the ongoing migration for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationFailed.json | +| [storageAccountsGetPropertiesSample.ts][storageaccountsgetpropertiessample] | Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetAsyncSkuConversionStatus.json | +| [storageAccountsHierarchicalNamespaceMigrationSample.ts][storageaccountshierarchicalnamespacemigrationsample] | Live Migration of storage account to enable Hns x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountHierarchicalNamespaceMigration.json | +| [storageAccountsListAccountSasSample.ts][storageaccountslistaccountsassample] | List SAS credentials of a storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListAccountSAS.json | +| [storageAccountsListByResourceGroupSample.ts][storageaccountslistbyresourcegroupsample] | Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListByResourceGroup.json | +| [storageAccountsListKeysSample.ts][storageaccountslistkeyssample] | Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListKeys.json | +| [storageAccountsListSample.ts][storageaccountslistsample] | Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountList.json | +| [storageAccountsListServiceSasSample.ts][storageaccountslistservicesassample] | List service SAS credentials of a specific resource. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListServiceSAS.json | +| [storageAccountsRegenerateKeySample.ts][storageaccountsregeneratekeysample] | Regenerates one of the access keys or Kerberos keys for the specified storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKerbKey.json | +| [storageAccountsRestoreBlobRangesSample.ts][storageaccountsrestoreblobrangessample] | Restore blobs in the specified blob ranges x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobRangesRestore.json | +| [storageAccountsRevokeUserDelegationKeysSample.ts][storageaccountsrevokeuserdelegationkeyssample] | Revoke user delegation keys. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRevokeUserDelegationKeys.json | +| [storageAccountsUpdateSample.ts][storageaccountsupdatesample] | The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableAD.json | +| [storageTaskAssignmentInstancesReportListSample.ts][storagetaskassignmentinstancesreportlistsample] | Fetch the report summary of a single storage task assignment's instances x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json | +| [storageTaskAssignmentsCreateSample.ts][storagetaskassignmentscreatesample] | Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json | +| [storageTaskAssignmentsDeleteSample.ts][storagetaskassignmentsdeletesample] | Delete the storage task assignment sub-resource x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json | +| [storageTaskAssignmentsGetSample.ts][storagetaskassignmentsgetsample] | Get the storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json | +| [storageTaskAssignmentsInstancesReportListSample.ts][storagetaskassignmentsinstancesreportlistsample] | Fetch the report summary of all the storage task assignments and instances in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json | +| [storageTaskAssignmentsListSample.ts][storagetaskassignmentslistsample] | List all the storage task assignments in an account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json | +| [storageTaskAssignmentsUpdateSample.ts][storagetaskassignmentsupdatesample] | Update storage task assignment properties x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json | +| [tableCreateSample.ts][tablecreatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPut.json | +| [tableDeleteSample.ts][tabledeletesample] | Deletes the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationDelete.json | +| [tableGetSample.ts][tablegetsample] | Gets the table with the specified table name, under the specified account if it exists. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationGet.json | +| [tableListSample.ts][tablelistsample] | Gets a list of all the tables under the specified storage account x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationList.json | +| [tableServicesGetServicePropertiesSample.ts][tableservicesgetservicepropertiessample] | Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesGet.json | +| [tableServicesListSample.ts][tableserviceslistsample] | List all table services for the storage account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesList.json | +| [tableServicesSetServicePropertiesSample.ts][tableservicessetservicepropertiessample] | Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesPut.json | +| [tableUpdateSample.ts][tableupdatesample] | Creates a new table with the specified table name, under the specified account. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPatch.json | +| [usagesListByLocationSample.ts][usageslistbylocationsample] | Gets the current usage count and the limit for the resources of the location under the subscription. x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListLocationUsage.json | ## Prerequisites @@ -185,7 +187,9 @@ Take a look at our [API Documentation][apiref] for more information about the AP [encryptionscopespatchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPatchSample.ts [encryptionscopesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPutSample.ts [fileservicesgetservicepropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServicePropertiesSample.ts +[fileservicesgetserviceusagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServiceUsageSample.ts [fileserviceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListSample.ts +[fileserviceslistserviceusagessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListServiceUsagesSample.ts [fileservicessetservicepropertiessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesSetServicePropertiesSample.ts [filesharescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesCreateSample.ts [filesharesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesDeleteSample.ts diff --git a/sdk/storage/arm-storage/samples/v18/typescript/package.json b/sdk/storage/arm-storage/samples/v18/typescript/package.json index f04e8032737e..d5657fd1f590 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/package.json +++ b/sdk/storage/arm-storage/samples/v18/typescript/package.json @@ -31,7 +31,7 @@ "dependencies": { "@azure/arm-storage": "latest", "dotenv": "latest", - "@azure/identity": "^4.0.1" + "@azure/identity": "^4.7.0" }, "devDependencies": { "@types/node": "^18.0.0", diff --git a/sdk/storage/arm-storage/samples/v18/typescript/sample.env b/sdk/storage/arm-storage/samples/v18/typescript/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/sample.env +++ b/sdk/storage/arm-storage/samples/v18/typescript/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersClearLegalHoldSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersClearLegalHoldSample.ts index b7cef0328ef4..4967342d931b 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersClearLegalHoldSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersClearLegalHoldSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LegalHold, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. * * @summary Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersClearLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersClearLegalHold.json */ async function clearLegalHoldContainers(): Promise { const subscriptionId = @@ -37,7 +35,7 @@ async function clearLegalHoldContainers(): Promise { } async function main(): Promise { - clearLegalHoldContainers(); + await clearLegalHoldContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateOrUpdateImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateOrUpdateImmutabilityPolicySample.ts index fc404653cdd7..486b5923c08f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateOrUpdateImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateOrUpdateImmutabilityPolicySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { ImmutabilityPolicy, BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicy.json */ async function createOrUpdateImmutabilityPolicy(): Promise { const subscriptionId = @@ -49,7 +47,7 @@ async function createOrUpdateImmutabilityPolicy(): Promise { * This sample demonstrates how to Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. * * @summary Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutImmutabilityPolicyAllowProtectedAppendWritesAll.json */ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(): Promise { const subscriptionId = @@ -75,8 +73,8 @@ async function createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll } async function main(): Promise { - createOrUpdateImmutabilityPolicy(); - createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(); + await createOrUpdateImmutabilityPolicy(); + await createOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateSample.ts index 29acb4ce91e4..1adf7016997e 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobContainer, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutDefaultEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutDefaultEncryptionScope.json */ async function putContainerWithDefaultEncryptionScope(): Promise { const subscriptionId = @@ -43,7 +41,7 @@ async function putContainerWithDefaultEncryptionScope(): Promise { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPutObjectLevelWorm.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPutObjectLevelWorm.json */ async function putContainerWithObjectLevelWorm(): Promise { const subscriptionId = @@ -69,7 +67,7 @@ async function putContainerWithObjectLevelWorm(): Promise { * This sample demonstrates how to Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. * * @summary Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPut.json */ async function putContainers(): Promise { const subscriptionId = @@ -90,9 +88,9 @@ async function putContainers(): Promise { } async function main(): Promise { - putContainerWithDefaultEncryptionScope(); - putContainerWithObjectLevelWorm(); - putContainers(); + await putContainerWithDefaultEncryptionScope(); + await putContainerWithObjectLevelWorm(); + await putContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteImmutabilityPolicySample.ts index e1a5c26d9e39..cf32102b99f5 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteImmutabilityPolicySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. * * @summary Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDeleteImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDeleteImmutabilityPolicy.json */ async function deleteImmutabilityPolicy(): Promise { const subscriptionId = @@ -37,7 +35,7 @@ async function deleteImmutabilityPolicy(): Promise { } async function main(): Promise { - deleteImmutabilityPolicy(); + await deleteImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteSample.ts index 82b288c0bccc..204155ebc7b0 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes specified container under its account. * * @summary Deletes specified container under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersDelete.json */ async function deleteContainers(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function deleteContainers(): Promise { } async function main(): Promise { - deleteContainers(); + await deleteContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersExtendImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersExtendImmutabilityPolicySample.ts index f92a9de932da..a9dd437d00e2 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersExtendImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersExtendImmutabilityPolicySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { ImmutabilityPolicy, BlobContainersExtendImmutabilityPolicyOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. * * @summary Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersExtendImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersExtendImmutabilityPolicy.json */ async function extendImmutabilityPolicy(): Promise { const subscriptionId = @@ -48,7 +46,7 @@ async function extendImmutabilityPolicy(): Promise { } async function main(): Promise { - extendImmutabilityPolicy(); + await extendImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetImmutabilityPolicySample.ts index b0e942311851..e6169d5bf3cc 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetImmutabilityPolicySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the existing immutability policy along with the corresponding ETag in response headers and body. * * @summary Gets the existing immutability policy along with the corresponding ETag in response headers and body. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetImmutabilityPolicy.json */ async function getImmutabilityPolicy(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function getImmutabilityPolicy(): Promise { } async function main(): Promise { - getImmutabilityPolicy(); + await getImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetSample.ts index 622f7e69275f..08530e89e31f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGetWithAllowProtectedAppendWritesAll.json */ async function getBlobContainersGetWithAllowProtectedAppendWritesAll(): Promise { const subscriptionId = @@ -38,7 +36,7 @@ async function getBlobContainersGetWithAllowProtectedAppendWritesAll(): Promise< * This sample demonstrates how to Gets properties of a specified container. * * @summary Gets properties of a specified container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersGet.json */ async function getContainers(): Promise { const subscriptionId = @@ -57,8 +55,8 @@ async function getContainers(): Promise { } async function main(): Promise { - getBlobContainersGetWithAllowProtectedAppendWritesAll(); - getContainers(); + await getBlobContainersGetWithAllowProtectedAppendWritesAll(); + await getContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLeaseSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLeaseSample.ts index ddfd819d2302..c6da803cae60 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLeaseSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLeaseSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LeaseContainerRequest, BlobContainersLeaseOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Acquire.json */ async function acquireALeaseOnAContainer(): Promise { const subscriptionId = @@ -51,7 +49,7 @@ async function acquireALeaseOnAContainer(): Promise { * This sample demonstrates how to The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLease_Break.json */ async function breakALeaseOnAContainer(): Promise { const subscriptionId = @@ -79,8 +77,8 @@ async function breakALeaseOnAContainer(): Promise { } async function main(): Promise { - acquireALeaseOnAContainer(); - breakALeaseOnAContainer(); + await acquireALeaseOnAContainer(); + await breakALeaseOnAContainer(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersListSample.ts index d19ff1315177..b4f7e0887ca7 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobContainersListOptionalParams, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersList.json */ async function listContainers(): Promise { const subscriptionId = @@ -29,7 +27,7 @@ async function listContainers(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobContainers.list( + for await (const item of client.blobContainers.list( resourceGroupName, accountName, )) { @@ -42,7 +40,7 @@ async function listContainers(): Promise { * This sample demonstrates how to Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. * * @summary Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedBlobContainersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedBlobContainersList.json */ async function listDeletedContainers(): Promise { const subscriptionId = @@ -54,7 +52,7 @@ async function listDeletedContainers(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobContainers.list( + for await (const item of client.blobContainers.list( resourceGroupName, accountName, options, @@ -65,8 +63,8 @@ async function listDeletedContainers(): Promise { } async function main(): Promise { - listContainers(); - listDeletedContainers(); + await listContainers(); + await listDeletedContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLockImmutabilityPolicySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLockImmutabilityPolicySample.ts index 55c036c38ca3..c353976df2cd 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLockImmutabilityPolicySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersLockImmutabilityPolicySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. * * @summary Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersLockImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersLockImmutabilityPolicy.json */ async function lockImmutabilityPolicy(): Promise { const subscriptionId = @@ -37,7 +35,7 @@ async function lockImmutabilityPolicy(): Promise { } async function main(): Promise { - lockImmutabilityPolicy(); + await lockImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersObjectLevelWormSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersObjectLevelWormSample.ts index 7f3fe9796a54..d92e27c22c68 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersObjectLevelWormSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersObjectLevelWormSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. * * @summary This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/ObjectLevelWormContainerMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/ObjectLevelWormContainerMigration.json */ async function versionLevelWormContainerMigration(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function versionLevelWormContainerMigration(): Promise { } async function main(): Promise { - versionLevelWormContainerMigration(); + await versionLevelWormContainerMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersSetLegalHoldSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersSetLegalHoldSample.ts index 7d192f67833f..82ebc85e0883 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersSetLegalHoldSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersSetLegalHoldSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LegalHold, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHold.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHold.json */ async function setLegalHoldContainers(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function setLegalHoldContainers(): Promise { * This sample demonstrates how to Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. * * @summary Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersSetLegalHoldAllowProtectedAppendWritesAll.json */ async function setLegalHoldContainersWithAllowProtectedAppendWritesAll(): Promise { const subscriptionId = @@ -64,8 +62,8 @@ async function setLegalHoldContainersWithAllowProtectedAppendWritesAll(): Promis } async function main(): Promise { - setLegalHoldContainers(); - setLegalHoldContainersWithAllowProtectedAppendWritesAll(); + await setLegalHoldContainers(); + await setLegalHoldContainersWithAllowProtectedAppendWritesAll(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersUpdateSample.ts index 12bb2d109653..04532774418f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobContainersUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobContainer, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. * * @summary Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobContainersPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobContainersPatch.json */ async function updateContainers(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function updateContainers(): Promise { } async function main(): Promise { - updateContainers(); + await updateContainers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesCreateOrUpdateSample.ts index cd9f391c8989..e9524b5b5860 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesCreateOrUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobInventoryPolicy, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicy.json */ async function storageAccountSetBlobInventoryPolicy(): Promise { const subscriptionId = @@ -102,7 +100,7 @@ async function storageAccountSetBlobInventoryPolicy(): Promise { * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(): Promise { const subscriptionId = @@ -203,7 +201,7 @@ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForH * This sample demonstrates how to Sets the blob inventory policy to the specified storage account. * * @summary Sets the blob inventory policy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json */ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(): Promise { const subscriptionId = @@ -300,9 +298,9 @@ async function storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForN } async function main(): Promise { - storageAccountSetBlobInventoryPolicy(); - storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(); - storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(); + await storageAccountSetBlobInventoryPolicy(); + await storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount(); + await storageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesDeleteSample.ts index a3e933d6e879..f88d1e9f3a25 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the blob inventory policy associated with the specified storage account. * * @summary Deletes the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteBlobInventoryPolicy.json */ async function storageAccountDeleteBlobInventoryPolicy(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountDeleteBlobInventoryPolicy(): Promise { } async function main(): Promise { - storageAccountDeleteBlobInventoryPolicy(); + await storageAccountDeleteBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesGetSample.ts index 665aeec511b1..36d2746b19e0 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountGetBlobInventoryPolicy(): Promise { } async function main(): Promise { - storageAccountGetBlobInventoryPolicy(); + await storageAccountGetBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesListSample.ts index 1de44b6cfbe8..ab2ff547ddf3 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobInventoryPoliciesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the blob inventory policy associated with the specified storage account. * * @summary Gets the blob inventory policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListBlobInventoryPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListBlobInventoryPolicy.json */ async function storageAccountGetBlobInventoryPolicy(): Promise { const subscriptionId = @@ -26,7 +24,7 @@ async function storageAccountGetBlobInventoryPolicy(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobInventoryPolicies.list( + for await (const item of client.blobInventoryPolicies.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function storageAccountGetBlobInventoryPolicy(): Promise { } async function main(): Promise { - storageAccountGetBlobInventoryPolicy(); + await storageAccountGetBlobInventoryPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesGetServicePropertiesSample.ts index 4a34c7075ae3..81295412fd53 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesGetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesGet.json */ async function getBlobServices(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function getBlobServices(): Promise { } async function main(): Promise { - getBlobServices(); + await getBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesListSample.ts index 12fa637b8651..d938f4acf863 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List blob services of storage account. It returns a collection of one object named default. * * @summary List blob services of storage account. It returns a collection of one object named default. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesList.json */ async function listBlobServices(): Promise { const subscriptionId = @@ -26,7 +24,7 @@ async function listBlobServices(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.blobServices.list( + for await (const item of client.blobServices.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function listBlobServices(): Promise { } async function main(): Promise { - listBlobServices(); + await listBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesSetServicePropertiesSample.ts index e117ac853edd..fde1c0b0e59a 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/blobServicesSetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobServiceProperties, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutAllowPermanentDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutAllowPermanentDelete.json */ async function blobServicesPutAllowPermanentDelete(): Promise { const subscriptionId = @@ -48,7 +46,7 @@ async function blobServicesPutAllowPermanentDelete(): Promise { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPutLastAccessTimeBasedTracking.json */ async function blobServicesPutLastAccessTimeBasedTracking(): Promise { const subscriptionId = @@ -77,7 +75,7 @@ async function blobServicesPutLastAccessTimeBasedTracking(): Promise { * This sample demonstrates how to Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobServicesPut.json */ async function putBlobServices(): Promise { const subscriptionId = @@ -137,9 +135,9 @@ async function putBlobServices(): Promise { } async function main(): Promise { - blobServicesPutAllowPermanentDelete(); - blobServicesPutLastAccessTimeBasedTracking(); - putBlobServices(); + await blobServicesPutAllowPermanentDelete(); + await blobServicesPutLastAccessTimeBasedTracking(); + await putBlobServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsGetSample.ts index 4f63d0975dff..bf8fd59f2988 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Get properties of specified deleted account resource. * * @summary Get properties of specified deleted account resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountGet.json */ async function deletedAccountGet(): Promise { const subscriptionId = @@ -30,7 +28,7 @@ async function deletedAccountGet(): Promise { } async function main(): Promise { - deletedAccountGet(); + await deletedAccountGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsListSample.ts index 95384ecc34b8..485f34a3ef33 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/deletedAccountsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists deleted accounts under the subscription. * * @summary Lists deleted accounts under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedAccountList.json */ async function deletedAccountList(): Promise { const subscriptionId = @@ -24,14 +22,14 @@ async function deletedAccountList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.deletedAccounts.list()) { + for await (const item of client.deletedAccounts.list()) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - deletedAccountList(); + await deletedAccountList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesGetSample.ts index df8d0480b934..82cc83a8ed3c 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Returns the properties for the specified encryption scope. * * @summary Returns the properties for the specified encryption scope. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetEncryptionScope.json */ async function storageAccountGetEncryptionScope(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function storageAccountGetEncryptionScope(): Promise { } async function main(): Promise { - storageAccountGetEncryptionScope(); + await storageAccountGetEncryptionScope(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesListSample.ts index 7f8178006d39..f0e9308b9aa0 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the encryption scopes available under the specified storage account. * * @summary Lists all the encryption scopes available under the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEncryptionScopeList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEncryptionScopeList.json */ async function storageAccountEncryptionScopeList(): Promise { const subscriptionId = @@ -27,7 +25,7 @@ async function storageAccountEncryptionScopeList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.encryptionScopes.list( + for await (const item of client.encryptionScopes.list( resourceGroupName, accountName, )) { @@ -37,7 +35,7 @@ async function storageAccountEncryptionScopeList(): Promise { } async function main(): Promise { - storageAccountEncryptionScopeList(); + await storageAccountEncryptionScopeList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPatchSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPatchSample.ts index 9663bd2a9af3..bcecdf13df51 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPatchSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPatchSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { EncryptionScope, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. * * @summary Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPatchEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPatchEncryptionScope.json */ async function storageAccountPatchEncryptionScope(): Promise { const subscriptionId = @@ -44,7 +42,7 @@ async function storageAccountPatchEncryptionScope(): Promise { } async function main(): Promise { - storageAccountPatchEncryptionScope(); + await storageAccountPatchEncryptionScope(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPutSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPutSample.ts index 8236da37144c..600badcdd566 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPutSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/encryptionScopesPutSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { EncryptionScope, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScope.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScope.json */ async function storageAccountPutEncryptionScope(): Promise { const subscriptionId = @@ -41,7 +39,7 @@ async function storageAccountPutEncryptionScope(): Promise { * This sample demonstrates how to Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. * * @summary Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json */ async function storageAccountPutEncryptionScopeWithInfrastructureEncryption(): Promise { const subscriptionId = @@ -65,8 +63,8 @@ async function storageAccountPutEncryptionScopeWithInfrastructureEncryption(): P } async function main(): Promise { - storageAccountPutEncryptionScope(); - storageAccountPutEncryptionScopeWithInfrastructureEncryption(); + await storageAccountPutEncryptionScope(); + await storageAccountPutEncryptionScopeWithInfrastructureEncryption(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServicePropertiesSample.ts index b40e46a7fceb..c5d8cf5b8480 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGet.json */ async function getFileServices(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function getFileServices(): Promise { } async function main(): Promise { - getFileServices(); + await getFileServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServiceUsageSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServiceUsageSample.ts new file mode 100644 index 000000000000..efc19f8ff3aa --- /dev/null +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesGetServiceUsageSample.ts @@ -0,0 +1,38 @@ +/* + * 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 { StorageManagementClient } from "@azure/arm-storage"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * + * @summary Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesGetUsage.json + */ +async function getFileServiceUsage(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileServices.getServiceUsage( + resourceGroupName, + accountName, + ); + console.log(result); +} + +async function main(): Promise { + await getFileServiceUsage(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListSample.ts index 7b28670b28c1..06a8af3ed5a9 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List all file services in storage accounts * * @summary List all file services in storage accounts - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesList.json */ async function listFileServices(): Promise { const subscriptionId = @@ -30,7 +28,7 @@ async function listFileServices(): Promise { } async function main(): Promise { - listFileServices(); + await listFileServices(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListServiceUsagesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListServiceUsagesSample.ts new file mode 100644 index 000000000000..6395a31b62c9 --- /dev/null +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesListServiceUsagesSample.ts @@ -0,0 +1,41 @@ +/* + * 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 { StorageManagementClient } from "@azure/arm-storage"; +import { DefaultAzureCredential } from "@azure/identity"; +import "dotenv/config"; + +/** + * This sample demonstrates how to Gets the usages of file service in storage account. + * + * @summary Gets the usages of file service in storage account. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesListUsages.json + */ +async function listFileServiceUsages(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || + "00000000-1111-2222-3333-444444444444"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res4410"; + const accountName = "sto8607"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileServices.listServiceUsages( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +async function main(): Promise { + await listFileServiceUsages(); +} + +main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesSetServicePropertiesSample.ts index f4ff235b0ed0..5179abc28cad 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileServicesSetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { FileServiceProperties, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut.json */ async function putFileServices(): Promise { const subscriptionId = @@ -78,7 +76,7 @@ async function putFileServices(): Promise { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSMBMultichannel.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSMBMultichannel.json */ async function putFileServicesEnableSmbMultichannel(): Promise { const subscriptionId = @@ -102,7 +100,7 @@ async function putFileServicesEnableSmbMultichannel(): Promise { * This sample demonstrates how to Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileServicesPut_EnableSecureSmbFeatures.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileServicesPut_EnableSecureSmbFeatures.json */ async function putFileServicesEnableSecureSmbFeatures(): Promise { const subscriptionId = @@ -130,9 +128,9 @@ async function putFileServicesEnableSecureSmbFeatures(): Promise { } async function main(): Promise { - putFileServices(); - putFileServicesEnableSmbMultichannel(); - putFileServicesEnableSecureSmbFeatures(); + await putFileServices(); + await putFileServicesEnableSmbMultichannel(); + await putFileServicesEnableSecureSmbFeatures(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesCreateSample.ts index 3e4d9cb26579..165fb4d593cd 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { FileShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * 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/2023-05-01/examples/FileSharesPut_NFS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json */ async function createNfsShares(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function createNfsShares(): Promise { * 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/2023-05-01/examples/FileSharesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json */ async function putShares(): Promise { const subscriptionId = @@ -64,7 +62,7 @@ async function putShares(): Promise { * 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/2023-05-01/examples/FileSharesPut_AccessTier.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json */ async function putSharesWithAccessTier(): Promise { const subscriptionId = @@ -84,10 +82,70 @@ async function putSharesWithAccessTier(): Promise { console.log(result); } +/** + * 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/2024-01-01/examples/FileSharesPut_PaidBursting.json + */ +async function putSharesWithPaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare: FileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesPut_ProvisionedV2.json + */ +async function putSharesProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346"; + const accountName = "sto666"; + const shareName = "share1235"; + const fileShare: FileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.create( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + async function main(): Promise { - createNfsShares(); - putShares(); - putSharesWithAccessTier(); + await createNfsShares(); + await putShares(); + await putSharesWithAccessTier(); + await putSharesWithPaidBursting(); + await putSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesDeleteSample.ts index ea9271a5966b..5d4bb049f60e 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes specified share under its account. * * @summary Deletes specified share under its account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesDelete.json */ async function deleteShares(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function deleteShares(): Promise { } async function main(): Promise { - deleteShares(); + await deleteShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesGetSample.ts index 4cc569e2d3ba..34edecd688bb 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { FileSharesGetOptionalParams, StorageManagementClient, @@ -19,7 +17,51 @@ import "dotenv/config"; * 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/2023-05-01/examples/FileSharesGet_Stats.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet_PaidBursting.json + */ +async function getSharePaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_ProvisionedV2.json + */ +async function getShareProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871"; + const accountName = "sto6217"; + const shareName = "share1634"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.get( + resourceGroupName, + accountName, + shareName, + ); + console.log(result); +} + +/** + * 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/2024-01-01/examples/FileSharesGet_Stats.json */ async function getShareStats(): Promise { const subscriptionId = @@ -44,7 +86,7 @@ async function getShareStats(): Promise { * 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/2023-05-01/examples/FileSharesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesGet.json */ async function getShares(): Promise { const subscriptionId = @@ -63,8 +105,10 @@ async function getShares(): Promise { } async function main(): Promise { - getShareStats(); - getShares(); + await getSharePaidBursting(); + await getShareProvisionedV2(); + await getShareStats(); + await getShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesLeaseSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesLeaseSample.ts index 1f4eeb3a64fd..1c7fdfa772f3 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesLeaseSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesLeaseSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LeaseShareRequest, FileSharesLeaseOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Acquire.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Acquire.json */ async function acquireALeaseOnAShare(): Promise { const subscriptionId = @@ -51,7 +49,7 @@ async function acquireALeaseOnAShare(): Promise { * This sample demonstrates how to The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. * * @summary The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesLease_Break.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesLease_Break.json */ async function breakALeaseOnAShare(): Promise { const subscriptionId = @@ -79,8 +77,8 @@ async function breakALeaseOnAShare(): Promise { } async function main(): Promise { - acquireALeaseOnAShare(); - breakALeaseOnAShare(); + await acquireALeaseOnAShare(); + await breakALeaseOnAShare(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesListSample.ts index 4ecbd345f915..0a321872d29f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { FileSharesListOptionalParams, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/DeletedFileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/DeletedFileSharesList.json */ async function listDeletedShares(): Promise { const subscriptionId = @@ -31,7 +29,7 @@ async function listDeletedShares(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list( + for await (const item of client.fileShares.list( resourceGroupName, accountName, options, @@ -45,7 +43,7 @@ async function listDeletedShares(): Promise { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareSnapshotsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareSnapshotsList.json */ async function listShareSnapshots(): Promise { const subscriptionId = @@ -57,7 +55,7 @@ async function listShareSnapshots(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list( + for await (const item of client.fileShares.list( resourceGroupName, accountName, options, @@ -71,7 +69,7 @@ async function listShareSnapshots(): Promise { * This sample demonstrates how to Lists all shares. * * @summary Lists all shares. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList.json */ async function listShares(): Promise { const subscriptionId = @@ -81,7 +79,53 @@ async function listShares(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.fileShares.list( + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_PaidBursting.json + */ +async function listSharesPaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list( + resourceGroupName, + accountName, + )) { + resArray.push(item); + } + console.log(resArray); +} + +/** + * This sample demonstrates how to Lists all shares. + * + * @summary Lists all shares. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesList_ProvisionedV2.json + */ +async function listSharesProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9290"; + const accountName = "sto1590"; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.fileShares.list( resourceGroupName, accountName, )) { @@ -91,9 +135,11 @@ async function listShares(): Promise { } async function main(): Promise { - listDeletedShares(); - listShareSnapshots(); - listShares(); + await listDeletedShares(); + await listShareSnapshots(); + await listShares(); + await listSharesPaidBursting(); + await listSharesProvisionedV2(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesRestoreSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesRestoreSample.ts index d73d86538f57..591004933d38 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesRestoreSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesRestoreSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { DeletedShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Restore a file share within a valid retention days if share soft delete is enabled * * @summary Restore a file share within a valid retention days if share soft delete is enabled - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesRestore.json */ async function restoreShares(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function restoreShares(): Promise { } async function main(): Promise { - restoreShares(); + await restoreShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesUpdateSample.ts index 5ef809cea29f..72c9aab95ffc 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/fileSharesUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { FileShare, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileShareAclsPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileShareAclsPatch.json */ async function updateShareAcls(): Promise { const subscriptionId = @@ -51,7 +49,65 @@ async function updateShareAcls(): Promise { * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. * * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/FileSharesPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_PaidBursting.json + */ +async function updateSharePaidBursting(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare: FileShare = { + fileSharePaidBursting: { + paidBurstingEnabled: true, + paidBurstingMaxBandwidthMibps: 10340, + paidBurstingMaxIops: 102400, + }, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch_ProvisionedV2.json + */ +async function updateShareProvisionedV2(): Promise { + const subscriptionId = + process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}"; + const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376"; + const accountName = "sto328"; + const shareName = "share6185"; + const fileShare: FileShare = { + provisionedBandwidthMibps: 200, + provisionedIops: 5000, + shareQuota: 100, + }; + const credential = new DefaultAzureCredential(); + const client = new StorageManagementClient(credential, subscriptionId); + const result = await client.fileShares.update( + resourceGroupName, + accountName, + shareName, + fileShare, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * + * @summary Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPatch.json */ async function updateShares(): Promise { const subscriptionId = @@ -72,8 +128,10 @@ async function updateShares(): Promise { } async function main(): Promise { - updateShareAcls(); - updateShares(); + await updateShareAcls(); + await updateSharePaidBursting(); + await updateShareProvisionedV2(); + await updateShares(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersCreateOrUpdateSample.ts index 7d8d1331f054..1b4466cf0532 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersCreateOrUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LocalUser, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreate.json */ async function createLocalUser(): Promise { const subscriptionId = @@ -52,7 +50,7 @@ async function createLocalUser(): Promise { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserCreateNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserCreateNFSv3Enabled.json */ async function createNfSv3EnabledLocalUser(): Promise { const subscriptionId = @@ -79,7 +77,7 @@ async function createNfSv3EnabledLocalUser(): Promise { * This sample demonstrates how to Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. * * @summary Create or update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended groups cannot be set with other properties. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserUpdate.json */ async function updateLocalUser(): Promise { const subscriptionId = @@ -109,9 +107,9 @@ async function updateLocalUser(): Promise { } async function main(): Promise { - createLocalUser(); - createNfSv3EnabledLocalUser(); - updateLocalUser(); + await createLocalUser(); + await createNfSv3EnabledLocalUser(); + await updateLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersDeleteSample.ts index faa63877c513..425a895de45c 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the local user associated with the specified storage account. * * @summary Deletes the local user associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserDelete.json */ async function deleteLocalUser(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function deleteLocalUser(): Promise { } async function main(): Promise { - deleteLocalUser(); + await deleteLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersGetSample.ts index 731c93f95456..f05ce258095e 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Get the local user of the storage account by username. * * @summary Get the local user of the storage account by username. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserGet.json */ async function getLocalUser(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function getLocalUser(): Promise { } async function main(): Promise { - getLocalUser(); + await getLocalUser(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListKeysSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListKeysSample.ts index 43fa135f262a..028638e3c3aa 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListKeysSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListKeysSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List SSH authorized keys and shared key of the local user. * * @summary List SSH authorized keys and shared key of the local user. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserListKeys.json */ async function listLocalUserKeys(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function listLocalUserKeys(): Promise { } async function main(): Promise { - listLocalUserKeys(); + await listLocalUserKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListSample.ts index dc4cfa2ec67e..d5b926546e53 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { LocalUsersListOptionalParams, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersList.json */ async function listLocalUsers(): Promise { const subscriptionId = @@ -29,7 +27,7 @@ async function listLocalUsers(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.localUsersOperations.list( + for await (const item of client.localUsersOperations.list( resourceGroupName, accountName, )) { @@ -42,7 +40,7 @@ async function listLocalUsers(): Promise { * This sample demonstrates how to List the local users associated with the storage account. * * @summary List the local users associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUsersListNFSv3Enabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUsersListNFSv3Enabled.json */ async function listNfSv3EnabledLocalUsers(): Promise { const subscriptionId = @@ -54,7 +52,7 @@ async function listNfSv3EnabledLocalUsers(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.localUsersOperations.list( + for await (const item of client.localUsersOperations.list( resourceGroupName, accountName, options, @@ -65,8 +63,8 @@ async function listNfSv3EnabledLocalUsers(): Promise { } async function main(): Promise { - listLocalUsers(); - listNfSv3EnabledLocalUsers(); + await listLocalUsers(); + await listNfSv3EnabledLocalUsers(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersRegeneratePasswordSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersRegeneratePasswordSample.ts index 4d27021b8752..5ba03b48b0e5 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersRegeneratePasswordSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/localUsersRegeneratePasswordSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Regenerate the local user SSH password. * * @summary Regenerate the local user SSH password. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/LocalUserRegeneratePassword.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/LocalUserRegeneratePassword.json */ async function regenerateLocalUserPassword(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function regenerateLocalUserPassword(): Promise { } async function main(): Promise { - regenerateLocalUserPassword(); + await regenerateLocalUserPassword(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesCreateOrUpdateSample.ts index d5bcd8afd18f..6267d933b30b 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesCreateOrUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { ManagementPolicy, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy.json */ async function storageAccountSetManagementPolicies(): Promise { const subscriptionId = @@ -86,7 +84,7 @@ async function storageAccountSetManagementPolicies(): Promise { * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyColdTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyColdTierActions.json */ async function storageAccountSetManagementPolicyColdTierActions(): Promise { const subscriptionId = @@ -142,7 +140,7 @@ async function storageAccountSetManagementPolicyColdTierActions(): Promise * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json */ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs(): Promise { const subscriptionId = @@ -187,7 +185,7 @@ async function storageAccountSetManagementPolicyForBlockAndAppendBlobs(): Promis * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyHotTierActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyHotTierActions.json */ async function storageAccountSetManagementPolicyHotTierActions(): Promise { const subscriptionId = @@ -232,7 +230,7 @@ async function storageAccountSetManagementPolicyHotTierActions(): Promise * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicyWithSnapshotAndVersion.json */ async function storageAccountSetManagementPolicyWithSnapshotAndVersion(): Promise { const subscriptionId = @@ -289,7 +287,7 @@ async function storageAccountSetManagementPolicyWithSnapshotAndVersion(): Promis * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions.json */ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(): Promise { const subscriptionId = @@ -336,7 +334,7 @@ async function storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions.json */ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(): Promise { const subscriptionId = @@ -385,7 +383,7 @@ async function storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions() * This sample demonstrates how to Sets the managementpolicy to the specified storage account. * * @summary Sets the managementpolicy to the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountSetManagementPolicy_LastTierChangeTimeActions.json */ async function storageAccountSetManagementPolicyLastTierChangeTimeActions(): Promise { const subscriptionId = @@ -444,14 +442,14 @@ async function storageAccountSetManagementPolicyLastTierChangeTimeActions(): Pro } async function main(): Promise { - storageAccountSetManagementPolicies(); - storageAccountSetManagementPolicyColdTierActions(); - storageAccountSetManagementPolicyForBlockAndAppendBlobs(); - storageAccountSetManagementPolicyHotTierActions(); - storageAccountSetManagementPolicyWithSnapshotAndVersion(); - storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(); - storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(); - storageAccountSetManagementPolicyLastTierChangeTimeActions(); + await storageAccountSetManagementPolicies(); + await storageAccountSetManagementPolicyColdTierActions(); + await storageAccountSetManagementPolicyForBlockAndAppendBlobs(); + await storageAccountSetManagementPolicyHotTierActions(); + await storageAccountSetManagementPolicyWithSnapshotAndVersion(); + await storageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions(); + await storageAccountSetManagementPolicyLastAccessTimeBasedBlobActions(); + await storageAccountSetManagementPolicyLastTierChangeTimeActions(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesDeleteSample.ts index d14c42d9f9cb..d9de0042d754 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the managementpolicy associated with the specified storage account. * * @summary Deletes the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteManagementPolicy.json */ async function storageAccountDeleteManagementPolicies(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountDeleteManagementPolicies(): Promise { } async function main(): Promise { - storageAccountDeleteManagementPolicies(); + await storageAccountDeleteManagementPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesGetSample.ts index b3b6f4cc2d26..51290952f60c 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/managementPoliciesGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the managementpolicy associated with the specified storage account. * * @summary Gets the managementpolicy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetManagementPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetManagementPolicy.json */ async function storageAccountGetManagementPolicies(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountGetManagementPolicies(): Promise { } async function main(): Promise { - storageAccountGetManagementPolicies(); + await storageAccountGetManagementPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts index 60564331893d..978fe8b8d09a 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets effective NetworkSecurityPerimeterConfiguration for association * * @summary Gets effective NetworkSecurityPerimeterConfiguration for association - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationGet.json */ async function networkSecurityPerimeterConfigurationGet(): Promise { const subscriptionId = @@ -37,7 +35,7 @@ async function networkSecurityPerimeterConfigurationGet(): Promise { } async function main(): Promise { - networkSecurityPerimeterConfigurationGet(); + await networkSecurityPerimeterConfigurationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts index fc3e02eca2a2..e17ae822c5c0 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets list of effective NetworkSecurityPerimeterConfiguration for storage account * * @summary Gets list of effective NetworkSecurityPerimeterConfiguration for storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationList.json */ async function networkSecurityPerimeterConfigurationList(): Promise { const subscriptionId = @@ -27,7 +25,7 @@ async function networkSecurityPerimeterConfigurationList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.networkSecurityPerimeterConfigurations.list( + for await (const item of client.networkSecurityPerimeterConfigurations.list( resourceGroupName, accountName, )) { @@ -37,7 +35,7 @@ async function networkSecurityPerimeterConfigurationList(): Promise { } async function main(): Promise { - networkSecurityPerimeterConfigurationList(); + await networkSecurityPerimeterConfigurationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts index 5477384787e6..87320811beb6 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Refreshes any information about the association. * * @summary Refreshes any information about the association. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NetworkSecurityPerimeterConfigurationReconcile.json */ async function networkSecurityPerimeterConfigurationReconcile(): Promise { const subscriptionId = @@ -38,7 +36,7 @@ async function networkSecurityPerimeterConfigurationReconcile(): Promise { } async function main(): Promise { - networkSecurityPerimeterConfigurationReconcile(); + await networkSecurityPerimeterConfigurationReconcile(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesCreateOrUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesCreateOrUpdateSample.ts index 024f2062860f..c7aa731b31b2 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesCreateOrUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesCreateOrUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { ObjectReplicationPolicy, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnDestination.json */ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promise { const subscriptionId = @@ -29,6 +27,7 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promi const objectReplicationPolicyId = "default"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -54,7 +53,7 @@ async function storageAccountCreateObjectReplicationPolicyOnDestination(): Promi * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateObjectReplicationPolicyOnSource.json */ async function storageAccountCreateObjectReplicationPolicyOnSource(): Promise { const subscriptionId = @@ -64,6 +63,7 @@ async function storageAccountCreateObjectReplicationPolicyOnSource(): Promise { const subscriptionId = @@ -103,6 +103,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination(): Promi const objectReplicationPolicyId = "2a20bb73-5717-4635-985a-5d4cf777438f"; const properties: ObjectReplicationPolicy = { destinationAccount: "dst112", + metrics: { enabled: true }, rules: [ { destinationContainer: "dcont139", @@ -130,7 +131,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnDestination(): Promi * This sample demonstrates how to Create or update the object replication policy of the storage account. * * @summary Create or update the object replication policy of the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateObjectReplicationPolicyOnSource.json */ async function storageAccountUpdateObjectReplicationPolicyOnSource(): Promise { const subscriptionId = @@ -140,6 +141,7 @@ async function storageAccountUpdateObjectReplicationPolicyOnSource(): Promise { - storageAccountCreateObjectReplicationPolicyOnDestination(); - storageAccountCreateObjectReplicationPolicyOnSource(); - storageAccountUpdateObjectReplicationPolicyOnDestination(); - storageAccountUpdateObjectReplicationPolicyOnSource(); + await storageAccountCreateObjectReplicationPolicyOnDestination(); + await storageAccountCreateObjectReplicationPolicyOnSource(); + await storageAccountUpdateObjectReplicationPolicyOnDestination(); + await storageAccountUpdateObjectReplicationPolicyOnSource(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesDeleteSample.ts index c00e06e8e79f..676b7d3698f3 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the object replication policy associated with the specified storage account. * * @summary Deletes the object replication policy associated with the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeleteObjectReplicationPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeleteObjectReplicationPolicy.json */ async function storageAccountDeleteObjectReplicationPolicies(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountDeleteObjectReplicationPolicies(): Promise { } async function main(): Promise { - storageAccountDeleteObjectReplicationPolicies(); + await storageAccountDeleteObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesGetSample.ts index 0159e2e844b4..625b7da24f92 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Get the object replication policy of the storage account by policy ID. * * @summary Get the object replication policy of the storage account by policy ID. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetObjectReplicationPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetObjectReplicationPolicy.json */ async function storageAccountGetObjectReplicationPolicies(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountGetObjectReplicationPolicies(): Promise { } async function main(): Promise { - storageAccountGetObjectReplicationPolicies(); + await storageAccountGetObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesListSample.ts index 95215dfc3a57..8a54edaf75ea 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/objectReplicationPoliciesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List the object replication policies associated with the storage account. * * @summary List the object replication policies associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListObjectReplicationPolicies.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListObjectReplicationPolicies.json */ async function storageAccountListObjectReplicationPolicies(): Promise { const subscriptionId = @@ -26,7 +24,7 @@ async function storageAccountListObjectReplicationPolicies(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.objectReplicationPoliciesOperations.list( + for await (const item of client.objectReplicationPoliciesOperations.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function storageAccountListObjectReplicationPolicies(): Promise { } async function main(): Promise { - storageAccountListObjectReplicationPolicies(); + await storageAccountListObjectReplicationPolicies(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/operationsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/operationsListSample.ts index 00c36b7c5786..54a58df14467 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/operationsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/operationsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all of the available Storage Rest API operations. * * @summary Lists all of the available Storage Rest API operations. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/OperationsList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/OperationsList.json */ async function operationsList(): Promise { const subscriptionId = @@ -25,14 +23,14 @@ async function operationsList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - operationsList(); + await operationsList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsDeleteSample.ts index 244c64453328..3feb417baf3c 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the specified private endpoint connection associated with the storage account. * * @summary Deletes the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDeletePrivateEndpointConnection.json */ async function storageAccountDeletePrivateEndpointConnection(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountDeletePrivateEndpointConnection(): Promise { } async function main(): Promise { - storageAccountDeletePrivateEndpointConnection(); + await storageAccountDeletePrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsGetSample.ts index 44bb9adcbe05..904958f4e75d 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the specified private endpoint connection associated with the storage account. * * @summary Gets the specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPrivateEndpointConnection.json */ async function storageAccountGetPrivateEndpointConnection(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function storageAccountGetPrivateEndpointConnection(): Promise { } async function main(): Promise { - storageAccountGetPrivateEndpointConnection(); + await storageAccountGetPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsListSample.ts index 1249d32a1b2d..36460f987dcb 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List all the private endpoint connections associated with the storage account. * * @summary List all the private endpoint connections associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateEndpointConnections.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateEndpointConnections.json */ async function storageAccountListPrivateEndpointConnections(): Promise { const subscriptionId = @@ -26,7 +24,7 @@ async function storageAccountListPrivateEndpointConnections(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.privateEndpointConnections.list( + for await (const item of client.privateEndpointConnections.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function storageAccountListPrivateEndpointConnections(): Promise { } async function main(): Promise { - storageAccountListPrivateEndpointConnections(); + await storageAccountListPrivateEndpointConnections(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsPutSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsPutSample.ts index e0bfe35f2f15..d3525d919de1 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsPutSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/privateEndpointConnectionsPutSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { PrivateEndpointConnection, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Update the state of specified private endpoint connection associated with the storage account. * * @summary Update the state of specified private endpoint connection associated with the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPutPrivateEndpointConnection.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPutPrivateEndpointConnection.json */ async function storageAccountPutPrivateEndpointConnection(): Promise { const subscriptionId = @@ -45,7 +43,7 @@ async function storageAccountPutPrivateEndpointConnection(): Promise { } async function main(): Promise { - storageAccountPutPrivateEndpointConnection(); + await storageAccountPutPrivateEndpointConnection(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/privateLinkResourcesListByStorageAccountSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/privateLinkResourcesListByStorageAccountSample.ts index e81a207d2c88..d53ee1354272 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/privateLinkResourcesListByStorageAccountSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/privateLinkResourcesListByStorageAccountSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the private link resources that need to be created for a storage account. * * @summary Gets the private link resources that need to be created for a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListPrivateLinkResources.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListPrivateLinkResources.json */ async function storageAccountListPrivateLinkResources(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function storageAccountListPrivateLinkResources(): Promise { } async function main(): Promise { - storageAccountListPrivateLinkResources(); + await storageAccountListPrivateLinkResources(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueCreateSample.ts index 04c603c5615b..c4ef401735b5 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageQueue, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPut.json */ async function queueOperationPut(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function queueOperationPut(): Promise { * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPutWithMetadata.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPutWithMetadata.json */ async function queueOperationPutWithMetadata(): Promise { const subscriptionId = @@ -63,8 +61,8 @@ async function queueOperationPutWithMetadata(): Promise { } async function main(): Promise { - queueOperationPut(); - queueOperationPutWithMetadata(); + await queueOperationPut(); + await queueOperationPutWithMetadata(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueDeleteSample.ts index 0f5e7279a921..1f8f1eb19970 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the queue with the specified queue name, under the specified account if it exists. * * @summary Deletes the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationDelete.json */ async function queueOperationDelete(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function queueOperationDelete(): Promise { } async function main(): Promise { - queueOperationDelete(); + await queueOperationDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueGetSample.ts index 4a87cdd99d32..8400d546b9c1 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the queue with the specified queue name, under the specified account if it exists. * * @summary Gets the queue with the specified queue name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationGet.json */ async function queueOperationGet(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function queueOperationGet(): Promise { } async function main(): Promise { - queueOperationGet(); + await queueOperationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueListSample.ts index ff9793707710..94fab086d7f3 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets a list of all the queues under the specified storage account * * @summary Gets a list of all the queues under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationList.json */ async function queueOperationList(): Promise { const subscriptionId = @@ -26,14 +24,14 @@ async function queueOperationList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.queue.list(resourceGroupName, accountName)) { + for await (const item of client.queue.list(resourceGroupName, accountName)) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - queueOperationList(); + await queueOperationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesGetServicePropertiesSample.ts index 148ff0ee4d37..a810d900359f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesGetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesGet.json */ async function queueServicesGet(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function queueServicesGet(): Promise { } async function main(): Promise { - queueServicesGet(); + await queueServicesGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesListSample.ts index bc0ce16613cc..8e8a7de4adcf 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List all queue services for the storage account * * @summary List all queue services for the storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesList.json */ async function queueServicesList(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function queueServicesList(): Promise { } async function main(): Promise { - queueServicesList(); + await queueServicesList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesSetServicePropertiesSample.ts index cc5d74beb821..8e39566d3fd9 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueServicesSetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { QueueServiceProperties, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueServicesPut.json */ async function queueServicesPut(): Promise { const subscriptionId = @@ -75,7 +73,7 @@ async function queueServicesPut(): Promise { } async function main(): Promise { - queueServicesPut(); + await queueServicesPut(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/queueUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/queueUpdateSample.ts index 0243a47e74a1..0c147cf4559d 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/queueUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/queueUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageQueue, StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new queue with the specified queue name, under the specified account. * * @summary Creates a new queue with the specified queue name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/QueueOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/QueueOperationPatch.json */ async function queueOperationPatch(): Promise { const subscriptionId = @@ -37,7 +35,7 @@ async function queueOperationPatch(): Promise { } async function main(): Promise { - queueOperationPatch(); + await queueOperationPatch(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/skusListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/skusListSample.ts index 3afacbcbc391..c894ee882503 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/skusListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/skusListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists the available SKUs supported by Microsoft.Storage for given subscription. * * @summary Lists the available SKUs supported by Microsoft.Storage for given subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/SKUList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/SKUList.json */ async function skuList(): Promise { const subscriptionId = @@ -24,14 +22,14 @@ async function skuList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.skus.list()) { + for await (const item of client.skus.list()) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - skuList(); + await skuList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts index 5d6e4463bbca..3fc303bbc6c3 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsAbortHierarchicalNamespaceMigrationSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Abort live Migration of storage account to enable Hns * * @summary Abort live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountAbortHierarchicalNamespaceMigration.json */ async function storageAccountAbortHierarchicalNamespaceMigration(): Promise { const subscriptionId = @@ -34,7 +32,7 @@ async function storageAccountAbortHierarchicalNamespaceMigration(): Promise { - storageAccountAbortHierarchicalNamespaceMigration(); + await storageAccountAbortHierarchicalNamespaceMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCheckNameAvailabilitySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCheckNameAvailabilitySample.ts index 126752adddad..7771a100c45a 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCheckNameAvailabilitySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCheckNameAvailabilitySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountCheckNameAvailabilityParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Checks that the storage account name is valid and is not already in use. * * @summary Checks that the storage account name is valid and is not already in use. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCheckNameAvailability.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCheckNameAvailability.json */ async function storageAccountCheckNameAvailability(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function storageAccountCheckNameAvailability(): Promise { } async function main(): Promise { - storageAccountCheckNameAvailability(); + await storageAccountCheckNameAvailability(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCreateSample.ts index ba78727a4f18..466c7be8121b 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountCreateParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/NfsV3AccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/NfsV3AccountCreate.json */ async function nfsV3AccountCreate(): Promise { const subscriptionId = @@ -60,7 +58,7 @@ async function nfsV3AccountCreate(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreate.json */ async function storageAccountCreate(): Promise { const subscriptionId = @@ -109,7 +107,7 @@ async function storageAccountCreate(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToAAD.json */ async function storageAccountCreateAllowedCopyScopeToAad(): Promise { const subscriptionId = @@ -156,7 +154,7 @@ async function storageAccountCreateAllowedCopyScopeToAad(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateAllowedCopyScopeToPrivateLink.json */ async function storageAccountCreateAllowedCopyScopeToPrivateLink(): Promise { const subscriptionId = @@ -203,7 +201,7 @@ async function storageAccountCreateAllowedCopyScopeToPrivateLink(): Promise { const subscriptionId = @@ -251,7 +249,7 @@ async function storageAccountCreateDisallowPublicNetworkAccess(): Promise * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json */ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone(): Promise { const subscriptionId = @@ -301,7 +299,7 @@ async function storageAccountCreateDnsEndpointTypeToAzureDnsZone(): Promise { const subscriptionId = @@ -351,7 +349,7 @@ async function storageAccountCreateDnsEndpointTypeToStandard(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateEnablePublicNetworkAccess.json */ async function storageAccountCreateEnablePublicNetworkAccess(): Promise { const subscriptionId = @@ -399,7 +397,7 @@ async function storageAccountCreateEnablePublicNetworkAccess(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreatePremiumBlockBlobStorage.json */ async function storageAccountCreatePremiumBlockBlobStorage(): Promise { const subscriptionId = @@ -436,7 +434,7 @@ async function storageAccountCreatePremiumBlockBlobStorage(): Promise { * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk(): Promise { const subscriptionId = @@ -485,7 +483,7 @@ async function storageAccountCreateUserAssignedEncryptionIdentityWithCmk(): Prom * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(): Promise { const subscriptionId = @@ -537,7 +535,7 @@ async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountCreateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountCreateWithImmutabilityPolicy.json */ async function storageAccountCreateWithImmutabilityPolicy(): Promise { const subscriptionId = @@ -569,18 +567,18 @@ async function storageAccountCreateWithImmutabilityPolicy(): Promise { } async function main(): Promise { - nfsV3AccountCreate(); - storageAccountCreate(); - storageAccountCreateAllowedCopyScopeToAad(); - storageAccountCreateAllowedCopyScopeToPrivateLink(); - storageAccountCreateDisallowPublicNetworkAccess(); - storageAccountCreateDnsEndpointTypeToAzureDnsZone(); - storageAccountCreateDnsEndpointTypeToStandard(); - storageAccountCreateEnablePublicNetworkAccess(); - storageAccountCreatePremiumBlockBlobStorage(); - storageAccountCreateUserAssignedEncryptionIdentityWithCmk(); - storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(); - storageAccountCreateWithImmutabilityPolicy(); + await nfsV3AccountCreate(); + await storageAccountCreate(); + await storageAccountCreateAllowedCopyScopeToAad(); + await storageAccountCreateAllowedCopyScopeToPrivateLink(); + await storageAccountCreateDisallowPublicNetworkAccess(); + await storageAccountCreateDnsEndpointTypeToAzureDnsZone(); + await storageAccountCreateDnsEndpointTypeToStandard(); + await storageAccountCreateEnablePublicNetworkAccess(); + await storageAccountCreatePremiumBlockBlobStorage(); + await storageAccountCreateUserAssignedEncryptionIdentityWithCmk(); + await storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(); + await storageAccountCreateWithImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCustomerInitiatedMigrationSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCustomerInitiatedMigrationSample.ts index 4062a492ffe7..c30b3844f0a5 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCustomerInitiatedMigrationSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsCustomerInitiatedMigrationSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountMigration, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. * * @summary Account Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountPostMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountPostMigration.json */ async function storageAccountPostMigration(): Promise { const subscriptionId = @@ -40,7 +38,7 @@ async function storageAccountPostMigration(): Promise { } async function main(): Promise { - storageAccountPostMigration(); + await storageAccountPostMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsDeleteSample.ts index 84e01d13fee2..e869c4f05b83 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes a storage account in Microsoft Azure. * * @summary Deletes a storage account in Microsoft Azure. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountDelete.json */ async function storageAccountDelete(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function storageAccountDelete(): Promise { } async function main(): Promise { - storageAccountDelete(); + await storageAccountDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsFailoverSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsFailoverSample.ts index 8729e46e5674..015e080b2c8f 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsFailoverSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsFailoverSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailover.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailover.json */ async function storageAccountFailover(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function storageAccountFailover(): Promise { * This sample demonstrates how to A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance * * @summary A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountFailoverPlanned.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountFailoverPlanned.json */ async function storageAccountFailoverPlanned(): Promise { const subscriptionId = @@ -53,8 +51,8 @@ async function storageAccountFailoverPlanned(): Promise { } async function main(): Promise { - storageAccountFailover(); - storageAccountFailoverPlanned(); + await storageAccountFailover(); + await storageAccountFailoverPlanned(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetCustomerInitiatedMigrationSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetCustomerInitiatedMigrationSample.ts index aa9ffacfcb41..75d0f48474c8 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetCustomerInitiatedMigrationSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetCustomerInitiatedMigrationSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationFailed.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationFailed.json */ async function storageAccountGetMigrationFailed(): Promise { const subscriptionId = @@ -39,7 +37,7 @@ async function storageAccountGetMigrationFailed(): Promise { * This sample demonstrates how to Gets the status of the ongoing migration for the specified storage account. * * @summary Gets the status of the ongoing migration for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetMigrationInProgress.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetMigrationInProgress.json */ async function storageAccountGetMigrationInProgress(): Promise { const subscriptionId = @@ -59,8 +57,8 @@ async function storageAccountGetMigrationInProgress(): Promise { } async function main(): Promise { - storageAccountGetMigrationFailed(); - storageAccountGetMigrationInProgress(); + await storageAccountGetMigrationFailed(); + await storageAccountGetMigrationInProgress(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetPropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetPropertiesSample.ts index 186deb485f69..dccb39f7d96d 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetPropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsGetPropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountsGetPropertiesOptionalParams, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetAsyncSkuConversionStatus.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetAsyncSkuConversionStatus.json */ async function storageAccountGetAsyncSkuConversionStatus(): Promise { const subscriptionId = @@ -39,7 +37,7 @@ async function storageAccountGetAsyncSkuConversionStatus(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetProperties.json */ async function storageAccountGetProperties(): Promise { const subscriptionId = @@ -59,7 +57,7 @@ async function storageAccountGetProperties(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKEnabled.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKEnabled.json */ async function storageAccountGetPropertiesCmkEnabled(): Promise { const subscriptionId = @@ -79,7 +77,7 @@ async function storageAccountGetPropertiesCmkEnabled(): Promise { * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesCMKVersionExpirationTime.json */ async function storageAccountGetPropertiesCmkVersionExpirationTime(): Promise { const subscriptionId = @@ -99,7 +97,7 @@ async function storageAccountGetPropertiesCmkVersionExpirationTime(): Promise { const subscriptionId = @@ -122,7 +120,7 @@ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(): * This sample demonstrates how to Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @summary Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountGetPropertiesGeoReplicationStatscanFailoverTrue.json */ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(): Promise { const subscriptionId = @@ -142,12 +140,12 @@ async function storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(): } async function main(): Promise { - storageAccountGetAsyncSkuConversionStatus(); - storageAccountGetProperties(); - storageAccountGetPropertiesCmkEnabled(); - storageAccountGetPropertiesCmkVersionExpirationTime(); - storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(); - storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(); + await storageAccountGetAsyncSkuConversionStatus(); + await storageAccountGetProperties(); + await storageAccountGetPropertiesCmkEnabled(); + await storageAccountGetPropertiesCmkVersionExpirationTime(); + await storageAccountGetPropertiesGeoReplicationStatscanFailoverFalse(); + await storageAccountGetPropertiesGeoReplicationStatscanFailoverTrue(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsHierarchicalNamespaceMigrationSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsHierarchicalNamespaceMigrationSample.ts index fdeb61593c01..0b988e5d2f72 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsHierarchicalNamespaceMigrationSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsHierarchicalNamespaceMigrationSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Live Migration of storage account to enable Hns * * @summary Live Migration of storage account to enable Hns - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountHierarchicalNamespaceMigration.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountHierarchicalNamespaceMigration.json */ async function storageAccountHierarchicalNamespaceMigration(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function storageAccountHierarchicalNamespaceMigration(): Promise { } async function main(): Promise { - storageAccountHierarchicalNamespaceMigration(); + await storageAccountHierarchicalNamespaceMigration(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListAccountSasSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListAccountSasSample.ts index 4de4db43f9f9..f55ad886babf 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListAccountSasSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListAccountSasSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { AccountSasParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to List SAS credentials of a storage account. * * @summary List SAS credentials of a storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListAccountSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListAccountSAS.json */ async function storageAccountListAccountSas(): Promise { const subscriptionId = @@ -46,7 +44,7 @@ async function storageAccountListAccountSas(): Promise { } async function main(): Promise { - storageAccountListAccountSas(); + await storageAccountListAccountSas(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListByResourceGroupSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListByResourceGroupSample.ts index 98fa8e3d1795..d317d208173d 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListByResourceGroupSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListByResourceGroupSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListByResourceGroup.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListByResourceGroup.json */ async function storageAccountListByResourceGroup(): Promise { const subscriptionId = @@ -25,7 +23,7 @@ async function storageAccountListByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageAccounts.listByResourceGroup( + for await (const item of client.storageAccounts.listByResourceGroup( resourceGroupName, )) { resArray.push(item); @@ -34,7 +32,7 @@ async function storageAccountListByResourceGroup(): Promise { } async function main(): Promise { - storageAccountListByResourceGroup(); + await storageAccountListByResourceGroup(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListKeysSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListKeysSample.ts index 734b90e5c1bb..34080cb4772e 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListKeysSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListKeysSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. * * @summary Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListKeys.json */ async function storageAccountListKeys(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function storageAccountListKeys(): Promise { } async function main(): Promise { - storageAccountListKeys(); + await storageAccountListKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListSample.ts index a60a96ce4ddb..a1a0397ae819 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. * * @summary Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountList.json */ async function storageAccountList(): Promise { const subscriptionId = @@ -24,14 +22,14 @@ async function storageAccountList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageAccounts.list()) { + for await (const item of client.storageAccounts.list()) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - storageAccountList(); + await storageAccountList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListServiceSasSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListServiceSasSample.ts index 2d528236eb85..1e10621de854 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListServiceSasSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsListServiceSasSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { ServiceSasParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to List service SAS credentials of a specific resource. * * @summary List service SAS credentials of a specific resource. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListServiceSAS.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListServiceSAS.json */ async function storageAccountListServiceSas(): Promise { const subscriptionId = @@ -43,7 +41,7 @@ async function storageAccountListServiceSas(): Promise { } async function main(): Promise { - storageAccountListServiceSas(); + await storageAccountListServiceSas(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRegenerateKeySample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRegenerateKeySample.ts index 9794521025ca..840dae654ae4 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRegenerateKeySample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRegenerateKeySample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountRegenerateKeyParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKerbKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKerbKey.json */ async function storageAccountRegenerateKerbKey(): Promise { const subscriptionId = @@ -43,7 +41,7 @@ async function storageAccountRegenerateKerbKey(): Promise { * This sample demonstrates how to Regenerates one of the access keys or Kerberos keys for the specified storage account. * * @summary Regenerates one of the access keys or Kerberos keys for the specified storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRegenerateKey.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRegenerateKey.json */ async function storageAccountRegenerateKey(): Promise { const subscriptionId = @@ -64,8 +62,8 @@ async function storageAccountRegenerateKey(): Promise { } async function main(): Promise { - storageAccountRegenerateKerbKey(); - storageAccountRegenerateKey(); + await storageAccountRegenerateKerbKey(); + await storageAccountRegenerateKey(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRestoreBlobRangesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRestoreBlobRangesSample.ts index 1ab8b2b1885e..e86d408825fe 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRestoreBlobRangesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRestoreBlobRangesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { BlobRestoreParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Restore blobs in the specified blob ranges * * @summary Restore blobs in the specified blob ranges - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/BlobRangesRestore.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/BlobRangesRestore.json */ async function blobRangesRestore(): Promise { const subscriptionId = @@ -44,7 +42,7 @@ async function blobRangesRestore(): Promise { } async function main(): Promise { - blobRangesRestore(); + await blobRangesRestore(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRevokeUserDelegationKeysSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRevokeUserDelegationKeysSample.ts index b8cbfcfb8611..b01e3119f2db 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRevokeUserDelegationKeysSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsRevokeUserDelegationKeysSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Revoke user delegation keys. * * @summary Revoke user delegation keys. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountRevokeUserDelegationKeys.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountRevokeUserDelegationKeys.json */ async function storageAccountRevokeUserDelegationKeys(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function storageAccountRevokeUserDelegationKeys(): Promise { } async function main(): Promise { - storageAccountRevokeUserDelegationKeys(); + await storageAccountRevokeUserDelegationKeys(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsUpdateSample.ts index cdf2513407ba..437e160ffb8a 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageAccountsUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageAccountUpdateParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableAD.json */ async function storageAccountEnableAd(): Promise { const subscriptionId = @@ -55,7 +53,7 @@ async function storageAccountEnableAd(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountEnableCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountEnableCMK.json */ async function storageAccountEnableCmk(): Promise { const subscriptionId = @@ -90,7 +88,7 @@ async function storageAccountEnableCmk(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdate.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdate.json */ async function storageAccountUpdate(): Promise { const subscriptionId = @@ -144,7 +142,7 @@ async function storageAccountUpdate(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateAllowedCopyScopeToAAD.json */ async function storageAccountUpdateAllowedCopyScopeToAad(): Promise { const subscriptionId = @@ -195,7 +193,7 @@ async function storageAccountUpdateAllowedCopyScopeToAad(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateDisablePublicNetworkAccess.json */ async function storageAccountUpdateDisablePublicNetworkAccess(): Promise { const subscriptionId = @@ -246,7 +244,7 @@ async function storageAccountUpdateDisablePublicNetworkAccess(): Promise { * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK.json */ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(): Promise { const subscriptionId = @@ -294,7 +292,7 @@ async function storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(): Prom * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json */ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(): Promise { const subscriptionId = @@ -345,7 +343,7 @@ async function storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClie * This sample demonstrates how to The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. * * @summary The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountUpdateWithImmutabilityPolicy.json */ async function storageAccountUpdateWithImmutabilityPolicy(): Promise { const subscriptionId = @@ -373,14 +371,14 @@ async function storageAccountUpdateWithImmutabilityPolicy(): Promise { } async function main(): Promise { - storageAccountEnableAd(); - storageAccountEnableCmk(); - storageAccountUpdate(); - storageAccountUpdateAllowedCopyScopeToAad(); - storageAccountUpdateDisablePublicNetworkAccess(); - storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(); - storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(); - storageAccountUpdateWithImmutabilityPolicy(); + await storageAccountEnableAd(); + await storageAccountEnableCmk(); + await storageAccountUpdate(); + await storageAccountUpdateAllowedCopyScopeToAad(); + await storageAccountUpdateDisablePublicNetworkAccess(); + await storageAccountUpdateUserAssignedEncryptionIdentityWithCmk(); + await storageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId(); + await storageAccountUpdateWithImmutabilityPolicy(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentInstancesReportListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentInstancesReportListSample.ts index a8035acce49a..bbde81a91211 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentInstancesReportListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentInstancesReportListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Fetch the report summary of a single storage task assignment's instances * * @summary Fetch the report summary of a single storage task assignment's instances - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentInstancesReportSummary.json */ async function listStorageTaskAssignmentInstancesReportSummary(): Promise { const subscriptionId = @@ -28,7 +26,7 @@ async function listStorageTaskAssignmentInstancesReportSummary(): Promise const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignmentInstancesReport.list( + for await (const item of client.storageTaskAssignmentInstancesReport.list( resourceGroupName, accountName, storageTaskAssignmentName, @@ -39,7 +37,7 @@ async function listStorageTaskAssignmentInstancesReportSummary(): Promise } async function main(): Promise { - listStorageTaskAssignmentInstancesReportSummary(); + await listStorageTaskAssignmentInstancesReportSummary(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsCreateSample.ts index 3996975c7f4c..c7266c083890 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageTaskAssignment, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignment.json */ async function putStorageTaskAssignment(): Promise { const subscriptionId = @@ -59,7 +57,7 @@ async function putStorageTaskAssignment(): Promise { * This sample demonstrates how to Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. * * @summary Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PutStorageTaskAssignmentRequiredProperties.json */ async function putStorageTaskAssignmentRequiredProperties(): Promise { const subscriptionId = @@ -95,8 +93,8 @@ async function putStorageTaskAssignmentRequiredProperties(): Promise { } async function main(): Promise { - putStorageTaskAssignment(); - putStorageTaskAssignmentRequiredProperties(); + await putStorageTaskAssignment(); + await putStorageTaskAssignmentRequiredProperties(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsDeleteSample.ts index 049063cd33bb..191421d318b4 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Delete the storage task assignment sub-resource * * @summary Delete the storage task assignment sub-resource - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/DeleteStorageTaskAssignment.json */ async function deleteStorageTaskAssignment(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function deleteStorageTaskAssignment(): Promise { } async function main(): Promise { - deleteStorageTaskAssignment(); + await deleteStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsGetSample.ts index 92fa4234a4a8..6dc7d1176505 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Get the storage task assignment properties * * @summary Get the storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/GetStorageTaskAssignment.json */ async function getStorageTaskAssignment(): Promise { const subscriptionId = @@ -36,7 +34,7 @@ async function getStorageTaskAssignment(): Promise { } async function main(): Promise { - getStorageTaskAssignment(); + await getStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsInstancesReportListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsInstancesReportListSample.ts index c8c825133a2d..f08dcc4a35c6 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsInstancesReportListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsInstancesReportListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Fetch the report summary of all the storage task assignments and instances in an account * * @summary Fetch the report summary of all the storage task assignments and instances in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsInstancesReportSummary.json */ async function listStorageTaskAssignmentsInstancesReportSummary(): Promise { const subscriptionId = @@ -27,7 +25,7 @@ async function listStorageTaskAssignmentsInstancesReportSummary(): Promise const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignmentsInstancesReport.list( + for await (const item of client.storageTaskAssignmentsInstancesReport.list( resourceGroupName, accountName, )) { @@ -37,7 +35,7 @@ async function listStorageTaskAssignmentsInstancesReportSummary(): Promise } async function main(): Promise { - listStorageTaskAssignmentsInstancesReportSummary(); + await listStorageTaskAssignmentsInstancesReportSummary(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsListSample.ts index 1946fb1d8ebd..11852755b960 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List all the storage task assignments in an account * * @summary List all the storage task assignments in an account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsList/ListStorageTaskAssignmentsForAccount.json */ async function listStorageTaskAssignmentsForAccount(): Promise { const subscriptionId = @@ -27,7 +25,7 @@ async function listStorageTaskAssignmentsForAccount(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.storageTaskAssignments.list( + for await (const item of client.storageTaskAssignments.list( resourceGroupName, accountName, )) { @@ -37,7 +35,7 @@ async function listStorageTaskAssignmentsForAccount(): Promise { } async function main(): Promise { - listStorageTaskAssignmentsForAccount(); + await listStorageTaskAssignmentsForAccount(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsUpdateSample.ts index f3ae884afa31..d45039eb9793 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/storageTaskAssignmentsUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageTaskAssignmentUpdateParameters, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Update storage task assignment properties * * @summary Update storage task assignment properties - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/storageTaskAssignmentsCrud/PatchStorageTaskAssignment.json */ async function patchStorageTaskAssignment(): Promise { const subscriptionId = @@ -54,7 +52,7 @@ async function patchStorageTaskAssignment(): Promise { } async function main(): Promise { - patchStorageTaskAssignment(); + await patchStorageTaskAssignment(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableCreateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableCreateSample.ts index 3fb703ad1dc9..f3a00bcfb84b 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableCreateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableCreateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { Table, TableCreateOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPut.json */ async function tableOperationPut(): Promise { const subscriptionId = @@ -42,7 +40,7 @@ async function tableOperationPut(): Promise { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls(): Promise { const subscriptionId = @@ -83,8 +81,8 @@ async function tableOperationPutOrPatchAcls(): Promise { } async function main(): Promise { - tableOperationPut(); - tableOperationPutOrPatchAcls(); + await tableOperationPut(); + await tableOperationPutOrPatchAcls(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableDeleteSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableDeleteSample.ts index fbd1a6ef368d..d260d5f22af5 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableDeleteSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableDeleteSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Deletes the table with the specified table name, under the specified account if it exists. * * @summary Deletes the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationDelete.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationDelete.json */ async function tableOperationDelete(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function tableOperationDelete(): Promise { } async function main(): Promise { - tableOperationDelete(); + await tableOperationDelete(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableGetSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableGetSample.ts index 8b65277d397c..f5fd247f412b 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableGetSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableGetSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the table with the specified table name, under the specified account if it exists. * * @summary Gets the table with the specified table name, under the specified account if it exists. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationGet.json */ async function tableOperationGet(): Promise { const subscriptionId = @@ -35,7 +33,7 @@ async function tableOperationGet(): Promise { } async function main(): Promise { - tableOperationGet(); + await tableOperationGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableListSample.ts index 8b0e90568265..ed28d4fc35dd 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets a list of all the tables under the specified storage account * * @summary Gets a list of all the tables under the specified storage account - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationList.json */ async function tableOperationList(): Promise { const subscriptionId = @@ -26,7 +24,7 @@ async function tableOperationList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.tableOperations.list( + for await (const item of client.tableOperations.list( resourceGroupName, accountName, )) { @@ -36,7 +34,7 @@ async function tableOperationList(): Promise { } async function main(): Promise { - tableOperationList(); + await tableOperationList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesGetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesGetServicePropertiesSample.ts index f2e752a0669d..f50763243c7c 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesGetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesGetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesGet.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesGet.json */ async function tableServicesGet(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function tableServicesGet(): Promise { } async function main(): Promise { - tableServicesGet(); + await tableServicesGet(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesListSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesListSample.ts index ad9a5a1a59a0..b86ae01f23f1 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesListSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesListSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to List all table services for the storage account. * * @summary List all table services for the storage account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesList.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesList.json */ async function tableServicesList(): Promise { const subscriptionId = @@ -33,7 +31,7 @@ async function tableServicesList(): Promise { } async function main(): Promise { - tableServicesList(); + await tableServicesList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesSetServicePropertiesSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesSetServicePropertiesSample.ts index cf05f645fb93..f580946bef7a 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesSetServicePropertiesSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableServicesSetServicePropertiesSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { TableServiceProperties, StorageManagementClient, @@ -19,7 +17,7 @@ import "dotenv/config"; * This sample demonstrates how to Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @summary Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableServicesPut.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableServicesPut.json */ async function tableServicesPut(): Promise { const subscriptionId = @@ -75,7 +73,7 @@ async function tableServicesPut(): Promise { } async function main(): Promise { - tableServicesPut(); + await tableServicesPut(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/tableUpdateSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/tableUpdateSample.ts index 577be5fbb8d3..b02f5fe1babd 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/tableUpdateSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/tableUpdateSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { Table, TableUpdateOptionalParams, @@ -20,7 +18,7 @@ import "dotenv/config"; * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPatch.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPatch.json */ async function tableOperationPatch(): Promise { const subscriptionId = @@ -42,7 +40,7 @@ async function tableOperationPatch(): Promise { * This sample demonstrates how to Creates a new table with the specified table name, under the specified account. * * @summary Creates a new table with the specified table name, under the specified account. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/TableOperationPutOrPatchAcls.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/TableOperationPutOrPatchAcls.json */ async function tableOperationPutOrPatchAcls(): Promise { const subscriptionId = @@ -83,8 +81,8 @@ async function tableOperationPutOrPatchAcls(): Promise { } async function main(): Promise { - tableOperationPatch(); - tableOperationPutOrPatchAcls(); + await tableOperationPatch(); + await tableOperationPutOrPatchAcls(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/src/usagesListByLocationSample.ts b/sdk/storage/arm-storage/samples/v18/typescript/src/usagesListByLocationSample.ts index b055b348cc11..e1401a1dfbff 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/src/usagesListByLocationSample.ts +++ b/sdk/storage/arm-storage/samples/v18/typescript/src/usagesListByLocationSample.ts @@ -6,8 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. import { StorageManagementClient } from "@azure/arm-storage"; import { DefaultAzureCredential } from "@azure/identity"; import "dotenv/config"; @@ -16,7 +14,7 @@ import "dotenv/config"; * This sample demonstrates how to Gets the current usage count and the limit for the resources of the location under the subscription. * * @summary Gets the current usage count and the limit for the resources of the location under the subscription. - * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/examples/StorageAccountListLocationUsage.json + * x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/StorageAccountListLocationUsage.json */ async function usageList(): Promise { const subscriptionId = @@ -25,14 +23,14 @@ async function usageList(): Promise { const credential = new DefaultAzureCredential(); const client = new StorageManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (let item of client.usages.listByLocation(location)) { + for await (const item of client.usages.listByLocation(location)) { resArray.push(item); } console.log(resArray); } async function main(): Promise { - usageList(); + await usageList(); } main().catch(console.error); diff --git a/sdk/storage/arm-storage/samples/v18/typescript/tsconfig.json b/sdk/storage/arm-storage/samples/v18/typescript/tsconfig.json index 984eed535aa8..400db87cf648 100644 --- a/sdk/storage/arm-storage/samples/v18/typescript/tsconfig.json +++ b/sdk/storage/arm-storage/samples/v18/typescript/tsconfig.json @@ -1,17 +1,20 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2023", "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + "lib": [], + "importHelpers": true, "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "moduleResolution": "node10", + "esModuleInterop": true, + "outDir": "./dist", + "resolveJsonModule": true }, "include": [ - "src/**/*.ts" + "./src" ] } diff --git a/sdk/storage/arm-storage/src/lroImpl.ts b/sdk/storage/arm-storage/src/lroImpl.ts index d8bc98987053..5f88efab981b 100644 --- a/sdk/storage/arm-storage/src/lroImpl.ts +++ b/sdk/storage/arm-storage/src/lroImpl.ts @@ -5,6 +5,10 @@ * 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. + import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; diff --git a/sdk/storage/arm-storage/src/models/index.ts b/sdk/storage/arm-storage/src/models/index.ts index 4d090a450b09..6c3aba07ced1 100644 --- a/sdk/storage/arm-storage/src/models/index.ts +++ b/sdk/storage/arm-storage/src/models/index.ts @@ -347,6 +347,188 @@ export interface Multichannel { enabled?: boolean; } +/** List file service usages schema. */ +export interface FileServiceUsages { + /** + * List of file service usages returned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: FileServiceUsage[]; + /** + * Request URL that can be used to query next page of file service usages. Returned when total number of requested file service usages exceed maximum page size. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** File service usage in storage account including account limits, file share limits and constants used in recommendations and bursting formula. */ +export interface FileServiceUsageProperties { + /** + * Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageAccountLimits?: AccountLimits; + /** + * Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareLimits?: FileShareLimits; + /** + * Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareRecommendations?: FileShareRecommendations; + /** + * Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstingConstants?: BurstingConstants; + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageAccountUsage?: AccountUsage; +} + +/** Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. */ +export interface AccountLimits { + /** + * The maximum number of file shares limit for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxFileShares?: number; + /** + * The maximum provisioned storage quota limit in gibibytes for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedStorageGiB?: number; + /** + * The maximum provisioned IOPS limit for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedIops?: number; + /** + * The maximum provisioned bandwidth limit in mebibytes per second for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedBandwidthMiBPerSec?: number; +} + +/** Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. */ +export interface FileShareLimits { + /** + * The minimum provisioned storage quota limit in gibibytes for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedStorageGiB?: number; + /** + * The maximum provisioned storage quota limit in gibibytes for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedStorageGiB?: number; + /** + * The minimum provisioned IOPS limit for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedIops?: number; + /** + * The maximum provisioned IOPS limit for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedIops?: number; + /** + * The minimum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedBandwidthMiBPerSec?: number; + /** + * The maximum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedBandwidthMiBPerSec?: number; +} + +/** Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. */ +export interface FileShareRecommendations { + /** + * The base IOPS in the file share provisioned IOPS recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly baseIops?: number; + /** + * The scalar for IO in the file share provisioned IOPS recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ioScalar?: number; + /** + * The base bandwidth in the file share provisioned bandwidth recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly baseBandwidthMiBPerSec?: number; + /** + * The scalar for bandwidth in the file share provisioned bandwidth recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bandwidthScalar?: number; +} + +/** Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the storage account. */ +export interface BurstingConstants { + /** + * The guaranteed floor of burst IOPS for small file shares. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstFloorIops?: number; + /** + * The scalar against provisioned IOPS in the file share included burst IOPS formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstIOScalar?: number; + /** + * The time frame for bursting in seconds in the file share maximum burst credits for IOPS formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstTimeframeSeconds?: number; +} + +/** Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted shares in the account. */ +export interface AccountUsage { + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly liveShares?: AccountUsageElements; + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly softDeletedShares?: AccountUsageElements; +} + +/** Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. */ +export interface AccountUsageElements { + /** + * The total number of file shares. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareCount?: number; + /** + * The total provisioned storage quota in gibibytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedStorageGiB?: number; + /** + * The total provisioned IOPS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedIops?: number; + /** + * The total provisioned bandwidth in mebibytes per second. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedBandwidthMiBPerSec?: number; +} + /** Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares. */ export interface FileShareItems { /** @@ -377,6 +559,16 @@ export interface AccessPolicy { permission?: string; } +/** File Share Paid Bursting properties. */ +export interface FileSharePropertiesFileSharePaidBursting { + /** Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. */ + paidBurstingEnabled?: boolean; + /** The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the maximum allowed IOPS for a share. */ + paidBurstingMaxIops?: number; + /** The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for a share. */ + paidBurstingMaxBandwidthMibps?: number; +} + /** The deleted share to be restored. */ export interface DeletedShare { /** Required. Identify the name of the deleted share that will be restored. */ @@ -1692,6 +1884,12 @@ export interface ObjectReplicationPolicyFilter { minCreationTime?: string; } +/** Optional. The object replication policy metrics feature options. */ +export interface ObjectReplicationPolicyPropertiesMetrics { + /** Indicates whether object replication metrics feature is enabled for the policy. */ + enabled?: boolean; +} + /** List of local users requested, and if paging is required, a URL to the next page of local users. */ export interface LocalUsers { /** The list of local users associated with the storage account. */ @@ -2218,6 +2416,15 @@ export interface FileServiceProperties extends Resource { protocolSettings?: ProtocolSettings; } +/** The usage of file service in storage account. */ +export interface FileServiceUsage extends Resource { + /** + * File service usage in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: FileServiceUsageProperties; +} + /** The properties of a storage account’s Queue service. */ export interface QueueServiceProperties extends Resource { /** Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. */ @@ -2324,6 +2531,8 @@ export interface ObjectReplicationPolicy extends Resource { destinationAccount?: string; /** The storage account object replication rules. */ rules?: ObjectReplicationPolicyRule[]; + /** Optional. The object replication policy metrics feature options. */ + metrics?: ObjectReplicationPolicyPropertiesMetrics; } /** The local user associated with the storage accounts. */ @@ -2593,8 +2802,37 @@ export interface FileShareItem extends AzureEntityResource { readonly lastModifiedTime?: Date; /** A name-value pair to associate with the share as metadata. */ metadata?: { [propertyName: string]: string }; - /** The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. */ + /** The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. */ shareQuota?: number; + /** The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. */ + provisionedIops?: number; + /** The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. */ + provisionedBandwidthMibps?: number; + /** + * The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly includedBurstIops?: number; + /** + * The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxBurstCreditsForIops?: number; + /** + * Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedQuotaDowngradeTime?: Date; + /** + * Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + /** + * Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; /** The authentication protocol that is used for the file share. Can only be specified when creating a share. */ enabledProtocols?: EnabledProtocols; /** The property is for NFS share only. The default is NoRootSquash. */ @@ -2658,6 +2896,8 @@ export interface FileShareItem extends AzureEntityResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly snapshotTime?: Date; + /** File Share Paid Bursting properties. */ + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; } /** Properties of the file share, including Id, resource name, resource type, Etag. */ @@ -2669,8 +2909,37 @@ export interface FileShare extends AzureEntityResource { readonly lastModifiedTime?: Date; /** A name-value pair to associate with the share as metadata. */ metadata?: { [propertyName: string]: string }; - /** The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. */ + /** The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. */ shareQuota?: number; + /** The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. */ + provisionedIops?: number; + /** The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. */ + provisionedBandwidthMibps?: number; + /** + * The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly includedBurstIops?: number; + /** + * The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxBurstCreditsForIops?: number; + /** + * Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedQuotaDowngradeTime?: Date; + /** + * Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + /** + * Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; /** The authentication protocol that is used for the file share. Can only be specified when creating a share. */ enabledProtocols?: EnabledProtocols; /** The property is for NFS share only. The default is NoRootSquash. */ @@ -2734,6 +3003,8 @@ export interface FileShare extends AzureEntityResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly snapshotTime?: Date; + /** File Share Paid Bursting properties. */ + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; } /** The storage account. */ @@ -3103,6 +3374,18 @@ export enum KnownSkuName { StandardGzrs = "Standard_GZRS", /** StandardRagzrs */ StandardRagzrs = "Standard_RAGZRS", + /** StandardV2LRS */ + StandardV2LRS = "StandardV2_LRS", + /** StandardV2GRS */ + StandardV2GRS = "StandardV2_GRS", + /** StandardV2ZRS */ + StandardV2ZRS = "StandardV2_ZRS", + /** StandardV2Gzrs */ + StandardV2Gzrs = "StandardV2_GZRS", + /** PremiumV2LRS */ + PremiumV2LRS = "PremiumV2_LRS", + /** PremiumV2ZRS */ + PremiumV2ZRS = "PremiumV2_ZRS", } /** @@ -3117,7 +3400,13 @@ export enum KnownSkuName { * **Premium_LRS** \ * **Premium_ZRS** \ * **Standard_GZRS** \ - * **Standard_RAGZRS** + * **Standard_RAGZRS** \ + * **StandardV2_LRS** \ + * **StandardV2_GRS** \ + * **StandardV2_ZRS** \ + * **StandardV2_GZRS** \ + * **PremiumV2_LRS** \ + * **PremiumV2_ZRS** */ export type SkuName = string; @@ -4528,7 +4817,7 @@ export interface BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams extends coreClient.OperationOptions { /** The ImmutabilityPolicy Properties that will be created or updated to a blob container. */ parameters?: ImmutabilityPolicy; - /** The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. */ + /** The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. */ ifMatch?: string; } @@ -4539,7 +4828,7 @@ export type BlobContainersCreateOrUpdateImmutabilityPolicyResponse = /** Optional parameters. */ export interface BlobContainersGetImmutabilityPolicyOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. */ + /** The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. */ ifMatch?: string; } @@ -4621,6 +4910,30 @@ export interface FileServicesGetServicePropertiesOptionalParams /** Contains response data for the getServiceProperties operation. */ export type FileServicesGetServicePropertiesResponse = FileServiceProperties; +/** Optional parameters. */ +export interface FileServicesListServiceUsagesOptionalParams + extends coreClient.OperationOptions { + /** Optional, specifies the maximum number of file service usages to be included in the list response. */ + maxpagesize?: number; +} + +/** Contains response data for the listServiceUsages operation. */ +export type FileServicesListServiceUsagesResponse = FileServiceUsages; + +/** Optional parameters. */ +export interface FileServicesGetServiceUsageOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getServiceUsage operation. */ +export type FileServicesGetServiceUsageResponse = FileServiceUsage; + +/** Optional parameters. */ +export interface FileServicesListServiceUsagesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listServiceUsagesNext operation. */ +export type FileServicesListServiceUsagesNextResponse = FileServiceUsages; + /** Optional parameters. */ export interface FileSharesListOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/storage/arm-storage/src/models/mappers.ts b/sdk/storage/arm-storage/src/models/mappers.ts index 06fc765945b5..b6cf79c6e964 100644 --- a/sdk/storage/arm-storage/src/models/mappers.ts +++ b/sdk/storage/arm-storage/src/models/mappers.ts @@ -827,6 +827,294 @@ export const Multichannel: coreClient.CompositeMapper = { }, }; +export const FileServiceUsages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsages", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FileServiceUsage", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const FileServiceUsageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsageProperties", + modelProperties: { + storageAccountLimits: { + serializedName: "storageAccountLimits", + type: { + name: "Composite", + className: "AccountLimits", + }, + }, + fileShareLimits: { + serializedName: "fileShareLimits", + type: { + name: "Composite", + className: "FileShareLimits", + }, + }, + fileShareRecommendations: { + serializedName: "fileShareRecommendations", + type: { + name: "Composite", + className: "FileShareRecommendations", + }, + }, + burstingConstants: { + serializedName: "burstingConstants", + type: { + name: "Composite", + className: "BurstingConstants", + }, + }, + storageAccountUsage: { + serializedName: "storageAccountUsage", + type: { + name: "Composite", + className: "AccountUsage", + }, + }, + }, + }, +}; + +export const AccountLimits: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountLimits", + modelProperties: { + maxFileShares: { + serializedName: "maxFileShares", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedStorageGiB: { + serializedName: "maxProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedIops: { + serializedName: "maxProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedBandwidthMiBPerSec: { + serializedName: "maxProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FileShareLimits: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileShareLimits", + modelProperties: { + minProvisionedStorageGiB: { + serializedName: "minProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedStorageGiB: { + serializedName: "maxProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + minProvisionedIops: { + serializedName: "minProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedIops: { + serializedName: "maxProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + minProvisionedBandwidthMiBPerSec: { + serializedName: "minProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedBandwidthMiBPerSec: { + serializedName: "maxProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FileShareRecommendations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileShareRecommendations", + modelProperties: { + baseIops: { + serializedName: "baseIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + ioScalar: { + serializedName: "ioScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + baseBandwidthMiBPerSec: { + serializedName: "baseBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + bandwidthScalar: { + serializedName: "bandwidthScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const BurstingConstants: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BurstingConstants", + modelProperties: { + burstFloorIops: { + serializedName: "burstFloorIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + burstIOScalar: { + serializedName: "burstIOScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + burstTimeframeSeconds: { + serializedName: "burstTimeframeSeconds", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AccountUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountUsage", + modelProperties: { + liveShares: { + serializedName: "liveShares", + type: { + name: "Composite", + className: "AccountUsageElements", + }, + }, + softDeletedShares: { + serializedName: "softDeletedShares", + type: { + name: "Composite", + className: "AccountUsageElements", + }, + }, + }, + }, +}; + +export const AccountUsageElements: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountUsageElements", + modelProperties: { + fileShareCount: { + serializedName: "fileShareCount", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedStorageGiB: { + serializedName: "provisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedIops: { + serializedName: "provisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedBandwidthMiBPerSec: { + serializedName: "provisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + export const FileShareItems: coreClient.CompositeMapper = { type: { name: "Composite", @@ -905,6 +1193,34 @@ export const AccessPolicy: coreClient.CompositeMapper = { }, }; +export const FileSharePropertiesFileSharePaidBursting: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + modelProperties: { + paidBurstingEnabled: { + serializedName: "paidBurstingEnabled", + type: { + name: "Boolean", + }, + }, + paidBurstingMaxIops: { + serializedName: "paidBurstingMaxIops", + type: { + name: "Number", + }, + }, + paidBurstingMaxBandwidthMibps: { + serializedName: "paidBurstingMaxBandwidthMibps", + type: { + name: "Number", + }, + }, + }, + }, + }; + export const DeletedShare: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4296,6 +4612,22 @@ export const ObjectReplicationPolicyFilter: coreClient.CompositeMapper = { }, }; +export const ObjectReplicationPolicyPropertiesMetrics: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ObjectReplicationPolicyPropertiesMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + export const LocalUsers: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5590,6 +5922,23 @@ export const FileServiceProperties: coreClient.CompositeMapper = { }, }; +export const FileServiceUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsage", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FileServiceUsageProperties", + }, + }, + }, + }, +}; + export const QueueServiceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5852,6 +6201,13 @@ export const ObjectReplicationPolicy: coreClient.CompositeMapper = { }, }, }, + metrics: { + serializedName: "properties.metrics", + type: { + name: "Composite", + className: "ObjectReplicationPolicyPropertiesMetrics", + }, + }, }, }, }; @@ -6420,15 +6776,59 @@ export const FileShareItem: coreClient.CompositeMapper = { }, }, shareQuota: { - constraints: { - InclusiveMaximum: 102400, - InclusiveMinimum: 1, - }, serializedName: "properties.shareQuota", type: { name: "Number", }, }, + provisionedIops: { + serializedName: "properties.provisionedIops", + type: { + name: "Number", + }, + }, + provisionedBandwidthMibps: { + serializedName: "properties.provisionedBandwidthMibps", + type: { + name: "Number", + }, + }, + includedBurstIops: { + serializedName: "properties.includedBurstIops", + readOnly: true, + type: { + name: "Number", + }, + }, + maxBurstCreditsForIops: { + serializedName: "properties.maxBurstCreditsForIops", + readOnly: true, + type: { + name: "Number", + }, + }, + nextAllowedQuotaDowngradeTime: { + serializedName: "properties.nextAllowedQuotaDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, + nextAllowedProvisionedIopsDowngradeTime: { + serializedName: "properties.nextAllowedProvisionedIopsDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, + nextAllowedProvisionedBandwidthDowngradeTime: { + serializedName: + "properties.nextAllowedProvisionedBandwidthDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, enabledProtocols: { serializedName: "properties.enabledProtocols", type: { @@ -6536,6 +6936,13 @@ export const FileShareItem: coreClient.CompositeMapper = { name: "DateTime", }, }, + fileSharePaidBursting: { + serializedName: "properties.fileSharePaidBursting", + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + }, + }, }, }, }; @@ -6561,15 +6968,59 @@ export const FileShare: coreClient.CompositeMapper = { }, }, shareQuota: { - constraints: { - InclusiveMaximum: 102400, - InclusiveMinimum: 1, - }, serializedName: "properties.shareQuota", type: { name: "Number", }, }, + provisionedIops: { + serializedName: "properties.provisionedIops", + type: { + name: "Number", + }, + }, + provisionedBandwidthMibps: { + serializedName: "properties.provisionedBandwidthMibps", + type: { + name: "Number", + }, + }, + includedBurstIops: { + serializedName: "properties.includedBurstIops", + readOnly: true, + type: { + name: "Number", + }, + }, + maxBurstCreditsForIops: { + serializedName: "properties.maxBurstCreditsForIops", + readOnly: true, + type: { + name: "Number", + }, + }, + nextAllowedQuotaDowngradeTime: { + serializedName: "properties.nextAllowedQuotaDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, + nextAllowedProvisionedIopsDowngradeTime: { + serializedName: "properties.nextAllowedProvisionedIopsDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, + nextAllowedProvisionedBandwidthDowngradeTime: { + serializedName: + "properties.nextAllowedProvisionedBandwidthDowngradeTime", + readOnly: true, + type: { + name: "DateTimeRfc1123", + }, + }, enabledProtocols: { serializedName: "properties.enabledProtocols", type: { @@ -6677,6 +7128,13 @@ export const FileShare: coreClient.CompositeMapper = { name: "DateTime", }, }, + fileSharePaidBursting: { + serializedName: "properties.fileSharePaidBursting", + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + }, + }, }, }, }; diff --git a/sdk/storage/arm-storage/src/models/parameters.ts b/sdk/storage/arm-storage/src/models/parameters.ts index d482d727a52a..dc85643433d4 100644 --- a/sdk/storage/arm-storage/src/models/parameters.ts +++ b/sdk/storage/arm-storage/src/models/parameters.ts @@ -101,7 +101,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2024-01-01", isConstant: true, serializedName: "api-version", type: { @@ -280,6 +280,28 @@ export const fileServicesName: OperationURLParameter = { }, }; +export const maxpagesize1: OperationQueryParameter = { + parameterPath: ["options", "maxpagesize"], + mapper: { + serializedName: "$maxpagesize", + type: { + name: "Number", + }, + }, +}; + +export const fileServiceUsagesName: OperationURLParameter = { + parameterPath: "fileServiceUsagesName", + mapper: { + defaultValue: "default", + isConstant: true, + serializedName: "fileServiceUsagesName", + type: { + name: "String", + }, + }, +}; + export const expand: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { @@ -583,7 +605,7 @@ export const properties3: OperationParameter = { mapper: ObjectReplicationPolicyMapper, }; -export const maxpagesize1: OperationQueryParameter = { +export const maxpagesize2: OperationQueryParameter = { parameterPath: ["options", "maxpagesize"], mapper: { constraints: { @@ -735,13 +757,3 @@ export const parameters15: OperationParameter = { parameterPath: "parameters", mapper: StorageTaskAssignmentUpdateParametersMapper, }; - -export const maxpagesize2: OperationQueryParameter = { - parameterPath: ["options", "maxpagesize"], - mapper: { - serializedName: "$maxpagesize", - type: { - name: "Number", - }, - }, -}; diff --git a/sdk/storage/arm-storage/src/operations/blobContainers.ts b/sdk/storage/arm-storage/src/operations/blobContainers.ts index 24efc1665e65..efc975e3e2b8 100644 --- a/sdk/storage/arm-storage/src/operations/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operations/blobContainers.ts @@ -396,9 +396,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ deleteImmutabilityPolicy( @@ -426,9 +426,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ lockImmutabilityPolicy( @@ -456,9 +456,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ extendImmutabilityPolicy( diff --git a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts index 8ad3aeaff012..97225c631d29 100644 --- a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts +++ b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts @@ -342,7 +342,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize1, + Parameters.maxpagesize2, Parameters.include3, ], urlParameters: [ diff --git a/sdk/storage/arm-storage/src/operations/fileServices.ts b/sdk/storage/arm-storage/src/operations/fileServices.ts index 52f35cf6da81..b90f78569edc 100644 --- a/sdk/storage/arm-storage/src/operations/fileServices.ts +++ b/sdk/storage/arm-storage/src/operations/fileServices.ts @@ -6,12 +6,18 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper.js"; import { FileServices } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { StorageManagementClient } from "../storageManagementClient.js"; import { + FileServiceUsage, + FileServicesListServiceUsagesNextOptionalParams, + FileServicesListServiceUsagesOptionalParams, + FileServicesListServiceUsagesResponse, FileServicesListOptionalParams, FileServicesListResponse, FileServiceProperties, @@ -19,8 +25,12 @@ import { FileServicesSetServicePropertiesResponse, FileServicesGetServicePropertiesOptionalParams, FileServicesGetServicePropertiesResponse, + FileServicesGetServiceUsageOptionalParams, + FileServicesGetServiceUsageResponse, + FileServicesListServiceUsagesNextResponse, } from "../models/index.js"; +/// /** Class containing FileServices operations. */ export class FileServicesImpl implements FileServices { private readonly client: StorageManagementClient; @@ -33,6 +43,93 @@ export class FileServicesImpl implements FileServices { this.client = client; } + /** + * Gets the usages of file service in storage account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + public listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listServiceUsagesPagingAll( + resourceGroupName, + accountName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listServiceUsagesPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listServiceUsagesPagingPage( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: FileServicesListServiceUsagesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listServiceUsages( + resourceGroupName, + accountName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listServiceUsagesNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listServiceUsagesPagingAll( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listServiceUsagesPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + /** * List all file services in storage accounts * @param resourceGroupName The name of the resource group within the user's subscription. The name is @@ -97,6 +194,69 @@ export class FileServicesImpl implements FileServices { getServicePropertiesOperationSpec, ); } + + /** + * Gets the usages of file service in storage account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + private _listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listServiceUsagesOperationSpec, + ); + } + + /** + * Gets the usage of file service in storage account including account limits, file share limits and + * constants used in recommendations and bursting formula. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + getServiceUsage( + resourceGroupName: string, + accountName: string, + options?: FileServicesGetServiceUsageOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + getServiceUsageOperationSpec, + ); + } + + /** + * ListServiceUsagesNext + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param nextLink The nextLink from the previous successful call to the ListServiceUsages method. + * @param options The options parameters. + */ + private _listServiceUsagesNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: FileServicesListServiceUsagesNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listServiceUsagesNextOperationSpec, + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -168,3 +328,70 @@ const getServicePropertiesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const listServiceUsagesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsages, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.maxpagesize1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.fileServicesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getServiceUsageOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsage, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.fileServicesName, + Parameters.fileServiceUsagesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listServiceUsagesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsages, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.fileServicesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/storage/arm-storage/src/operations/localUsersOperations.ts b/sdk/storage/arm-storage/src/operations/localUsersOperations.ts index 92c9ee6c9493..f71e79483fdd 100644 --- a/sdk/storage/arm-storage/src/operations/localUsersOperations.ts +++ b/sdk/storage/arm-storage/src/operations/localUsersOperations.ts @@ -256,7 +256,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize1, + Parameters.maxpagesize2, Parameters.include2, ], urlParameters: [ diff --git a/sdk/storage/arm-storage/src/operations/storageAccounts.ts b/sdk/storage/arm-storage/src/operations/storageAccounts.ts index 28c89c2c6099..fa607e657784 100644 --- a/sdk/storage/arm-storage/src/operations/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operations/storageAccounts.ts @@ -523,7 +523,7 @@ export class StorageAccountsImpl implements StorageAccounts { * primary and secondary endpoints are available. The primary use case of a Planned Failover is * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter * to 'Planned'. Learn more about the failover options here- - * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -598,7 +598,7 @@ export class StorageAccountsImpl implements StorageAccounts { * primary and secondary endpoints are available. The primary use case of a Planned Failover is * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter * to 'Planned'. Learn more about the failover options here- - * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -1323,28 +1323,28 @@ const hierarchicalNamespaceMigrationOperationSpec: coreClient.OperationSpec = { serializer, }; const abortHierarchicalNamespaceMigrationOperationSpec: coreClient.OperationSpec = -{ - path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, + { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, + }; const customerInitiatedMigrationOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", httpMethod: "POST", diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts index 52b89524fec0..6bcccaa00af1 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts @@ -204,7 +204,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize2, + Parameters.maxpagesize1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts index b2fd72ecb2a1..9b8643320481 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts @@ -667,7 +667,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseAutoGenerated, }, }, - queryParameters: [Parameters.apiVersion, Parameters.maxpagesize2], + queryParameters: [Parameters.apiVersion, Parameters.maxpagesize1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts index ea37e41f7677..9a5e308cd478 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts @@ -171,7 +171,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize2, + Parameters.maxpagesize1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts b/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts index 7745b6768c53..9d351b7707d0 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts @@ -238,9 +238,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ deleteImmutabilityPolicy( @@ -262,9 +262,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ lockImmutabilityPolicy( @@ -286,9 +286,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ extendImmutabilityPolicy( diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts b/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts index 11e602b29911..2fb356e5a25e 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts @@ -6,7 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { + FileServiceUsage, + FileServicesListServiceUsagesOptionalParams, FileServicesListOptionalParams, FileServicesListResponse, FileServiceProperties, @@ -14,10 +17,27 @@ import { FileServicesSetServicePropertiesResponse, FileServicesGetServicePropertiesOptionalParams, FileServicesGetServicePropertiesResponse, + FileServicesGetServiceUsageOptionalParams, + FileServicesGetServiceUsageResponse, } from "../models/index.js"; +/// /** Interface representing a FileServices. */ export interface FileServices { + /** + * Gets the usages of file service in storage account. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): PagedAsyncIterableIterator; /** * List all file services in storage accounts * @param resourceGroupName The name of the resource group within the user's subscription. The name is @@ -65,4 +85,19 @@ export interface FileServices { accountName: string, options?: FileServicesGetServicePropertiesOptionalParams, ): Promise; + /** + * Gets the usage of file service in storage account including account limits, file share limits and + * constants used in recommendations and bursting formula. + * @param resourceGroupName The name of the resource group within the user's subscription. The name is + * case insensitive. + * @param accountName The name of the storage account within the specified resource group. Storage + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + getServiceUsage( + resourceGroupName: string, + accountName: string, + options?: FileServicesGetServiceUsageOptionalParams, + ): Promise; } diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts index 368c50999b70..d311da31d854 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts @@ -250,7 +250,7 @@ export interface StorageAccounts { * primary and secondary endpoints are available. The primary use case of a Planned Failover is * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter * to 'Planned'. Learn more about the failover options here- - * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -273,7 +273,7 @@ export interface StorageAccounts { * primary and secondary endpoints are available. The primary use case of a Planned Failover is * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter * to 'Planned'. Learn more about the failover options here- - * https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage diff --git a/sdk/storage/arm-storage/src/storageManagementClient.ts b/sdk/storage/arm-storage/src/storageManagementClient.ts index 6e64b451ce1e..e779ef753e1a 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -100,7 +100,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-storage/18.3.1`; + const packageDetails = `azsdk-js-arm-storage/18.4.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -154,7 +154,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-01"; + this.apiVersion = options.apiVersion || "2024-01-01"; this.blobServices = new BlobServicesImpl(this); this.blobContainers = new BlobContainersImpl(this); this.fileServices = new FileServicesImpl(this); diff --git a/sdk/storage/arm-storage/test/storage_examples.spec.ts b/sdk/storage/arm-storage/test/storage_examples.spec.ts index cde4d17e9d02..bde11c1de92f 100644 --- a/sdk/storage/arm-storage/test/storage_examples.spec.ts +++ b/sdk/storage/arm-storage/test/storage_examples.spec.ts @@ -101,7 +101,7 @@ describe("Storage test", () => { it("storageAccounts list test", async () => { const resArray = new Array(); - for await (let item of client.storageAccounts.listByResourceGroup(resourceGroup)) { + for await (const item of client.storageAccounts.listByResourceGroup(resourceGroup)) { resArray.push(item); } assert.equal(resArray.length, 1); @@ -109,7 +109,7 @@ describe("Storage test", () => { it("blobContainers list test", async () => { const resArray = new Array(); - for await (let item of client.blobContainers.list(resourceGroup, storageAccountName)) { + for await (const item of client.blobContainers.list(resourceGroup, storageAccountName)) { resArray.push(item); } assert.equal(resArray.length, 1); @@ -128,7 +128,7 @@ describe("Storage test", () => { it("blobContainers delete test", async () => { const resArray = new Array(); await client.blobContainers.delete(resourceGroup, storageAccountName, containerName); - for await (let item of client.blobContainers.list(resourceGroup, storageAccountName)) { + for await (const item of client.blobContainers.list(resourceGroup, storageAccountName)) { resArray.push(item); } assert.equal(resArray.length, 0); @@ -137,7 +137,7 @@ describe("Storage test", () => { it("storageAccounts delete test", async () => { const resArray = new Array(); await client.storageAccounts.delete(resourceGroup, storageAccountName); - for await (let item of client.storageAccounts.listByResourceGroup(resourceGroup)) { + for await (const item of client.storageAccounts.listByResourceGroup(resourceGroup)) { resArray.push(item); } assert.equal(resArray.length, 0);