@azure/arm-resourcehealth 1.1.0 → 3.0.0-alpha.20211124.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/{LICENSE.txt → LICENSE} +21 -21
- package/README.md +98 -100
- 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 +69 -25
- package/review/arm-resourcehealth.api.md +396 -0
- package/rollup.config.js +184 -27
- package/src/index.ts +13 -0
- package/src/microsoftResourceHealth.ts +53 -0
- package/src/microsoftResourceHealthContext.ts +71 -0
- package/src/models/index.ts +478 -0
- package/{lib → src}/models/mappers.ts +409 -175
- package/src/models/parameters.ts +127 -0
- package/src/operations/availabilityStatuses.ts +479 -0
- 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 +13 -0
- package/src/operations/operations.ts +59 -0
- 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 -1037
- 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 -20
- package/esm/microsoftResourceHealth.d.ts.map +0 -1
- package/esm/microsoftResourceHealth.js +0 -35
- package/esm/microsoftResourceHealth.js.map +0 -1
- package/esm/microsoftResourceHealthContext.d.ts +0 -17
- package/esm/microsoftResourceHealthContext.d.ts.map +0 -1
- package/esm/microsoftResourceHealthContext.js +0 -57
- 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/lib/microsoftResourceHealth.ts +0 -45
- package/lib/microsoftResourceHealthContext.ts +0 -63
- package/lib/models/availabilityStatusesMappers.ts +0 -22
- package/lib/models/index.ts +0 -628
- package/lib/models/operationsMappers.ts +0 -17
- package/lib/models/parameters.ts +0 -98
- package/lib/operations/availabilityStatuses.ts +0 -416
- package/lib/operations/index.ts +0 -12
- package/lib/operations/operations.ts +0 -74
@@ -0,0 +1,127 @@
|
|
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 {
|
10
|
+
OperationParameter,
|
11
|
+
OperationURLParameter,
|
12
|
+
OperationQueryParameter
|
13
|
+
} from "@azure/core-client";
|
14
|
+
|
15
|
+
export const accept: OperationParameter = {
|
16
|
+
parameterPath: "accept",
|
17
|
+
mapper: {
|
18
|
+
defaultValue: "application/json",
|
19
|
+
isConstant: true,
|
20
|
+
serializedName: "Accept",
|
21
|
+
type: {
|
22
|
+
name: "String"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
export const $host: OperationURLParameter = {
|
28
|
+
parameterPath: "$host",
|
29
|
+
mapper: {
|
30
|
+
serializedName: "$host",
|
31
|
+
required: true,
|
32
|
+
type: {
|
33
|
+
name: "String"
|
34
|
+
}
|
35
|
+
},
|
36
|
+
skipEncoding: true
|
37
|
+
};
|
38
|
+
|
39
|
+
export const apiVersion: OperationQueryParameter = {
|
40
|
+
parameterPath: "apiVersion",
|
41
|
+
mapper: {
|
42
|
+
defaultValue: "2017-07-01",
|
43
|
+
isConstant: true,
|
44
|
+
serializedName: "api-version",
|
45
|
+
type: {
|
46
|
+
name: "String"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
};
|
50
|
+
|
51
|
+
export const filter: OperationQueryParameter = {
|
52
|
+
parameterPath: ["options", "filter"],
|
53
|
+
mapper: {
|
54
|
+
serializedName: "$filter",
|
55
|
+
type: {
|
56
|
+
name: "String"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
61
|
+
export const subscriptionId: OperationURLParameter = {
|
62
|
+
parameterPath: "subscriptionId",
|
63
|
+
mapper: {
|
64
|
+
serializedName: "subscriptionId",
|
65
|
+
required: true,
|
66
|
+
type: {
|
67
|
+
name: "String"
|
68
|
+
}
|
69
|
+
}
|
70
|
+
};
|
71
|
+
|
72
|
+
export const expand: OperationQueryParameter = {
|
73
|
+
parameterPath: ["options", "expand"],
|
74
|
+
mapper: {
|
75
|
+
serializedName: "$expand",
|
76
|
+
type: {
|
77
|
+
name: "String"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
};
|
81
|
+
|
82
|
+
export const resourceGroupName: OperationURLParameter = {
|
83
|
+
parameterPath: "resourceGroupName",
|
84
|
+
mapper: {
|
85
|
+
serializedName: "resourceGroupName",
|
86
|
+
required: true,
|
87
|
+
type: {
|
88
|
+
name: "String"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
};
|
92
|
+
|
93
|
+
export const resourceUri: OperationURLParameter = {
|
94
|
+
parameterPath: "resourceUri",
|
95
|
+
mapper: {
|
96
|
+
serializedName: "resourceUri",
|
97
|
+
required: true,
|
98
|
+
type: {
|
99
|
+
name: "String"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
skipEncoding: true
|
103
|
+
};
|
104
|
+
|
105
|
+
export const nextLink: OperationURLParameter = {
|
106
|
+
parameterPath: "nextLink",
|
107
|
+
mapper: {
|
108
|
+
serializedName: "nextLink",
|
109
|
+
required: true,
|
110
|
+
type: {
|
111
|
+
name: "String"
|
112
|
+
}
|
113
|
+
},
|
114
|
+
skipEncoding: true
|
115
|
+
};
|
116
|
+
|
117
|
+
export const issueName: OperationURLParameter = {
|
118
|
+
parameterPath: "issueName",
|
119
|
+
mapper: {
|
120
|
+
defaultValue: "default",
|
121
|
+
isConstant: true,
|
122
|
+
serializedName: "issueName",
|
123
|
+
type: {
|
124
|
+
name: "String"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
};
|
@@ -0,0 +1,479 @@
|
|
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 { AvailabilityStatuses } 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
|
+
AvailabilityStatusesListBySubscriptionIdNextOptionalParams,
|
18
|
+
AvailabilityStatusesListBySubscriptionIdOptionalParams,
|
19
|
+
AvailabilityStatusesListByResourceGroupNextOptionalParams,
|
20
|
+
AvailabilityStatusesListByResourceGroupOptionalParams,
|
21
|
+
AvailabilityStatusesListNextOptionalParams,
|
22
|
+
AvailabilityStatusesListOptionalParams,
|
23
|
+
AvailabilityStatusesListBySubscriptionIdResponse,
|
24
|
+
AvailabilityStatusesListByResourceGroupResponse,
|
25
|
+
AvailabilityStatusesGetByResourceOptionalParams,
|
26
|
+
AvailabilityStatusesGetByResourceResponse,
|
27
|
+
AvailabilityStatusesListResponse,
|
28
|
+
AvailabilityStatusesListBySubscriptionIdNextResponse,
|
29
|
+
AvailabilityStatusesListByResourceGroupNextResponse,
|
30
|
+
AvailabilityStatusesListNextResponse
|
31
|
+
} from "../models";
|
32
|
+
|
33
|
+
/// <reference lib="esnext.asynciterable" />
|
34
|
+
/** Class containing AvailabilityStatuses operations. */
|
35
|
+
export class AvailabilityStatusesImpl implements AvailabilityStatuses {
|
36
|
+
private readonly client: MicrosoftResourceHealthContext;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Initialize a new instance of the class AvailabilityStatuses class.
|
40
|
+
* @param client Reference to the service client
|
41
|
+
*/
|
42
|
+
constructor(client: MicrosoftResourceHealthContext) {
|
43
|
+
this.client = client;
|
44
|
+
}
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Lists the current availability status for all the resources in the subscription. Use the nextLink
|
48
|
+
* property in the response to get the next page of availability statuses.
|
49
|
+
* @param options The options parameters.
|
50
|
+
*/
|
51
|
+
public listBySubscriptionId(
|
52
|
+
options?: AvailabilityStatusesListBySubscriptionIdOptionalParams
|
53
|
+
): PagedAsyncIterableIterator<AvailabilityStatus> {
|
54
|
+
const iter = this.listBySubscriptionIdPagingAll(options);
|
55
|
+
return {
|
56
|
+
next() {
|
57
|
+
return iter.next();
|
58
|
+
},
|
59
|
+
[Symbol.asyncIterator]() {
|
60
|
+
return this;
|
61
|
+
},
|
62
|
+
byPage: () => {
|
63
|
+
return this.listBySubscriptionIdPagingPage(options);
|
64
|
+
}
|
65
|
+
};
|
66
|
+
}
|
67
|
+
|
68
|
+
private async *listBySubscriptionIdPagingPage(
|
69
|
+
options?: AvailabilityStatusesListBySubscriptionIdOptionalParams
|
70
|
+
): AsyncIterableIterator<AvailabilityStatus[]> {
|
71
|
+
let result = await this._listBySubscriptionId(options);
|
72
|
+
yield result.value || [];
|
73
|
+
let continuationToken = result.nextLink;
|
74
|
+
while (continuationToken) {
|
75
|
+
result = await this._listBySubscriptionIdNext(continuationToken, options);
|
76
|
+
continuationToken = result.nextLink;
|
77
|
+
yield result.value || [];
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
private async *listBySubscriptionIdPagingAll(
|
82
|
+
options?: AvailabilityStatusesListBySubscriptionIdOptionalParams
|
83
|
+
): AsyncIterableIterator<AvailabilityStatus> {
|
84
|
+
for await (const page of this.listBySubscriptionIdPagingPage(options)) {
|
85
|
+
yield* page;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Lists the current availability status for all the resources in the resource group. Use the nextLink
|
91
|
+
* property in the response to get the next page of availability statuses.
|
92
|
+
* @param resourceGroupName The name of the resource group.
|
93
|
+
* @param options The options parameters.
|
94
|
+
*/
|
95
|
+
public listByResourceGroup(
|
96
|
+
resourceGroupName: string,
|
97
|
+
options?: AvailabilityStatusesListByResourceGroupOptionalParams
|
98
|
+
): PagedAsyncIterableIterator<AvailabilityStatus> {
|
99
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
100
|
+
return {
|
101
|
+
next() {
|
102
|
+
return iter.next();
|
103
|
+
},
|
104
|
+
[Symbol.asyncIterator]() {
|
105
|
+
return this;
|
106
|
+
},
|
107
|
+
byPage: () => {
|
108
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
109
|
+
}
|
110
|
+
};
|
111
|
+
}
|
112
|
+
|
113
|
+
private async *listByResourceGroupPagingPage(
|
114
|
+
resourceGroupName: string,
|
115
|
+
options?: AvailabilityStatusesListByResourceGroupOptionalParams
|
116
|
+
): AsyncIterableIterator<AvailabilityStatus[]> {
|
117
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
118
|
+
yield result.value || [];
|
119
|
+
let continuationToken = result.nextLink;
|
120
|
+
while (continuationToken) {
|
121
|
+
result = await this._listByResourceGroupNext(
|
122
|
+
resourceGroupName,
|
123
|
+
continuationToken,
|
124
|
+
options
|
125
|
+
);
|
126
|
+
continuationToken = result.nextLink;
|
127
|
+
yield result.value || [];
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
private async *listByResourceGroupPagingAll(
|
132
|
+
resourceGroupName: string,
|
133
|
+
options?: AvailabilityStatusesListByResourceGroupOptionalParams
|
134
|
+
): AsyncIterableIterator<AvailabilityStatus> {
|
135
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
136
|
+
resourceGroupName,
|
137
|
+
options
|
138
|
+
)) {
|
139
|
+
yield* page;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Lists all historical availability transitions and impacting events for a single resource. Use the
|
145
|
+
* nextLink property in the response to get the next page of availability status
|
146
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
147
|
+
* type. Currently the API support not nested and one nesting level resource types :
|
148
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
149
|
+
* and
|
150
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
151
|
+
* @param options The options parameters.
|
152
|
+
*/
|
153
|
+
public list(
|
154
|
+
resourceUri: string,
|
155
|
+
options?: AvailabilityStatusesListOptionalParams
|
156
|
+
): PagedAsyncIterableIterator<AvailabilityStatus> {
|
157
|
+
const iter = this.listPagingAll(resourceUri, options);
|
158
|
+
return {
|
159
|
+
next() {
|
160
|
+
return iter.next();
|
161
|
+
},
|
162
|
+
[Symbol.asyncIterator]() {
|
163
|
+
return this;
|
164
|
+
},
|
165
|
+
byPage: () => {
|
166
|
+
return this.listPagingPage(resourceUri, options);
|
167
|
+
}
|
168
|
+
};
|
169
|
+
}
|
170
|
+
|
171
|
+
private async *listPagingPage(
|
172
|
+
resourceUri: string,
|
173
|
+
options?: AvailabilityStatusesListOptionalParams
|
174
|
+
): AsyncIterableIterator<AvailabilityStatus[]> {
|
175
|
+
let result = await this._list(resourceUri, options);
|
176
|
+
yield result.value || [];
|
177
|
+
let continuationToken = result.nextLink;
|
178
|
+
while (continuationToken) {
|
179
|
+
result = await this._listNext(resourceUri, continuationToken, options);
|
180
|
+
continuationToken = result.nextLink;
|
181
|
+
yield result.value || [];
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
private async *listPagingAll(
|
186
|
+
resourceUri: string,
|
187
|
+
options?: AvailabilityStatusesListOptionalParams
|
188
|
+
): AsyncIterableIterator<AvailabilityStatus> {
|
189
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
190
|
+
yield* page;
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Lists the current availability status for all the resources in the subscription. Use the nextLink
|
196
|
+
* property in the response to get the next page of availability statuses.
|
197
|
+
* @param options The options parameters.
|
198
|
+
*/
|
199
|
+
private _listBySubscriptionId(
|
200
|
+
options?: AvailabilityStatusesListBySubscriptionIdOptionalParams
|
201
|
+
): Promise<AvailabilityStatusesListBySubscriptionIdResponse> {
|
202
|
+
return this.client.sendOperationRequest(
|
203
|
+
{ options },
|
204
|
+
listBySubscriptionIdOperationSpec
|
205
|
+
);
|
206
|
+
}
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Lists the current availability status for all the resources in the resource group. Use the nextLink
|
210
|
+
* property in the response to get the next page of availability statuses.
|
211
|
+
* @param resourceGroupName The name of the resource group.
|
212
|
+
* @param options The options parameters.
|
213
|
+
*/
|
214
|
+
private _listByResourceGroup(
|
215
|
+
resourceGroupName: string,
|
216
|
+
options?: AvailabilityStatusesListByResourceGroupOptionalParams
|
217
|
+
): Promise<AvailabilityStatusesListByResourceGroupResponse> {
|
218
|
+
return this.client.sendOperationRequest(
|
219
|
+
{ resourceGroupName, options },
|
220
|
+
listByResourceGroupOperationSpec
|
221
|
+
);
|
222
|
+
}
|
223
|
+
|
224
|
+
/**
|
225
|
+
* Gets current availability status for a single resource
|
226
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
227
|
+
* type. Currently the API support not nested and one nesting level resource types :
|
228
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
229
|
+
* and
|
230
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
231
|
+
* @param options The options parameters.
|
232
|
+
*/
|
233
|
+
getByResource(
|
234
|
+
resourceUri: string,
|
235
|
+
options?: AvailabilityStatusesGetByResourceOptionalParams
|
236
|
+
): Promise<AvailabilityStatusesGetByResourceResponse> {
|
237
|
+
return this.client.sendOperationRequest(
|
238
|
+
{ resourceUri, options },
|
239
|
+
getByResourceOperationSpec
|
240
|
+
);
|
241
|
+
}
|
242
|
+
|
243
|
+
/**
|
244
|
+
* Lists all historical availability transitions and impacting events for a single resource. Use the
|
245
|
+
* nextLink property in the response to get the next page of availability status
|
246
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
247
|
+
* type. Currently the API support not nested and one nesting level resource types :
|
248
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
249
|
+
* and
|
250
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
251
|
+
* @param options The options parameters.
|
252
|
+
*/
|
253
|
+
private _list(
|
254
|
+
resourceUri: string,
|
255
|
+
options?: AvailabilityStatusesListOptionalParams
|
256
|
+
): Promise<AvailabilityStatusesListResponse> {
|
257
|
+
return this.client.sendOperationRequest(
|
258
|
+
{ resourceUri, options },
|
259
|
+
listOperationSpec
|
260
|
+
);
|
261
|
+
}
|
262
|
+
|
263
|
+
/**
|
264
|
+
* ListBySubscriptionIdNext
|
265
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscriptionId method.
|
266
|
+
* @param options The options parameters.
|
267
|
+
*/
|
268
|
+
private _listBySubscriptionIdNext(
|
269
|
+
nextLink: string,
|
270
|
+
options?: AvailabilityStatusesListBySubscriptionIdNextOptionalParams
|
271
|
+
): Promise<AvailabilityStatusesListBySubscriptionIdNextResponse> {
|
272
|
+
return this.client.sendOperationRequest(
|
273
|
+
{ nextLink, options },
|
274
|
+
listBySubscriptionIdNextOperationSpec
|
275
|
+
);
|
276
|
+
}
|
277
|
+
|
278
|
+
/**
|
279
|
+
* ListByResourceGroupNext
|
280
|
+
* @param resourceGroupName The name of the resource group.
|
281
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
282
|
+
* @param options The options parameters.
|
283
|
+
*/
|
284
|
+
private _listByResourceGroupNext(
|
285
|
+
resourceGroupName: string,
|
286
|
+
nextLink: string,
|
287
|
+
options?: AvailabilityStatusesListByResourceGroupNextOptionalParams
|
288
|
+
): Promise<AvailabilityStatusesListByResourceGroupNextResponse> {
|
289
|
+
return this.client.sendOperationRequest(
|
290
|
+
{ resourceGroupName, nextLink, options },
|
291
|
+
listByResourceGroupNextOperationSpec
|
292
|
+
);
|
293
|
+
}
|
294
|
+
|
295
|
+
/**
|
296
|
+
* ListNext
|
297
|
+
* @param resourceUri The fully qualified ID of the resource, including the resource name and resource
|
298
|
+
* type. Currently the API support not nested and one nesting level resource types :
|
299
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
300
|
+
* and
|
301
|
+
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
302
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
303
|
+
* @param options The options parameters.
|
304
|
+
*/
|
305
|
+
private _listNext(
|
306
|
+
resourceUri: string,
|
307
|
+
nextLink: string,
|
308
|
+
options?: AvailabilityStatusesListNextOptionalParams
|
309
|
+
): Promise<AvailabilityStatusesListNextResponse> {
|
310
|
+
return this.client.sendOperationRequest(
|
311
|
+
{ resourceUri, nextLink, options },
|
312
|
+
listNextOperationSpec
|
313
|
+
);
|
314
|
+
}
|
315
|
+
}
|
316
|
+
// Operation Specifications
|
317
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
318
|
+
|
319
|
+
const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = {
|
320
|
+
path:
|
321
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses",
|
322
|
+
httpMethod: "GET",
|
323
|
+
responses: {
|
324
|
+
200: {
|
325
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
326
|
+
},
|
327
|
+
default: {
|
328
|
+
bodyMapper: Mappers.ErrorResponse
|
329
|
+
}
|
330
|
+
},
|
331
|
+
queryParameters: [
|
332
|
+
Parameters.apiVersion,
|
333
|
+
Parameters.filter,
|
334
|
+
Parameters.expand
|
335
|
+
],
|
336
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
337
|
+
headerParameters: [Parameters.accept],
|
338
|
+
serializer
|
339
|
+
};
|
340
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
341
|
+
path:
|
342
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses",
|
343
|
+
httpMethod: "GET",
|
344
|
+
responses: {
|
345
|
+
200: {
|
346
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
347
|
+
},
|
348
|
+
default: {
|
349
|
+
bodyMapper: Mappers.ErrorResponse
|
350
|
+
}
|
351
|
+
},
|
352
|
+
queryParameters: [
|
353
|
+
Parameters.apiVersion,
|
354
|
+
Parameters.filter,
|
355
|
+
Parameters.expand
|
356
|
+
],
|
357
|
+
urlParameters: [
|
358
|
+
Parameters.$host,
|
359
|
+
Parameters.subscriptionId,
|
360
|
+
Parameters.resourceGroupName
|
361
|
+
],
|
362
|
+
headerParameters: [Parameters.accept],
|
363
|
+
serializer
|
364
|
+
};
|
365
|
+
const getByResourceOperationSpec: coreClient.OperationSpec = {
|
366
|
+
path:
|
367
|
+
"/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current",
|
368
|
+
httpMethod: "GET",
|
369
|
+
responses: {
|
370
|
+
200: {
|
371
|
+
bodyMapper: Mappers.AvailabilityStatus
|
372
|
+
},
|
373
|
+
default: {
|
374
|
+
bodyMapper: Mappers.ErrorResponse
|
375
|
+
}
|
376
|
+
},
|
377
|
+
queryParameters: [
|
378
|
+
Parameters.apiVersion,
|
379
|
+
Parameters.filter,
|
380
|
+
Parameters.expand
|
381
|
+
],
|
382
|
+
urlParameters: [Parameters.$host, Parameters.resourceUri],
|
383
|
+
headerParameters: [Parameters.accept],
|
384
|
+
serializer
|
385
|
+
};
|
386
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
387
|
+
path:
|
388
|
+
"/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses",
|
389
|
+
httpMethod: "GET",
|
390
|
+
responses: {
|
391
|
+
200: {
|
392
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
393
|
+
},
|
394
|
+
default: {
|
395
|
+
bodyMapper: Mappers.ErrorResponse
|
396
|
+
}
|
397
|
+
},
|
398
|
+
queryParameters: [
|
399
|
+
Parameters.apiVersion,
|
400
|
+
Parameters.filter,
|
401
|
+
Parameters.expand
|
402
|
+
],
|
403
|
+
urlParameters: [Parameters.$host, Parameters.resourceUri],
|
404
|
+
headerParameters: [Parameters.accept],
|
405
|
+
serializer
|
406
|
+
};
|
407
|
+
const listBySubscriptionIdNextOperationSpec: coreClient.OperationSpec = {
|
408
|
+
path: "{nextLink}",
|
409
|
+
httpMethod: "GET",
|
410
|
+
responses: {
|
411
|
+
200: {
|
412
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
413
|
+
},
|
414
|
+
default: {
|
415
|
+
bodyMapper: Mappers.ErrorResponse
|
416
|
+
}
|
417
|
+
},
|
418
|
+
queryParameters: [
|
419
|
+
Parameters.apiVersion,
|
420
|
+
Parameters.filter,
|
421
|
+
Parameters.expand
|
422
|
+
],
|
423
|
+
urlParameters: [
|
424
|
+
Parameters.$host,
|
425
|
+
Parameters.subscriptionId,
|
426
|
+
Parameters.nextLink
|
427
|
+
],
|
428
|
+
headerParameters: [Parameters.accept],
|
429
|
+
serializer
|
430
|
+
};
|
431
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
432
|
+
path: "{nextLink}",
|
433
|
+
httpMethod: "GET",
|
434
|
+
responses: {
|
435
|
+
200: {
|
436
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
437
|
+
},
|
438
|
+
default: {
|
439
|
+
bodyMapper: Mappers.ErrorResponse
|
440
|
+
}
|
441
|
+
},
|
442
|
+
queryParameters: [
|
443
|
+
Parameters.apiVersion,
|
444
|
+
Parameters.filter,
|
445
|
+
Parameters.expand
|
446
|
+
],
|
447
|
+
urlParameters: [
|
448
|
+
Parameters.$host,
|
449
|
+
Parameters.subscriptionId,
|
450
|
+
Parameters.resourceGroupName,
|
451
|
+
Parameters.nextLink
|
452
|
+
],
|
453
|
+
headerParameters: [Parameters.accept],
|
454
|
+
serializer
|
455
|
+
};
|
456
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
457
|
+
path: "{nextLink}",
|
458
|
+
httpMethod: "GET",
|
459
|
+
responses: {
|
460
|
+
200: {
|
461
|
+
bodyMapper: Mappers.AvailabilityStatusListResult
|
462
|
+
},
|
463
|
+
default: {
|
464
|
+
bodyMapper: Mappers.ErrorResponse
|
465
|
+
}
|
466
|
+
},
|
467
|
+
queryParameters: [
|
468
|
+
Parameters.apiVersion,
|
469
|
+
Parameters.filter,
|
470
|
+
Parameters.expand
|
471
|
+
],
|
472
|
+
urlParameters: [
|
473
|
+
Parameters.$host,
|
474
|
+
Parameters.resourceUri,
|
475
|
+
Parameters.nextLink
|
476
|
+
],
|
477
|
+
headerParameters: [Parameters.accept],
|
478
|
+
serializer
|
479
|
+
};
|