Files
colawwjandGitHub df9f6dc804 Refresh 7 (#21441)
* datacatalog

* datadog

* datalake-analytics

* datamigration

* depolymentmanager

* desktopvirtualization

* deviceprovisioningservices

* devtestlabs

* update

* update

* update

* refresh-7

* update

* update

* update

* update

* update
2022-04-19 17:05:19 +08:00

40 lines
1.5 KiB
JavaScript

/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { DevTestLabsClient } = require("@azure/arm-devtestlabs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Exports the lab resource usage into a storage account This operation can take a while to complete.
*
* @summary Exports the lab resource usage into a storage account This operation can take a while to complete.
* x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ExportResourceUsage.json
*/
async function labsExportResourceUsage() {
const subscriptionId = "{subscriptionId}";
const resourceGroupName = "resourceGroupName";
const name = "{labName}";
const exportResourceUsageParameters = {
blobStorageAbsoluteSasUri:
"https://invalid.blob.core.windows.net/export.blob?sv=2015-07-08&sig={sas}&sp=rcw",
usageStartDate: new Date("2020-12-01T00:00:00Z"),
};
const credential = new DefaultAzureCredential();
const client = new DevTestLabsClient(credential, subscriptionId);
const result = await client.labs.beginExportResourceUsageAndWait(
resourceGroupName,
name,
exportResourceUsageParameters
);
console.log(result);
}
labsExportResourceUsage().catch(console.error);