@azure/arm-resources 5.0.0-beta.1 → 5.0.0
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 +6 -11
- package/README.md +15 -9
- package/dist/index.js +450 -2161
- 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 +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/{esm → dist-esm/src}/models/index.d.ts +60 -201
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/index.js +0 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.d.ts +3 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +106 -69
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +0 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm/operationsInterfaces → dist-esm/src/operations}/deploymentOperations.d.ts +85 -35
- package/dist-esm/src/operations/deploymentOperations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/deploymentOperations.js +1 -412
- package/dist-esm/src/operations/deploymentOperations.js.map +1 -0
- package/{esm/operationsInterfaces → dist-esm/src/operations}/deployments.d.ts +86 -40
- package/dist-esm/src/operations/deployments.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/deployments.js +102 -429
- package/dist-esm/src/operations/deployments.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +0 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/{esm → dist-esm/src}/operations/operations.d.ts +4 -19
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/operations.js +1 -75
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/{esm → dist-esm/src}/operations/providerResourceTypes.d.ts +3 -3
- package/dist-esm/src/operations/providerResourceTypes.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/providerResourceTypes.js +1 -1
- package/dist-esm/src/operations/providerResourceTypes.js.map +1 -0
- package/{esm → dist-esm/src}/operations/providers.d.ts +4 -33
- package/dist-esm/src/operations/providers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/providers.js +5 -156
- package/dist-esm/src/operations/providers.js.map +1 -0
- package/{esm → dist-esm/src}/operations/resourceGroups.d.ts +4 -19
- package/dist-esm/src/operations/resourceGroups.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/resourceGroups.js +14 -85
- package/dist-esm/src/operations/resourceGroups.js.map +1 -0
- package/{esm → dist-esm/src}/operations/resources.d.ts +4 -36
- package/dist-esm/src/operations/resources.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/resources.js +43 -188
- package/dist-esm/src/operations/resources.js.map +1 -0
- package/{esm → dist-esm/src}/operations/tagsOperations.d.ts +13 -28
- package/dist-esm/src/operations/tagsOperations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/tagsOperations.js +1 -79
- package/dist-esm/src/operations/tagsOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deploymentOperations.d.ts +77 -0
- package/dist-esm/src/operationsInterfaces/deploymentOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/deploymentOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/deploymentOperations.js.map +1 -0
- package/{esm/operations → dist-esm/src/operationsInterfaces}/deployments.d.ts +3 -170
- package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/deployments.js +9 -0
- package/dist-esm/src/operationsInterfaces/deployments.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/operations.js +1 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/providerResourceTypes.d.ts +0 -0
- package/dist-esm/src/operationsInterfaces/providerResourceTypes.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/providerResourceTypes.js +0 -0
- package/dist-esm/src/operationsInterfaces/providerResourceTypes.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/providers.d.ts +1 -14
- package/dist-esm/src/operationsInterfaces/providers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/providers.js +1 -1
- package/dist-esm/src/operationsInterfaces/providers.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/resourceGroups.d.ts +1 -8
- package/dist-esm/src/operationsInterfaces/resourceGroups.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceGroups.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceGroups.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/resources.d.ts +1 -15
- package/dist-esm/src/operationsInterfaces/resources.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/resources.js +1 -1
- package/dist-esm/src/operationsInterfaces/resources.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/tagsOperations.d.ts +10 -17
- package/dist-esm/src/operationsInterfaces/tagsOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/tagsOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/tagsOperations.js.map +1 -0
- package/{esm → dist-esm/src}/resourceManagementClient.d.ts +5 -2
- package/dist-esm/src/resourceManagementClient.d.ts.map +1 -0
- package/{esm/resourceManagementClientContext.js → dist-esm/src/resourceManagementClient.js} +13 -4
- package/dist-esm/src/resourceManagementClient.js.map +1 -0
- package/dist-esm/test/resources_examples.d.ts +4 -0
- package/dist-esm/test/resources_examples.d.ts.map +1 -0
- package/dist-esm/test/resources_examples.js +190 -0
- package/dist-esm/test/resources_examples.js.map +1 -0
- package/package.json +27 -33
- package/review/arm-resources.api.md +50 -214
- package/src/index.ts +0 -1
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +61 -252
- package/src/models/mappers.ts +109 -71
- package/src/operations/deploymentOperations.ts +5 -593
- package/src/operations/deployments.ts +110 -544
- package/src/operations/operations.ts +5 -85
- package/src/operations/providerResourceTypes.ts +4 -4
- package/src/operations/providers.ts +9 -178
- package/src/operations/resourceGroups.ts +19 -98
- package/src/operations/resources.ts +47 -229
- package/src/operations/tagsOperations.ts +40 -129
- package/src/operationsInterfaces/deploymentOperations.ts +0 -69
- package/src/operationsInterfaces/deployments.ts +0 -60
- package/src/operationsInterfaces/operations.ts +1 -15
- package/src/operationsInterfaces/providers.ts +0 -21
- package/src/operationsInterfaces/resourceGroups.ts +0 -11
- package/src/operationsInterfaces/resources.ts +0 -23
- package/src/operationsInterfaces/tagsOperations.ts +28 -42
- package/src/resourceManagementClient.ts +46 -3
- package/tsconfig.json +2 -3
- package/{esm/index.d.ts → types/arm-resources.d.ts} +85 -388
- package/types/tsdoc-metadata.json +11 -0
- package/esm/coreClientLro.d.ts +0 -26
- package/esm/coreClientLro.d.ts.map +0 -1
- package/esm/coreClientLro.js +0 -186
- package/esm/coreClientLro.js.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/lro/azureAsyncPolling.d.ts +0 -3
- package/esm/lro/azureAsyncPolling.d.ts.map +0 -1
- package/esm/lro/azureAsyncPolling.js +0 -67
- package/esm/lro/azureAsyncPolling.js.map +0 -1
- package/esm/lro/bodyPolling.d.ts +0 -8
- package/esm/lro/bodyPolling.d.ts.map +0 -1
- package/esm/lro/bodyPolling.js +0 -37
- package/esm/lro/bodyPolling.js.map +0 -1
- package/esm/lro/index.d.ts +0 -4
- package/esm/lro/index.d.ts.map +0 -1
- package/esm/lro/index.js +0 -12
- package/esm/lro/index.js.map +0 -1
- package/esm/lro/locationPolling.d.ts +0 -3
- package/esm/lro/locationPolling.d.ts.map +0 -1
- package/esm/lro/locationPolling.js +0 -19
- package/esm/lro/locationPolling.js.map +0 -1
- package/esm/lro/lroEngine.d.ts +0 -14
- package/esm/lro/lroEngine.d.ts.map +0 -1
- package/esm/lro/lroEngine.js +0 -41
- package/esm/lro/lroEngine.js.map +0 -1
- package/esm/lro/models.d.ts +0 -138
- package/esm/lro/models.d.ts.map +0 -1
- package/esm/lro/models.js +0 -14
- package/esm/lro/models.js.map +0 -1
- package/esm/lro/operation.d.ts +0 -36
- package/esm/lro/operation.d.ts.map +0 -1
- package/esm/lro/operation.js +0 -82
- package/esm/lro/operation.js.map +0 -1
- package/esm/lro/passthrough.d.ts +0 -3
- package/esm/lro/passthrough.d.ts.map +0 -1
- package/esm/lro/passthrough.js +0 -15
- package/esm/lro/passthrough.js.map +0 -1
- package/esm/lro/requestUtils.d.ts +0 -16
- package/esm/lro/requestUtils.d.ts.map +0 -1
- package/esm/lro/requestUtils.js +0 -73
- package/esm/lro/requestUtils.js.map +0 -1
- package/esm/lro/stateMachine.d.ts +0 -18
- package/esm/lro/stateMachine.d.ts.map +0 -1
- package/esm/lro/stateMachine.js +0 -84
- package/esm/lro/stateMachine.js.map +0 -1
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/deploymentOperations.d.ts +0 -259
- package/esm/operations/deploymentOperations.d.ts.map +0 -1
- package/esm/operations/deploymentOperations.js.map +0 -1
- package/esm/operations/deployments.d.ts.map +0 -1
- package/esm/operations/deployments.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/providerResourceTypes.d.ts.map +0 -1
- package/esm/operations/providerResourceTypes.js.map +0 -1
- package/esm/operations/providers.d.ts.map +0 -1
- package/esm/operations/providers.js.map +0 -1
- package/esm/operations/resourceGroups.d.ts.map +0 -1
- package/esm/operations/resourceGroups.js.map +0 -1
- package/esm/operations/resources.d.ts.map +0 -1
- package/esm/operations/resources.js.map +0 -1
- package/esm/operations/tagsOperations.d.ts.map +0 -1
- package/esm/operations/tagsOperations.js.map +0 -1
- package/esm/operationsInterfaces/deploymentOperations.d.ts.map +0 -1
- package/esm/operationsInterfaces/deploymentOperations.js +0 -9
- package/esm/operationsInterfaces/deploymentOperations.js.map +0 -1
- package/esm/operationsInterfaces/deployments.d.ts.map +0 -1
- package/esm/operationsInterfaces/deployments.js +0 -9
- package/esm/operationsInterfaces/deployments.js.map +0 -1
- package/esm/operationsInterfaces/index.d.ts.map +0 -1
- package/esm/operationsInterfaces/index.js.map +0 -1
- package/esm/operationsInterfaces/operations.d.ts +0 -18
- package/esm/operationsInterfaces/operations.d.ts.map +0 -1
- package/esm/operationsInterfaces/operations.js.map +0 -1
- package/esm/operationsInterfaces/providerResourceTypes.d.ts.map +0 -1
- package/esm/operationsInterfaces/providerResourceTypes.js.map +0 -1
- package/esm/operationsInterfaces/providers.d.ts.map +0 -1
- package/esm/operationsInterfaces/providers.js.map +0 -1
- package/esm/operationsInterfaces/resourceGroups.d.ts.map +0 -1
- package/esm/operationsInterfaces/resourceGroups.js +0 -9
- package/esm/operationsInterfaces/resourceGroups.js.map +0 -1
- package/esm/operationsInterfaces/resources.d.ts.map +0 -1
- package/esm/operationsInterfaces/resources.js.map +0 -1
- package/esm/operationsInterfaces/tagsOperations.d.ts.map +0 -1
- package/esm/operationsInterfaces/tagsOperations.js +0 -9
- package/esm/operationsInterfaces/tagsOperations.js.map +0 -1
- package/esm/resourceManagementClient.d.ts.map +0 -1
- package/esm/resourceManagementClient.js +0 -29
- package/esm/resourceManagementClient.js.map +0 -1
- package/esm/resourceManagementClientContext.d.ts +0 -16
- package/esm/resourceManagementClientContext.d.ts.map +0 -1
- package/esm/resourceManagementClientContext.js.map +0 -1
- package/src/coreClientLro.ts +0 -323
- package/src/lro/azureAsyncPolling.ts +0 -96
- package/src/lro/bodyPolling.ts +0 -54
- package/src/lro/index.ts +0 -26
- package/src/lro/locationPolling.ts +0 -30
- package/src/lro/lroEngine.ts +0 -61
- package/src/lro/models.ts +0 -173
- package/src/lro/operation.ts +0 -120
- package/src/lro/passthrough.ts +0 -23
- package/src/lro/requestUtils.ts +0 -105
- package/src/lro/stateMachine.ts +0 -138
- package/src/resourceManagementClientContext.ts +0 -70
|
@@ -6,33 +6,30 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import "@azure/core-paging";
|
|
10
9
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
11
10
|
import { Operations } from "../operationsInterfaces";
|
|
12
11
|
import * as coreClient from "@azure/core-client";
|
|
13
12
|
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { ResourceManagementClient } from "../resourceManagementClient";
|
|
16
15
|
import {
|
|
17
16
|
Operation,
|
|
18
17
|
OperationsListNextOptionalParams,
|
|
19
18
|
OperationsListOptionalParams,
|
|
20
|
-
OperationsListNextNextOptionalParams,
|
|
21
19
|
OperationsListResponse,
|
|
22
|
-
OperationsListNextResponse
|
|
23
|
-
OperationsListNextNextResponse
|
|
20
|
+
OperationsListNextResponse
|
|
24
21
|
} from "../models";
|
|
25
22
|
|
|
26
23
|
/// <reference lib="esnext.asynciterable" />
|
|
27
|
-
/** Class
|
|
24
|
+
/** Class containing Operations operations. */
|
|
28
25
|
export class OperationsImpl implements Operations {
|
|
29
|
-
private readonly client:
|
|
26
|
+
private readonly client: ResourceManagementClient;
|
|
30
27
|
|
|
31
28
|
/**
|
|
32
29
|
* Initialize a new instance of the class Operations class.
|
|
33
30
|
* @param client Reference to the service client
|
|
34
31
|
*/
|
|
35
|
-
constructor(client:
|
|
32
|
+
constructor(client: ResourceManagementClient) {
|
|
36
33
|
this.client = client;
|
|
37
34
|
}
|
|
38
35
|
|
|
@@ -78,52 +75,6 @@ export class OperationsImpl implements Operations {
|
|
|
78
75
|
}
|
|
79
76
|
}
|
|
80
77
|
|
|
81
|
-
/**
|
|
82
|
-
* ListNext
|
|
83
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
84
|
-
* @param options The options parameters.
|
|
85
|
-
*/
|
|
86
|
-
public listNext(
|
|
87
|
-
nextLink: string,
|
|
88
|
-
options?: OperationsListNextOptionalParams
|
|
89
|
-
): PagedAsyncIterableIterator<Operation> {
|
|
90
|
-
const iter = this.listNextPagingAll(nextLink, options);
|
|
91
|
-
return {
|
|
92
|
-
next() {
|
|
93
|
-
return iter.next();
|
|
94
|
-
},
|
|
95
|
-
[Symbol.asyncIterator]() {
|
|
96
|
-
return this;
|
|
97
|
-
},
|
|
98
|
-
byPage: () => {
|
|
99
|
-
return this.listNextPagingPage(nextLink, options);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private async *listNextPagingPage(
|
|
105
|
-
nextLink: string,
|
|
106
|
-
options?: OperationsListNextOptionalParams
|
|
107
|
-
): AsyncIterableIterator<Operation[]> {
|
|
108
|
-
let result = await this._listNext(nextLink, options);
|
|
109
|
-
yield result.value || [];
|
|
110
|
-
let continuationToken = result.nextLink;
|
|
111
|
-
while (continuationToken) {
|
|
112
|
-
result = await this._listNextNext(continuationToken, options);
|
|
113
|
-
continuationToken = result.nextLink;
|
|
114
|
-
yield result.value || [];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
private async *listNextPagingAll(
|
|
119
|
-
nextLink: string,
|
|
120
|
-
options?: OperationsListNextOptionalParams
|
|
121
|
-
): AsyncIterableIterator<Operation> {
|
|
122
|
-
for await (const page of this.listNextPagingPage(nextLink, options)) {
|
|
123
|
-
yield* page;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
78
|
/**
|
|
128
79
|
* Lists all of the available Microsoft.Resources REST API operations.
|
|
129
80
|
* @param options The options parameters.
|
|
@@ -148,21 +99,6 @@ export class OperationsImpl implements Operations {
|
|
|
148
99
|
listNextOperationSpec
|
|
149
100
|
);
|
|
150
101
|
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* ListNextNext
|
|
154
|
-
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
|
155
|
-
* @param options The options parameters.
|
|
156
|
-
*/
|
|
157
|
-
private _listNextNext(
|
|
158
|
-
nextLink: string,
|
|
159
|
-
options?: OperationsListNextNextOptionalParams
|
|
160
|
-
): Promise<OperationsListNextNextResponse> {
|
|
161
|
-
return this.client.sendOperationRequest(
|
|
162
|
-
{ nextLink, options },
|
|
163
|
-
listNextNextOperationSpec
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
102
|
}
|
|
167
103
|
// Operation Specifications
|
|
168
104
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -199,19 +135,3 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
199
135
|
headerParameters: [Parameters.accept],
|
|
200
136
|
serializer
|
|
201
137
|
};
|
|
202
|
-
const listNextNextOperationSpec: coreClient.OperationSpec = {
|
|
203
|
-
path: "{nextLink}",
|
|
204
|
-
httpMethod: "GET",
|
|
205
|
-
responses: {
|
|
206
|
-
200: {
|
|
207
|
-
bodyMapper: Mappers.OperationListResult
|
|
208
|
-
},
|
|
209
|
-
default: {
|
|
210
|
-
bodyMapper: Mappers.CloudError
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
queryParameters: [Parameters.apiVersion],
|
|
214
|
-
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
215
|
-
headerParameters: [Parameters.accept],
|
|
216
|
-
serializer
|
|
217
|
-
};
|
|
@@ -10,21 +10,21 @@ import { ProviderResourceTypes } 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 { ResourceManagementClient } from "../resourceManagementClient";
|
|
14
14
|
import {
|
|
15
15
|
ProviderResourceTypesListOptionalParams,
|
|
16
16
|
ProviderResourceTypesListResponse
|
|
17
17
|
} from "../models";
|
|
18
18
|
|
|
19
|
-
/** Class
|
|
19
|
+
/** Class containing ProviderResourceTypes operations. */
|
|
20
20
|
export class ProviderResourceTypesImpl implements ProviderResourceTypes {
|
|
21
|
-
private readonly client:
|
|
21
|
+
private readonly client: ResourceManagementClient;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Initialize a new instance of the class ProviderResourceTypes class.
|
|
25
25
|
* @param client Reference to the service client
|
|
26
26
|
*/
|
|
27
|
-
constructor(client:
|
|
27
|
+
constructor(client: ResourceManagementClient) {
|
|
28
28
|
this.client = client;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -6,21 +6,18 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import "@azure/core-paging";
|
|
10
9
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
11
10
|
import { Providers } from "../operationsInterfaces";
|
|
12
11
|
import * as coreClient from "@azure/core-client";
|
|
13
12
|
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { ResourceManagementClient } from "../resourceManagementClient";
|
|
16
15
|
import {
|
|
17
16
|
Provider,
|
|
18
17
|
ProvidersListNextOptionalParams,
|
|
19
18
|
ProvidersListOptionalParams,
|
|
20
19
|
ProvidersListAtTenantScopeNextOptionalParams,
|
|
21
20
|
ProvidersListAtTenantScopeOptionalParams,
|
|
22
|
-
ProvidersListNextNextOptionalParams,
|
|
23
|
-
ProvidersListAtTenantScopeNextNextOptionalParams,
|
|
24
21
|
ProvidersUnregisterOptionalParams,
|
|
25
22
|
ProvidersUnregisterResponse,
|
|
26
23
|
ProvidersRegisterAtManagementGroupScopeOptionalParams,
|
|
@@ -35,21 +32,19 @@ import {
|
|
|
35
32
|
ProvidersGetAtTenantScopeOptionalParams,
|
|
36
33
|
ProvidersGetAtTenantScopeResponse,
|
|
37
34
|
ProvidersListNextResponse,
|
|
38
|
-
ProvidersListAtTenantScopeNextResponse
|
|
39
|
-
ProvidersListNextNextResponse,
|
|
40
|
-
ProvidersListAtTenantScopeNextNextResponse
|
|
35
|
+
ProvidersListAtTenantScopeNextResponse
|
|
41
36
|
} from "../models";
|
|
42
37
|
|
|
43
38
|
/// <reference lib="esnext.asynciterable" />
|
|
44
|
-
/** Class
|
|
39
|
+
/** Class containing Providers operations. */
|
|
45
40
|
export class ProvidersImpl implements Providers {
|
|
46
|
-
private readonly client:
|
|
41
|
+
private readonly client: ResourceManagementClient;
|
|
47
42
|
|
|
48
43
|
/**
|
|
49
44
|
* Initialize a new instance of the class Providers class.
|
|
50
45
|
* @param client Reference to the service client
|
|
51
46
|
*/
|
|
52
|
-
constructor(client:
|
|
47
|
+
constructor(client: ResourceManagementClient) {
|
|
53
48
|
this.client = client;
|
|
54
49
|
}
|
|
55
50
|
|
|
@@ -137,104 +132,6 @@ export class ProvidersImpl implements Providers {
|
|
|
137
132
|
}
|
|
138
133
|
}
|
|
139
134
|
|
|
140
|
-
/**
|
|
141
|
-
* ListNext
|
|
142
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
143
|
-
* @param options The options parameters.
|
|
144
|
-
*/
|
|
145
|
-
public listNext(
|
|
146
|
-
nextLink: string,
|
|
147
|
-
options?: ProvidersListNextOptionalParams
|
|
148
|
-
): PagedAsyncIterableIterator<Provider> {
|
|
149
|
-
const iter = this.listNextPagingAll(nextLink, options);
|
|
150
|
-
return {
|
|
151
|
-
next() {
|
|
152
|
-
return iter.next();
|
|
153
|
-
},
|
|
154
|
-
[Symbol.asyncIterator]() {
|
|
155
|
-
return this;
|
|
156
|
-
},
|
|
157
|
-
byPage: () => {
|
|
158
|
-
return this.listNextPagingPage(nextLink, options);
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
private async *listNextPagingPage(
|
|
164
|
-
nextLink: string,
|
|
165
|
-
options?: ProvidersListNextOptionalParams
|
|
166
|
-
): AsyncIterableIterator<Provider[]> {
|
|
167
|
-
let result = await this._listNext(nextLink, options);
|
|
168
|
-
yield result.value || [];
|
|
169
|
-
let continuationToken = result.nextLink;
|
|
170
|
-
while (continuationToken) {
|
|
171
|
-
result = await this._listNextNext(continuationToken, options);
|
|
172
|
-
continuationToken = result.nextLink;
|
|
173
|
-
yield result.value || [];
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private async *listNextPagingAll(
|
|
178
|
-
nextLink: string,
|
|
179
|
-
options?: ProvidersListNextOptionalParams
|
|
180
|
-
): AsyncIterableIterator<Provider> {
|
|
181
|
-
for await (const page of this.listNextPagingPage(nextLink, options)) {
|
|
182
|
-
yield* page;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* ListAtTenantScopeNext
|
|
188
|
-
* @param nextLink The nextLink from the previous successful call to the ListAtTenantScope method.
|
|
189
|
-
* @param options The options parameters.
|
|
190
|
-
*/
|
|
191
|
-
public listAtTenantScopeNext(
|
|
192
|
-
nextLink: string,
|
|
193
|
-
options?: ProvidersListAtTenantScopeNextOptionalParams
|
|
194
|
-
): PagedAsyncIterableIterator<Provider> {
|
|
195
|
-
const iter = this.listAtTenantScopeNextPagingAll(nextLink, options);
|
|
196
|
-
return {
|
|
197
|
-
next() {
|
|
198
|
-
return iter.next();
|
|
199
|
-
},
|
|
200
|
-
[Symbol.asyncIterator]() {
|
|
201
|
-
return this;
|
|
202
|
-
},
|
|
203
|
-
byPage: () => {
|
|
204
|
-
return this.listAtTenantScopeNextPagingPage(nextLink, options);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private async *listAtTenantScopeNextPagingPage(
|
|
210
|
-
nextLink: string,
|
|
211
|
-
options?: ProvidersListAtTenantScopeNextOptionalParams
|
|
212
|
-
): AsyncIterableIterator<Provider[]> {
|
|
213
|
-
let result = await this._listAtTenantScopeNext(nextLink, options);
|
|
214
|
-
yield result.value || [];
|
|
215
|
-
let continuationToken = result.nextLink;
|
|
216
|
-
while (continuationToken) {
|
|
217
|
-
result = await this._listAtTenantScopeNextNext(
|
|
218
|
-
continuationToken,
|
|
219
|
-
options
|
|
220
|
-
);
|
|
221
|
-
continuationToken = result.nextLink;
|
|
222
|
-
yield result.value || [];
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
private async *listAtTenantScopeNextPagingAll(
|
|
227
|
-
nextLink: string,
|
|
228
|
-
options?: ProvidersListAtTenantScopeNextOptionalParams
|
|
229
|
-
): AsyncIterableIterator<Provider> {
|
|
230
|
-
for await (const page of this.listAtTenantScopeNextPagingPage(
|
|
231
|
-
nextLink,
|
|
232
|
-
options
|
|
233
|
-
)) {
|
|
234
|
-
yield* page;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
135
|
/**
|
|
239
136
|
* Unregisters a subscription from a resource provider.
|
|
240
137
|
* @param resourceProviderNamespace The namespace of the resource provider to unregister.
|
|
@@ -379,36 +276,6 @@ export class ProvidersImpl implements Providers {
|
|
|
379
276
|
listAtTenantScopeNextOperationSpec
|
|
380
277
|
);
|
|
381
278
|
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* ListNextNext
|
|
385
|
-
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
|
386
|
-
* @param options The options parameters.
|
|
387
|
-
*/
|
|
388
|
-
private _listNextNext(
|
|
389
|
-
nextLink: string,
|
|
390
|
-
options?: ProvidersListNextNextOptionalParams
|
|
391
|
-
): Promise<ProvidersListNextNextResponse> {
|
|
392
|
-
return this.client.sendOperationRequest(
|
|
393
|
-
{ nextLink, options },
|
|
394
|
-
listNextNextOperationSpec
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* ListAtTenantScopeNextNext
|
|
400
|
-
* @param nextLink The nextLink from the previous successful call to the ListAtTenantScopeNext method.
|
|
401
|
-
* @param options The options parameters.
|
|
402
|
-
*/
|
|
403
|
-
private _listAtTenantScopeNextNext(
|
|
404
|
-
nextLink: string,
|
|
405
|
-
options?: ProvidersListAtTenantScopeNextNextOptionalParams
|
|
406
|
-
): Promise<ProvidersListAtTenantScopeNextNextResponse> {
|
|
407
|
-
return this.client.sendOperationRequest(
|
|
408
|
-
{ nextLink, options },
|
|
409
|
-
listAtTenantScopeNextNextOperationSpec
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
279
|
}
|
|
413
280
|
// Operation Specifications
|
|
414
281
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -508,7 +375,7 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
508
375
|
bodyMapper: Mappers.CloudError
|
|
509
376
|
}
|
|
510
377
|
},
|
|
511
|
-
queryParameters: [Parameters.apiVersion, Parameters.
|
|
378
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
512
379
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
513
380
|
headerParameters: [Parameters.accept],
|
|
514
381
|
serializer
|
|
@@ -524,7 +391,7 @@ const listAtTenantScopeOperationSpec: coreClient.OperationSpec = {
|
|
|
524
391
|
bodyMapper: Mappers.CloudError
|
|
525
392
|
}
|
|
526
393
|
},
|
|
527
|
-
queryParameters: [Parameters.apiVersion, Parameters.
|
|
394
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
528
395
|
urlParameters: [Parameters.$host],
|
|
529
396
|
headerParameters: [Parameters.accept],
|
|
530
397
|
serializer
|
|
@@ -576,7 +443,7 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
576
443
|
bodyMapper: Mappers.CloudError
|
|
577
444
|
}
|
|
578
445
|
},
|
|
579
|
-
queryParameters: [Parameters.apiVersion, Parameters.
|
|
446
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
580
447
|
urlParameters: [
|
|
581
448
|
Parameters.$host,
|
|
582
449
|
Parameters.nextLink,
|
|
@@ -596,43 +463,7 @@ const listAtTenantScopeNextOperationSpec: coreClient.OperationSpec = {
|
|
|
596
463
|
bodyMapper: Mappers.CloudError
|
|
597
464
|
}
|
|
598
465
|
},
|
|
599
|
-
queryParameters: [Parameters.apiVersion, Parameters.
|
|
600
|
-
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
601
|
-
headerParameters: [Parameters.accept],
|
|
602
|
-
serializer
|
|
603
|
-
};
|
|
604
|
-
const listNextNextOperationSpec: coreClient.OperationSpec = {
|
|
605
|
-
path: "{nextLink}",
|
|
606
|
-
httpMethod: "GET",
|
|
607
|
-
responses: {
|
|
608
|
-
200: {
|
|
609
|
-
bodyMapper: Mappers.ProviderListResult
|
|
610
|
-
},
|
|
611
|
-
default: {
|
|
612
|
-
bodyMapper: Mappers.CloudError
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.expand],
|
|
616
|
-
urlParameters: [
|
|
617
|
-
Parameters.$host,
|
|
618
|
-
Parameters.nextLink,
|
|
619
|
-
Parameters.subscriptionId
|
|
620
|
-
],
|
|
621
|
-
headerParameters: [Parameters.accept],
|
|
622
|
-
serializer
|
|
623
|
-
};
|
|
624
|
-
const listAtTenantScopeNextNextOperationSpec: coreClient.OperationSpec = {
|
|
625
|
-
path: "{nextLink}",
|
|
626
|
-
httpMethod: "GET",
|
|
627
|
-
responses: {
|
|
628
|
-
200: {
|
|
629
|
-
bodyMapper: Mappers.ProviderListResult
|
|
630
|
-
},
|
|
631
|
-
default: {
|
|
632
|
-
bodyMapper: Mappers.CloudError
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.expand],
|
|
466
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
636
467
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
637
468
|
headerParameters: [Parameters.accept],
|
|
638
469
|
serializer
|
|
@@ -6,21 +6,18 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import "@azure/core-paging";
|
|
10
9
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
11
10
|
import { ResourceGroups } from "../operationsInterfaces";
|
|
12
11
|
import * as coreClient from "@azure/core-client";
|
|
13
12
|
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
16
|
-
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
17
|
-
import {
|
|
18
|
-
import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro";
|
|
14
|
+
import { ResourceManagementClient } from "../resourceManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
19
17
|
import {
|
|
20
18
|
ResourceGroup,
|
|
21
19
|
ResourceGroupsListNextOptionalParams,
|
|
22
20
|
ResourceGroupsListOptionalParams,
|
|
23
|
-
ResourceGroupsListNextNextOptionalParams,
|
|
24
21
|
ResourceGroupsCheckExistenceOptionalParams,
|
|
25
22
|
ResourceGroupsCheckExistenceResponse,
|
|
26
23
|
ResourceGroupsCreateOrUpdateOptionalParams,
|
|
@@ -35,20 +32,19 @@ import {
|
|
|
35
32
|
ResourceGroupsExportTemplateOptionalParams,
|
|
36
33
|
ResourceGroupsExportTemplateResponse,
|
|
37
34
|
ResourceGroupsListResponse,
|
|
38
|
-
ResourceGroupsListNextResponse
|
|
39
|
-
ResourceGroupsListNextNextResponse
|
|
35
|
+
ResourceGroupsListNextResponse
|
|
40
36
|
} from "../models";
|
|
41
37
|
|
|
42
38
|
/// <reference lib="esnext.asynciterable" />
|
|
43
|
-
/** Class
|
|
39
|
+
/** Class containing ResourceGroups operations. */
|
|
44
40
|
export class ResourceGroupsImpl implements ResourceGroups {
|
|
45
|
-
private readonly client:
|
|
41
|
+
private readonly client: ResourceManagementClient;
|
|
46
42
|
|
|
47
43
|
/**
|
|
48
44
|
* Initialize a new instance of the class ResourceGroups class.
|
|
49
45
|
* @param client Reference to the service client
|
|
50
46
|
*/
|
|
51
|
-
constructor(client:
|
|
47
|
+
constructor(client: ResourceManagementClient) {
|
|
52
48
|
this.client = client;
|
|
53
49
|
}
|
|
54
50
|
|
|
@@ -94,52 +90,6 @@ export class ResourceGroupsImpl implements ResourceGroups {
|
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
92
|
|
|
97
|
-
/**
|
|
98
|
-
* ListNext
|
|
99
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
100
|
-
* @param options The options parameters.
|
|
101
|
-
*/
|
|
102
|
-
public listNext(
|
|
103
|
-
nextLink: string,
|
|
104
|
-
options?: ResourceGroupsListNextOptionalParams
|
|
105
|
-
): PagedAsyncIterableIterator<ResourceGroup> {
|
|
106
|
-
const iter = this.listNextPagingAll(nextLink, options);
|
|
107
|
-
return {
|
|
108
|
-
next() {
|
|
109
|
-
return iter.next();
|
|
110
|
-
},
|
|
111
|
-
[Symbol.asyncIterator]() {
|
|
112
|
-
return this;
|
|
113
|
-
},
|
|
114
|
-
byPage: () => {
|
|
115
|
-
return this.listNextPagingPage(nextLink, options);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
private async *listNextPagingPage(
|
|
121
|
-
nextLink: string,
|
|
122
|
-
options?: ResourceGroupsListNextOptionalParams
|
|
123
|
-
): AsyncIterableIterator<ResourceGroup[]> {
|
|
124
|
-
let result = await this._listNext(nextLink, options);
|
|
125
|
-
yield result.value || [];
|
|
126
|
-
let continuationToken = result.nextLink;
|
|
127
|
-
while (continuationToken) {
|
|
128
|
-
result = await this._listNextNext(continuationToken, options);
|
|
129
|
-
continuationToken = result.nextLink;
|
|
130
|
-
yield result.value || [];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
private async *listNextPagingAll(
|
|
135
|
-
nextLink: string,
|
|
136
|
-
options?: ResourceGroupsListNextOptionalParams
|
|
137
|
-
): AsyncIterableIterator<ResourceGroup> {
|
|
138
|
-
for await (const page of this.listNextPagingPage(nextLink, options)) {
|
|
139
|
-
yield* page;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
93
|
/**
|
|
144
94
|
* Checks whether a resource group exists.
|
|
145
95
|
* @param resourceGroupName The name of the resource group to check. The name is case insensitive.
|
|
@@ -223,12 +173,15 @@ export class ResourceGroupsImpl implements ResourceGroups {
|
|
|
223
173
|
};
|
|
224
174
|
};
|
|
225
175
|
|
|
226
|
-
const lro = new
|
|
176
|
+
const lro = new LroImpl(
|
|
227
177
|
sendOperation,
|
|
228
178
|
{ resourceGroupName, options },
|
|
229
179
|
deleteOperationSpec
|
|
230
180
|
);
|
|
231
|
-
return new LroEngine(lro, {
|
|
181
|
+
return new LroEngine(lro, {
|
|
182
|
+
resumeFrom: options?.resumeFrom,
|
|
183
|
+
intervalInMs: options?.updateIntervalInMs
|
|
184
|
+
});
|
|
232
185
|
}
|
|
233
186
|
|
|
234
187
|
/**
|
|
@@ -334,13 +287,16 @@ export class ResourceGroupsImpl implements ResourceGroups {
|
|
|
334
287
|
};
|
|
335
288
|
};
|
|
336
289
|
|
|
337
|
-
const lro = new
|
|
290
|
+
const lro = new LroImpl(
|
|
338
291
|
sendOperation,
|
|
339
292
|
{ resourceGroupName, parameters, options },
|
|
340
|
-
exportTemplateOperationSpec
|
|
341
|
-
"location"
|
|
293
|
+
exportTemplateOperationSpec
|
|
342
294
|
);
|
|
343
|
-
return new LroEngine(lro, {
|
|
295
|
+
return new LroEngine(lro, {
|
|
296
|
+
resumeFrom: options?.resumeFrom,
|
|
297
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
298
|
+
lroResourceLocationConfig: "location"
|
|
299
|
+
});
|
|
344
300
|
}
|
|
345
301
|
|
|
346
302
|
/**
|
|
@@ -386,21 +342,6 @@ export class ResourceGroupsImpl implements ResourceGroups {
|
|
|
386
342
|
listNextOperationSpec
|
|
387
343
|
);
|
|
388
344
|
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* ListNextNext
|
|
392
|
-
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
|
393
|
-
* @param options The options parameters.
|
|
394
|
-
*/
|
|
395
|
-
private _listNextNext(
|
|
396
|
-
nextLink: string,
|
|
397
|
-
options?: ResourceGroupsListNextNextOptionalParams
|
|
398
|
-
): Promise<ResourceGroupsListNextNextResponse> {
|
|
399
|
-
return this.client.sendOperationRequest(
|
|
400
|
-
{ nextLink, options },
|
|
401
|
-
listNextNextOperationSpec
|
|
402
|
-
);
|
|
403
|
-
}
|
|
404
345
|
}
|
|
405
346
|
// Operation Specifications
|
|
406
347
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -580,23 +521,3 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
580
521
|
headerParameters: [Parameters.accept],
|
|
581
522
|
serializer
|
|
582
523
|
};
|
|
583
|
-
const listNextNextOperationSpec: coreClient.OperationSpec = {
|
|
584
|
-
path: "{nextLink}",
|
|
585
|
-
httpMethod: "GET",
|
|
586
|
-
responses: {
|
|
587
|
-
200: {
|
|
588
|
-
bodyMapper: Mappers.ResourceGroupListResult
|
|
589
|
-
},
|
|
590
|
-
default: {
|
|
591
|
-
bodyMapper: Mappers.CloudError
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
|
-
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
|
|
595
|
-
urlParameters: [
|
|
596
|
-
Parameters.$host,
|
|
597
|
-
Parameters.nextLink,
|
|
598
|
-
Parameters.subscriptionId
|
|
599
|
-
],
|
|
600
|
-
headerParameters: [Parameters.accept],
|
|
601
|
-
serializer
|
|
602
|
-
};
|