From e84ac3fefee467195b58797ef2aeac4477d92f7e Mon Sep 17 00:00:00 2001 From: colawwj Date: Fri, 17 Sep 2021 15:08:13 +0800 Subject: [PATCH 1/2] update --- sdk/consumption/arm-consumption/README.md | 14 ++------------ sdk/consumption/arm-consumption/package.json | 2 +- .../src/consumptionManagementClientContext.ts | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index b7e09d98951e..6e8a58ca8b15 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -50,12 +50,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; const creds = new DefaultAzureCredential(); const client = new ConsumptionManagementClient(creds, subscriptionId); const scope = "testscope"; -const expand = "testexpand"; -const filter = "testfilter"; -const skiptoken = "testskiptoken"; -const top = 1; -const metric = "actualcost"; -client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { +client.usageDetails.list(scope).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -93,12 +88,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t }); const client = new Azure.ArmConsumption.ConsumptionManagementClient(creds, subscriptionId); const scope = "testscope"; - const expand = "testexpand"; - const filter = "testfilter"; - const skiptoken = "testskiptoken"; - const top = 1; - const metric = "actualcost"; - client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { + client.usageDetails.list(scope).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index f004b5731c34..24a6d73bfeed 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-consumption", "author": "Microsoft Corporation", "description": "ConsumptionManagementClient Library with typescript type definitions for node.js and browser.", - "version": "8.0.0", + "version": "8.0.1", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts index b451fb386e08..634ac502d476 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-consumption"; -const packageVersion = "8.0.0"; +const packageVersion = "8.0.1"; export class ConsumptionManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; From 39360b7de56fb68abdf6fc941da6ea5f5accf3f7 Mon Sep 17 00:00:00 2001 From: colawwj Date: Fri, 17 Sep 2021 15:40:15 +0800 Subject: [PATCH 2/2] update --- sdk/consumption/arm-consumption/README.md | 38 ++++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index 6e8a58ca8b15..ddcd05d27ed5 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -50,7 +50,18 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; const creds = new DefaultAzureCredential(); const client = new ConsumptionManagementClient(creds, subscriptionId); const scope = "testscope"; -client.usageDetails.list(scope).then((result) => { +const expand = "testexpand"; +const filter = "testfilter"; +const skiptoken = "testskiptoken"; +const top = 1; +const metric = "actualcost"; +client.usageDetails.list(scope,{ + expand: expand, + filter: filter, + skiptoken: skiptoken, + top: top, + metric: metric +}).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -88,13 +99,24 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t }); const client = new Azure.ArmConsumption.ConsumptionManagementClient(creds, subscriptionId); const scope = "testscope"; - client.usageDetails.list(scope).then((result) => { - console.log("The result is:"); - console.log(result); - }).catch((err) => { - console.log("An error occurred:"); - console.error(err); - }); + const expand = "testexpand"; + const filter = "testfilter"; + const skiptoken = "testskiptoken"; + const top = 1; + const metric = "actualcost"; + client.usageDetails.list(scope,{ + expand: expand, + filter: filter, + skiptoken: skiptoken, + top: top, + metric: metric + }).then((result) => { + console.log("The result is:"); + console.log(result); + }).catch((err) => { + console.log("An error occurred:"); + console.error(err); + });