@azure/arm-consumption 9.0.0-beta.1 → 9.0.1-alpha.20220106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -10
- package/README.md +4 -0
- package/dist/index.js +198 -62
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/src/consumptionManagementClient.d.ts +5 -2
- package/dist-esm/src/consumptionManagementClient.d.ts.map +1 -1
- package/dist-esm/src/consumptionManagementClient.js +32 -3
- package/dist-esm/src/consumptionManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +0 -1
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +113 -25
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +7 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +189 -36
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/operations/aggregatedCost.d.ts +2 -2
- package/dist-esm/src/operations/aggregatedCost.d.ts.map +1 -1
- package/dist-esm/src/operations/aggregatedCost.js.map +1 -1
- package/dist-esm/src/operations/balances.d.ts +2 -2
- package/dist-esm/src/operations/balances.d.ts.map +1 -1
- package/dist-esm/src/operations/balances.js +1 -1
- package/dist-esm/src/operations/balances.js.map +1 -1
- package/dist-esm/src/operations/budgets.d.ts +2 -2
- package/dist-esm/src/operations/budgets.d.ts.map +1 -1
- package/dist-esm/src/operations/budgets.js.map +1 -1
- package/dist-esm/src/operations/charges.d.ts +2 -2
- package/dist-esm/src/operations/charges.d.ts.map +1 -1
- package/dist-esm/src/operations/charges.js.map +1 -1
- package/dist-esm/src/operations/credits.d.ts +2 -2
- package/dist-esm/src/operations/credits.d.ts.map +1 -1
- package/dist-esm/src/operations/credits.js.map +1 -1
- package/dist-esm/src/operations/eventsOperations.d.ts +2 -2
- package/dist-esm/src/operations/eventsOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/eventsOperations.js.map +1 -1
- package/dist-esm/src/operations/lotsOperations.d.ts +2 -2
- package/dist-esm/src/operations/lotsOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/lotsOperations.js.map +1 -1
- package/dist-esm/src/operations/marketplaces.d.ts +2 -2
- package/dist-esm/src/operations/marketplaces.d.ts.map +1 -1
- package/dist-esm/src/operations/marketplaces.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts +2 -2
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/priceSheet.d.ts +2 -2
- package/dist-esm/src/operations/priceSheet.d.ts.map +1 -1
- package/dist-esm/src/operations/priceSheet.js.map +1 -1
- package/dist-esm/src/operations/reservationRecommendationDetails.d.ts +2 -2
- package/dist-esm/src/operations/reservationRecommendationDetails.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationRecommendationDetails.js.map +1 -1
- package/dist-esm/src/operations/reservationRecommendations.d.ts +2 -2
- package/dist-esm/src/operations/reservationRecommendations.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationRecommendations.js.map +1 -1
- package/dist-esm/src/operations/reservationTransactions.d.ts +2 -2
- package/dist-esm/src/operations/reservationTransactions.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationTransactions.js.map +1 -1
- package/dist-esm/src/operations/reservationsDetails.d.ts +2 -2
- package/dist-esm/src/operations/reservationsDetails.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationsDetails.js.map +1 -1
- package/dist-esm/src/operations/reservationsSummaries.d.ts +2 -2
- package/dist-esm/src/operations/reservationsSummaries.d.ts.map +1 -1
- package/dist-esm/src/operations/reservationsSummaries.js.map +1 -1
- package/dist-esm/src/operations/tags.d.ts +2 -2
- package/dist-esm/src/operations/tags.d.ts.map +1 -1
- package/dist-esm/src/operations/tags.js.map +1 -1
- package/dist-esm/src/operations/usageDetails.d.ts +2 -2
- package/dist-esm/src/operations/usageDetails.d.ts.map +1 -1
- package/dist-esm/src/operations/usageDetails.js.map +1 -1
- package/dist-esm/test/{sampleTest.d.ts → consumption_examples.d.ts} +1 -1
- package/dist-esm/test/consumption_examples.d.ts.map +1 -0
- package/dist-esm/test/{sampleTest.js → consumption_examples.js} +4 -4
- package/dist-esm/test/consumption_examples.js.map +1 -0
- package/package.json +17 -6
- package/review/arm-consumption.api.md +41 -13
- package/src/consumptionManagementClient.ts +46 -3
- package/src/index.ts +0 -1
- package/src/models/index.ts +120 -26
- package/src/models/mappers.ts +200 -37
- package/src/operations/aggregatedCost.ts +3 -3
- package/src/operations/balances.ts +4 -4
- package/src/operations/budgets.ts +3 -3
- package/src/operations/charges.ts +3 -3
- package/src/operations/credits.ts +3 -3
- package/src/operations/eventsOperations.ts +3 -3
- package/src/operations/lotsOperations.ts +3 -3
- package/src/operations/marketplaces.ts +3 -3
- package/src/operations/operations.ts +3 -3
- package/src/operations/priceSheet.ts +3 -3
- package/src/operations/reservationRecommendationDetails.ts +3 -3
- package/src/operations/reservationRecommendations.ts +3 -3
- package/src/operations/reservationTransactions.ts +3 -3
- package/src/operations/reservationsDetails.ts +3 -3
- package/src/operations/reservationsSummaries.ts +3 -3
- package/src/operations/tags.ts +3 -3
- package/src/operations/usageDetails.ts +3 -3
- package/types/arm-consumption.d.ts +99 -17
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/src/consumptionManagementClientContext.d.ts +0 -16
- package/dist-esm/src/consumptionManagementClientContext.d.ts.map +0 -1
- package/dist-esm/src/consumptionManagementClientContext.js +0 -49
- package/dist-esm/src/consumptionManagementClientContext.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/src/consumptionManagementClientContext.ts +0 -70
package/src/operations/tags.ts
CHANGED
|
@@ -10,18 +10,18 @@ import { Tags } from "../operationsInterfaces";
|
|
|
10
10
|
import * as coreClient from "@azure/core-client";
|
|
11
11
|
import * as Mappers from "../models/mappers";
|
|
12
12
|
import * as Parameters from "../models/parameters";
|
|
13
|
-
import {
|
|
13
|
+
import { ConsumptionManagementClient } from "../consumptionManagementClient";
|
|
14
14
|
import { TagsGetOptionalParams, TagsGetResponse } from "../models";
|
|
15
15
|
|
|
16
16
|
/** Class containing Tags operations. */
|
|
17
17
|
export class TagsImpl implements Tags {
|
|
18
|
-
private readonly client:
|
|
18
|
+
private readonly client: ConsumptionManagementClient;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Initialize a new instance of the class Tags class.
|
|
22
22
|
* @param client Reference to the service client
|
|
23
23
|
*/
|
|
24
|
-
constructor(client:
|
|
24
|
+
constructor(client: ConsumptionManagementClient) {
|
|
25
25
|
this.client = client;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -11,7 +11,7 @@ import { UsageDetails } from "../operationsInterfaces";
|
|
|
11
11
|
import * as coreClient from "@azure/core-client";
|
|
12
12
|
import * as Mappers from "../models/mappers";
|
|
13
13
|
import * as Parameters from "../models/parameters";
|
|
14
|
-
import {
|
|
14
|
+
import { ConsumptionManagementClient } from "../consumptionManagementClient";
|
|
15
15
|
import {
|
|
16
16
|
UsageDetailUnion,
|
|
17
17
|
UsageDetailsListNextOptionalParams,
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
/// <reference lib="esnext.asynciterable" />
|
|
24
24
|
/** Class containing UsageDetails operations. */
|
|
25
25
|
export class UsageDetailsImpl implements UsageDetails {
|
|
26
|
-
private readonly client:
|
|
26
|
+
private readonly client: ConsumptionManagementClient;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Initialize a new instance of the class UsageDetails class.
|
|
30
30
|
* @param client Reference to the service client
|
|
31
31
|
*/
|
|
32
|
-
constructor(client:
|
|
32
|
+
constructor(client: ConsumptionManagementClient) {
|
|
33
33
|
this.client = client;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -490,7 +490,10 @@ export declare type ChargeSummaryKind = string;
|
|
|
490
490
|
|
|
491
491
|
export declare type ChargeSummaryUnion = ChargeSummary | LegacyChargeSummary | ModernChargeSummary;
|
|
492
492
|
|
|
493
|
-
export declare class ConsumptionManagementClient extends
|
|
493
|
+
export declare class ConsumptionManagementClient extends coreClient.ServiceClient {
|
|
494
|
+
$host: string;
|
|
495
|
+
apiVersion: string;
|
|
496
|
+
subscriptionId: string;
|
|
494
497
|
/**
|
|
495
498
|
* Initializes a new instance of the ConsumptionManagementClient class.
|
|
496
499
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -517,19 +520,6 @@ export declare class ConsumptionManagementClient extends ConsumptionManagementCl
|
|
|
517
520
|
credits: Credits;
|
|
518
521
|
}
|
|
519
522
|
|
|
520
|
-
export declare class ConsumptionManagementClientContext extends coreClient.ServiceClient {
|
|
521
|
-
$host: string;
|
|
522
|
-
apiVersion: string;
|
|
523
|
-
subscriptionId: string;
|
|
524
|
-
/**
|
|
525
|
-
* Initializes a new instance of the ConsumptionManagementClientContext class.
|
|
526
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
527
|
-
* @param subscriptionId Azure Subscription ID.
|
|
528
|
-
* @param options The parameter options
|
|
529
|
-
*/
|
|
530
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConsumptionManagementClientOptionalParams);
|
|
531
|
-
}
|
|
532
|
-
|
|
533
523
|
/** Optional parameters. */
|
|
534
524
|
export declare interface ConsumptionManagementClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
535
525
|
/** server parameter */
|
|
@@ -1222,21 +1212,113 @@ export declare type LegacyReservationRecommendation = ReservationRecommendation
|
|
|
1222
1212
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1223
1213
|
*/
|
|
1224
1214
|
readonly firstUsageDate?: Date;
|
|
1215
|
+
/** Shared or single recommendation. */
|
|
1216
|
+
scope: string;
|
|
1225
1217
|
/**
|
|
1226
|
-
*
|
|
1218
|
+
* List of sku properties
|
|
1227
1219
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1228
1220
|
*/
|
|
1229
|
-
readonly
|
|
1221
|
+
readonly skuProperties?: SkuProperty[];
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
/** The properties of the reservation recommendation. */
|
|
1225
|
+
export declare interface LegacyReservationRecommendationProperties {
|
|
1226
|
+
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1227
|
+
scope: "Single" | "Shared";
|
|
1228
|
+
/**
|
|
1229
|
+
* The number of days of usage to look back for recommendation.
|
|
1230
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1231
|
+
*/
|
|
1232
|
+
readonly lookBackPeriod?: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* The instance Flexibility Ratio.
|
|
1235
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1236
|
+
*/
|
|
1237
|
+
readonly instanceFlexibilityRatio?: number;
|
|
1238
|
+
/**
|
|
1239
|
+
* The instance Flexibility Group.
|
|
1240
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1241
|
+
*/
|
|
1242
|
+
readonly instanceFlexibilityGroup?: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* The normalized Size.
|
|
1245
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1246
|
+
*/
|
|
1247
|
+
readonly normalizedSize?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* The recommended Quantity Normalized.
|
|
1250
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1251
|
+
*/
|
|
1252
|
+
readonly recommendedQuantityNormalized?: number;
|
|
1253
|
+
/**
|
|
1254
|
+
* The meter id (GUID)
|
|
1255
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1256
|
+
*/
|
|
1257
|
+
readonly meterId?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* The azure resource type.
|
|
1260
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1261
|
+
*/
|
|
1262
|
+
readonly resourceType?: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* RI recommendations in one or three year terms.
|
|
1265
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1266
|
+
*/
|
|
1267
|
+
readonly term?: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* The total amount of cost without reserved instances.
|
|
1270
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1271
|
+
*/
|
|
1272
|
+
readonly costWithNoReservedInstances?: number;
|
|
1273
|
+
/**
|
|
1274
|
+
* Recommended quality for reserved instances.
|
|
1275
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1276
|
+
*/
|
|
1277
|
+
readonly recommendedQuantity?: number;
|
|
1278
|
+
/**
|
|
1279
|
+
* The total amount of cost with reserved instances.
|
|
1280
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1281
|
+
*/
|
|
1282
|
+
readonly totalCostWithReservedInstances?: number;
|
|
1283
|
+
/**
|
|
1284
|
+
* Total estimated savings with reserved instances.
|
|
1285
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1286
|
+
*/
|
|
1287
|
+
readonly netSavings?: number;
|
|
1288
|
+
/**
|
|
1289
|
+
* The usage date for looking back.
|
|
1290
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1291
|
+
*/
|
|
1292
|
+
readonly firstUsageDate?: Date;
|
|
1230
1293
|
/**
|
|
1231
1294
|
* List of sku properties
|
|
1232
1295
|
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1233
1296
|
*/
|
|
1234
1297
|
readonly skuProperties?: SkuProperty[];
|
|
1235
|
-
}
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
export declare type LegacyReservationRecommendationPropertiesUnion = LegacyReservationRecommendationProperties | LegacySingleScopeReservationRecommendationProperties | LegacySharedScopeReservationRecommendationProperties;
|
|
1236
1301
|
|
|
1237
1302
|
/** Legacy Reservation transaction resource. */
|
|
1238
1303
|
export declare type LegacyReservationTransaction = ReservationTransaction & {};
|
|
1239
1304
|
|
|
1305
|
+
/** The properties of the legacy reservation recommendation for shared scope. */
|
|
1306
|
+
export declare type LegacySharedScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & {
|
|
1307
|
+
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1308
|
+
scope: "Shared";
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
/** The properties of the legacy reservation recommendation for single scope. */
|
|
1312
|
+
export declare type LegacySingleScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & {
|
|
1313
|
+
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1314
|
+
scope: "Single";
|
|
1315
|
+
/**
|
|
1316
|
+
* Subscription id associated with single scoped recommendation.
|
|
1317
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1318
|
+
*/
|
|
1319
|
+
readonly subscriptionId?: string;
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1240
1322
|
/** Legacy usage detail. */
|
|
1241
1323
|
export declare type LegacyUsageDetail = UsageDetail & {
|
|
1242
1324
|
/**
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as coreClient from "@azure/core-client";
|
|
2
|
-
import * as coreAuth from "@azure/core-auth";
|
|
3
|
-
import { ConsumptionManagementClientOptionalParams } from "./models";
|
|
4
|
-
export declare class ConsumptionManagementClientContext extends coreClient.ServiceClient {
|
|
5
|
-
$host: string;
|
|
6
|
-
apiVersion: string;
|
|
7
|
-
subscriptionId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Initializes a new instance of the ConsumptionManagementClientContext class.
|
|
10
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
11
|
-
* @param subscriptionId Azure Subscription ID.
|
|
12
|
-
* @param options The parameter options
|
|
13
|
-
*/
|
|
14
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConsumptionManagementClientOptionalParams);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=consumptionManagementClientContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consumptionManagementClientContext.d.ts","sourceRoot":"","sources":["../../src/consumptionManagementClientContext.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,yCAAyC,EAAE,MAAM,UAAU,CAAC;AAErE,qBAAa,kCAAmC,SAAQ,UAAU,CAAC,aAAa;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,yCAAyC;CA2CtD"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
import * as coreClient from "@azure/core-client";
|
|
9
|
-
export class ConsumptionManagementClientContext extends coreClient.ServiceClient {
|
|
10
|
-
/**
|
|
11
|
-
* Initializes a new instance of the ConsumptionManagementClientContext class.
|
|
12
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
13
|
-
* @param subscriptionId Azure Subscription ID.
|
|
14
|
-
* @param options The parameter options
|
|
15
|
-
*/
|
|
16
|
-
constructor(credentials, subscriptionId, options) {
|
|
17
|
-
if (credentials === undefined) {
|
|
18
|
-
throw new Error("'credentials' cannot be null");
|
|
19
|
-
}
|
|
20
|
-
if (subscriptionId === undefined) {
|
|
21
|
-
throw new Error("'subscriptionId' cannot be null");
|
|
22
|
-
}
|
|
23
|
-
// Initializing default values for options
|
|
24
|
-
if (!options) {
|
|
25
|
-
options = {};
|
|
26
|
-
}
|
|
27
|
-
const defaults = {
|
|
28
|
-
requestContentType: "application/json; charset=utf-8",
|
|
29
|
-
credential: credentials
|
|
30
|
-
};
|
|
31
|
-
const packageDetails = `azsdk-js-arm-consumption/9.0.0-beta.1`;
|
|
32
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
33
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
34
|
-
: `${packageDetails}`;
|
|
35
|
-
if (!options.credentialScopes) {
|
|
36
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
37
|
-
}
|
|
38
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
39
|
-
userAgentPrefix
|
|
40
|
-
}, baseUri: options.endpoint || "https://management.azure.com" });
|
|
41
|
-
super(optionsWithDefaults);
|
|
42
|
-
// Parameter assignments
|
|
43
|
-
this.subscriptionId = subscriptionId;
|
|
44
|
-
// Assigning values to Constant parameters
|
|
45
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
46
|
-
this.apiVersion = options.apiVersion || "2021-10-01";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=consumptionManagementClientContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consumptionManagementClientContext.js","sourceRoot":"","sources":["../../src/consumptionManagementClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,kCAAmC,SAAQ,UAAU,CAAC,aAAa;IAK9E;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,E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,aAAa,EAAE;oBACX,6BAA6B,EAAE;wBAC3B,OAAO,EAAE,IAAI;wBACb,QAAQ,EAAE,aAAa;wBACvB,SAAS,EAAE,EAAE;wBACb,aAAa,EAAE;4BACX,qBAAqB;4BACrB,uBAAuB;yBAC1B;wBACD,YAAY,EAAE;4BACV,aAAa;4BACb,QAAQ;yBACX;wBACD,aAAa,EAAE,QAAQ;qBAC1B;iBACJ;aACJ,CAAC,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAC,UAAU,CAAC,CAAC;QACpC,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,kBAAkB,EAAE;;YACrB,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAC,UAAU,CAAC,CAAC;YACvD,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAC,UAAU,CAAC,CAAC;QACpC,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE;;YACxB,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAC,UAAU,CAAC,CAAC;QAC5D,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import * as coreClient from "@azure/core-client";
|
|
10
|
-
import * as coreAuth from "@azure/core-auth";
|
|
11
|
-
import { ConsumptionManagementClientOptionalParams } from "./models";
|
|
12
|
-
|
|
13
|
-
export class ConsumptionManagementClientContext extends coreClient.ServiceClient {
|
|
14
|
-
$host: string;
|
|
15
|
-
apiVersion: string;
|
|
16
|
-
subscriptionId: string;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Initializes a new instance of the ConsumptionManagementClientContext class.
|
|
20
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
21
|
-
* @param subscriptionId Azure Subscription ID.
|
|
22
|
-
* @param options The parameter options
|
|
23
|
-
*/
|
|
24
|
-
constructor(
|
|
25
|
-
credentials: coreAuth.TokenCredential,
|
|
26
|
-
subscriptionId: string,
|
|
27
|
-
options?: ConsumptionManagementClientOptionalParams
|
|
28
|
-
) {
|
|
29
|
-
if (credentials === undefined) {
|
|
30
|
-
throw new Error("'credentials' cannot be null");
|
|
31
|
-
}
|
|
32
|
-
if (subscriptionId === undefined) {
|
|
33
|
-
throw new Error("'subscriptionId' cannot be null");
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Initializing default values for options
|
|
37
|
-
if (!options) {
|
|
38
|
-
options = {};
|
|
39
|
-
}
|
|
40
|
-
const defaults: ConsumptionManagementClientOptionalParams = {
|
|
41
|
-
requestContentType: "application/json; charset=utf-8",
|
|
42
|
-
credential: credentials
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const packageDetails = `azsdk-js-arm-consumption/9.0.0-beta.1`;
|
|
46
|
-
const userAgentPrefix =
|
|
47
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
48
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
49
|
-
: `${packageDetails}`;
|
|
50
|
-
|
|
51
|
-
if (!options.credentialScopes) {
|
|
52
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
53
|
-
}
|
|
54
|
-
const optionsWithDefaults = {
|
|
55
|
-
...defaults,
|
|
56
|
-
...options,
|
|
57
|
-
userAgentOptions: {
|
|
58
|
-
userAgentPrefix
|
|
59
|
-
},
|
|
60
|
-
baseUri: options.endpoint || "https://management.azure.com"
|
|
61
|
-
};
|
|
62
|
-
super(optionsWithDefaults);
|
|
63
|
-
// Parameter assignments
|
|
64
|
-
this.subscriptionId = subscriptionId;
|
|
65
|
-
|
|
66
|
-
// Assigning values to Constant parameters
|
|
67
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
68
|
-
this.apiVersion = options.apiVersion || "2021-10-01";
|
|
69
|
-
}
|
|
70
|
-
}
|