@azure/arm-desktopvirtualization 1.0.0-beta.3 → 1.0.0-beta.4
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 +26 -0
- package/README.md +1 -1
- package/dist/index.js +537 -173
- 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/samples-dev/msixPackagesCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/msixPackagesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/src/desktopVirtualizationAPIClient.d.ts +2 -0
- package/dist-esm/src/desktopVirtualizationAPIClient.d.ts.map +1 -1
- package/dist-esm/src/desktopVirtualizationAPIClient.js +49 -18
- package/dist-esm/src/desktopVirtualizationAPIClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +101 -39
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +59 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/applicationGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/applicationGroups.js +37 -14
- package/dist-esm/src/operations/applicationGroups.js.map +1 -1
- package/dist-esm/src/operations/applications.d.ts.map +1 -1
- package/dist-esm/src/operations/applications.js +19 -7
- package/dist-esm/src/operations/applications.js.map +1 -1
- package/dist-esm/src/operations/desktops.d.ts.map +1 -1
- package/dist-esm/src/operations/desktops.js +19 -7
- package/dist-esm/src/operations/desktops.js.map +1 -1
- package/dist-esm/src/operations/hostPools.d.ts.map +1 -1
- package/dist-esm/src/operations/hostPools.js +37 -14
- package/dist-esm/src/operations/hostPools.js.map +1 -1
- package/dist-esm/src/operations/msixImages.d.ts.map +1 -1
- package/dist-esm/src/operations/msixImages.js +19 -7
- package/dist-esm/src/operations/msixImages.js.map +1 -1
- package/dist-esm/src/operations/msixPackages.d.ts.map +1 -1
- package/dist-esm/src/operations/msixPackages.js +19 -7
- package/dist-esm/src/operations/msixPackages.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -7
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +37 -14
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.js +37 -14
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/scalingPlans.d.ts.map +1 -1
- package/dist-esm/src/operations/scalingPlans.js +55 -21
- package/dist-esm/src/operations/scalingPlans.js.map +1 -1
- package/dist-esm/src/operations/sessionHosts.d.ts.map +1 -1
- package/dist-esm/src/operations/sessionHosts.js +19 -7
- package/dist-esm/src/operations/sessionHosts.js.map +1 -1
- package/dist-esm/src/operations/startMenuItems.d.ts.map +1 -1
- package/dist-esm/src/operations/startMenuItems.js +19 -7
- package/dist-esm/src/operations/startMenuItems.js.map +1 -1
- package/dist-esm/src/operations/userSessions.d.ts.map +1 -1
- package/dist-esm/src/operations/userSessions.js +37 -14
- package/dist-esm/src/operations/userSessions.js.map +1 -1
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaces.js +37 -14
- package/dist-esm/src/operations/workspaces.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +15 -11
- package/review/arm-desktopvirtualization.api.md +134 -187
- package/src/desktopVirtualizationAPIClient.ts +60 -20
- package/src/index.ts +1 -0
- package/src/models/index.ts +99 -39
- package/src/operations/applicationGroups.ts +46 -17
- package/src/operations/applications.ts +27 -13
- package/src/operations/desktops.ts +27 -13
- package/src/operations/hostPools.ts +46 -17
- package/src/operations/msixImages.ts +27 -13
- package/src/operations/msixPackages.ts +27 -9
- package/src/operations/operations.ts +21 -8
- package/src/operations/privateEndpointConnections.ts +52 -25
- package/src/operations/privateLinkResources.ts +51 -24
- package/src/operations/scalingPlans.ts +71 -29
- package/src/operations/sessionHosts.ts +27 -9
- package/src/operations/startMenuItems.ts +26 -12
- package/src/operations/userSessions.ts +53 -26
- package/src/operations/workspaces.ts +46 -17
- package/src/pagingHelper.ts +39 -0
- package/types/arm-desktopvirtualization.d.ts +112 -39
- package/types/tsdoc-metadata.json +1 -1
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { UserSessions } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,13 +17,13 @@ import {
|
|
|
16
17
|
UserSession,
|
|
17
18
|
UserSessionsListByHostPoolNextOptionalParams,
|
|
18
19
|
UserSessionsListByHostPoolOptionalParams,
|
|
20
|
+
UserSessionsListByHostPoolResponse,
|
|
19
21
|
UserSessionsListNextOptionalParams,
|
|
20
22
|
UserSessionsListOptionalParams,
|
|
21
|
-
|
|
23
|
+
UserSessionsListResponse,
|
|
22
24
|
UserSessionsGetOptionalParams,
|
|
23
25
|
UserSessionsGetResponse,
|
|
24
26
|
UserSessionsDeleteOptionalParams,
|
|
25
|
-
UserSessionsListResponse,
|
|
26
27
|
UserSessionsDisconnectOptionalParams,
|
|
27
28
|
UserSessionsSendMessageOptionalParams,
|
|
28
29
|
UserSessionsListByHostPoolNextResponse,
|
|
@@ -65,11 +66,15 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
65
66
|
[Symbol.asyncIterator]() {
|
|
66
67
|
return this;
|
|
67
68
|
},
|
|
68
|
-
byPage: () => {
|
|
69
|
+
byPage: (settings?: PageSettings) => {
|
|
70
|
+
if (settings?.maxPageSize) {
|
|
71
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
72
|
+
}
|
|
69
73
|
return this.listByHostPoolPagingPage(
|
|
70
74
|
resourceGroupName,
|
|
71
75
|
hostPoolName,
|
|
72
|
-
options
|
|
76
|
+
options,
|
|
77
|
+
settings
|
|
73
78
|
);
|
|
74
79
|
}
|
|
75
80
|
};
|
|
@@ -78,15 +83,22 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
78
83
|
private async *listByHostPoolPagingPage(
|
|
79
84
|
resourceGroupName: string,
|
|
80
85
|
hostPoolName: string,
|
|
81
|
-
options?: UserSessionsListByHostPoolOptionalParams
|
|
86
|
+
options?: UserSessionsListByHostPoolOptionalParams,
|
|
87
|
+
settings?: PageSettings
|
|
82
88
|
): AsyncIterableIterator<UserSession[]> {
|
|
83
|
-
let result
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
let result: UserSessionsListByHostPoolResponse;
|
|
90
|
+
let continuationToken = settings?.continuationToken;
|
|
91
|
+
if (!continuationToken) {
|
|
92
|
+
result = await this._listByHostPool(
|
|
93
|
+
resourceGroupName,
|
|
94
|
+
hostPoolName,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
let page = result.value || [];
|
|
98
|
+
continuationToken = result.nextLink;
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
101
|
+
}
|
|
90
102
|
while (continuationToken) {
|
|
91
103
|
result = await this._listByHostPoolNext(
|
|
92
104
|
resourceGroupName,
|
|
@@ -95,7 +107,9 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
95
107
|
options
|
|
96
108
|
);
|
|
97
109
|
continuationToken = result.nextLink;
|
|
98
|
-
|
|
110
|
+
let page = result.value || [];
|
|
111
|
+
setContinuationToken(page, continuationToken);
|
|
112
|
+
yield page;
|
|
99
113
|
}
|
|
100
114
|
}
|
|
101
115
|
|
|
@@ -139,12 +153,16 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
139
153
|
[Symbol.asyncIterator]() {
|
|
140
154
|
return this;
|
|
141
155
|
},
|
|
142
|
-
byPage: () => {
|
|
156
|
+
byPage: (settings?: PageSettings) => {
|
|
157
|
+
if (settings?.maxPageSize) {
|
|
158
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
159
|
+
}
|
|
143
160
|
return this.listPagingPage(
|
|
144
161
|
resourceGroupName,
|
|
145
162
|
hostPoolName,
|
|
146
163
|
sessionHostName,
|
|
147
|
-
options
|
|
164
|
+
options,
|
|
165
|
+
settings
|
|
148
166
|
);
|
|
149
167
|
}
|
|
150
168
|
};
|
|
@@ -154,16 +172,23 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
154
172
|
resourceGroupName: string,
|
|
155
173
|
hostPoolName: string,
|
|
156
174
|
sessionHostName: string,
|
|
157
|
-
options?: UserSessionsListOptionalParams
|
|
175
|
+
options?: UserSessionsListOptionalParams,
|
|
176
|
+
settings?: PageSettings
|
|
158
177
|
): AsyncIterableIterator<UserSession[]> {
|
|
159
|
-
let result
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
let result: UserSessionsListResponse;
|
|
179
|
+
let continuationToken = settings?.continuationToken;
|
|
180
|
+
if (!continuationToken) {
|
|
181
|
+
result = await this._list(
|
|
182
|
+
resourceGroupName,
|
|
183
|
+
hostPoolName,
|
|
184
|
+
sessionHostName,
|
|
185
|
+
options
|
|
186
|
+
);
|
|
187
|
+
let page = result.value || [];
|
|
188
|
+
continuationToken = result.nextLink;
|
|
189
|
+
setContinuationToken(page, continuationToken);
|
|
190
|
+
yield page;
|
|
191
|
+
}
|
|
167
192
|
while (continuationToken) {
|
|
168
193
|
result = await this._listNext(
|
|
169
194
|
resourceGroupName,
|
|
@@ -173,7 +198,9 @@ export class UserSessionsImpl implements UserSessions {
|
|
|
173
198
|
options
|
|
174
199
|
);
|
|
175
200
|
continuationToken = result.nextLink;
|
|
176
|
-
|
|
201
|
+
let page = result.value || [];
|
|
202
|
+
setContinuationToken(page, continuationToken);
|
|
203
|
+
yield page;
|
|
177
204
|
}
|
|
178
205
|
}
|
|
179
206
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Workspaces } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,8 +17,10 @@ import {
|
|
|
16
17
|
Workspace,
|
|
17
18
|
WorkspacesListByResourceGroupNextOptionalParams,
|
|
18
19
|
WorkspacesListByResourceGroupOptionalParams,
|
|
20
|
+
WorkspacesListByResourceGroupResponse,
|
|
19
21
|
WorkspacesListBySubscriptionNextOptionalParams,
|
|
20
22
|
WorkspacesListBySubscriptionOptionalParams,
|
|
23
|
+
WorkspacesListBySubscriptionResponse,
|
|
21
24
|
WorkspacesGetOptionalParams,
|
|
22
25
|
WorkspacesGetResponse,
|
|
23
26
|
WorkspacesCreateOrUpdateOptionalParams,
|
|
@@ -25,8 +28,6 @@ import {
|
|
|
25
28
|
WorkspacesDeleteOptionalParams,
|
|
26
29
|
WorkspacesUpdateOptionalParams,
|
|
27
30
|
WorkspacesUpdateResponse,
|
|
28
|
-
WorkspacesListByResourceGroupResponse,
|
|
29
|
-
WorkspacesListBySubscriptionResponse,
|
|
30
31
|
WorkspacesListByResourceGroupNextResponse,
|
|
31
32
|
WorkspacesListBySubscriptionNextResponse
|
|
32
33
|
} from "../models";
|
|
@@ -61,19 +62,33 @@ export class WorkspacesImpl implements Workspaces {
|
|
|
61
62
|
[Symbol.asyncIterator]() {
|
|
62
63
|
return this;
|
|
63
64
|
},
|
|
64
|
-
byPage: () => {
|
|
65
|
-
|
|
65
|
+
byPage: (settings?: PageSettings) => {
|
|
66
|
+
if (settings?.maxPageSize) {
|
|
67
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
68
|
+
}
|
|
69
|
+
return this.listByResourceGroupPagingPage(
|
|
70
|
+
resourceGroupName,
|
|
71
|
+
options,
|
|
72
|
+
settings
|
|
73
|
+
);
|
|
66
74
|
}
|
|
67
75
|
};
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
private async *listByResourceGroupPagingPage(
|
|
71
79
|
resourceGroupName: string,
|
|
72
|
-
options?: WorkspacesListByResourceGroupOptionalParams
|
|
80
|
+
options?: WorkspacesListByResourceGroupOptionalParams,
|
|
81
|
+
settings?: PageSettings
|
|
73
82
|
): AsyncIterableIterator<Workspace[]> {
|
|
74
|
-
let result
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
let result: WorkspacesListByResourceGroupResponse;
|
|
84
|
+
let continuationToken = settings?.continuationToken;
|
|
85
|
+
if (!continuationToken) {
|
|
86
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
87
|
+
let page = result.value || [];
|
|
88
|
+
continuationToken = result.nextLink;
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
91
|
+
}
|
|
77
92
|
while (continuationToken) {
|
|
78
93
|
result = await this._listByResourceGroupNext(
|
|
79
94
|
resourceGroupName,
|
|
@@ -81,7 +96,9 @@ export class WorkspacesImpl implements Workspaces {
|
|
|
81
96
|
options
|
|
82
97
|
);
|
|
83
98
|
continuationToken = result.nextLink;
|
|
84
|
-
|
|
99
|
+
let page = result.value || [];
|
|
100
|
+
setContinuationToken(page, continuationToken);
|
|
101
|
+
yield page;
|
|
85
102
|
}
|
|
86
103
|
}
|
|
87
104
|
|
|
@@ -112,22 +129,34 @@ export class WorkspacesImpl implements Workspaces {
|
|
|
112
129
|
[Symbol.asyncIterator]() {
|
|
113
130
|
return this;
|
|
114
131
|
},
|
|
115
|
-
byPage: () => {
|
|
116
|
-
|
|
132
|
+
byPage: (settings?: PageSettings) => {
|
|
133
|
+
if (settings?.maxPageSize) {
|
|
134
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
135
|
+
}
|
|
136
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
117
137
|
}
|
|
118
138
|
};
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
private async *listBySubscriptionPagingPage(
|
|
122
|
-
options?: WorkspacesListBySubscriptionOptionalParams
|
|
142
|
+
options?: WorkspacesListBySubscriptionOptionalParams,
|
|
143
|
+
settings?: PageSettings
|
|
123
144
|
): AsyncIterableIterator<Workspace[]> {
|
|
124
|
-
let result
|
|
125
|
-
|
|
126
|
-
|
|
145
|
+
let result: WorkspacesListBySubscriptionResponse;
|
|
146
|
+
let continuationToken = settings?.continuationToken;
|
|
147
|
+
if (!continuationToken) {
|
|
148
|
+
result = await this._listBySubscription(options);
|
|
149
|
+
let page = result.value || [];
|
|
150
|
+
continuationToken = result.nextLink;
|
|
151
|
+
setContinuationToken(page, continuationToken);
|
|
152
|
+
yield page;
|
|
153
|
+
}
|
|
127
154
|
while (continuationToken) {
|
|
128
155
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
129
156
|
continuationToken = result.nextLink;
|
|
130
|
-
|
|
157
|
+
let page = result.value || [];
|
|
158
|
+
setContinuationToken(page, continuationToken);
|
|
159
|
+
yield page;
|
|
131
160
|
}
|
|
132
161
|
}
|
|
133
162
|
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
export interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given a result page from a pageable operation, returns a
|
|
17
|
+
* continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage().
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|