@azure/arm-resourcehealth 1.2.1 → 3.0.0-alpha.20211221.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +69 -83
- package/dist/index.js +1811 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/microsoftResourceHealth.d.ts +20 -0
- package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -0
- package/dist-esm/src/microsoftResourceHealth.js +27 -0
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -0
- package/dist-esm/src/microsoftResourceHealthContext.d.ts +17 -0
- package/dist-esm/src/microsoftResourceHealthContext.d.ts.map +1 -0
- package/dist-esm/src/microsoftResourceHealthContext.js +50 -0
- package/dist-esm/src/microsoftResourceHealthContext.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +402 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +22 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +21 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +393 -170
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +12 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +52 -36
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/availabilityStatuses.d.ts +102 -0
- package/dist-esm/src/operations/availabilityStatuses.d.ts.map +1 -0
- package/dist-esm/src/operations/availabilityStatuses.js +407 -0
- package/dist-esm/src/operations/availabilityStatuses.js.map +1 -0
- package/dist-esm/src/operations/childAvailabilityStatuses.d.ts +51 -0
- package/dist-esm/src/operations/childAvailabilityStatuses.d.ts.map +1 -0
- package/dist-esm/src/operations/childAvailabilityStatuses.js +173 -0
- package/dist-esm/src/operations/childAvailabilityStatuses.js.map +1 -0
- package/dist-esm/src/operations/childResources.d.ts +43 -0
- package/dist-esm/src/operations/childResources.d.ts.map +1 -0
- package/dist-esm/src/operations/childResources.js +143 -0
- package/dist-esm/src/operations/childResources.js.map +1 -0
- package/dist-esm/src/operations/emergingIssues.d.ts +37 -0
- package/dist-esm/src/operations/emergingIssues.d.ts.map +1 -0
- package/dist-esm/src/operations/emergingIssues.js +143 -0
- package/dist-esm/src/operations/emergingIssues.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +18 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +46 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts +40 -0
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.js +9 -0
- package/dist-esm/src/operationsInterfaces/availabilityStatuses.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/childAvailabilityStatuses.d.ts +23 -0
- package/dist-esm/src/operationsInterfaces/childAvailabilityStatuses.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/childAvailabilityStatuses.js +9 -0
- package/dist-esm/src/operationsInterfaces/childAvailabilityStatuses.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/childResources.d.ts +15 -0
- package/dist-esm/src/operationsInterfaces/childResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/childResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/childResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/emergingIssues.js +9 -0
- package/dist-esm/src/operationsInterfaces/emergingIssues.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +67 -24
- package/review/arm-resourcehealth.api.md +396 -0
- package/rollup.config.js +184 -27
- package/src/index.ts +13 -0
- package/src/microsoftResourceHealth.ts +40 -38
- package/src/microsoftResourceHealthContext.ts +49 -47
- package/src/models/index.ts +382 -532
- package/src/models/mappers.ts +409 -175
- package/src/models/parameters.ts +66 -37
- package/src/operations/availabilityStatuses.ts +335 -272
- package/src/operations/childAvailabilityStatuses.ts +210 -0
- package/src/operations/childResources.ts +168 -0
- package/src/operations/emergingIssues.ts +165 -0
- package/src/operations/index.ts +6 -5
- package/src/operations/operations.ts +26 -41
- package/src/operationsInterfaces/availabilityStatuses.ts +67 -0
- package/src/operationsInterfaces/childAvailabilityStatuses.ts +43 -0
- package/src/operationsInterfaces/childResources.ts +30 -0
- package/src/operationsInterfaces/emergingIssues.ts +34 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +21 -0
- package/tsconfig.json +4 -4
- package/types/arm-resourcehealth.d.ts +588 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-resourcehealth.js +0 -1047
- package/dist/arm-resourcehealth.js.map +0 -1
- package/dist/arm-resourcehealth.min.js +0 -1
- package/dist/arm-resourcehealth.min.js.map +0 -1
- package/esm/microsoftResourceHealth.d.ts +0 -26
- package/esm/microsoftResourceHealth.d.ts.map +0 -1
- package/esm/microsoftResourceHealth.js +0 -40
- package/esm/microsoftResourceHealth.js.map +0 -1
- package/esm/microsoftResourceHealthContext.d.ts +0 -23
- package/esm/microsoftResourceHealthContext.d.ts.map +0 -1
- package/esm/microsoftResourceHealthContext.js +0 -62
- package/esm/microsoftResourceHealthContext.js.map +0 -1
- package/esm/models/availabilityStatusesMappers.d.ts +0 -2
- package/esm/models/availabilityStatusesMappers.d.ts.map +0 -1
- package/esm/models/availabilityStatusesMappers.js +0 -11
- package/esm/models/availabilityStatusesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -589
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -16
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/availabilityStatuses.d.ts +0 -166
- package/esm/operations/availabilityStatuses.d.ts.map +0 -1
- package/esm/operations/availabilityStatuses.js +0 -225
- package/esm/operations/availabilityStatuses.js.map +0 -1
- package/esm/operations/index.d.ts +0 -3
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -12
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -51
- package/esm/operations/operations.js.map +0 -1
- package/src/models/availabilityStatusesMappers.ts +0 -22
- package/src/models/operationsMappers.ts +0 -17
@@ -0,0 +1,210 @@
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
10
|
+
import { ChildAvailabilityStatuses } from "../operationsInterfaces";
|
11
|
+
import * as coreClient from "@azure/core-client";
|
12
|
+
import * as Mappers from "../models/mappers";
|
13
|
+
import * as Parameters from "../models/parameters";
|
14
|
+
import { MicrosoftResourceHealthContext } from "../microsoftResourceHealthContext";
|
15
|
+
import {
|
16
|
+
AvailabilityStatus,
|
17
|
+
ChildAvailabilityStatusesListNextOptionalParams,
|
18
|
+
ChildAvailabilityStatusesListOptionalParams,
|
19
|
+
ChildAvailabilityStatusesGetByResourceOptionalParams,
|
20
|
+
ChildAvailabilityStatusesGetByResourceResponse,
|
21
|
+
ChildAvailabilityStatusesListResponse,
|
22
|
+
ChildAvailabilityStatusesListNextResponse
|
23
|
+
} from "../models";
|
24
|
+
|
25
|
+
/// <reference lib="esnext.asynciterable" />
|
26
|
+
/** Class containing ChildAvailabilityStatuses operations. */
|
27
|
+
export class ChildAvailabilityStatusesImpl
|
28
|
+
implements ChildAvailabilityStatuses {
|
29
|
+
private readonly client: MicrosoftResourceHealthContext;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Initialize a new instance of the class ChildAvailabilityStatuses class.
|
33
|
+
* @param client Reference to the service client
|
34
|
+
*/
|
35
|
+
constructor(client: MicrosoftResourceHealthContext) {
|
36
|
+
this.client = client;
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Lists the historical availability statuses for a single child resource. Use the nextLink property in
|
41
|
+
* the response to get the next page of availability status
|
42
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
43
|
+
* type. Currently the API only support one nesting level resource types :
|
44
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
45
|
+
* @param options The options parameters.
|
46
|
+
*/
|
47
|
+
public list(
|
48
|
+
resourceUri: string,
|
49
|
+
options?: ChildAvailabilityStatusesListOptionalParams
|
50
|
+
): PagedAsyncIterableIterator<AvailabilityStatus> {
|
51
|
+
const iter = this.listPagingAll(resourceUri, options);
|
52
|
+
return {
|
53
|
+
next() {
|
54
|
+
return iter.next();
|
55
|
+
},
|
56
|
+
[Symbol.asyncIterator]() {
|
57
|
+
return this;
|
58
|
+
},
|
59
|
+
byPage: () => {
|
60
|
+
return this.listPagingPage(resourceUri, options);
|
61
|
+
}
|
62
|
+
};
|
63
|
+
}
|
64
|
+
|
65
|
+
private async *listPagingPage(
|
66
|
+
resourceUri: string,
|
67
|
+
options?: ChildAvailabilityStatusesListOptionalParams
|
68
|
+
): AsyncIterableIterator<AvailabilityStatus[]> {
|
69
|
+
let result = await this._list(resourceUri, options);
|
70
|
+
yield result.value || [];
|
71
|
+
let continuationToken = result.nextLink;
|
72
|
+
while (continuationToken) {
|
73
|
+
result = await this._listNext(resourceUri, continuationToken, options);
|
74
|
+
continuationToken = result.nextLink;
|
75
|
+
yield result.value || [];
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
private async *listPagingAll(
|
80
|
+
resourceUri: string,
|
81
|
+
options?: ChildAvailabilityStatusesListOptionalParams
|
82
|
+
): AsyncIterableIterator<AvailabilityStatus> {
|
83
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
84
|
+
yield* page;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Gets current availability status for a single resource
|
90
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
91
|
+
* type. Currently the API only support one nesting level resource types :
|
92
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
93
|
+
* @param options The options parameters.
|
94
|
+
*/
|
95
|
+
getByResource(
|
96
|
+
resourceUri: string,
|
97
|
+
options?: ChildAvailabilityStatusesGetByResourceOptionalParams
|
98
|
+
): Promise<ChildAvailabilityStatusesGetByResourceResponse> {
|
99
|
+
return this.client.sendOperationRequest(
|
100
|
+
{ resourceUri, options },
|
101
|
+
getByResourceOperationSpec
|
102
|
+
);
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Lists the historical availability statuses for a single child resource. Use the nextLink property in
|
107
|
+
* the response to get the next page of availability status
|
108
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
109
|
+
* type. Currently the API only support one nesting level resource types :
|
110
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
111
|
+
* @param options The options parameters.
|
112
|
+
*/
|
113
|
+
private _list(
|
114
|
+
resourceUri: string,
|
115
|
+
options?: ChildAvailabilityStatusesListOptionalParams
|
116
|
+
): Promise<ChildAvailabilityStatusesListResponse> {
|
117
|
+
return this.client.sendOperationRequest(
|
118
|
+
{ resourceUri, options },
|
119
|
+
listOperationSpec
|
120
|
+
);
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
* ListNext
|
125
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
126
|
+
* type. Currently the API only support one nesting level resource types :
|
127
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
128
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
129
|
+
* @param options The options parameters.
|
130
|
+
*/
|
131
|
+
private _listNext(
|
132
|
+
resourceUri: string,
|
133
|
+
nextLink: string,
|
134
|
+
options?: ChildAvailabilityStatusesListNextOptionalParams
|
135
|
+
): Promise<ChildAvailabilityStatusesListNextResponse> {
|
136
|
+
return this.client.sendOperationRequest(
|
137
|
+
{ resourceUri, nextLink, options },
|
138
|
+
listNextOperationSpec
|
139
|
+
);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
// Operation Specifications
|
143
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
144
|
+
|
145
|
+
const getByResourceOperationSpec: coreClient.OperationSpec = {
|
146
|
+
path:
|
147
|
+
"/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current",
|
148
|
+
httpMethod: "GET",
|
149
|
+
responses: {
|
150
|
+
200: {
|
151
|
+
bodyMapper: Mappers.AvailabilityStatus
|
152
|
+
},
|
153
|
+
default: {
|
154
|
+
bodyMapper: Mappers.ErrorResponse
|
155
|
+
}
|
156
|
+
},
|
157
|
+
queryParameters: [
|
158
|
+
Parameters.apiVersion,
|
159
|
+
Parameters.filter,
|
160
|
+
Parameters.expand
|
161
|
+
],
|
162
|
+
urlParameters: [Parameters.$host, Parameters.resourceUri],
|
163
|
+
headerParameters: [Parameters.accept],
|
164
|
+
serializer
|
165
|
+
};
|
166
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
167
|
+
path:
|
168
|
+
"/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses",
|
169
|
+
httpMethod: "GET",
|
170
|
+
responses: {
|
171
|
+
200: {
|
172
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
173
|
+
},
|
174
|
+
default: {
|
175
|
+
bodyMapper: Mappers.ErrorResponse
|
176
|
+
}
|
177
|
+
},
|
178
|
+
queryParameters: [
|
179
|
+
Parameters.apiVersion,
|
180
|
+
Parameters.filter,
|
181
|
+
Parameters.expand
|
182
|
+
],
|
183
|
+
urlParameters: [Parameters.$host, Parameters.resourceUri],
|
184
|
+
headerParameters: [Parameters.accept],
|
185
|
+
serializer
|
186
|
+
};
|
187
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
188
|
+
path: "{nextLink}",
|
189
|
+
httpMethod: "GET",
|
190
|
+
responses: {
|
191
|
+
200: {
|
192
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
193
|
+
},
|
194
|
+
default: {
|
195
|
+
bodyMapper: Mappers.ErrorResponse
|
196
|
+
}
|
197
|
+
},
|
198
|
+
queryParameters: [
|
199
|
+
Parameters.apiVersion,
|
200
|
+
Parameters.filter,
|
201
|
+
Parameters.expand
|
202
|
+
],
|
203
|
+
urlParameters: [
|
204
|
+
Parameters.$host,
|
205
|
+
Parameters.resourceUri,
|
206
|
+
Parameters.nextLink
|
207
|
+
],
|
208
|
+
headerParameters: [Parameters.accept],
|
209
|
+
serializer
|
210
|
+
};
|
@@ -0,0 +1,168 @@
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
10
|
+
import { ChildResources } from "../operationsInterfaces";
|
11
|
+
import * as coreClient from "@azure/core-client";
|
12
|
+
import * as Mappers from "../models/mappers";
|
13
|
+
import * as Parameters from "../models/parameters";
|
14
|
+
import { MicrosoftResourceHealthContext } from "../microsoftResourceHealthContext";
|
15
|
+
import {
|
16
|
+
AvailabilityStatus,
|
17
|
+
ChildResourcesListNextOptionalParams,
|
18
|
+
ChildResourcesListOptionalParams,
|
19
|
+
ChildResourcesListResponse,
|
20
|
+
ChildResourcesListNextResponse
|
21
|
+
} from "../models";
|
22
|
+
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
24
|
+
/** Class containing ChildResources operations. */
|
25
|
+
export class ChildResourcesImpl implements ChildResources {
|
26
|
+
private readonly client: MicrosoftResourceHealthContext;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Initialize a new instance of the class ChildResources class.
|
30
|
+
* @param client Reference to the service client
|
31
|
+
*/
|
32
|
+
constructor(client: MicrosoftResourceHealthContext) {
|
33
|
+
this.client = client;
|
34
|
+
}
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Lists the all the children and its current health status for a parent resource. Use the nextLink
|
38
|
+
* property in the response to get the next page of children current health
|
39
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
40
|
+
* type. Currently the API only support not nested parent resource type:
|
41
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
42
|
+
* @param options The options parameters.
|
43
|
+
*/
|
44
|
+
public list(
|
45
|
+
resourceUri: string,
|
46
|
+
options?: ChildResourcesListOptionalParams
|
47
|
+
): PagedAsyncIterableIterator<AvailabilityStatus> {
|
48
|
+
const iter = this.listPagingAll(resourceUri, options);
|
49
|
+
return {
|
50
|
+
next() {
|
51
|
+
return iter.next();
|
52
|
+
},
|
53
|
+
[Symbol.asyncIterator]() {
|
54
|
+
return this;
|
55
|
+
},
|
56
|
+
byPage: () => {
|
57
|
+
return this.listPagingPage(resourceUri, options);
|
58
|
+
}
|
59
|
+
};
|
60
|
+
}
|
61
|
+
|
62
|
+
private async *listPagingPage(
|
63
|
+
resourceUri: string,
|
64
|
+
options?: ChildResourcesListOptionalParams
|
65
|
+
): AsyncIterableIterator<AvailabilityStatus[]> {
|
66
|
+
let result = await this._list(resourceUri, options);
|
67
|
+
yield result.value || [];
|
68
|
+
let continuationToken = result.nextLink;
|
69
|
+
while (continuationToken) {
|
70
|
+
result = await this._listNext(resourceUri, continuationToken, options);
|
71
|
+
continuationToken = result.nextLink;
|
72
|
+
yield result.value || [];
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
private async *listPagingAll(
|
77
|
+
resourceUri: string,
|
78
|
+
options?: ChildResourcesListOptionalParams
|
79
|
+
): AsyncIterableIterator<AvailabilityStatus> {
|
80
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
81
|
+
yield* page;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Lists the all the children and its current health status for a parent resource. Use the nextLink
|
87
|
+
* property in the response to get the next page of children current health
|
88
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
89
|
+
* type. Currently the API only support not nested parent resource type:
|
90
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
91
|
+
* @param options The options parameters.
|
92
|
+
*/
|
93
|
+
private _list(
|
94
|
+
resourceUri: string,
|
95
|
+
options?: ChildResourcesListOptionalParams
|
96
|
+
): Promise<ChildResourcesListResponse> {
|
97
|
+
return this.client.sendOperationRequest(
|
98
|
+
{ resourceUri, options },
|
99
|
+
listOperationSpec
|
100
|
+
);
|
101
|
+
}
|
102
|
+
|
103
|
+
/**
|
104
|
+
* ListNext
|
105
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
106
|
+
* type. Currently the API only support not nested parent resource type:
|
107
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
108
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
109
|
+
* @param options The options parameters.
|
110
|
+
*/
|
111
|
+
private _listNext(
|
112
|
+
resourceUri: string,
|
113
|
+
nextLink: string,
|
114
|
+
options?: ChildResourcesListNextOptionalParams
|
115
|
+
): Promise<ChildResourcesListNextResponse> {
|
116
|
+
return this.client.sendOperationRequest(
|
117
|
+
{ resourceUri, nextLink, options },
|
118
|
+
listNextOperationSpec
|
119
|
+
);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
// Operation Specifications
|
123
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
124
|
+
|
125
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
126
|
+
path: "/{resourceUri}/providers/Microsoft.ResourceHealth/childResources",
|
127
|
+
httpMethod: "GET",
|
128
|
+
responses: {
|
129
|
+
200: {
|
130
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
131
|
+
},
|
132
|
+
default: {
|
133
|
+
bodyMapper: Mappers.ErrorResponse
|
134
|
+
}
|
135
|
+
},
|
136
|
+
queryParameters: [
|
137
|
+
Parameters.apiVersion,
|
138
|
+
Parameters.filter,
|
139
|
+
Parameters.expand
|
140
|
+
],
|
141
|
+
urlParameters: [Parameters.$host, Parameters.resourceUri],
|
142
|
+
headerParameters: [Parameters.accept],
|
143
|
+
serializer
|
144
|
+
};
|
145
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
146
|
+
path: "{nextLink}",
|
147
|
+
httpMethod: "GET",
|
148
|
+
responses: {
|
149
|
+
200: {
|
150
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
151
|
+
},
|
152
|
+
default: {
|
153
|
+
bodyMapper: Mappers.ErrorResponse
|
154
|
+
}
|
155
|
+
},
|
156
|
+
queryParameters: [
|
157
|
+
Parameters.apiVersion,
|
158
|
+
Parameters.filter,
|
159
|
+
Parameters.expand
|
160
|
+
],
|
161
|
+
urlParameters: [
|
162
|
+
Parameters.$host,
|
163
|
+
Parameters.resourceUri,
|
164
|
+
Parameters.nextLink
|
165
|
+
],
|
166
|
+
headerParameters: [Parameters.accept],
|
167
|
+
serializer
|
168
|
+
};
|
@@ -0,0 +1,165 @@
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
10
|
+
import { EmergingIssues } from "../operationsInterfaces";
|
11
|
+
import * as coreClient from "@azure/core-client";
|
12
|
+
import * as Mappers from "../models/mappers";
|
13
|
+
import * as Parameters from "../models/parameters";
|
14
|
+
import { MicrosoftResourceHealthContext } from "../microsoftResourceHealthContext";
|
15
|
+
import {
|
16
|
+
EmergingIssuesGetResult,
|
17
|
+
EmergingIssuesListNextOptionalParams,
|
18
|
+
EmergingIssuesListOptionalParams,
|
19
|
+
EmergingIssuesGetOptionalParams,
|
20
|
+
EmergingIssuesGetResponse,
|
21
|
+
EmergingIssuesListResponse,
|
22
|
+
EmergingIssuesListNextResponse
|
23
|
+
} from "../models";
|
24
|
+
|
25
|
+
/// <reference lib="esnext.asynciterable" />
|
26
|
+
/** Class containing EmergingIssues operations. */
|
27
|
+
export class EmergingIssuesImpl implements EmergingIssues {
|
28
|
+
private readonly client: MicrosoftResourceHealthContext;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Initialize a new instance of the class EmergingIssues class.
|
32
|
+
* @param client Reference to the service client
|
33
|
+
*/
|
34
|
+
constructor(client: MicrosoftResourceHealthContext) {
|
35
|
+
this.client = client;
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Lists Azure services' emerging issues.
|
40
|
+
* @param options The options parameters.
|
41
|
+
*/
|
42
|
+
public list(
|
43
|
+
options?: EmergingIssuesListOptionalParams
|
44
|
+
): PagedAsyncIterableIterator<EmergingIssuesGetResult> {
|
45
|
+
const iter = this.listPagingAll(options);
|
46
|
+
return {
|
47
|
+
next() {
|
48
|
+
return iter.next();
|
49
|
+
},
|
50
|
+
[Symbol.asyncIterator]() {
|
51
|
+
return this;
|
52
|
+
},
|
53
|
+
byPage: () => {
|
54
|
+
return this.listPagingPage(options);
|
55
|
+
}
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
59
|
+
private async *listPagingPage(
|
60
|
+
options?: EmergingIssuesListOptionalParams
|
61
|
+
): AsyncIterableIterator<EmergingIssuesGetResult[]> {
|
62
|
+
let result = await this._list(options);
|
63
|
+
yield result.value || [];
|
64
|
+
let continuationToken = result.nextLink;
|
65
|
+
while (continuationToken) {
|
66
|
+
result = await this._listNext(continuationToken, options);
|
67
|
+
continuationToken = result.nextLink;
|
68
|
+
yield result.value || [];
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
private async *listPagingAll(
|
73
|
+
options?: EmergingIssuesListOptionalParams
|
74
|
+
): AsyncIterableIterator<EmergingIssuesGetResult> {
|
75
|
+
for await (const page of this.listPagingPage(options)) {
|
76
|
+
yield* page;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Gets Azure services' emerging issues.
|
82
|
+
* @param options The options parameters.
|
83
|
+
*/
|
84
|
+
get(
|
85
|
+
options?: EmergingIssuesGetOptionalParams
|
86
|
+
): Promise<EmergingIssuesGetResponse> {
|
87
|
+
return this.client.sendOperationRequest({ options }, getOperationSpec);
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Lists Azure services' emerging issues.
|
92
|
+
* @param options The options parameters.
|
93
|
+
*/
|
94
|
+
private _list(
|
95
|
+
options?: EmergingIssuesListOptionalParams
|
96
|
+
): Promise<EmergingIssuesListResponse> {
|
97
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* ListNext
|
102
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
103
|
+
* @param options The options parameters.
|
104
|
+
*/
|
105
|
+
private _listNext(
|
106
|
+
nextLink: string,
|
107
|
+
options?: EmergingIssuesListNextOptionalParams
|
108
|
+
): Promise<EmergingIssuesListNextResponse> {
|
109
|
+
return this.client.sendOperationRequest(
|
110
|
+
{ nextLink, options },
|
111
|
+
listNextOperationSpec
|
112
|
+
);
|
113
|
+
}
|
114
|
+
}
|
115
|
+
// Operation Specifications
|
116
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
117
|
+
|
118
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
119
|
+
path: "/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}",
|
120
|
+
httpMethod: "GET",
|
121
|
+
responses: {
|
122
|
+
200: {
|
123
|
+
bodyMapper: Mappers.EmergingIssuesGetResult
|
124
|
+
},
|
125
|
+
default: {
|
126
|
+
bodyMapper: Mappers.ErrorResponse
|
127
|
+
}
|
128
|
+
},
|
129
|
+
queryParameters: [Parameters.apiVersion],
|
130
|
+
urlParameters: [Parameters.$host, Parameters.issueName],
|
131
|
+
headerParameters: [Parameters.accept],
|
132
|
+
serializer
|
133
|
+
};
|
134
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
135
|
+
path: "/providers/Microsoft.ResourceHealth/emergingIssues",
|
136
|
+
httpMethod: "GET",
|
137
|
+
responses: {
|
138
|
+
200: {
|
139
|
+
bodyMapper: Mappers.EmergingIssueListResult
|
140
|
+
},
|
141
|
+
default: {
|
142
|
+
bodyMapper: Mappers.ErrorResponse
|
143
|
+
}
|
144
|
+
},
|
145
|
+
queryParameters: [Parameters.apiVersion],
|
146
|
+
urlParameters: [Parameters.$host],
|
147
|
+
headerParameters: [Parameters.accept],
|
148
|
+
serializer
|
149
|
+
};
|
150
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
151
|
+
path: "{nextLink}",
|
152
|
+
httpMethod: "GET",
|
153
|
+
responses: {
|
154
|
+
200: {
|
155
|
+
bodyMapper: Mappers.EmergingIssueListResult
|
156
|
+
},
|
157
|
+
default: {
|
158
|
+
bodyMapper: Mappers.ErrorResponse
|
159
|
+
}
|
160
|
+
},
|
161
|
+
queryParameters: [Parameters.apiVersion],
|
162
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
163
|
+
headerParameters: [Parameters.accept],
|
164
|
+
serializer
|
165
|
+
};
|
package/src/operations/index.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
4
|
-
* license information.
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
5
4
|
*
|
6
5
|
* 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.
|
9
7
|
*/
|
10
8
|
|
11
9
|
export * from "./availabilityStatuses";
|
10
|
+
export * from "./childAvailabilityStatuses";
|
11
|
+
export * from "./childResources";
|
12
12
|
export * from "./operations";
|
13
|
+
export * from "./emergingIssues";
|
@@ -1,26 +1,28 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
4
|
-
* license information.
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
5
4
|
*
|
6
5
|
* 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.
|
9
7
|
*/
|
10
8
|
|
11
|
-
import
|
12
|
-
import * as
|
13
|
-
import * as Mappers from "../models/
|
9
|
+
import { Operations } from "../operationsInterfaces";
|
10
|
+
import * as coreClient from "@azure/core-client";
|
11
|
+
import * as Mappers from "../models/mappers";
|
14
12
|
import * as Parameters from "../models/parameters";
|
15
13
|
import { MicrosoftResourceHealthContext } from "../microsoftResourceHealthContext";
|
14
|
+
import {
|
15
|
+
OperationsListOptionalParams,
|
16
|
+
OperationsListResponse
|
17
|
+
} from "../models";
|
16
18
|
|
17
|
-
/** Class
|
18
|
-
export class Operations {
|
19
|
+
/** Class containing Operations operations. */
|
20
|
+
export class OperationsImpl implements Operations {
|
19
21
|
private readonly client: MicrosoftResourceHealthContext;
|
20
22
|
|
21
23
|
/**
|
22
|
-
*
|
23
|
-
* @param
|
24
|
+
* Initialize a new instance of the class Operations class.
|
25
|
+
* @param client Reference to the service client
|
24
26
|
*/
|
25
27
|
constructor(client: MicrosoftResourceHealthContext) {
|
26
28
|
this.client = client;
|
@@ -28,40 +30,20 @@ export class Operations {
|
|
28
30
|
|
29
31
|
/**
|
30
32
|
* Lists available operations for the resourcehealth resource provider
|
31
|
-
* @param
|
32
|
-
* @returns Promise<Models.OperationsListResponse>
|
33
|
+
* @param options The options parameters.
|
33
34
|
*/
|
34
|
-
list(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
39
|
-
/**
|
40
|
-
* @param options The optional parameters
|
41
|
-
* @param callback The callback
|
42
|
-
*/
|
43
|
-
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
|
44
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
|
45
|
-
return this.client.sendOperationRequest(
|
46
|
-
{
|
47
|
-
options
|
48
|
-
},
|
49
|
-
listOperationSpec,
|
50
|
-
callback) as Promise<Models.OperationsListResponse>;
|
35
|
+
list(
|
36
|
+
options?: OperationsListOptionalParams
|
37
|
+
): Promise<OperationsListResponse> {
|
38
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
51
39
|
}
|
52
40
|
}
|
53
|
-
|
54
41
|
// Operation Specifications
|
55
|
-
const serializer =
|
56
|
-
|
42
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
43
|
+
|
44
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
45
|
+
path: "/providers/Microsoft.ResourceHealth/operations",
|
57
46
|
httpMethod: "GET",
|
58
|
-
path: "providers/Microsoft.ResourceHealth/operations",
|
59
|
-
queryParameters: [
|
60
|
-
Parameters.apiVersion
|
61
|
-
],
|
62
|
-
headerParameters: [
|
63
|
-
Parameters.acceptLanguage
|
64
|
-
],
|
65
47
|
responses: {
|
66
48
|
200: {
|
67
49
|
bodyMapper: Mappers.OperationListResult
|
@@ -70,5 +52,8 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
70
52
|
bodyMapper: Mappers.ErrorResponse
|
71
53
|
}
|
72
54
|
},
|
55
|
+
queryParameters: [Parameters.apiVersion],
|
56
|
+
urlParameters: [Parameters.$host],
|
57
|
+
headerParameters: [Parameters.accept],
|
73
58
|
serializer
|
74
59
|
};
|