Skip to content

Commit cad24be

Browse files
author
SDKAuto
committed
CodeGen from PR 18996 in Azure/azure-rest-api-specs
Merge 2a781ad77e4b5072d3c6a1f5ba5462f9539fb989 into ac286e05bedd69d301e1dc94ec70f66e8536686b
1 parent 427f8e6 commit cad24be

File tree

10 files changed

+1343
-960
lines changed

10 files changed

+1343
-960
lines changed

sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# Release History
2-
3-
## 1.0.0-beta.4 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
2+
3+
## 1.0.0-beta.4 (2022-05-11)
4+
5+
**Features**
6+
7+
- Added Interface AgentUpdatePatchProperties
8+
- Added Interface AgentUpdateProperties
9+
- Added Interface MaintenanceWindowPatchProperties
10+
- Added Interface MaintenanceWindowProperties
11+
- Added Type Alias DayOfWeek
12+
- Added Type Alias HostpoolPublicNetworkAccess
13+
- Added Type Alias SessionHostComponentUpdateType
14+
- Type Alias HostPool has a new parameter agentUpdate
15+
- Type Alias HostPool has a new parameter privateEndpointConnections
16+
- Type Alias HostPoolPatch has a new parameter agentUpdate
17+
- Type Alias SessionHost has a new parameter friendlyName
18+
- Type Alias SessionHostPatch has a new parameter friendlyName
19+
- Type Alias Workspace has a new parameter privateEndpointConnections
20+
- Added Enum KnownHostpoolPublicNetworkAccess
21+
- Added Enum KnownSessionHostComponentUpdateType
22+
1323
## 1.0.0-beta.3 (2022-04-18)
1424

1525
**features**
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "c77c6c634dc3644d65d3e35df5d73a9c34d3c956",
3-
"readme": "specification\\desktopvirtualization\\resource-manager\\readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\desktopvirtualization\\resource-manager\\readme.md --use=@autorest/[email protected].20220408.1 --generate-sample=true",
2+
"commit": "e1f482ee1873ca7c545c7ddf0fd7a7beeb4a597c",
3+
"readme": "specification/desktopvirtualization/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/desktopvirtualization/resource-manager/readme.md --use=@autorest/[email protected].20220425.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
7-
"use": "@autorest/[email protected].20220408.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7+
"use": "@autorest/[email protected].20220425.1"
88
}

sdk/desktopvirtualization/arm-desktopvirtualization/package.json

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@
3838
"uglify-js": "^3.4.9",
3939
"rimraf": "^3.0.0",
4040
"@azure/identity": "^2.0.1",
41-
"@azure-tools/test-recorder": "^1.0.0",
41+
"@azure-tools/test-recorder": "^2.0.0",
42+
"@azure-tools/test-credential": "^1.0.0",
4243
"mocha": "^7.1.1",
43-
"cross-env": "^7.0.2"
44+
"cross-env": "^7.0.2",
45+
"@azure/dev-tool": "^1.0.0"
4446
},
4547
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization",
4648
"repository": {
@@ -91,7 +93,7 @@
9193
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9294
"unit-test:browser": "echo skipped",
9395
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
94-
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
96+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
9597
"integration-test:browser": "echo skipped",
9698
"docs": "echo skipped"
9799
},
@@ -104,13 +106,5 @@
104106
}
105107
]
106108
},
107-
"autoPublish": true,
108-
"//sampleConfiguration": {
109-
"productName": "",
110-
"productSlugs": [
111-
"azure"
112-
],
113-
"disableDocsMs": true,
114-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview"
115-
}
116-
}
109+
"autoPublish": true
110+
}

sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ import * as coreAuth from '@azure/core-auth';
88
import * as coreClient from '@azure/core-client';
99
import { PagedAsyncIterableIterator } from '@azure/core-paging';
1010

