Skip to content

Commit 4e6d060

Browse files
author
SDK Automation
committed
Update from master
1 parent d678c90 commit 4e6d060

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+6594
-5726
lines changed

sdk/consumption/arm-consumption/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Microsoft
3+
Copyright (c) 2020 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/consumption/arm-consumption/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package contains an isomorphic SDK for ConsumptionManagementClient.
99

1010
### How to Install
1111

12-
```
12+
```bash
1313
npm install @azure/arm-consumption
1414
```
1515

@@ -19,13 +19,14 @@ npm install @azure/arm-consumption
1919

2020
##### Install @azure/ms-rest-nodeauth
2121

22-
```
23-
npm install @azure/ms-rest-nodeauth
22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23+
```bash
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
2425
```
2526

2627
##### Sample code
2728

28-
```ts
29+
```typescript
2930
import * as msRest from "@azure/ms-rest-js";
3031
import * as msRestAzure from "@azure/ms-rest-azure-js";
3132
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
@@ -34,12 +35,13 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
3435

3536
msRestNodeAuth.interactiveLogin().then((creds) => {
3637
const client = new ConsumptionManagementClient(creds, subscriptionId);
38+
const scope = "testscope";
3739
const expand = "testexpand";
3840
const filter = "testfilter";
3941
const skiptoken = "testskiptoken";
4042
const top = 1;
41-
const apply = "testapply";
42-
client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => {
43+
const metric = "actualcost";
44+
client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => {
4345
console.log("The result is:");
4446
console.log(result);
4547
});
@@ -52,7 +54,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
5254

5355
##### Install @azure/ms-rest-browserauth
5456

55-
```
57+
```bash
5658
npm install @azure/ms-rest-browserauth
5759
```
5860

@@ -82,12 +84,13 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
8284
authManager.login();
8385
}
8486
const client = new Azure.ArmConsumption.ConsumptionManagementClient(res.creds, subscriptionId);
87+
const scope = "testscope";
8588
const expand = "testexpand";
8689
const filter = "testfilter";
8790
const skiptoken = "testskiptoken";
8891
const top = 1;
89-
const apply = "testapply";
90-
client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => {
92+
const metric = "actualcost";
93+
client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => {
9194
console.log("The result is:");
9295
console.log(result);
9396
}).catch((err) => {
@@ -105,5 +108,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
105108

106109
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
107110

108-
109-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fconsumption%2Farm-consumption%2FREADME.png)
111+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/consumption/arm-consumption/README.png)

sdk/consumption/arm-consumption/package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "ConsumptionManagementClient Library with typescript type definitions for node.js and browser.",
55
"version": "6.3.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.1.0",
8-
"@azure/ms-rest-js": "^1.1.0",
9-
"tslib": "^1.9.3"
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^1.10.0"
1010
},
1111
"keywords": [
1212
"node",
@@ -20,18 +20,19 @@
2020
"module": "./esm/consumptionManagementClient.js",
2121
"types": "./esm/consumptionManagementClient.d.ts",
2222
"devDependencies": {
23-
"typescript": "^3.1.1",
24-
"rollup": "^0.66.2",
25-
"rollup-plugin-node-resolve": "^3.4.0",
26-
"uglify-js": "^3.4.9"
23+
"typescript": "^3.5.3",
24+
"rollup": "^1.18.0",
25+
"rollup-plugin-node-resolve": "^5.2.0",
26+
"rollup-plugin-sourcemaps": "^0.4.2",
27+
"uglify-js": "^3.6.0"
2728
},
28-
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption",
29+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption",
2930
"repository": {
3031
"type": "git",
31-
"url": "https://github.com/azure/azure-sdk-for-js.git"
32+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3233
},
3334
"bugs": {
34-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
35+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3536
},
3637
"files": [
3738
"dist/**/*.js",
@@ -43,6 +44,7 @@
4344
"esm/**/*.d.ts",
4445
"esm/**/*.d.ts.map",
4546
"src/**/*.ts",
47+
"README.md",
4648
"rollup.config.js",
4749
"tsconfig.json"
4850
],
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import rollup from "rollup";
12
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
25
/**
3-
* @type {import('rollup').RollupFileOptions}
6+
* @type {rollup.RollupFileOptions}
47
*/
58
const config = {
6-
input: './esm/consumptionManagementClient.js',
7-
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
9+
input: "./esm/consumptionManagementClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
814
output: {
915
file: "./dist/arm-consumption.js",
1016
format: "umd",
@@ -16,16 +22,16 @@ const config = {
1622
},
1723
banner: `/*
1824
* Copyright (c) Microsoft Corporation. All rights reserved.
19-
* Licensed under the MIT License. See License.txt in the project root for
20-
* license information.
25+
* Licensed under the MIT License. See License.txt in the project root for license information.
2126
*
2227
* Code generated by Microsoft (R) AutoRest Code Generator.
23-
* Changes may cause incorrect behavior and will be lost if the code is
24-
* regenerated.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2529
*/`
2630
},
2731
plugins: [
28-
nodeResolve({ module: true })
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
2934
]
3035
};
36+
3137
export default config;

sdk/consumption/arm-consumption/src/consumptionManagementClient.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,22 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext {
1919
// Operation groups
2020
usageDetails: operations.UsageDetails;
2121
marketplaces: operations.Marketplaces;
22+
budgets: operations.Budgets;
23+
tags: operations.Tags;
24+
charges: operations.Charges;
2225
balances: operations.Balances;
2326
reservationsSummaries: operations.ReservationsSummaries;
2427
reservationsDetails: operations.ReservationsDetails;
2528
reservationRecommendations: operations.ReservationRecommendations;
26-
budgets: operations.Budgets;
29+
reservationRecommendationDetails: operations.ReservationRecommendationDetails;
30+
reservationTransactions: operations.ReservationTransactions;
2731
priceSheet: operations.PriceSheet;
28-
tags: operations.Tags;
2932
forecasts: operations.Forecasts;
3033
operations: operations.Operations;
3134
aggregatedCost: operations.AggregatedCost;
32-
charges: operations.Charges;
35+
events: operations.EventsOperations;
36+
lots: operations.LotsOperations;
37+
credits: operations.Credits;
3338

3439
/**
3540
* Initializes a new instance of the ConsumptionManagementClient class.
@@ -41,17 +46,22 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext {
4146
super(credentials, subscriptionId, options);
4247
this.usageDetails = new operations.UsageDetails(this);
4348
this.marketplaces = new operations.Marketplaces(this);
49+
this.budgets = new operations.Budgets(this);
50+
this.tags = new operations.Tags(this);
51+
this.charges = new operations.Charges(this);
4452
this.balances = new operations.Balances(this);
4553
this.reservationsSummaries = new operations.ReservationsSummaries(this);
4654
this.reservationsDetails = new operations.ReservationsDetails(this);
4755
this.reservationRecommendations = new operations.ReservationRecommendations(this);
48-
this.budgets = new operations.Budgets(this);
56+
this.reservationRecommendationDetails = new operations.ReservationRecommendationDetails(this);
57+
this.reservationTransactions = new operations.ReservationTransactions(this);
4958
this.priceSheet = new operations.PriceSheet(this);
50-
this.tags = new operations.Tags(this);
5159
this.forecasts = new operations.Forecasts(this);
5260
this.operations = new operations.Operations(this);
5361
this.aggregatedCost = new operations.AggregatedCost(this);
54-
this.charges = new operations.Charges(this);
62+
this.events = new operations.EventsOperations(this);
63+
this.lots = new operations.LotsOperations(this);
64+
this.credits = new operations.Credits(this);
5565
}
5666
}
5767

sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
1313
import * as msRestAzure from "@azure/ms-rest-azure-js";
1414

1515
const packageName = "@azure/arm-consumption";
16-
const packageVersion = "0.1.0";
16+
const packageVersion = "6.3.0";
1717

1818
export class ConsumptionManagementClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials;
@@ -44,7 +44,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService
4444

4545
super(credentials, options);
4646

47-
this.apiVersion = '2018-10-01';
47+
this.apiVersion = '2019-10-01';
4848
this.acceptLanguage = 'en-US';
4949
this.longRunningOperationRetryTimeout = 30;
5050
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,54 @@
11
/*
22
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
7-
* Changes may cause incorrect behavior and will be lost if the code is
8-
* regenerated.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
97
*/
108

119
export {
12-
ManagementGroupAggregatedCostResult,
13-
Resource,
14-
BaseResource,
15-
ErrorResponse,
16-
ErrorDetails,
17-
UsageDetail,
18-
MeterDetails,
19-
Marketplace,
10+
discriminators,
11+
Amount,
2012
Balance,
21-
BalancePropertiesNewPurchasesDetailsItem,
2213
BalancePropertiesAdjustmentDetailsItem,
23-
ReservationSummary,
24-
ReservationDetail,
25-
PriceSheetResult,
26-
PriceSheetProperties,
14+
BalancePropertiesNewPurchasesDetailsItem,
15+
BaseResource,
16+
Budget,
17+
BudgetComparisonExpression,
18+
BudgetFilter,
19+
BudgetTimePeriod,
20+
ChargeSummary,
21+
CreditBalanceSummary,
22+
CreditSummary,
23+
CurrentSpend,
24+
ErrorDetails,
25+
ErrorResponse,
26+
EventSummary,
2727
Forecast,
2828
ForecastPropertiesConfidenceLevelsItem,
29-
ChargeSummary,
29+
LegacyChargeSummary,
30+
LegacyUsageDetail,
31+
LotSummary,
32+
ManagementGroupAggregatedCostResult,
33+
Marketplace,
34+
MeterDetails,
35+
MeterDetailsResponse,
36+
ModernChargeSummary,
37+
ModernUsageDetail,
38+
Notification,
39+
PriceSheetProperties,
40+
PriceSheetResult,
3041
ProxyResource,
31-
TagsResult,
42+
ReservationDetail,
43+
ReservationRecommendationDetailsCalculatedSavingsProperties,
44+
ReservationRecommendationDetailsModel,
45+
ReservationRecommendationDetailsResourceProperties,
46+
ReservationRecommendationDetailsSavingsProperties,
47+
ReservationRecommendationDetailsUsageProperties,
48+
ReservationSummary,
49+
ReservationTransaction,
50+
Resource,
3251
Tag,
33-
Budget,
34-
BudgetTimePeriod,
35-
Filters,
36-
CurrentSpend,
37-
Notification
52+
TagsResult,
53+
UsageDetail
3854
} from "../models/mappers";
39-

0 commit comments

Comments
 (0)