@azure/arm-resourcehealth 3.0.0-alpha.20211221.1 → 3.0.1-alpha.20220106.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -16
- package/README.md +1 -1
- package/dist/index.js +4 -25
- 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/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/microsoftResourceHealth.d.ts +5 -2
- package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
- package/dist-esm/src/microsoftResourceHealth.js +32 -3
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.d.ts +2 -2
- package/dist-esm/src/operations/availabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.js.map +1 -1
- package/dist-esm/src/operations/childAvailabilityStatuses.d.ts +2 -2
- package/dist-esm/src/operations/childAvailabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operations/childAvailabilityStatuses.js.map +1 -1
- package/dist-esm/src/operations/childResources.d.ts +2 -2
- package/dist-esm/src/operations/childResources.d.ts.map +1 -1
- package/dist-esm/src/operations/childResources.js.map +1 -1
- package/dist-esm/src/operations/emergingIssues.d.ts +2 -2
- package/dist-esm/src/operations/emergingIssues.d.ts.map +1 -1
- package/dist-esm/src/operations/emergingIssues.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/package.json +2 -2
- package/review/arm-resourcehealth.api.md +5 -10
- package/src/index.ts +0 -1
- package/src/microsoftResourceHealth.ts +46 -3
- package/src/operations/availabilityStatuses.ts +3 -3
- package/src/operations/childAvailabilityStatuses.ts +3 -3
- package/src/operations/childResources.ts +3 -3
- package/src/operations/emergingIssues.ts +3 -3
- package/src/operations/operations.ts +3 -3
- package/types/arm-resourcehealth.d.ts +4 -15
- package/dist-esm/src/microsoftResourceHealthContext.d.ts +0 -17
- package/dist-esm/src/microsoftResourceHealthContext.d.ts.map +0 -1
- package/dist-esm/src/microsoftResourceHealthContext.js +0 -50
- package/dist-esm/src/microsoftResourceHealthContext.js.map +0 -1
- package/src/microsoftResourceHealthContext.ts +0 -71
@@ -261,9 +261,13 @@ export enum KnownStageValues {
|
|
261
261
|
}
|
262
262
|
|
263
263
|
// @public (undocumented)
|
264
|
-
export class MicrosoftResourceHealth extends
|
264
|
+
export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
265
|
+
// (undocumented)
|
266
|
+
$host: string;
|
265
267
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
|
266
268
|
// (undocumented)
|
269
|
+
apiVersion: string;
|
270
|
+
// (undocumented)
|
267
271
|
availabilityStatuses: AvailabilityStatuses;
|
268
272
|
// (undocumented)
|
269
273
|
childAvailabilityStatuses: ChildAvailabilityStatuses;
|
@@ -273,15 +277,6 @@ export class MicrosoftResourceHealth extends MicrosoftResourceHealthContext {
|
|
273
277
|
emergingIssues: EmergingIssues;
|
274
278
|
// (undocumented)
|
275
279
|
operations: Operations;
|
276
|
-
}
|
277
|
-
|
278
|
-
// @public (undocumented)
|
279
|
-
export class MicrosoftResourceHealthContext extends coreClient.ServiceClient {
|
280
|
-
// (undocumented)
|
281
|
-
$host: string;
|
282
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
|
283
|
-
// (undocumented)
|
284
|
-
apiVersion: string;
|
285
280
|
// (undocumented)
|
286
281
|
subscriptionId: string;
|
287
282
|
}
|
package/src/index.ts
CHANGED
@@ -9,5 +9,4 @@
|
|
9
9
|
/// <reference lib="esnext.asynciterable" />
|
10
10
|
export * from "./models";
|
11
11
|
export { MicrosoftResourceHealth } from "./microsoftResourceHealth";
|
12
|
-
export { MicrosoftResourceHealthContext } from "./microsoftResourceHealthContext";
|
13
12
|
export * from "./operationsInterfaces";
|
@@ -6,6 +6,7 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
9
10
|
import * as coreAuth from "@azure/core-auth";
|
10
11
|
import {
|
11
12
|
AvailabilityStatusesImpl,
|
@@ -21,10 +22,13 @@ import {
|
|
21
22
|
Operations,
|
22
23
|
EmergingIssues
|
23
24
|
} from "./operationsInterfaces";
|
24
|
-
import { MicrosoftResourceHealthContext } from "./microsoftResourceHealthContext";
|
25
25
|
import { MicrosoftResourceHealthOptionalParams } from "./models";
|
26
26
|
|
27
|
-
export class MicrosoftResourceHealth extends
|
27
|
+
export class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
28
|
+
$host: string;
|
29
|
+
apiVersion: string;
|
30
|
+
subscriptionId: string;
|
31
|
+
|
28
32
|
/**
|
29
33
|
* Initializes a new instance of the MicrosoftResourceHealth class.
|
30
34
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
@@ -37,7 +41,46 @@ export class MicrosoftResourceHealth extends MicrosoftResourceHealthContext {
|
|
37
41
|
subscriptionId: string,
|
38
42
|
options?: MicrosoftResourceHealthOptionalParams
|
39
43
|
) {
|
40
|
-
|
44
|
+
if (credentials === undefined) {
|
45
|
+
throw new Error("'credentials' cannot be null");
|
46
|
+
}
|
47
|
+
if (subscriptionId === undefined) {
|
48
|
+
throw new Error("'subscriptionId' cannot be null");
|
49
|
+
}
|
50
|
+
|
51
|
+
// Initializing default values for options
|
52
|
+
if (!options) {
|
53
|
+
options = {};
|
54
|
+
}
|
55
|
+
const defaults: MicrosoftResourceHealthOptionalParams = {
|
56
|
+
requestContentType: "application/json; charset=utf-8",
|
57
|
+
credential: credentials
|
58
|
+
};
|
59
|
+
|
60
|
+
const packageDetails = `azsdk-js-arm-resourcehealth/1.0.0-beta.1`;
|
61
|
+
const userAgentPrefix =
|
62
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
63
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
64
|
+
: `${packageDetails}`;
|
65
|
+
|
66
|
+
if (!options.credentialScopes) {
|
67
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
68
|
+
}
|
69
|
+
const optionsWithDefaults = {
|
70
|
+
...defaults,
|
71
|
+
...options,
|
72
|
+
userAgentOptions: {
|
73
|
+
userAgentPrefix
|
74
|
+
},
|
75
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
76
|
+
};
|
77
|
+
super(optionsWithDefaults);
|
78
|
+
// Parameter assignments
|
79
|
+
this.subscriptionId = subscriptionId;
|
80
|
+
|
81
|
+
// Assigning values to Constant parameters
|
82
|
+
this.$host = options.$host || "https://management.azure.com";
|
83
|
+
this.apiVersion = options.apiVersion || "2017-07-01";
|
41
84
|
this.availabilityStatuses = new AvailabilityStatusesImpl(this);
|
42
85
|
this.childAvailabilityStatuses = new ChildAvailabilityStatusesImpl(this);
|
43
86
|
this.childResources = new ChildResourcesImpl(this);
|
@@ -11,7 +11,7 @@ import { AvailabilityStatuses } 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 { MicrosoftResourceHealth } from "../microsoftResourceHealth";
|
15
15
|
import {
|
16
16
|
AvailabilityStatus,
|
17
17
|
AvailabilityStatusesListBySubscriptionIdNextOptionalParams,
|
@@ -33,13 +33,13 @@ import {
|
|
33
33
|
/// <reference lib="esnext.asynciterable" />
|
34
34
|
/** Class containing AvailabilityStatuses operations. */
|
35
35
|
export class AvailabilityStatusesImpl implements AvailabilityStatuses {
|
36
|
-
private readonly client:
|
36
|
+
private readonly client: MicrosoftResourceHealth;
|
37
37
|
|
38
38
|
/**
|
39
39
|
* Initialize a new instance of the class AvailabilityStatuses class.
|
40
40
|
* @param client Reference to the service client
|
41
41
|
*/
|
42
|
-
constructor(client:
|
42
|
+
constructor(client: MicrosoftResourceHealth) {
|
43
43
|
this.client = client;
|
44
44
|
}
|
45
45
|
|
@@ -11,7 +11,7 @@ import { ChildAvailabilityStatuses } 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 { MicrosoftResourceHealth } from "../microsoftResourceHealth";
|
15
15
|
import {
|
16
16
|
AvailabilityStatus,
|
17
17
|
ChildAvailabilityStatusesListNextOptionalParams,
|
@@ -26,13 +26,13 @@ import {
|
|
26
26
|
/** Class containing ChildAvailabilityStatuses operations. */
|
27
27
|
export class ChildAvailabilityStatusesImpl
|
28
28
|
implements ChildAvailabilityStatuses {
|
29
|
-
private readonly client:
|
29
|
+
private readonly client: MicrosoftResourceHealth;
|
30
30
|
|
31
31
|
/**
|
32
32
|
* Initialize a new instance of the class ChildAvailabilityStatuses class.
|
33
33
|
* @param client Reference to the service client
|
34
34
|
*/
|
35
|
-
constructor(client:
|
35
|
+
constructor(client: MicrosoftResourceHealth) {
|
36
36
|
this.client = client;
|
37
37
|
}
|
38
38
|
|
@@ -11,7 +11,7 @@ import { ChildResources } 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 { MicrosoftResourceHealth } from "../microsoftResourceHealth";
|
15
15
|
import {
|
16
16
|
AvailabilityStatus,
|
17
17
|
ChildResourcesListNextOptionalParams,
|
@@ -23,13 +23,13 @@ import {
|
|
23
23
|
/// <reference lib="esnext.asynciterable" />
|
24
24
|
/** Class containing ChildResources operations. */
|
25
25
|
export class ChildResourcesImpl implements ChildResources {
|
26
|
-
private readonly client:
|
26
|
+
private readonly client: MicrosoftResourceHealth;
|
27
27
|
|
28
28
|
/**
|
29
29
|
* Initialize a new instance of the class ChildResources class.
|
30
30
|
* @param client Reference to the service client
|
31
31
|
*/
|
32
|
-
constructor(client:
|
32
|
+
constructor(client: MicrosoftResourceHealth) {
|
33
33
|
this.client = client;
|
34
34
|
}
|
35
35
|
|
@@ -11,7 +11,7 @@ import { EmergingIssues } 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 { MicrosoftResourceHealth } from "../microsoftResourceHealth";
|
15
15
|
import {
|
16
16
|
EmergingIssuesGetResult,
|
17
17
|
EmergingIssuesListNextOptionalParams,
|
@@ -25,13 +25,13 @@ import {
|
|
25
25
|
/// <reference lib="esnext.asynciterable" />
|
26
26
|
/** Class containing EmergingIssues operations. */
|
27
27
|
export class EmergingIssuesImpl implements EmergingIssues {
|
28
|
-
private readonly client:
|
28
|
+
private readonly client: MicrosoftResourceHealth;
|
29
29
|
|
30
30
|
/**
|
31
31
|
* Initialize a new instance of the class EmergingIssues class.
|
32
32
|
* @param client Reference to the service client
|
33
33
|
*/
|
34
|
-
constructor(client:
|
34
|
+
constructor(client: MicrosoftResourceHealth) {
|
35
35
|
this.client = client;
|
36
36
|
}
|
37
37
|
|
@@ -10,7 +10,7 @@ import { Operations } 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 { MicrosoftResourceHealth } from "../microsoftResourceHealth";
|
14
14
|
import {
|
15
15
|
OperationsListOptionalParams,
|
16
16
|
OperationsListResponse
|
@@ -18,13 +18,13 @@ import {
|
|
18
18
|
|
19
19
|
/** Class containing Operations operations. */
|
20
20
|
export class OperationsImpl implements Operations {
|
21
|
-
private readonly client:
|
21
|
+
private readonly client: MicrosoftResourceHealth;
|
22
22
|
|
23
23
|
/**
|
24
24
|
* Initialize a new instance of the class Operations class.
|
25
25
|
* @param client Reference to the service client
|
26
26
|
*/
|
27
|
-
constructor(client:
|
27
|
+
constructor(client: MicrosoftResourceHealth) {
|
28
28
|
this.client = client;
|
29
29
|
}
|
30
30
|
|
@@ -381,7 +381,10 @@ export declare enum KnownStageValues {
|
|
381
381
|
Archived = "Archived"
|
382
382
|
}
|
383
383
|
|
384
|
-
export declare class MicrosoftResourceHealth extends
|
384
|
+
export declare class MicrosoftResourceHealth extends coreClient.ServiceClient {
|
385
|
+
$host: string;
|
386
|
+
apiVersion: string;
|
387
|
+
subscriptionId: string;
|
385
388
|
/**
|
386
389
|
* Initializes a new instance of the MicrosoftResourceHealth class.
|
387
390
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
@@ -397,20 +400,6 @@ export declare class MicrosoftResourceHealth extends MicrosoftResourceHealthCont
|
|
397
400
|
emergingIssues: EmergingIssues;
|
398
401
|
}
|
399
402
|
|
400
|
-
export declare class MicrosoftResourceHealthContext extends coreClient.ServiceClient {
|
401
|
-
$host: string;
|
402
|
-
apiVersion: string;
|
403
|
-
subscriptionId: string;
|
404
|
-
/**
|
405
|
-
* Initializes a new instance of the MicrosoftResourceHealthContext class.
|
406
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
407
|
-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
|
408
|
-
* The subscription ID forms part of the URI for every service call.
|
409
|
-
* @param options The parameter options
|
410
|
-
*/
|
411
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
|
412
|
-
}
|
413
|
-
|
414
403
|
/** Optional parameters. */
|
415
404
|
export declare interface MicrosoftResourceHealthOptionalParams extends coreClient.ServiceClientOptions {
|
416
405
|
/** server parameter */
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import * as coreClient from "@azure/core-client";
|
2
|
-
import * as coreAuth from "@azure/core-auth";
|
3
|
-
import { MicrosoftResourceHealthOptionalParams } from "./models";
|
4
|
-
export declare class MicrosoftResourceHealthContext extends coreClient.ServiceClient {
|
5
|
-
$host: string;
|
6
|
-
apiVersion: string;
|
7
|
-
subscriptionId: string;
|
8
|
-
/**
|
9
|
-
* Initializes a new instance of the MicrosoftResourceHealthContext class.
|
10
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
11
|
-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
|
12
|
-
* The subscription ID forms part of the URI for every service call.
|
13
|
-
* @param options The parameter options
|
14
|
-
*/
|
15
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=microsoftResourceHealthContext.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"microsoftResourceHealthContext.d.ts","sourceRoot":"","sources":["../../src/microsoftResourceHealthContext.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,8BAA+B,SAAQ,UAAU,CAAC,aAAa;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,qCAAqC;CA2ClD"}
|
@@ -1,50 +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 MicrosoftResourceHealthContext extends coreClient.ServiceClient {
|
10
|
-
/**
|
11
|
-
* Initializes a new instance of the MicrosoftResourceHealthContext class.
|
12
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
13
|
-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
|
14
|
-
* The subscription ID forms part of the URI for every service call.
|
15
|
-
* @param options The parameter options
|
16
|
-
*/
|
17
|
-
constructor(credentials, subscriptionId, options) {
|
18
|
-
if (credentials === undefined) {
|
19
|
-
throw new Error("'credentials' cannot be null");
|
20
|
-
}
|
21
|
-
if (subscriptionId === undefined) {
|
22
|
-
throw new Error("'subscriptionId' cannot be null");
|
23
|
-
}
|
24
|
-
// Initializing default values for options
|
25
|
-
if (!options) {
|
26
|
-
options = {};
|
27
|
-
}
|
28
|
-
const defaults = {
|
29
|
-
requestContentType: "application/json; charset=utf-8",
|
30
|
-
credential: credentials
|
31
|
-
};
|
32
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/3.0.0-beta.1`;
|
33
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
34
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
35
|
-
: `${packageDetails}`;
|
36
|
-
if (!options.credentialScopes) {
|
37
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
38
|
-
}
|
39
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
40
|
-
userAgentPrefix
|
41
|
-
}, baseUri: options.endpoint || "https://management.azure.com" });
|
42
|
-
super(optionsWithDefaults);
|
43
|
-
// Parameter assignments
|
44
|
-
this.subscriptionId = subscriptionId;
|
45
|
-
// Assigning values to Constant parameters
|
46
|
-
this.$host = options.$host || "https://management.azure.com";
|
47
|
-
this.apiVersion = options.apiVersion || "2017-07-01";
|
48
|
-
}
|
49
|
-
}
|
50
|
-
//# sourceMappingURL=microsoftResourceHealthContext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"microsoftResourceHealthContext.js","sourceRoot":"","sources":["../../src/microsoftResourceHealthContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,8BAA+B,SAAQ,UAAU,CAAC,aAAa;IAK1E;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA+C;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA0C;YACtD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,0CAA0C,CAAC;QAClE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,8BAA8B,GAC5D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF"}
|
@@ -1,71 +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 { MicrosoftResourceHealthOptionalParams } from "./models";
|
12
|
-
|
13
|
-
export class MicrosoftResourceHealthContext extends coreClient.ServiceClient {
|
14
|
-
$host: string;
|
15
|
-
apiVersion: string;
|
16
|
-
subscriptionId: string;
|
17
|
-
|
18
|
-
/**
|
19
|
-
* Initializes a new instance of the MicrosoftResourceHealthContext class.
|
20
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
21
|
-
* @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription.
|
22
|
-
* The subscription ID forms part of the URI for every service call.
|
23
|
-
* @param options The parameter options
|
24
|
-
*/
|
25
|
-
constructor(
|
26
|
-
credentials: coreAuth.TokenCredential,
|
27
|
-
subscriptionId: string,
|
28
|
-
options?: MicrosoftResourceHealthOptionalParams
|
29
|
-
) {
|
30
|
-
if (credentials === undefined) {
|
31
|
-
throw new Error("'credentials' cannot be null");
|
32
|
-
}
|
33
|
-
if (subscriptionId === undefined) {
|
34
|
-
throw new Error("'subscriptionId' cannot be null");
|
35
|
-
}
|
36
|
-
|
37
|
-
// Initializing default values for options
|
38
|
-
if (!options) {
|
39
|
-
options = {};
|
40
|
-
}
|
41
|
-
const defaults: MicrosoftResourceHealthOptionalParams = {
|
42
|
-
requestContentType: "application/json; charset=utf-8",
|
43
|
-
credential: credentials
|
44
|
-
};
|
45
|
-
|
46
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/3.0.0-beta.1`;
|
47
|
-
const userAgentPrefix =
|
48
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
49
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
50
|
-
: `${packageDetails}`;
|
51
|
-
|
52
|
-
if (!options.credentialScopes) {
|
53
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
54
|
-
}
|
55
|
-
const optionsWithDefaults = {
|
56
|
-
...defaults,
|
57
|
-
...options,
|
58
|
-
userAgentOptions: {
|
59
|
-
userAgentPrefix
|
60
|
-
},
|
61
|
-
baseUri: options.endpoint || "https://management.azure.com"
|
62
|
-
};
|
63
|
-
super(optionsWithDefaults);
|
64
|
-
// Parameter assignments
|
65
|
-
this.subscriptionId = subscriptionId;
|
66
|
-
|
67
|
-
// Assigning values to Constant parameters
|
68
|
-
this.$host = options.$host || "https://management.azure.com";
|
69
|
-
this.apiVersion = options.apiVersion || "2017-07-01";
|
70
|
-
}
|
71
|
-
}
|