11+
// @public
12+
export interface AgentUpdatePatchProperties {
13+
maintenanceWindows?: MaintenanceWindowPatchProperties[];
14+
maintenanceWindowTimeZone?: string;
15+
type?: SessionHostComponentUpdateType;
16+
useSessionHostLocalTime?: boolean;
17+
}
18+
19+
// @public
20+
export interface AgentUpdateProperties {
21+
maintenanceWindows?: MaintenanceWindowProperties[];
22+
maintenanceWindowTimeZone?: string;
23+
type?: SessionHostComponentUpdateType;
24+
useSessionHostLocalTime?: boolean;
25+
}
26+
1127
// @public
1228
export type Application = Resource & {
1329
readonly systemData?: SystemData;
@@ -219,6 +235,9 @@ export type CommandLineSetting = string;
219235
// @public
220236
export type CreatedByType = string;
221237

238+
// @public
239+
export type DayOfWeek = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday";
240+
222241
// @public
223242
export type Desktop = Resource & {
224243
readonly systemData?: SystemData;
@@ -379,7 +398,9 @@ export type HostPool = ResourceModelWithAllowedPropertySet & {
379398
startVMOnConnect?: boolean;
380399
migrationRequest?: MigrationRequestProperties;
381400
readonly cloudPcResource?: boolean;
382-
publicNetworkAccess?: PublicNetworkAccess;
401+
publicNetworkAccess?: HostpoolPublicNetworkAccess;
402+
agentUpdate?: AgentUpdateProperties;
403+
readonly privateEndpointConnections?: PrivateEndpointConnection[];
383404
};
384405

385406
// @public
@@ -409,9 +430,13 @@ export type HostPoolPatch = Resource & {
409430
ssoSecretType?: SSOSecretType;
410431
preferredAppGroupType?: PreferredAppGroupType;
411432
startVMOnConnect?: boolean;
412-
publicNetworkAccess?: PublicNetworkAccess;
433+
publicNetworkAccess?: HostpoolPublicNetworkAccess;
434+
agentUpdate?: AgentUpdatePatchProperties;
413435
};
414436

437+
// @public
438+
export type HostpoolPublicNetworkAccess = string;
439+
415440
// @public
416441
export interface HostPools {
417442
createOrUpdate(resourceGroupName: string, hostPoolName: string, hostPool: HostPool, options?: HostPoolsCreateOrUpdateOptionalParams): Promise<HostPoolsCreateOrUpdateResponse>;
@@ -556,6 +581,18 @@ export enum KnownHealthCheckResult {
556581
Unknown = "Unknown"
557582
}
558583

584+
// @public
585+
export enum KnownHostpoolPublicNetworkAccess {
586+
// (undocumented)
587+
Disabled = "Disabled",
588+
// (undocumented)
589+
Enabled = "Enabled",
590+
// (undocumented)
591+
EnabledForClientsOnly = "EnabledForClientsOnly",
592+
// (undocumented)
593+
EnabledForSessionHostsOnly = "EnabledForSessionHostsOnly"
594+
}
595+
559596
// @public
560597
export enum KnownHostPoolType {
561598
BYODesktop = "BYODesktop",
@@ -671,6 +708,12 @@ export enum KnownScalingScheduleDaysOfWeekItem {
671708
Wednesday = "Wednesday"
672709
}
673710

711+
// @public
712+
export enum KnownSessionHostComponentUpdateType {
713+
Default = "Default",
714+
Scheduled = "Scheduled"
715+
}
716+
674717
// @public
675718
export enum KnownSessionHostLoadBalancingAlgorithm {
676719
// (undocumented)
@@ -755,6 +798,18 @@ export interface LogSpecification {
755798
name?: string;
756799
}
757800

801+
// @public
802+
export interface MaintenanceWindowPatchProperties {
803+
dayOfWeek?: DayOfWeek;
804+
hour?: number;
805+
}
806+
807+
// @public
808+
export interface MaintenanceWindowProperties {
809+
dayOfWeek?: DayOfWeek;
810+
hour?: number;
811+
}
812+
758813
// @public
759814
export interface MigrationRequestProperties {
760815
migrationPath?: string;
@@ -1329,6 +1384,7 @@ export type SessionHost = Resource & {
13291384
readonly virtualMachineId?: string;
13301385
readonly resourceId?: string;
13311386
assignedUser?: string;
1387+
friendlyName?: string;
13321388
status?: Status;
13331389
readonly statusTimestamp?: Date;
13341390
osVersion?: string;
@@ -1339,6 +1395,9 @@ export type SessionHost = Resource & {
13391395
readonly sessionHostHealthCheckResults?: SessionHostHealthCheckReport[];
13401396
};
13411397

1398+
// @public
1399+
export type SessionHostComponentUpdateType = string;
1400+
13421401
// @public
13431402
export interface SessionHostHealthCheckFailureDetails {
13441403
readonly errorCode?: number;
@@ -1366,6 +1425,7 @@ export type SessionHostLoadBalancingAlgorithm = string;
13661425
export type SessionHostPatch = Resource & {
13671426
allowNewSession?: boolean;
13681427
assignedUser?: string;
1428+
friendlyName?: string;
13691429
};
13701430

13711431
// @public
@@ -1575,6 +1635,7 @@ export type Workspace = ResourceModelWithAllowedPropertySet & {
15751635
applicationGroupReferences?: string[];
15761636
readonly cloudPcResource?: boolean;
15771637
publicNetworkAccess?: PublicNetworkAccess;
1638+
readonly privateEndpointConnections?: PrivateEndpointConnection[];
15781639
};
15791640

15801641
// @public

sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
import * as coreClient from "@azure/core-client";
1010
import * as coreRestPipeline from "@azure/core-rest-pipeline";
11+
import {
12+
PipelineRequest,
13+
PipelineResponse,
14+
SendRequest
15+
} from "@azure/core-rest-pipeline";
1116
import * as coreAuth from "@azure/core-auth";
1217
import {
1318
OperationsImpl,
@@ -122,7 +127,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {
122127

123128
// Assigning values to Constant parameters
124129
this.$host = options.$host || "https://management.azure.com";
125-
this.apiVersion = options.apiVersion || "2021-09-03-preview";
130+
this.apiVersion = options.apiVersion || "2022-02-10-preview";
126131
this.operations = new OperationsImpl(this);
127132
this.workspaces = new WorkspacesImpl(this);
128133
this.scalingPlans = new ScalingPlansImpl(this);
@@ -137,6 +142,35 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient {
137142
this.msixImages = new MsixImagesImpl(this);
138143
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
139144
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
145+
this.addCustomApiVersionPolicy(options.apiVersion);
146+
}
147+
148+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
149+
private addCustomApiVersionPolicy(apiVersion?: string) {
150+
if (!apiVersion) {
151+
return;
152+
}
153+
const apiVersionPolicy = {
154+
name: "CustomApiVersionPolicy",
155+
async sendRequest(
156+
request: PipelineRequest,
157+
next: SendRequest
158+
): Promise<PipelineResponse> {
159+
const param = request.url.split("?");
160+
if (param.length > 1) {
161+
const newParams = param[1].split("&").map((item) => {
162+
if (item.indexOf("api-version") > -1) {
163+
return item.replace(/(?<==).*$/, apiVersion);
164+
} else {
165+
return item;
166+
}
167+
});
168+
request.url = param[0] + "?" + newParams.join("&");
169+
}
170+
return next(request);
171+
}
172+
};
173+
this.pipeline.addPolicy(apiVersionPolicy);
140174
}
141175

142176
operations: Operations;

0 commit comments

Comments
 (0)