From 9c8db335cc673f7e4977796775c8f0d3a74c706b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 27 Nov 2023 19:08:05 +0000 Subject: [PATCH] CodeGen from PR 26606 in Azure/azure-rest-api-specs Merge fa1d740925035b24ca0726c0a828fef7d313c42a into 12de39b01089f0de0a46d93081d3361712ff1164 --- common/config/rush/pnpm-lock.yaml | 4 +- .../arm-desktopvirtualization/CHANGELOG.md | 182 +- .../arm-desktopvirtualization/README.md | 2 +- .../arm-desktopvirtualization/_meta.json | 8 +- .../arm-desktopvirtualization/package.json | 20 +- .../review/arm-desktopvirtualization.api.md | 954 +++++++ .../src/desktopVirtualizationAPIClient.ts | 58 +- .../arm-desktopvirtualization/src/lroImpl.ts | 42 + .../src/models/index.ts | 1349 ++++++++++ .../src/models/mappers.ts | 2396 ++++++++++++++++- .../src/models/parameters.ts | 155 +- .../activeSessionHostConfigurations.ts | 245 ++ .../src/operations/appAttachPackageInfo.ts | 225 ++ .../operations/appAttachPackageOperations.ts | 475 ++++ .../operations/controlSessionHostUpdate.ts | 174 ++ .../src/operations/index.ts | 11 + .../operations/initiateSessionHostUpdate.ts | 164 ++ .../operations/sessionHostConfigurations.ts | 520 ++++ ...essionHostConfigurationsOperationStatus.ts | 243 ++ .../src/operations/sessionHostManagements.ts | 334 +++ .../sessionHostManagementsOperationStatus.ts | 247 ++ .../src/operations/sessionHostOperations.ts | 70 + .../operations/validateSessionHostUpdate.ts | 166 ++ .../activeSessionHostConfigurations.ts | 43 + .../appAttachPackageInfo.ts | 32 + .../appAttachPackageOperations.ts | 88 + .../controlSessionHostUpdate.ts | 49 + .../src/operationsInterfaces/index.ts | 11 + .../initiateSessionHostUpdate.ts | 44 + .../sessionHostConfigurations.ts | 105 + ...essionHostConfigurationsOperationStatus.ts | 44 + .../sessionHostManagements.ts | 70 + .../sessionHostManagementsOperationStatus.ts | 44 + .../sessionHostOperations.ts | 26 + .../validateSessionHostUpdate.ts | 46 + .../test/sampleTest.ts | 43 + .../arm-desktopvirtualization/tsconfig.json | 10 +- 37 files changed, 8515 insertions(+), 184 deletions(-) create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/lroImpl.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/activeSessionHostConfigurations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/controlSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/initiateSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurationsOperationStatus.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagements.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagementsOperationStatus.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/validateSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/activeSessionHostConfigurations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/controlSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/initiateSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurationsOperationStatus.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagements.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagementsOperationStatus.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostOperations.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/validateSessionHostUpdate.ts create mode 100644 sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ba6d29104882..ca1b95be3343 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12129,17 +12129,19 @@ packages: dev: false file:projects/arm-desktopvirtualization.tgz: - resolution: {integrity: sha512-PCPedV/PuxGgESNuEKTPdRHDon5WHZknD/yPvCGIuDFraL8VXe+vgjABNurZzfpYjqPbDLYoS1ollsEk3jug4g==, tarball: file:projects/arm-desktopvirtualization.tgz} + resolution: {integrity: sha512-gnQuzNS4KxnpL9SZJENbRpBSUJYuUjmf0KaU5NK8bppo6eENbMLV+EDxr6+L4WQ6zcOvxmnAsTwlZ7M66Gb8aQ==, tarball: file:projects/arm-desktopvirtualization.tgz} name: '@rush-temp/arm-desktopvirtualization' version: 0.0.0 dependencies: '@azure/identity': 3.4.1 '@microsoft/api-extractor': 7.38.3(@types/node@18.18.13) '@types/chai': 4.3.11 + '@types/mocha': 10.0.6 '@types/node': 18.18.13 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 + esm: 3.2.25 mkdirp: 2.1.6 mocha: 10.2.0 rimraf: 5.0.5 diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md index 0c6f22b14641..c83087c66049 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/CHANGELOG.md @@ -1,15 +1,177 @@ # Release History + +## 1.2.0-beta.1 (2023-11-27) + +**Features** -## 1.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group ActiveSessionHostConfigurations + - Added operation group AppAttachPackageInfo + - Added operation group AppAttachPackageOperations + - Added operation group ControlSessionHostUpdate + - Added operation group InitiateSessionHostUpdate + - Added operation group SessionHostConfigurations + - Added operation group SessionHostConfigurationsOperationStatus + - Added operation group SessionHostManagements + - Added operation group SessionHostManagementsOperationStatus + - Added operation group SessionHostOperations + - Added operation group ValidateSessionHostUpdate + - Added Interface ActiveDirectoryInfoPatchProperties + - Added Interface ActiveDirectoryInfoProperties + - Added Interface ActiveSessionHostConfiguration + - Added Interface ActiveSessionHostConfigurationList + - Added Interface ActiveSessionHostConfigurationsGetOptionalParams + - Added Interface ActiveSessionHostConfigurationsListByHostPoolNextOptionalParams + - Added Interface ActiveSessionHostConfigurationsListByHostPoolOptionalParams + - Added Interface AppAttachPackage + - Added Interface AppAttachPackageCreateOrUpdateOptionalParams + - Added Interface AppAttachPackageDeleteOptionalParams + - Added Interface AppAttachPackageGetOptionalParams + - Added Interface AppAttachPackageInfoImportNextOptionalParams + - Added Interface AppAttachPackageInfoImportOptionalParams + - Added Interface AppAttachPackageInfoProperties + - Added Interface AppAttachPackageList + - Added Interface AppAttachPackageListByResourceGroupNextOptionalParams + - Added Interface AppAttachPackageListByResourceGroupOptionalParams + - Added Interface AppAttachPackageListBySubscriptionNextOptionalParams + - Added Interface AppAttachPackageListBySubscriptionOptionalParams + - Added Interface AppAttachPackagePatch + - Added Interface AppAttachPackagePatchProperties + - Added Interface AppAttachPackageProperties + - Added Interface AppAttachPackageUpdateOptionalParams + - Added Interface AzureActiveDirectoryInfoProperties + - Added Interface BootDiagnosticsInfoPatchProperties + - Added Interface BootDiagnosticsInfoProperties + - Added Interface ControlSessionHostUpdatePostHeaders + - Added Interface ControlSessionHostUpdatePostOptionalParams + - Added Interface CustomInfoPatchProperties + - Added Interface CustomInfoProperties + - Added Interface DiskInfoPatchProperties + - Added Interface DiskInfoProperties + - Added Interface DomainInfoPatchProperties + - Added Interface DomainInfoProperties + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface HostPoolControlParameter + - Added Interface HostPoolUpdateConfigurationPatchProperties + - Added Interface HostPoolUpdateConfigurationProperties + - Added Interface HostPoolUpdateFault + - Added Interface ImageInfoPatchProperties + - Added Interface ImageInfoProperties + - Added Interface ImportPackageInfoRequest + - Added Interface InitiateSessionHostUpdatePostHeaders + - Added Interface InitiateSessionHostUpdatePostOptionalParams + - Added Interface KeyVaultCredentialsPatchProperties + - Added Interface KeyVaultCredentialsProperties + - Added Interface MarketplaceInfoPatchProperties + - Added Interface MarketplaceInfoProperties + - Added Interface NetworkInfoPatchProperties + - Added Interface NetworkInfoProperties + - Added Interface SecurityInfoPatchProperties + - Added Interface SecurityInfoProperties + - Added Interface SessionHostConfiguration + - Added Interface SessionHostConfigurationList + - Added Interface SessionHostConfigurationOperationStatus + - Added Interface SessionHostConfigurationOperationStatusList + - Added Interface SessionHostConfigurationPatch + - Added Interface SessionHostConfigurationsCreateOrUpdateHeaders + - Added Interface SessionHostConfigurationsCreateOrUpdateOptionalParams + - Added Interface SessionHostConfigurationsGetOptionalParams + - Added Interface SessionHostConfigurationsListByHostPoolNextOptionalParams + - Added Interface SessionHostConfigurationsListByHostPoolOptionalParams + - Added Interface SessionHostConfigurationsOperationStatusGetOptionalParams + - Added Interface SessionHostConfigurationsOperationStatusListNextOptionalParams + - Added Interface SessionHostConfigurationsOperationStatusListOptionalParams + - Added Interface SessionHostConfigurationsUpdateHeaders + - Added Interface SessionHostConfigurationsUpdateOptionalParams + - Added Interface SessionHostManagement + - Added Interface SessionHostManagementList + - Added Interface SessionHostManagementOperationProgress + - Added Interface SessionHostManagementOperationStatus + - Added Interface SessionHostManagementOperationStatusList + - Added Interface SessionHostManagementPatch + - Added Interface SessionHostManagementProgressError + - Added Interface SessionHostManagementsCreateOrUpdateOptionalParams + - Added Interface SessionHostManagementsGetOptionalParams + - Added Interface SessionHostManagementsListByHostPoolNextOptionalParams + - Added Interface SessionHostManagementsListByHostPoolOptionalParams + - Added Interface SessionHostManagementsOperationStatusGetOptionalParams + - Added Interface SessionHostManagementsOperationStatusListNextOptionalParams + - Added Interface SessionHostManagementsOperationStatusListOptionalParams + - Added Interface SessionHostManagementsUpdateOptionalParams + - Added Interface SessionHostRetryProvisioningOptionalParams + - Added Interface TrackedResource + - Added Interface UpdateSessionHostsRequestBody + - Added Interface ValidateSessionHostUpdatePostHeaders + - Added Interface ValidateSessionHostUpdatePostOptionalParams + - Added Interface ValidateSessionHostUpdateRequestBody + - Added Type Alias ActiveSessionHostConfigurationsGetResponse + - Added Type Alias ActiveSessionHostConfigurationsListByHostPoolNextResponse + - Added Type Alias ActiveSessionHostConfigurationsListByHostPoolResponse + - Added Type Alias AppAttachPackageArchitectures + - Added Type Alias AppAttachPackageCreateOrUpdateResponse + - Added Type Alias AppAttachPackageGetResponse + - Added Type Alias AppAttachPackageInfoImportNextResponse + - Added Type Alias AppAttachPackageInfoImportResponse + - Added Type Alias AppAttachPackageListByResourceGroupNextResponse + - Added Type Alias AppAttachPackageListByResourceGroupResponse + - Added Type Alias AppAttachPackageListBySubscriptionNextResponse + - Added Type Alias AppAttachPackageListBySubscriptionResponse + - Added Type Alias AppAttachPackageUpdateResponse + - Added Type Alias ControlSessionHostUpdatePostResponse + - Added Type Alias DomainJoinType + - Added Type Alias FailHealthCheckOnStagingFailure + - Added Type Alias FaultType + - Added Type Alias HostPoolUpdateAction + - Added Type Alias InitiateSessionHostUpdatePostResponse + - Added Type Alias ManagementType + - Added Type Alias OperationActionSHM + - Added Type Alias OperationTypeSHM + - Added Type Alias PackageTimestamped + - Added Type Alias ProvisioningState + - Added Type Alias ProvisioningStateSHC + - Added Type Alias SessionHostConfigurationsCreateOrUpdateResponse + - Added Type Alias SessionHostConfigurationsGetResponse + - Added Type Alias SessionHostConfigurationsListByHostPoolNextResponse + - Added Type Alias SessionHostConfigurationsListByHostPoolResponse + - Added Type Alias SessionHostConfigurationsOperationStatusGetResponse + - Added Type Alias SessionHostConfigurationsOperationStatusListNextResponse + - Added Type Alias SessionHostConfigurationsOperationStatusListResponse + - Added Type Alias SessionHostConfigurationsUpdateResponse + - Added Type Alias SessionHostManagementsCreateOrUpdateResponse + - Added Type Alias SessionHostManagementsGetResponse + - Added Type Alias SessionHostManagementsListByHostPoolNextResponse + - Added Type Alias SessionHostManagementsListByHostPoolResponse + - Added Type Alias SessionHostManagementsOperationStatusGetResponse + - Added Type Alias SessionHostManagementsOperationStatusListNextResponse + - Added Type Alias SessionHostManagementsOperationStatusListResponse + - Added Type Alias SessionHostManagementsUpdateResponse + - Added Type Alias Type + - Added Type Alias ValidateSessionHostUpdatePostResponse + - Added Type Alias VirtualMachineDiskType + - Added Type Alias VirtualMachineSecurityType + - Interface ExpandMsixImage has a new optional parameter certificateExpiry + - Interface ExpandMsixImage has a new optional parameter certificateName + - Interface HostPool has a new optional parameter appAttachPackageReferences + - Interface HostPool has a new optional parameter managementType + - Interface SessionHost has a new optional parameter lastSessionHostUpdateTime + - Interface SessionHost has a new optional parameter sessionHostConfiguration + - Added Enum KnownAppAttachPackageArchitectures + - Added Enum KnownDomainJoinType + - Added Enum KnownFailHealthCheckOnStagingFailure + - Added Enum KnownFaultType + - Added Enum KnownHostPoolUpdateAction + - Added Enum KnownManagementType + - Added Enum KnownOperationActionSHM + - Added Enum KnownOperationTypeSHM + - Added Enum KnownPackageTimestamped + - Added Enum KnownProvisioningState + - Added Enum KnownProvisioningStateSHC + - Added Enum KnownType + - Added Enum KnownVirtualMachineDiskType + - Added Enum KnownVirtualMachineSecurityType + + ## 1.1.0 (2023-10-08) **Features** diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/README.md b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md index 387cf846b7df..2a041a8ec1d5 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/README.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-desktopvirtualization) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json index aac8827ff336..de5c9cb47c38 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c280892951a9e45c059132c05aace25a9c752d48", + "commit": "86bd6fd01ec0943a7541fb277fb2e403a6302875", "readme": "specification/desktopvirtualization/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs-pr\\specification\\desktopvirtualization\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.9" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json index d56d3701548d..56d8e7296a10 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/package.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/package.json @@ -3,11 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DesktopVirtualizationAPIClient.", - "version": "1.1.1", + "version": "1.2.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", @@ -32,15 +34,17 @@ "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -103,13 +107,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-desktopvirtualization?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/desktopvirtualization/arm-desktopvirtualization" +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md index 015d7bef8d52..9cba6c422e7a 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/review/arm-desktopvirtualization.api.md @@ -6,7 +6,77 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export interface ActiveDirectoryInfoPatchProperties { + domainCredentials?: KeyVaultCredentialsPatchProperties; +} + +// @public +export interface ActiveDirectoryInfoProperties { + domainCredentials: KeyVaultCredentialsProperties; + domainName?: string; + ouPath: string; +} + +// @public +export interface ActiveSessionHostConfiguration extends Resource { + availabilityZones?: number[]; + bootDiagnosticsInfo?: BootDiagnosticsInfoProperties; + customConfigurationScriptUrl?: string; + diskInfo: DiskInfoProperties; + domainInfo: DomainInfoProperties; + friendlyName?: string; + imageInfo: ImageInfoProperties; + networkInfo: NetworkInfoProperties; + securityInfo?: SecurityInfoProperties; + readonly systemData?: SystemData; + readonly version?: Date; + vmAdminCredentials: KeyVaultCredentialsProperties; + vmLocation?: string; + vmNamePrefix: string; + vmResourceGroup?: string; + vmSizeId: string; + vmTags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ActiveSessionHostConfigurationList { + readonly nextLink?: string; + value?: ActiveSessionHostConfiguration[]; +} + +// @public +export interface ActiveSessionHostConfigurations { + get(resourceGroupName: string, hostPoolName: string, options?: ActiveSessionHostConfigurationsGetOptionalParams): Promise; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ActiveSessionHostConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActiveSessionHostConfigurationsGetResponse = ActiveSessionHostConfiguration; + +// @public +export interface ActiveSessionHostConfigurationsListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActiveSessionHostConfigurationsListByHostPoolNextResponse = ActiveSessionHostConfigurationList; + +// @public +export interface ActiveSessionHostConfigurationsListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ActiveSessionHostConfigurationsListByHostPoolResponse = ActiveSessionHostConfigurationList; // @public export interface AgentUpdatePatchProperties { @@ -24,6 +94,152 @@ export interface AgentUpdateProperties { useSessionHostLocalTime?: boolean; } +// @public +export interface AppAttachPackage extends TrackedResource { + properties: AppAttachPackageProperties; + readonly systemData?: SystemData; +} + +// @public +export type AppAttachPackageArchitectures = string; + +// @public +export interface AppAttachPackageCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageCreateOrUpdateResponse = AppAttachPackage; + +// @public +export interface AppAttachPackageDeleteOptionalParams extends coreClient.OperationOptions { + force?: boolean; +} + +// @public +export interface AppAttachPackageGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageGetResponse = AppAttachPackage; + +// @public +export interface AppAttachPackageInfo { + listImport(resourceGroupName: string, hostPoolName: string, importPackageInfoRequest: ImportPackageInfoRequest, options?: AppAttachPackageInfoImportOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AppAttachPackageInfoImportNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageInfoImportNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageInfoImportOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageInfoImportResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageInfoProperties { + certificateExpiry?: Date; + certificateName?: string; + displayName?: string; + imagePath?: string; + isActive?: boolean; + isPackageTimestamped?: PackageTimestamped; + isRegularRegistration?: boolean; + lastUpdated?: Date; + packageAlias?: string; + packageApplications?: MsixPackageApplications[]; + packageDependencies?: MsixPackageDependencies[]; + packageFamilyName?: string; + packageFullName?: string; + packageName?: string; + packageRelativePath?: string; + version?: string; +} + +// @public +export interface AppAttachPackageList { + readonly nextLink?: string; + value?: AppAttachPackage[]; +} + +// @public +export interface AppAttachPackageListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageListByResourceGroupNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListByResourceGroupOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type AppAttachPackageListByResourceGroupResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppAttachPackageListBySubscriptionNextResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageListBySubscriptionOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type AppAttachPackageListBySubscriptionResponse = AppAttachPackageList; + +// @public +export interface AppAttachPackageOperations { + createOrUpdate(resourceGroupName: string, appAttachPackageName: string, appAttachPackage: AppAttachPackage, options?: AppAttachPackageCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageDeleteOptionalParams): Promise; + get(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AppAttachPackageListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AppAttachPackageListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, appAttachPackageName: string, options?: AppAttachPackageUpdateOptionalParams): Promise; +} + +// @public +export interface AppAttachPackagePatch extends Resource { + properties?: AppAttachPackagePatchProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface AppAttachPackagePatchProperties { + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; + hostPoolReferences?: string[]; + image?: AppAttachPackageInfoProperties; + keyVaultURL?: string; +} + +// @public +export interface AppAttachPackageProperties { + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; + hostPoolReferences?: string[]; + image?: AppAttachPackageInfoProperties; + keyVaultURL?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AppAttachPackageUpdateOptionalParams extends coreClient.OperationOptions { + appAttachPackagePatch?: AppAttachPackagePatch; +} + +// @public +export type AppAttachPackageUpdateResponse = AppAttachPackage; + // @public export interface Application extends Resource { applicationType?: RemoteApplicationType; @@ -223,6 +439,23 @@ export type ApplicationsUpdateResponse = Application; // @public export type ApplicationType = string; +// @public +export interface AzureActiveDirectoryInfoProperties { + mdmProviderGuid: string; +} + +// @public +export interface BootDiagnosticsInfoPatchProperties { + enabled?: boolean; + storageUri?: string; +} + +// @public +export interface BootDiagnosticsInfoProperties { + enabled?: boolean; + storageUri?: string; +} + // @public export interface CloudError { error?: CloudErrorProperties; @@ -237,9 +470,41 @@ export interface CloudErrorProperties { // @public export type CommandLineSetting = string; +// @public +export interface ControlSessionHostUpdate { + beginPost(resourceGroupName: string, hostPoolName: string, hostPoolControlParameter: HostPoolControlParameter, options?: ControlSessionHostUpdatePostOptionalParams): Promise, ControlSessionHostUpdatePostResponse>>; + beginPostAndWait(resourceGroupName: string, hostPoolName: string, hostPoolControlParameter: HostPoolControlParameter, options?: ControlSessionHostUpdatePostOptionalParams): Promise; +} + +// @public +export interface ControlSessionHostUpdatePostHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface ControlSessionHostUpdatePostOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ControlSessionHostUpdatePostResponse = ControlSessionHostUpdatePostHeaders; + // @public export type CreatedByType = string; +// @public +export interface CustomInfoPatchProperties { + resourceId?: string; +} + +// @public +export interface CustomInfoProperties { + resourceId: string; +} + // @public export type DayOfWeek = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday"; @@ -313,16 +578,26 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DesktopVirtualizationAPIClientOptionalParams); // (undocumented) + activeSessionHostConfigurations: ActiveSessionHostConfigurations; + // (undocumented) apiVersion: string; // (undocumented) + appAttachPackageInfo: AppAttachPackageInfo; + // (undocumented) + appAttachPackageOperations: AppAttachPackageOperations; + // (undocumented) applicationGroups: ApplicationGroups; // (undocumented) applications: Applications; // (undocumented) + controlSessionHostUpdate: ControlSessionHostUpdate; + // (undocumented) desktops: Desktops; // (undocumented) hostPools: HostPools; // (undocumented) + initiateSessionHostUpdate: InitiateSessionHostUpdate; + // (undocumented) msixImages: MsixImages; // (undocumented) msixPackages: MsixPackages; @@ -339,6 +614,16 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { // (undocumented) scalingPlans: ScalingPlans; // (undocumented) + sessionHostConfigurations: SessionHostConfigurations; + // (undocumented) + sessionHostConfigurationsOperationStatus: SessionHostConfigurationsOperationStatus; + // (undocumented) + sessionHostManagements: SessionHostManagements; + // (undocumented) + sessionHostManagementsOperationStatus: SessionHostManagementsOperationStatus; + // (undocumented) + sessionHostOperations: SessionHostOperations; + // (undocumented) sessionHosts: SessionHosts; // (undocumented) startMenuItems: StartMenuItems; @@ -347,6 +632,8 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { // (undocumented) userSessions: UserSessions; // (undocumented) + validateSessionHostUpdate: ValidateSessionHostUpdate; + // (undocumented) workspaces: Workspaces; } @@ -357,8 +644,55 @@ export interface DesktopVirtualizationAPIClientOptionalParams extends coreClient endpoint?: string; } +// @public +export interface DiskInfoPatchProperties { + type?: VirtualMachineDiskType; +} + +// @public +export interface DiskInfoProperties { + type: VirtualMachineDiskType; +} + +// @public +export interface DomainInfoPatchProperties { + activeDirectoryInfo?: ActiveDirectoryInfoPatchProperties; +} + +// @public +export interface DomainInfoProperties { + activeDirectoryInfo?: ActiveDirectoryInfoProperties; + azureActiveDirectoryInfo?: AzureActiveDirectoryInfoProperties; + joinType: DomainJoinType; +} + +// @public +export type DomainJoinType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export interface ExpandMsixImage extends Resource { + certificateExpiry?: Date; + certificateName?: string; displayName?: string; imagePath?: string; isActive?: boolean; @@ -380,6 +714,12 @@ export interface ExpandMsixImageList { value?: ExpandMsixImage[]; } +// @public +export type FailHealthCheckOnStagingFailure = string; + +// @public +export type FaultType = string; + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -392,6 +732,7 @@ export type HealthCheckResult = string; // @public export interface HostPool extends ResourceModelWithAllowedPropertySet { agentUpdate?: AgentUpdateProperties; + readonly appAttachPackageReferences?: string[]; readonly applicationGroupReferences?: string[]; readonly cloudPcResource?: boolean; customRdpProperty?: string; @@ -399,6 +740,7 @@ export interface HostPool extends ResourceModelWithAllowedPropertySet { friendlyName?: string; hostPoolType: HostPoolType; loadBalancerType: LoadBalancerType; + managementType?: ManagementType; maxSessionLimit?: number; readonly objectId?: string; personalDesktopAssignmentType?: PersonalDesktopAssignmentType; @@ -417,6 +759,12 @@ export interface HostPool extends ResourceModelWithAllowedPropertySet { vmTemplate?: string; } +// @public +export interface HostPoolControlParameter { + action: HostPoolUpdateAction; + cancelMessage?: string; +} + // @public export interface HostPoolList { readonly nextLink?: string; @@ -533,6 +881,33 @@ export type HostPoolsUpdateResponse = HostPool; // @public export type HostPoolType = string; +// @public +export type HostPoolUpdateAction = string; + +// @public +export interface HostPoolUpdateConfigurationPatchProperties { + deleteOriginalVm?: boolean; + logOffDelayMinutes?: number; + logOffMessage?: string; + maxVmsRemoved?: number; +} + +// @public +export interface HostPoolUpdateConfigurationProperties { + deleteOriginalVm?: boolean; + logOffDelayMinutes: number; + logOffMessage?: string; + maxVmsRemoved: number; +} + +// @public +export interface HostPoolUpdateFault { + faultCode?: string; + faultContext?: string; + faultText?: string; + faultType?: FaultType; +} + // @public export interface Identity { readonly principalId?: string; @@ -540,6 +915,72 @@ export interface Identity { type?: "SystemAssigned"; } +// @public +export interface ImageInfoPatchProperties { + customInfo?: CustomInfoPatchProperties; + marketplaceInfo?: MarketplaceInfoPatchProperties; + type?: Type; +} + +// @public +export interface ImageInfoProperties { + customInfo?: CustomInfoProperties; + marketplaceInfo?: MarketplaceInfoProperties; + type: Type; +} + +// @public +export interface ImportPackageInfoRequest { + packageArchitecture?: AppAttachPackageArchitectures; + path?: string; +} + +// @public +export interface InitiateSessionHostUpdate { + beginPost(resourceGroupName: string, hostPoolName: string, options?: InitiateSessionHostUpdatePostOptionalParams): Promise, InitiateSessionHostUpdatePostResponse>>; + beginPostAndWait(resourceGroupName: string, hostPoolName: string, options?: InitiateSessionHostUpdatePostOptionalParams): Promise; +} + +// @public +export interface InitiateSessionHostUpdatePostHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface InitiateSessionHostUpdatePostOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + updateSessionHostsRequestBody?: UpdateSessionHostsRequestBody; +} + +// @public +export type InitiateSessionHostUpdatePostResponse = InitiateSessionHostUpdatePostHeaders; + +// @public +export interface KeyVaultCredentialsPatchProperties { + passwordKeyVaultSecretUri?: string; + usernameKeyVaultSecretUri?: string; +} + +// @public +export interface KeyVaultCredentialsProperties { + passwordKeyVaultSecretUri: string; + usernameKeyVaultSecretUri: string; +} + +// @public +export enum KnownAppAttachPackageArchitectures { + ALL = "ALL", + ARM = "ARM", + ARM64 = "ARM64", + Neutral = "Neutral", + X64 = "x64", + X86 = "x86", + X86A64 = "x86a64" +} + // @public export enum KnownApplicationGroupType { Desktop = "Desktop", @@ -567,6 +1008,25 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDomainJoinType { + ActiveDirectory = "ActiveDirectory", + AzureActiveDirectory = "AzureActiveDirectory" +} + +// @public +export enum KnownFailHealthCheckOnStagingFailure { + DoNotFail = "DoNotFail", + NeedsAssistance = "NeedsAssistance", + Unhealthy = "Unhealthy" +} + +// @public +export enum KnownFaultType { + ServiceError = "ServiceError", + UserError = "UserError" +} + // @public export enum KnownHealthCheckName { AppAttachHealthCheck = "AppAttachHealthCheck", @@ -605,6 +1065,15 @@ export enum KnownHostPoolType { Pooled = "Pooled" } +// @public +export enum KnownHostPoolUpdateAction { + Cancel = "Cancel", + Pause = "Pause", + Resume = "Resume", + Retry = "Retry", + Start = "Start" +} + // @public export enum KnownLoadBalancerType { BreadthFirst = "BreadthFirst", @@ -612,6 +1081,33 @@ export enum KnownLoadBalancerType { Persistent = "Persistent" } +// @public +export enum KnownManagementType { + Automated = "Automated", + Standard = "Standard" +} + +// @public +export enum KnownOperationActionSHM { + Cancel = "Cancel", + Pause = "Pause", + Resume = "Resume", + Retry = "Retry", + Start = "Start" +} + +// @public +export enum KnownOperationTypeSHM { + InitiateSessionHostUpdate = "InitiateSessionHostUpdate", + ValidateSessionHostUpdate = "ValidateSessionHostUpdate" +} + +// @public +export enum KnownPackageTimestamped { + NotTimestamped = "NotTimestamped", + Timestamped = "Timestamped" +} + // @public export enum KnownPersonalDesktopAssignmentType { Automatic = "Automatic", @@ -640,6 +1136,22 @@ export enum KnownPrivateEndpointServiceConnectionStatus { Rejected = "Rejected" } +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + +// @public +export enum KnownProvisioningStateSHC { + Canceled = "Canceled", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded" +} + // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", @@ -747,6 +1259,12 @@ export enum KnownStopHostsWhen { ZeroSessions = "ZeroSessions" } +// @public +export enum KnownType { + Custom = "Custom", + Marketplace = "Marketplace" +} + // @public export enum KnownUpdateState { Failed = "Failed", @@ -756,6 +1274,20 @@ export enum KnownUpdateState { Succeeded = "Succeeded" } +// @public +export enum KnownVirtualMachineDiskType { + PremiumLRS = "Premium_LRS", + StandardLRS = "Standard_LRS", + StandardSSDLRS = "StandardSSD_LRS" +} + +// @public +export enum KnownVirtualMachineSecurityType { + ConfidentialVM = "ConfidentialVM", + Standard = "Standard", + TrustedLaunch = "TrustedLaunch" +} + // @public export type LoadBalancerType = string; @@ -778,6 +1310,25 @@ export interface MaintenanceWindowProperties { hour?: number; } +// @public +export type ManagementType = string; + +// @public +export interface MarketplaceInfoPatchProperties { + exactVersion?: string; + offer?: string; + publisher?: string; + sku?: string; +} + +// @public +export interface MarketplaceInfoProperties { + exactVersion: string; + offer: string; + publisher: string; + sku: string; +} + // @public export interface MsixImages { listExpand(resourceGroupName: string, hostPoolName: string, msixImageURI: MsixImageURI, options?: MsixImagesExpandOptionalParams): PagedAsyncIterableIterator; @@ -901,6 +1452,21 @@ export interface MsixPackagesUpdateOptionalParams extends coreClient.OperationOp // @public export type MsixPackagesUpdateResponse = MsixPackage; +// @public +export interface NetworkInfoPatchProperties { + securityGroupId?: string; + subnetId?: string; +} + +// @public +export interface NetworkInfoProperties { + securityGroupId?: string; + subnetId: string; +} + +// @public +export type OperationActionSHM = string; + // @public export interface OperationProperties { serviceSpecification?: ServiceSpecification; @@ -925,6 +1491,12 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = ResourceProviderOperationList; +// @public +export type OperationTypeSHM = string; + +// @public +export type PackageTimestamped = string; + // @public export type PersonalDesktopAssignmentType = string; @@ -1108,6 +1680,12 @@ export interface PrivateLinkServiceConnectionState { status?: PrivateEndpointServiceConnectionStatus; } +// @public +export type ProvisioningState = string; + +// @public +export type ProvisioningStateSHC = string; + // @public export interface ProxyResource extends Resource { } @@ -1569,6 +2147,20 @@ export interface ScalingSchedule { // @public export type ScalingScheduleDaysOfWeekItem = string; +// @public +export interface SecurityInfoPatchProperties { + secureBootEnabled?: boolean; + type?: VirtualMachineSecurityType; + vTpmEnabled?: boolean; +} + +// @public +export interface SecurityInfoProperties { + secureBootEnabled?: boolean; + type?: VirtualMachineSecurityType; + vTpmEnabled?: boolean; +} + // @public export interface SendMessage { messageBody?: string; @@ -1590,10 +2182,12 @@ export interface SessionHost extends Resource { assignedUser?: string; friendlyName?: string; lastHeartBeat?: Date; + readonly lastSessionHostUpdateTime?: Date; readonly lastUpdateTime?: Date; readonly objectId?: string; osVersion?: string; readonly resourceId?: string; + readonly sessionHostConfiguration?: string; readonly sessionHostHealthCheckResults?: SessionHostHealthCheckReport[]; sessions?: number; status?: Status; @@ -1608,6 +2202,164 @@ export interface SessionHost extends Resource { // @public export type SessionHostComponentUpdateType = string; +// @public +export interface SessionHostConfiguration extends Resource { + availabilityZones?: number[]; + bootDiagnosticsInfo?: BootDiagnosticsInfoProperties; + customConfigurationScriptUrl?: string; + diskInfo: DiskInfoProperties; + domainInfo: DomainInfoProperties; + friendlyName?: string; + imageInfo: ImageInfoProperties; + networkInfo: NetworkInfoProperties; + readonly provisioningState?: ProvisioningStateSHC; + securityInfo?: SecurityInfoProperties; + readonly systemData?: SystemData; + readonly version?: Date; + vmAdminCredentials: KeyVaultCredentialsProperties; + vmLocation?: string; + vmNamePrefix: string; + vmResourceGroup?: string; + vmSizeId: string; + vmTags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface SessionHostConfigurationList { + readonly nextLink?: string; + value?: SessionHostConfiguration[]; +} + +// @public +export interface SessionHostConfigurationOperationStatus { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: SessionHostConfigurationOperationStatus[]; + percentComplete?: number; + startTime?: Date; + status: string; +} + +// @public +export interface SessionHostConfigurationOperationStatusList { + readonly nextLink?: string; + value?: SessionHostConfigurationOperationStatus[]; +} + +// @public +export interface SessionHostConfigurationPatch { + availabilityZones?: number[]; + bootDiagnosticsInfo?: BootDiagnosticsInfoPatchProperties; + customConfigurationScriptUrl?: string; + diskInfo?: DiskInfoPatchProperties; + domainInfo?: DomainInfoPatchProperties; + friendlyName?: string; + imageInfo?: ImageInfoPatchProperties; + networkInfo?: NetworkInfoProperties; + securityInfo?: SecurityInfoPatchProperties; + vmAdminCredentials?: KeyVaultCredentialsPatchProperties; + vmLocation?: string; + vmNamePrefix?: string; + vmResourceGroup?: string; + vmSizeId?: string; + vmTags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface SessionHostConfigurations { + beginCreateOrUpdate(resourceGroupName: string, hostPoolName: string, sessionHostConfiguration: SessionHostConfiguration, options?: SessionHostConfigurationsCreateOrUpdateOptionalParams): Promise, SessionHostConfigurationsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, hostPoolName: string, sessionHostConfiguration: SessionHostConfiguration, options?: SessionHostConfigurationsCreateOrUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, hostPoolName: string, options?: SessionHostConfigurationsUpdateOptionalParams): Promise, SessionHostConfigurationsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, hostPoolName: string, options?: SessionHostConfigurationsUpdateOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, options?: SessionHostConfigurationsGetOptionalParams): Promise; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: SessionHostConfigurationsListByHostPoolOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SessionHostConfigurationsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface SessionHostConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SessionHostConfigurationsCreateOrUpdateResponse = SessionHostConfigurationsCreateOrUpdateHeaders & SessionHostConfiguration; + +// @public +export interface SessionHostConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostConfigurationsGetResponse = SessionHostConfiguration; + +// @public +export interface SessionHostConfigurationsListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostConfigurationsListByHostPoolNextResponse = SessionHostConfigurationList; + +// @public +export interface SessionHostConfigurationsListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostConfigurationsListByHostPoolResponse = SessionHostConfigurationList; + +// @public +export interface SessionHostConfigurationsOperationStatus { + get(resourceGroupName: string, hostPoolName: string, operationId: string, options?: SessionHostConfigurationsOperationStatusGetOptionalParams): Promise; + list(resourceGroupName: string, hostPoolName: string, options?: SessionHostConfigurationsOperationStatusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SessionHostConfigurationsOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostConfigurationsOperationStatusGetResponse = SessionHostConfigurationOperationStatus; + +// @public +export interface SessionHostConfigurationsOperationStatusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostConfigurationsOperationStatusListNextResponse = SessionHostConfigurationOperationStatusList; + +// @public +export interface SessionHostConfigurationsOperationStatusListOptionalParams extends coreClient.OperationOptions { + isLatest?: boolean; + isNonTerminal?: boolean; +} + +// @public +export type SessionHostConfigurationsOperationStatusListResponse = SessionHostConfigurationOperationStatusList; + +// @public +export interface SessionHostConfigurationsUpdateHeaders { + azureAsyncOperation?: string; +} + +// @public +export interface SessionHostConfigurationsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + sessionHostConfiguration?: SessionHostConfigurationPatch; + updateIntervalInMs?: number; +} + +// @public +export type SessionHostConfigurationsUpdateResponse = SessionHostConfigurationsUpdateHeaders & SessionHostConfiguration; + // @public export interface SessionHostHealthCheckFailureDetails { readonly errorCode?: number; @@ -1631,6 +2383,150 @@ export interface SessionHostList { // @public export type SessionHostLoadBalancingAlgorithm = string; +// @public +export interface SessionHostManagement extends ProxyResource { + scheduledDateTimeZone: string; + readonly systemData?: SystemData; + update: HostPoolUpdateConfigurationProperties; +} + +// @public +export interface SessionHostManagementList { + readonly nextLink?: string; + value?: SessionHostManagement[]; +} + +// @public +export interface SessionHostManagementOperationProgress { + executionStartTime?: Date; + sessionHostsCompleted?: number; + sessionHostsInProgress?: number; + sessionHostsRollbackFailed?: number; + totalSessionHosts?: number; +} + +// @public +export interface SessionHostManagementOperationStatus { + readonly action?: OperationActionSHM; + correlationId?: string; + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: SessionHostManagementOperationStatus[]; + parentId?: string; + percentComplete?: number; + progress?: SessionHostManagementOperationProgress; + scheduledDateTime?: Date; + sessionHostManagement?: SessionHostManagement; + startTime?: Date; + status: string; + type?: OperationTypeSHM; +} + +// @public +export interface SessionHostManagementOperationStatusList { + readonly nextLink?: string; + value?: SessionHostManagementOperationStatus[]; +} + +// @public +export interface SessionHostManagementPatch { + scheduledDateTimeZone?: string; + readonly systemData?: SystemData; + update?: HostPoolUpdateConfigurationPatchProperties; +} + +// @public +export interface SessionHostManagementProgressError { + faultCode?: string; + faultContext?: string; + faultText?: string; + faultType?: FaultType; +} + +// @public +export interface SessionHostManagements { + createOrUpdate(resourceGroupName: string, hostPoolName: string, sessionHostManagement: SessionHostManagement, options?: SessionHostManagementsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, hostPoolName: string, options?: SessionHostManagementsGetOptionalParams): Promise; + listByHostPool(resourceGroupName: string, hostPoolName: string, options?: SessionHostManagementsListByHostPoolOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, hostPoolName: string, options?: SessionHostManagementsUpdateOptionalParams): Promise; +} + +// @public +export interface SessionHostManagementsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsCreateOrUpdateResponse = SessionHostManagement; + +// @public +export interface SessionHostManagementsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsGetResponse = SessionHostManagement; + +// @public +export interface SessionHostManagementsListByHostPoolNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsListByHostPoolNextResponse = SessionHostManagementList; + +// @public +export interface SessionHostManagementsListByHostPoolOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsListByHostPoolResponse = SessionHostManagementList; + +// @public +export interface SessionHostManagementsOperationStatus { + get(resourceGroupName: string, hostPoolName: string, operationId: string, options?: SessionHostManagementsOperationStatusGetOptionalParams): Promise; + list(resourceGroupName: string, hostPoolName: string, options?: SessionHostManagementsOperationStatusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SessionHostManagementsOperationStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsOperationStatusGetResponse = SessionHostManagementOperationStatus; + +// @public +export interface SessionHostManagementsOperationStatusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SessionHostManagementsOperationStatusListNextResponse = SessionHostManagementOperationStatusList; + +// @public +export interface SessionHostManagementsOperationStatusListOptionalParams extends coreClient.OperationOptions { + action?: string; + correlationId?: string; + isInitiatingOperation?: boolean; + isLatest?: boolean; + isNonTerminal?: boolean; + type?: string; +} + +// @public +export type SessionHostManagementsOperationStatusListResponse = SessionHostManagementOperationStatusList; + +// @public +export interface SessionHostManagementsUpdateOptionalParams extends coreClient.OperationOptions { + sessionHostManagement?: SessionHostManagementPatch; +} + +// @public +export type SessionHostManagementsUpdateResponse = SessionHostManagement; + +// @public +export interface SessionHostOperations { + retryProvisioning(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: SessionHostRetryProvisioningOptionalParams): Promise; +} + // @public export interface SessionHostPatch extends Resource { allowNewSession?: boolean; @@ -1638,6 +2534,10 @@ export interface SessionHostPatch extends Resource { friendlyName?: string; } +// @public +export interface SessionHostRetryProvisioningOptionalParams extends coreClient.OperationOptions { +} + // @public export interface SessionHosts { delete(resourceGroupName: string, hostPoolName: string, sessionHostName: string, options?: SessionHostsDeleteOptionalParams): Promise; @@ -1767,6 +2667,24 @@ export interface Time { minute: number; } +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type Type = string; + +// @public +export interface UpdateSessionHostsRequestBody { + scheduledDateTime?: Date; + scheduledDateTimeZone?: string; + update?: HostPoolUpdateConfigurationPatchProperties; +} + // @public export type UpdateState = string; @@ -1853,6 +2771,42 @@ export interface UserSessionsSendMessageOptionalParams extends coreClient.Operat sendMessage?: SendMessage; } +// @public +export interface ValidateSessionHostUpdate { + beginPost(resourceGroupName: string, hostPoolName: string, options?: ValidateSessionHostUpdatePostOptionalParams): Promise, ValidateSessionHostUpdatePostResponse>>; + beginPostAndWait(resourceGroupName: string, hostPoolName: string, options?: ValidateSessionHostUpdatePostOptionalParams): Promise; +} + +// @public +export interface ValidateSessionHostUpdatePostHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface ValidateSessionHostUpdatePostOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + validateSessionHostUpdateRequestBody?: ValidateSessionHostUpdateRequestBody; +} + +// @public +export type ValidateSessionHostUpdatePostResponse = ValidateSessionHostUpdatePostHeaders; + +// @public +export interface ValidateSessionHostUpdateRequestBody { + scheduledDateTime?: Date; + sessionHostConfiguration?: SessionHostConfiguration; + sessionHostManagement?: SessionHostManagement; +} + +// @public +export type VirtualMachineDiskType = string; + +// @public +export type VirtualMachineSecurityType = string; + // @public export interface Workspace extends ResourceModelWithAllowedPropertySet { applicationGroupReferences?: string[]; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts index 7c2c089c59c3..a19da1ce92f0 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/desktopVirtualizationAPIClient.ts @@ -27,10 +27,21 @@ import { ApplicationsImpl, DesktopsImpl, HostPoolsImpl, + SessionHostManagementsImpl, + ValidateSessionHostUpdateImpl, + InitiateSessionHostUpdateImpl, + ControlSessionHostUpdateImpl, + SessionHostManagementsOperationStatusImpl, + SessionHostConfigurationsImpl, + SessionHostConfigurationsOperationStatusImpl, + ActiveSessionHostConfigurationsImpl, UserSessionsImpl, SessionHostsImpl, + SessionHostOperationsImpl, MsixPackagesImpl, - MsixImagesImpl + AppAttachPackageInfoImpl, + MsixImagesImpl, + AppAttachPackageOperationsImpl } from "./operations"; import { Operations, @@ -45,10 +56,21 @@ import { Applications, Desktops, HostPools, + SessionHostManagements, + ValidateSessionHostUpdate, + InitiateSessionHostUpdate, + ControlSessionHostUpdate, + SessionHostManagementsOperationStatus, + SessionHostConfigurations, + SessionHostConfigurationsOperationStatus, + ActiveSessionHostConfigurations, UserSessions, SessionHosts, + SessionHostOperations, MsixPackages, - MsixImages + AppAttachPackageInfo, + MsixImages, + AppAttachPackageOperations } from "./operationsInterfaces"; import { DesktopVirtualizationAPIClientOptionalParams } from "./models"; @@ -84,7 +106,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-desktopvirtualization/1.1.1`; + const packageDetails = `azsdk-js-arm-desktopvirtualization/1.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -137,7 +159,7 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-09-05"; + this.apiVersion = options.apiVersion || "2023-11-01-preview"; this.operations = new OperationsImpl(this); this.workspaces = new WorkspacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -152,10 +174,27 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { this.applications = new ApplicationsImpl(this); this.desktops = new DesktopsImpl(this); this.hostPools = new HostPoolsImpl(this); + this.sessionHostManagements = new SessionHostManagementsImpl(this); + this.validateSessionHostUpdate = new ValidateSessionHostUpdateImpl(this); + this.initiateSessionHostUpdate = new InitiateSessionHostUpdateImpl(this); + this.controlSessionHostUpdate = new ControlSessionHostUpdateImpl(this); + this.sessionHostManagementsOperationStatus = new SessionHostManagementsOperationStatusImpl( + this + ); + this.sessionHostConfigurations = new SessionHostConfigurationsImpl(this); + this.sessionHostConfigurationsOperationStatus = new SessionHostConfigurationsOperationStatusImpl( + this + ); + this.activeSessionHostConfigurations = new ActiveSessionHostConfigurationsImpl( + this + ); this.userSessions = new UserSessionsImpl(this); this.sessionHosts = new SessionHostsImpl(this); + this.sessionHostOperations = new SessionHostOperationsImpl(this); this.msixPackages = new MsixPackagesImpl(this); + this.appAttachPackageInfo = new AppAttachPackageInfoImpl(this); this.msixImages = new MsixImagesImpl(this); + this.appAttachPackageOperations = new AppAttachPackageOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -199,8 +238,19 @@ export class DesktopVirtualizationAPIClient extends coreClient.ServiceClient { applications: Applications; desktops: Desktops; hostPools: HostPools; + sessionHostManagements: SessionHostManagements; + validateSessionHostUpdate: ValidateSessionHostUpdate; + initiateSessionHostUpdate: InitiateSessionHostUpdate; + controlSessionHostUpdate: ControlSessionHostUpdate; + sessionHostManagementsOperationStatus: SessionHostManagementsOperationStatus; + sessionHostConfigurations: SessionHostConfigurations; + sessionHostConfigurationsOperationStatus: SessionHostConfigurationsOperationStatus; + activeSessionHostConfigurations: ActiveSessionHostConfigurations; userSessions: UserSessions; sessionHosts: SessionHosts; + sessionHostOperations: SessionHostOperations; msixPackages: MsixPackages; + appAttachPackageInfo: AppAttachPackageInfo; msixImages: MsixImages; + appAttachPackageOperations: AppAttachPackageOperations; } diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/lroImpl.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts index 51a5cad5d64d..598443a6f658 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/index.ts @@ -573,6 +573,446 @@ export interface HostPoolList { readonly nextLink?: string; } +/** The configurations of a hostpool update. */ +export interface HostPoolUpdateConfigurationProperties { + /** Whether not to save original disk. False by default. */ + deleteOriginalVm?: boolean; + /** The maximum number of virtual machines to be removed during hostpool update. */ + maxVmsRemoved: number; + /** Grace period before logging off users in minutes. */ + logOffDelayMinutes: number; + /** Log off message sent to user for logoff. Default value is an empty string. */ + logOffMessage?: string; +} + +/** Represents a SessionHostManagementPatch definition. */ +export interface SessionHostManagementPatch { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Time zone for sessionHostManagement operations as defined in https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid. Must be set if useLocalTime is true. */ + scheduledDateTimeZone?: string; + /** Parameters for a hostpool update. */ + update?: HostPoolUpdateConfigurationPatchProperties; +} + +/** The configurations of a hostpool update. */ +export interface HostPoolUpdateConfigurationPatchProperties { + /** Whether not to save original disk. False by default. */ + deleteOriginalVm?: boolean; + /** The maximum number of virtual machines to be removed during hostpool update. */ + maxVmsRemoved?: number; + /** Grace period before logging off users in minutes. */ + logOffDelayMinutes?: number; + /** Log off message sent to user for logoff. */ + logOffMessage?: string; +} + +/** List of SessionHostManagement definitions. */ +export interface SessionHostManagementList { + /** List of SessionHostManagement definitions. */ + value?: SessionHostManagement[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Object containing the definition for properties to be used in the sessionHostUpdate validation. */ +export interface ValidateSessionHostUpdateRequestBody { + /** Object containing the definition for the SessionHostConfiguration to be validated. If none is provided the update will use the SessionHostConfiguration settings associated with the HostPool. */ + sessionHostConfiguration?: SessionHostConfiguration; + /** Object containing the definition for the SessionHostManagement to be validated. If none is provided the update will use the settings saved in the sessionHostManagement object. */ + sessionHostManagement?: SessionHostManagement; + /** The timestamp that the update validation is scheduled for. If none is provided, the update will be executed immediately */ + scheduledDateTime?: Date; +} + +/** Network information. */ +export interface NetworkInfoProperties { + /** The resource ID of the subnet. */ + subnetId: string; + /** The resource ID of the security group. Any allowable/open ports should be specified in the NSG. */ + securityGroupId?: string; +} + +/** Disk information. */ +export interface DiskInfoProperties { + /** The disk type used by virtual machine in hostpool session host. */ + type: VirtualMachineDiskType; +} + +/** Image configurations of session host in a HostPool. */ +export interface ImageInfoProperties { + /** The type of image session hosts use in the hostpool. */ + type: Type; + /** The values to uniquely identify a marketplace image. Only one should be populated based on the image type. */ + marketplaceInfo?: MarketplaceInfoProperties; + /** The values to uniquely identify a custom image. Only one should be populated based on the image type. */ + customInfo?: CustomInfoProperties; +} + +/** Marketplace image information. */ +export interface MarketplaceInfoProperties { + /** The offer of the image. */ + offer: string; + /** The publisher of the image. */ + publisher: string; + /** The sku of the image. */ + sku: string; + /** The exact version of the image. */ + exactVersion: string; +} + +/** Custom image information. */ +export interface CustomInfoProperties { + /** The resource id of the custom image. */ + resourceId: string; +} + +/** Domain configurations of session hosts. */ +export interface DomainInfoProperties { + /** The type of domain join done by the virtual machine. */ + joinType: DomainJoinType; + /** Active directory info. Only one should be populated based on the join type. */ + activeDirectoryInfo?: ActiveDirectoryInfoProperties; + /** Azure active directory info. Only one should be populated based on the join type. */ + azureActiveDirectoryInfo?: AzureActiveDirectoryInfoProperties; +} + +/** Active directory info. Only one should be populated based on the join type. */ +export interface ActiveDirectoryInfoProperties { + /** Credentials needed to create the virtual machine. */ + domainCredentials: KeyVaultCredentialsProperties; + /** The ou path. */ + ouPath: string; + /** The domain a virtual machine connected to a hostpool will join. */ + domainName?: string; +} + +/** Credentials kept in the keyvault. */ +export interface KeyVaultCredentialsProperties { + /** The uri to access the secret that the username is stored in. */ + usernameKeyVaultSecretUri: string; + /** The uri to access the secret that the password is stored in. */ + passwordKeyVaultSecretUri: string; +} + +/** Azure Active directory info. Only one should be populated based on the join type. */ +export interface AzureActiveDirectoryInfoProperties { + /** The mdm guid. */ + mdmProviderGuid: string; +} + +/** Security information. */ +export interface SecurityInfoProperties { + /** The security type used by virtual machine in hostpool session host. Default is Standard. */ + type?: VirtualMachineSecurityType; + /** Whether to use secureBoot on the virtual machine. */ + secureBootEnabled?: boolean; + /** Whether to use vTPM on the virtual machine. */ + vTpmEnabled?: boolean; +} + +/** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ +export interface BootDiagnosticsInfoProperties { + /** Whether boot diagnostics should be enabled on the Virtual Machine. */ + enabled?: boolean; + /** Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. */ + storageUri?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Object containing the definition for properties to be used for a sessionHostUpdate operation. */ +export interface UpdateSessionHostsRequestBody { + /** The timestamp that the update validation is scheduled for. If none is provided, the update will be executed immediately */ + scheduledDateTime?: Date; + /** The timeZone as defined in https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid. */ + scheduledDateTimeZone?: string; + /** settings for management information for the hostpool update operation. If none is provided the update will use the settings saved in the sessionHostManagement object. */ + update?: HostPoolUpdateConfigurationPatchProperties; +} + +/** Represents properties for a hostpool update. */ +export interface HostPoolControlParameter { + /** Action types for controlling hostpool update. */ + action: HostPoolUpdateAction; + /** The cancel message sent to the user on the session host. This is can only be specified if the action is 'Cancel'. */ + cancelMessage?: string; +} + +/** The current status of an async operation. */ +export interface SessionHostManagementOperationStatus { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. Current defined values are < Scheduled | UpdatingSessionHosts | ValidatingSessionHostUpdate | Paused | Pausing | Cancelling | Resuming | Starting > | Succeeded | Failed | Canceled */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: SessionHostManagementOperationStatus[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; + /** The Log Analytics. */ + correlationId?: string; + /** Type of sessionHostManagement operation. */ + type?: OperationTypeSHM; + /** + * Action type of the current sessionHostManagement operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly action?: OperationActionSHM; + /** Progress information on the sessionHostManagement operation. */ + progress?: SessionHostManagementOperationProgress; + /** The timestamp that the update is scheduled for. */ + scheduledDateTime?: Date; + /** SessionHostManagement properties used for the operation. */ + sessionHostManagement?: SessionHostManagement; + /** The resource ID of the operation that started this process. */ + parentId?: string; +} + +/** SessionHostManagement Operation Progress information. */ +export interface SessionHostManagementOperationProgress { + /** Time that the sessionHostManagement operation was created. */ + executionStartTime?: Date; + /** The number of sessionHosts to be started in the sessionHostManagement operation. */ + totalSessionHosts?: number; + /** The number of sessionHosts in progress in the sessionHostManagement operation. */ + sessionHostsInProgress?: number; + /** The number of sessionHosts completed in the sessionHostManagement operation. */ + sessionHostsCompleted?: number; + /** The number of sessionHosts rollback failed in the sessionHostManagement operation. */ + sessionHostsRollbackFailed?: number; +} + +/** List of SessionHostManagementOperationStatus definitions. */ +export interface SessionHostManagementOperationStatusList { + /** List of SessionHostManagementOperationStatus definitions. */ + value?: SessionHostManagementOperationStatus[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a SessionHostConfigurationPatch definition. */ +export interface SessionHostConfigurationPatch { + /** Friendly name to describe this version of the SessionHostConfiguration. */ + friendlyName?: string; + /** Hashtable that lists key/value pair tags to apply to the VMs */ + vmTags?: { [propertyName: string]: string }; + /** The Location for the session host to be created in */ + vmLocation?: string; + /** The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided. */ + vmResourceGroup?: string; + /** The prefix that should be associated with session host names */ + vmNamePrefix?: string; + /** Value for availability zones to be used by the session host. Should be from [1,2,3]. */ + availabilityZones?: number[]; + /** Network information. */ + networkInfo?: NetworkInfoProperties; + /** The id of the size of a virtual machine connected to a hostpool. */ + vmSizeId?: string; + /** Disk information. */ + diskInfo?: DiskInfoPatchProperties; + /** The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning. */ + customConfigurationScriptUrl?: string; + /** Image configurations of HostPool. */ + imageInfo?: ImageInfoPatchProperties; + /** Domain configurations of session hosts. */ + domainInfo?: DomainInfoPatchProperties; + /** Security information. */ + securityInfo?: SecurityInfoPatchProperties; + /** Local Admin credentials for session hosts. */ + vmAdminCredentials?: KeyVaultCredentialsPatchProperties; + /** Boot Diagnostics information. */ + bootDiagnosticsInfo?: BootDiagnosticsInfoPatchProperties; +} + +/** Disk information. */ +export interface DiskInfoPatchProperties { + /** The disk type used by virtual machine in hostpool session host. */ + type?: VirtualMachineDiskType; +} + +/** Image configurations of session host in a HostPool. */ +export interface ImageInfoPatchProperties { + /** The type of image session hosts use in the hostpool. */ + type?: Type; + /** The values to uniquely identify a marketplace image. Only one should be populated based on the image type. */ + marketplaceInfo?: MarketplaceInfoPatchProperties; + /** The values to uniquely identify a custom image. Only one should be populated based on the image type. */ + customInfo?: CustomInfoPatchProperties; +} + +/** Marketplace image information. */ +export interface MarketplaceInfoPatchProperties { + /** The offer of the image. */ + offer?: string; + /** The publisher of the image. */ + publisher?: string; + /** The sku of the image. */ + sku?: string; + /** The exact version of the image. */ + exactVersion?: string; +} + +/** Custom image information. */ +export interface CustomInfoPatchProperties { + /** The resource id of the custom image. */ + resourceId?: string; +} + +/** Domain configurations of session hosts. */ +export interface DomainInfoPatchProperties { + /** Active directory info. Only one should be populated based on the join type. */ + activeDirectoryInfo?: ActiveDirectoryInfoPatchProperties; +} + +/** Active directory info. Only one should be populated based on the join type. */ +export interface ActiveDirectoryInfoPatchProperties { + /** Credentials needed to create the virtual machine. */ + domainCredentials?: KeyVaultCredentialsPatchProperties; +} + +/** Credentials kept in the keyvault. */ +export interface KeyVaultCredentialsPatchProperties { + /** The uri to access the secret that the username is stored in. */ + usernameKeyVaultSecretUri?: string; + /** The uri to access the secret that the password is stored in. */ + passwordKeyVaultSecretUri?: string; +} + +/** Security information. */ +export interface SecurityInfoPatchProperties { + /** The security type used by virtual machine in hostpool session host. */ + type?: VirtualMachineSecurityType; + /** Whether to use secureBoot on the virtual machine. */ + secureBootEnabled?: boolean; + /** Whether to use vTPM on the virtual machine. */ + vTpmEnabled?: boolean; +} + +/** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ +export interface BootDiagnosticsInfoPatchProperties { + /** Whether boot diagnostics should be enabled on the Virtual Machine. */ + enabled?: boolean; + /** Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. */ + storageUri?: string; +} + +/** List of SessionHostConfiguration definitions. */ +export interface SessionHostConfigurationList { + /** List of SessionHostConfiguration definitions. */ + value?: SessionHostConfiguration[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The current status of an async operation. */ +export interface SessionHostConfigurationOperationStatus { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. Current defined values are */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: SessionHostConfigurationOperationStatus[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; +} + +/** List of OperationStatus definitions. */ +export interface SessionHostConfigurationOperationStatusList { + /** List of OperationStatus definitions. */ + value?: SessionHostConfigurationOperationStatus[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** List of ActiveSessionHostConfiguration definitions. */ +export interface ActiveSessionHostConfigurationList { + /** List of ActiveSessionHostConfiguration definitions. */ + value?: ActiveSessionHostConfiguration[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** List of UserSession definitions. */ export interface UserSessionList { /** List of UserSession definitions. */ @@ -672,6 +1112,78 @@ export interface MsixPackageList { readonly nextLink?: string; } +/** Information to import app attach package */ +export interface ImportPackageInfoRequest { + /** URI to Image */ + path?: string; + /** Possible device architectures that an app attach package can be configured for */ + packageArchitecture?: AppAttachPackageArchitectures; +} + +/** List of App Attach Package definitions. */ +export interface AppAttachPackageList { + /** List of App Attach Package definitions. */ + value?: AppAttachPackage[]; + /** + * Link to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Schema for App Attach Package properties. */ +export interface AppAttachPackageProperties { + /** + * The provisioning state of the App Attach Package. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Detailed properties for App Attach Package */ + image?: AppAttachPackageInfoProperties; + /** List of Hostpool resource Ids. */ + hostPoolReferences?: string[]; + /** URL of keyvault location to store certificate */ + keyVaultURL?: string; + /** Parameter indicating how the health check should behave if this package fails staging */ + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; +} + +/** Schema for Import Package Information properties. */ +export interface AppAttachPackageInfoProperties { + /** Alias of App Attach Package. Assigned at import time */ + packageAlias?: string; + /** VHD/CIM image path on Network Share. */ + imagePath?: string; + /** Package Name from appxmanifest.xml. */ + packageName?: string; + /** Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. */ + packageFamilyName?: string; + /** Package Full Name from appxmanifest.xml. */ + packageFullName?: string; + /** User friendly Name to be displayed in the portal. */ + displayName?: string; + /** Relative Path to the package inside the image. */ + packageRelativePath?: string; + /** Specifies how to register Package in feed. */ + isRegularRegistration?: boolean; + /** Make this version of the package the active one across the hostpool. */ + isActive?: boolean; + /** List of package dependencies. */ + packageDependencies?: MsixPackageDependencies[]; + /** Package Version found in the appxmanifest.xml. */ + version?: string; + /** Date Package was last updated, found in the appxmanifest.xml. */ + lastUpdated?: Date; + /** List of package applications. */ + packageApplications?: MsixPackageApplications[]; + /** Certificate name found in the appxmanifest.xml. */ + certificateName?: string; + /** Date certificate expires, found in the appxmanifest.xml. */ + certificateExpiry?: Date; + /** Is package timestamped so it can ignore the certificate expiry date */ + isPackageTimestamped?: PackageTimestamped; +} + /** Represents URI referring to MSIX Image */ export interface MsixImageURI { /** URI to Image */ @@ -689,6 +1201,18 @@ export interface ExpandMsixImageList { readonly nextLink?: string; } +/** Schema for patchable fields on an App Attach Package. */ +export interface AppAttachPackagePatchProperties { + /** Detailed properties for App Attach Package */ + image?: AppAttachPackageInfoProperties; + /** List of Hostpool resource Ids. */ + hostPoolReferences?: string[]; + /** URL of keyvault location to store certificate */ + keyVaultURL?: string; + /** Parameter indicating how the health check should behave if this package fails staging */ + failHealthCheckOnStagingFailure?: FailHealthCheckOnStagingFailure; +} + /** Represents message sent to a UserSession. */ export interface SendMessage { /** Title of message. */ @@ -697,6 +1221,38 @@ export interface SendMessage { messageBody?: string; } +/** Hostpool update fault information. */ +export interface HostPoolUpdateFault { + /** Hostpool update fault type. */ + faultType?: FaultType; + /** Hostpool update fault code. */ + faultCode?: string; + /** Hostpool update fault text. */ + faultText?: string; + /** Hostpool update fault context. */ + faultContext?: string; +} + +/** SessionHostManagement operation fault information. */ +export interface SessionHostManagementProgressError { + /** SessionHostManagement operation fault type. */ + faultType?: FaultType; + /** SessionHostManagement operation fault code. */ + faultCode?: string; + /** SessionHostManagement operation fault text. */ + faultText?: string; + /** SessionHostManagement operation fault context. */ + faultContext?: string; +} + +/** Network information. */ +export interface NetworkInfoPatchProperties { + /** The resource ID of the subnet. */ + subnetId?: string; + /** The resource ID of the security group. Any allowable/open ports should be specified in the NSG. */ + securityGroupId?: string; +} + /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends Resource { /** The resource of private end point. */ @@ -952,6 +1508,99 @@ export interface HostPoolPatch extends Resource { agentUpdate?: AgentUpdatePatchProperties; } +/** Represents a SessionHostConfiguration definition. */ +export interface SessionHostConfiguration extends Resource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The timestamp of the last update. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: Date; + /** Friendly name to describe this version of the SessionHostConfiguration. */ + friendlyName?: string; + /** + * Provisioning state of the Session Host Configuration. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningStateSHC; + /** Hashtable that lists key/value pair tags to apply to the VMs */ + vmTags?: { [propertyName: string]: string }; + /** The Location for the session host to be created in. It will default to the location of the hostpool if not provided. */ + vmLocation?: string; + /** The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided. */ + vmResourceGroup?: string; + /** The prefix that should be associated with session host names */ + vmNamePrefix: string; + /** Value for availability zones to be used by the session host. Should be from [1,2,3]. */ + availabilityZones?: number[]; + /** Network information. */ + networkInfo: NetworkInfoProperties; + /** The id of the size of a virtual machine connected to a hostpool. */ + vmSizeId: string; + /** Disk information. */ + diskInfo: DiskInfoProperties; + /** The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning. */ + customConfigurationScriptUrl?: string; + /** Image configurations of HostPool. */ + imageInfo: ImageInfoProperties; + /** Domain configurations of session hosts. */ + domainInfo: DomainInfoProperties; + /** Security information. */ + securityInfo?: SecurityInfoProperties; + /** Local Admin credentials for session hosts. */ + vmAdminCredentials: KeyVaultCredentialsProperties; + /** Boot Diagnostics information. */ + bootDiagnosticsInfo?: BootDiagnosticsInfoProperties; +} + +/** Represents a ActiveSessionHostConfiguration definition. This has all of the sessionHostConfiguration properties except provisioningState */ +export interface ActiveSessionHostConfiguration extends Resource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The timestamp of the last update. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: Date; + /** Friendly name to describe this version of the SessionHostConfiguration. */ + friendlyName?: string; + /** Hashtable that lists key/value pair tags to apply to the VMs */ + vmTags?: { [propertyName: string]: string }; + /** The Location for the session host to be created in. It will default to the location of the hostpool if not provided. */ + vmLocation?: string; + /** The ResourceGroup for the session hosts to be created in. It will default to the ResourceGroup of the hostpool if not provided. */ + vmResourceGroup?: string; + /** The prefix that should be associated with session host names */ + vmNamePrefix: string; + /** Value for availability zones to be used by the session host. Should be from [1,2,3]. */ + availabilityZones?: number[]; + /** Network information. */ + networkInfo: NetworkInfoProperties; + /** The id of the size of a virtual machine connected to a hostpool. */ + vmSizeId: string; + /** Disk information. */ + diskInfo: DiskInfoProperties; + /** The uri to the storage blob containing the arm template to be run on the virtual machine after provisioning. */ + customConfigurationScriptUrl?: string; + /** Image configurations of HostPool. */ + imageInfo: ImageInfoProperties; + /** Domain configurations of session hosts. */ + domainInfo: DomainInfoProperties; + /** Security information. */ + securityInfo?: SecurityInfoProperties; + /** Local Admin credentials for session hosts. */ + vmAdminCredentials: KeyVaultCredentialsProperties; + /** Boot Diagnostics information. */ + bootDiagnosticsInfo?: BootDiagnosticsInfoProperties; +} + /** Represents a UserSession definition. */ export interface UserSession extends Resource { /** @@ -1030,6 +1679,16 @@ export interface SessionHost extends Resource { readonly lastUpdateTime?: Date; /** The error message. */ updateErrorMessage?: string; + /** + * The last time update was completed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSessionHostUpdateTime?: Date; + /** + * SessionHostConfiguration version reference at the time the update is initiated, in the format of date time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sessionHostConfiguration?: string; /** * List of SessionHostHealthCheckReports * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1088,6 +1747,14 @@ export interface MsixPackagePatch extends Resource { displayName?: string; } +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + /** Represents the definition of contents retrieved after expanding the MSIX Image. */ export interface ExpandMsixImage extends Resource { /** Alias of MSIX Package. */ @@ -1116,6 +1783,18 @@ export interface ExpandMsixImage extends Resource { lastUpdated?: Date; /** List of package applications. */ packageApplications?: MsixPackageApplications[]; + /** Certificate name found in the appxmanifest.xml. */ + certificateName?: string; + /** Date certificate expires, found in the appxmanifest.xml. */ + certificateExpiry?: Date; +} + +/** Schema for patchable App Attach Package properties. */ +export interface AppAttachPackagePatch extends Resource { + /** tags to be updated */ + tags?: { [propertyName: string]: string }; + /** Detailed properties for App Attach Package */ + properties?: AppAttachPackagePatchProperties; } /** Represents a Workspace definition. */ @@ -1246,11 +1925,18 @@ export interface HostPool extends ResourceModelWithAllowedPropertySet { registrationInfo?: RegistrationInfo; /** VM template for sessionhosts configuration within hostpool. */ vmTemplate?: string; + /** The type of management for this hostpool, Automated or Standard. The default value is Automated. */ + managementType?: ManagementType; /** * List of applicationGroup links. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly applicationGroupReferences?: string[]; + /** + * List of App Attach Package links. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly appAttachPackageReferences?: string[]; /** URL to customer ADFS server for signing WVD SSO certificates. */ ssoadfsAuthority?: string; /** ClientId for the registered Relying Party used to issue WVD SSO certificates. */ @@ -1356,6 +2042,72 @@ export interface ScalingPlanPersonalSchedule extends ProxyResource { offPeakMinutesToWaitOnLogoff?: number; } +/** Represents a SessionHostManagement definition. */ +export interface SessionHostManagement extends ProxyResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Time zone for sessionHostManagement operations as defined in https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid. Must be set if useLocalTime is true. */ + scheduledDateTimeZone: string; + /** Parameters for a hostpool update. */ + update: HostPoolUpdateConfigurationProperties; +} + +/** Schema for App Attach Package properties. */ +export interface AppAttachPackage extends TrackedResource { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Detailed properties for App Attach Package */ + properties: AppAttachPackageProperties; +} + +/** Defines headers for ValidateSessionHostUpdate_post operation. */ +export interface ValidateSessionHostUpdatePostHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The URL of the resource used to check the status of the asynchronous operation. */ + azureAsyncOperation?: string; + /** Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. */ + retryAfter?: number; +} + +/** Defines headers for InitiateSessionHostUpdate_post operation. */ +export interface InitiateSessionHostUpdatePostHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The URL of the resource used to check the status of the asynchronous operation. */ + azureAsyncOperation?: string; + /** Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. */ + retryAfter?: number; +} + +/** Defines headers for ControlSessionHostUpdate_post operation. */ +export interface ControlSessionHostUpdatePostHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + location?: string; + /** The URL of the resource used to check the status of the asynchronous operation. */ + azureAsyncOperation?: string; + /** Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds. */ + retryAfter?: number; +} + +/** Defines headers for SessionHostConfigurations_createOrUpdate operation. */ +export interface SessionHostConfigurationsCreateOrUpdateHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + +/** Defines headers for SessionHostConfigurations_update operation. */ +export interface SessionHostConfigurationsUpdateHeaders { + /** The URL of the resource used to check the status of the asynchronous operation. */ + azureAsyncOperation?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -1725,6 +2477,24 @@ export enum KnownRegistrationTokenOperation { */ export type RegistrationTokenOperation = string; +/** Known values of {@link ManagementType} that the service accepts. */ +export enum KnownManagementType { + /** Automated */ + Automated = "Automated", + /** Standard */ + Standard = "Standard" +} + +/** + * Defines values for ManagementType. \ + * {@link KnownManagementType} can be used interchangeably with ManagementType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automated** \ + * **Standard** + */ +export type ManagementType = string; + /** Known values of {@link SSOSecretType} that the service accepts. */ export enum KnownSSOSecretType { /** SharedKey */ @@ -1812,6 +2582,180 @@ export enum KnownSessionHostComponentUpdateType { */ export type SessionHostComponentUpdateType = string; +/** Known values of {@link ProvisioningStateSHC} that the service accepts. */ +export enum KnownProvisioningStateSHC { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Provisioning */ + Provisioning = "Provisioning" +} + +/** + * Defines values for ProvisioningStateSHC. \ + * {@link KnownProvisioningStateSHC} can be used interchangeably with ProvisioningStateSHC, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Provisioning** + */ +export type ProvisioningStateSHC = string; + +/** Known values of {@link VirtualMachineDiskType} that the service accepts. */ +export enum KnownVirtualMachineDiskType { + /** Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. */ + StandardLRS = "Standard_LRS", + /** Premium SSD locally redundant storage. Best for production and performance sensitive workloads. */ + PremiumLRS = "Premium_LRS", + /** Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. */ + StandardSSDLRS = "StandardSSD_LRS" +} + +/** + * Defines values for VirtualMachineDiskType. \ + * {@link KnownVirtualMachineDiskType} can be used interchangeably with VirtualMachineDiskType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS**: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. \ + * **Premium_LRS**: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. \ + * **StandardSSD_LRS**: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. + */ +export type VirtualMachineDiskType = string; + +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + /** Using default marketplace images offered by Azure Marketplace. */ + Marketplace = "Marketplace", + /** Using a custom image. */ + Custom = "Custom" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Marketplace**: Using default marketplace images offered by Azure Marketplace. \ + * **Custom**: Using a custom image. + */ +export type Type = string; + +/** Known values of {@link DomainJoinType} that the service accepts. */ +export enum KnownDomainJoinType { + /** Using microsoft active directory. */ + ActiveDirectory = "ActiveDirectory", + /** Using microsoft azure active directory. */ + AzureActiveDirectory = "AzureActiveDirectory" +} + +/** + * Defines values for DomainJoinType. \ + * {@link KnownDomainJoinType} can be used interchangeably with DomainJoinType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ActiveDirectory**: Using microsoft active directory. \ + * **AzureActiveDirectory**: Using microsoft azure active directory. + */ +export type DomainJoinType = string; + +/** Known values of {@link VirtualMachineSecurityType} that the service accepts. */ +export enum KnownVirtualMachineSecurityType { + /** Standard security protocol. No additional parameters */ + Standard = "Standard", + /** TrustedLaunch allows for secure boot adn vTPM */ + TrustedLaunch = "TrustedLaunch", + /** Confidential Virtual Machine security protocol */ + ConfidentialVM = "ConfidentialVM" +} + +/** + * Defines values for VirtualMachineSecurityType. \ + * {@link KnownVirtualMachineSecurityType} can be used interchangeably with VirtualMachineSecurityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard security protocol. No additional parameters \ + * **TrustedLaunch**: TrustedLaunch allows for secure boot adn vTPM \ + * **ConfidentialVM**: Confidential Virtual Machine security protocol + */ +export type VirtualMachineSecurityType = string; + +/** Known values of {@link HostPoolUpdateAction} that the service accepts. */ +export enum KnownHostPoolUpdateAction { + /** Start the hostpool update. */ + Start = "Start", + /** Pause the hostpool update. */ + Pause = "Pause", + /** Cancel the hostpool update. */ + Cancel = "Cancel", + /** Retry the hostpool update. */ + Retry = "Retry", + /** Resume the hostpool update. */ + Resume = "Resume" +} + +/** + * Defines values for HostPoolUpdateAction. \ + * {@link KnownHostPoolUpdateAction} can be used interchangeably with HostPoolUpdateAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Start**: Start the hostpool update. \ + * **Pause**: Pause the hostpool update. \ + * **Cancel**: Cancel the hostpool update. \ + * **Retry**: Retry the hostpool update. \ + * **Resume**: Resume the hostpool update. + */ +export type HostPoolUpdateAction = string; + +/** Known values of {@link OperationTypeSHM} that the service accepts. */ +export enum KnownOperationTypeSHM { + /** InitiateSessionHostUpdate */ + InitiateSessionHostUpdate = "InitiateSessionHostUpdate", + /** ValidateSessionHostUpdate */ + ValidateSessionHostUpdate = "ValidateSessionHostUpdate" +} + +/** + * Defines values for OperationTypeSHM. \ + * {@link KnownOperationTypeSHM} can be used interchangeably with OperationTypeSHM, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InitiateSessionHostUpdate** \ + * **ValidateSessionHostUpdate** + */ +export type OperationTypeSHM = string; + +/** Known values of {@link OperationActionSHM} that the service accepts. */ +export enum KnownOperationActionSHM { + /** Start */ + Start = "Start", + /** Retry */ + Retry = "Retry", + /** Pause */ + Pause = "Pause", + /** Resume */ + Resume = "Resume", + /** Cancel */ + Cancel = "Cancel" +} + +/** + * Defines values for OperationActionSHM. \ + * {@link KnownOperationActionSHM} can be used interchangeably with OperationActionSHM, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Start** \ + * **Retry** \ + * **Pause** \ + * **Resume** \ + * **Cancel** + */ +export type OperationActionSHM = string; + /** Known values of {@link ApplicationType} that the service accepts. */ export enum KnownApplicationType { /** RemoteApp */ @@ -2003,6 +2947,120 @@ export enum KnownHealthCheckResult { * **SessionHostShutdown**: We received a Shutdown notification. */ export type HealthCheckResult = string; + +/** Known values of {@link AppAttachPackageArchitectures} that the service accepts. */ +export enum KnownAppAttachPackageArchitectures { + /** ARM */ + ARM = "ARM", + /** ARM64 */ + ARM64 = "ARM64", + /** X86 */ + X86 = "x86", + /** X64 */ + X64 = "x64", + /** Neutral */ + Neutral = "Neutral", + /** X86A64 */ + X86A64 = "x86a64", + /** ALL */ + ALL = "ALL" +} + +/** + * Defines values for AppAttachPackageArchitectures. \ + * {@link KnownAppAttachPackageArchitectures} can be used interchangeably with AppAttachPackageArchitectures, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ARM** \ + * **ARM64** \ + * **x86** \ + * **x64** \ + * **Neutral** \ + * **x86a64** \ + * **ALL** + */ +export type AppAttachPackageArchitectures = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Provisioning */ + Provisioning = "Provisioning", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Provisioning** \ + * **Failed** \ + * **Canceled** + */ +export type ProvisioningState = string; + +/** Known values of {@link PackageTimestamped} that the service accepts. */ +export enum KnownPackageTimestamped { + /** Timestamped */ + Timestamped = "Timestamped", + /** NotTimestamped */ + NotTimestamped = "NotTimestamped" +} + +/** + * Defines values for PackageTimestamped. \ + * {@link KnownPackageTimestamped} can be used interchangeably with PackageTimestamped, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Timestamped** \ + * **NotTimestamped** + */ +export type PackageTimestamped = string; + +/** Known values of {@link FailHealthCheckOnStagingFailure} that the service accepts. */ +export enum KnownFailHealthCheckOnStagingFailure { + /** Unhealthy */ + Unhealthy = "Unhealthy", + /** NeedsAssistance */ + NeedsAssistance = "NeedsAssistance", + /** DoNotFail */ + DoNotFail = "DoNotFail" +} + +/** + * Defines values for FailHealthCheckOnStagingFailure. \ + * {@link KnownFailHealthCheckOnStagingFailure} can be used interchangeably with FailHealthCheckOnStagingFailure, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unhealthy** \ + * **NeedsAssistance** \ + * **DoNotFail** + */ +export type FailHealthCheckOnStagingFailure = string; + +/** Known values of {@link FaultType} that the service accepts. */ +export enum KnownFaultType { + /** Fault caused by service error. */ + ServiceError = "ServiceError", + /** Fault caused by user error. */ + UserError = "UserError" +} + +/** + * Defines values for FaultType. \ + * {@link KnownFaultType} can be used interchangeably with FaultType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceError**: Fault caused by service error. \ + * **UserError**: Fault caused by user error. + */ +export type FaultType = string; /** Defines values for SkuTier. */ export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; /** Defines values for DayOfWeek. */ @@ -2650,6 +3708,214 @@ export interface HostPoolsListNextOptionalParams /** Contains response data for the listNext operation. */ export type HostPoolsListNextResponse = HostPoolList; +/** Optional parameters. */ +export interface SessionHostManagementsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SessionHostManagementsGetResponse = SessionHostManagement; + +/** Optional parameters. */ +export interface SessionHostManagementsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type SessionHostManagementsCreateOrUpdateResponse = SessionHostManagement; + +/** Optional parameters. */ +export interface SessionHostManagementsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing SessionHostManagement definitions. */ + sessionHostManagement?: SessionHostManagementPatch; +} + +/** Contains response data for the update operation. */ +export type SessionHostManagementsUpdateResponse = SessionHostManagement; + +/** Optional parameters. */ +export interface SessionHostManagementsListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type SessionHostManagementsListByHostPoolResponse = SessionHostManagementList; + +/** Optional parameters. */ +export interface SessionHostManagementsListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type SessionHostManagementsListByHostPoolNextResponse = SessionHostManagementList; + +/** Optional parameters. */ +export interface ValidateSessionHostUpdatePostOptionalParams + extends coreClient.OperationOptions { + /** Object containing the definition for properties to be used in the sessionHostUpdate validation. */ + validateSessionHostUpdateRequestBody?: ValidateSessionHostUpdateRequestBody; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the post operation. */ +export type ValidateSessionHostUpdatePostResponse = ValidateSessionHostUpdatePostHeaders; + +/** Optional parameters. */ +export interface InitiateSessionHostUpdatePostOptionalParams + extends coreClient.OperationOptions { + /** Object containing the definition for properties to be used in the sessionHostUpdate validation. */ + updateSessionHostsRequestBody?: UpdateSessionHostsRequestBody; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the post operation. */ +export type InitiateSessionHostUpdatePostResponse = InitiateSessionHostUpdatePostHeaders; + +/** Optional parameters. */ +export interface ControlSessionHostUpdatePostOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the post operation. */ +export type ControlSessionHostUpdatePostResponse = ControlSessionHostUpdatePostHeaders; + +/** Optional parameters. */ +export interface SessionHostManagementsOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SessionHostManagementsOperationStatusGetResponse = SessionHostManagementOperationStatus; + +/** Optional parameters. */ +export interface SessionHostManagementsOperationStatusListOptionalParams + extends coreClient.OperationOptions { + /** Returns the most recent sessionHostManagement operation. */ + isLatest?: boolean; + /** Filter based on the type of sessionHostManagement operation. Valid values are 'InitiateSessionHostUpdate' and 'ValidateSessionHostUpdate' */ + type?: string; + /** Returns currently running operations. Ignored if 'isLatest' is true */ + isNonTerminal?: boolean; + /** CorrelationId of the sessionHostManagement operations to be returned. */ + correlationId?: string; + /** Action type for the Operation Status list to be filtered on. Valid actions are: start | retry | pause | resume | cancel). */ + action?: string; + /** Filter option to only return operations that initiated a sessionHostManagement operation. */ + isInitiatingOperation?: boolean; +} + +/** Contains response data for the list operation. */ +export type SessionHostManagementsOperationStatusListResponse = SessionHostManagementOperationStatusList; + +/** Optional parameters. */ +export interface SessionHostManagementsOperationStatusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SessionHostManagementsOperationStatusListNextResponse = SessionHostManagementOperationStatusList; + +/** Optional parameters. */ +export interface SessionHostConfigurationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type SessionHostConfigurationsCreateOrUpdateResponse = SessionHostConfigurationsCreateOrUpdateHeaders & + SessionHostConfiguration; + +/** Optional parameters. */ +export interface SessionHostConfigurationsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing SessionHostConfiguration definitions. */ + sessionHostConfiguration?: SessionHostConfigurationPatch; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type SessionHostConfigurationsUpdateResponse = SessionHostConfigurationsUpdateHeaders & + SessionHostConfiguration; + +/** Optional parameters. */ +export interface SessionHostConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SessionHostConfigurationsGetResponse = SessionHostConfiguration; + +/** Optional parameters. */ +export interface SessionHostConfigurationsListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type SessionHostConfigurationsListByHostPoolResponse = SessionHostConfigurationList; + +/** Optional parameters. */ +export interface SessionHostConfigurationsListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type SessionHostConfigurationsListByHostPoolNextResponse = SessionHostConfigurationList; + +/** Optional parameters. */ +export interface SessionHostConfigurationsOperationStatusGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SessionHostConfigurationsOperationStatusGetResponse = SessionHostConfigurationOperationStatus; + +/** Optional parameters. */ +export interface SessionHostConfigurationsOperationStatusListOptionalParams + extends coreClient.OperationOptions { + /** Returns the most recent sessionHostConfiguration operation. */ + isLatest?: boolean; + /** Returns currently running operations. Ignored if 'isLatest' is true */ + isNonTerminal?: boolean; +} + +/** Contains response data for the list operation. */ +export type SessionHostConfigurationsOperationStatusListResponse = SessionHostConfigurationOperationStatusList; + +/** Optional parameters. */ +export interface SessionHostConfigurationsOperationStatusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SessionHostConfigurationsOperationStatusListNextResponse = SessionHostConfigurationOperationStatusList; + +/** Optional parameters. */ +export interface ActiveSessionHostConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ActiveSessionHostConfigurationsGetResponse = ActiveSessionHostConfiguration; + +/** Optional parameters. */ +export interface ActiveSessionHostConfigurationsListByHostPoolOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPool operation. */ +export type ActiveSessionHostConfigurationsListByHostPoolResponse = ActiveSessionHostConfigurationList; + +/** Optional parameters. */ +export interface ActiveSessionHostConfigurationsListByHostPoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostPoolNext operation. */ +export type ActiveSessionHostConfigurationsListByHostPoolNextResponse = ActiveSessionHostConfigurationList; + /** Optional parameters. */ export interface UserSessionsListByHostPoolOptionalParams extends coreClient.OperationOptions { @@ -2766,6 +4032,10 @@ export interface SessionHostsListNextOptionalParams /** Contains response data for the listNext operation. */ export type SessionHostsListNextResponse = SessionHostList; +/** Optional parameters. */ +export interface SessionHostRetryProvisioningOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface MsixPackagesGetOptionalParams extends coreClient.OperationOptions {} @@ -2815,6 +4085,20 @@ export interface MsixPackagesListNextOptionalParams /** Contains response data for the listNext operation. */ export type MsixPackagesListNextResponse = MsixPackageList; +/** Optional parameters. */ +export interface AppAttachPackageInfoImportOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the import operation. */ +export type AppAttachPackageInfoImportResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageInfoImportNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the importNext operation. */ +export type AppAttachPackageInfoImportNextResponse = AppAttachPackageList; + /** Optional parameters. */ export interface MsixImagesExpandOptionalParams extends coreClient.OperationOptions {} @@ -2829,6 +4113,71 @@ export interface MsixImagesExpandNextOptionalParams /** Contains response data for the expandNext operation. */ export type MsixImagesExpandNextResponse = ExpandMsixImageList; +/** Optional parameters. */ +export interface AppAttachPackageGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AppAttachPackageGetResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AppAttachPackageCreateOrUpdateResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageDeleteOptionalParams + extends coreClient.OperationOptions { + /** Force flag to delete App Attach package. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface AppAttachPackageUpdateOptionalParams + extends coreClient.OperationOptions { + /** Object containing App Attach Package definition. */ + appAttachPackagePatch?: AppAttachPackagePatch; +} + +/** Contains response data for the update operation. */ +export type AppAttachPackageUpdateResponse = AppAttachPackage; + +/** Optional parameters. */ +export interface AppAttachPackageListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are package name and host pool. */ + filter?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type AppAttachPackageListByResourceGroupResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** OData filter expression. Valid properties for filtering are package name, host pool, and resource group. */ + filter?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type AppAttachPackageListBySubscriptionResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AppAttachPackageListByResourceGroupNextResponse = AppAttachPackageList; + +/** Optional parameters. */ +export interface AppAttachPackageListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AppAttachPackageListBySubscriptionNextResponse = AppAttachPackageList; + /** Optional parameters. */ export interface DesktopVirtualizationAPIClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts index 2824f25d99a1..e5a5947ab3d0 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/mappers.ts @@ -1639,26 +1639,40 @@ export const HostPoolList: coreClient.CompositeMapper = { } }; -export const UserSessionList: coreClient.CompositeMapper = { +export const HostPoolUpdateConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserSessionList", + className: "HostPoolUpdateConfigurationProperties", modelProperties: { - value: { - serializedName: "value", + deleteOriginalVm: { + serializedName: "deleteOriginalVm", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserSession" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + maxVmsRemoved: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "maxVmsRemoved", + required: true, + type: { + name: "Number" + } + }, + logOffDelayMinutes: { + serializedName: "logOffDelayMinutes", + required: true, + type: { + name: "Number" + } + }, + logOffMessage: { + defaultValue: "", + constraints: { + MaxLength: 260 + }, + serializedName: "logOffMessage", type: { name: "String" } @@ -1667,70 +1681,78 @@ export const UserSessionList: coreClient.CompositeMapper = { } }; -export const SessionHostHealthCheckReport: coreClient.CompositeMapper = { +export const SessionHostManagementPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SessionHostHealthCheckReport", + className: "SessionHostManagementPatch", modelProperties: { - healthCheckName: { - serializedName: "healthCheckName", - readOnly: true, + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - healthCheckResult: { - serializedName: "healthCheckResult", - readOnly: true, + scheduledDateTimeZone: { + serializedName: "properties.scheduledDateTimeZone", type: { name: "String" } }, - additionalFailureDetails: { - serializedName: "additionalFailureDetails", + update: { + serializedName: "properties.update", type: { name: "Composite", - className: "SessionHostHealthCheckFailureDetails" + className: "HostPoolUpdateConfigurationPatchProperties" } } } } }; -export const SessionHostHealthCheckFailureDetails: coreClient.CompositeMapper = { +export const HostPoolUpdateConfigurationPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SessionHostHealthCheckFailureDetails", + className: "HostPoolUpdateConfigurationPatchProperties", modelProperties: { - message: { - serializedName: "message", - readOnly: true, + deleteOriginalVm: { + serializedName: "deleteOriginalVm", type: { - name: "String" + name: "Boolean" } }, - errorCode: { - serializedName: "errorCode", - readOnly: true, + maxVmsRemoved: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "maxVmsRemoved", type: { name: "Number" } }, - lastHealthCheckDateTime: { - serializedName: "lastHealthCheckDateTime", - readOnly: true, + logOffDelayMinutes: { + serializedName: "logOffDelayMinutes", type: { - name: "DateTime" + name: "Number" + } + }, + logOffMessage: { + constraints: { + MaxLength: 260 + }, + serializedName: "logOffMessage", + type: { + name: "String" } } } } }; -export const SessionHostList: coreClient.CompositeMapper = { +export const SessionHostManagementList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SessionHostList", + className: "SessionHostManagementList", modelProperties: { value: { serializedName: "value", @@ -1739,7 +1761,7 @@ export const SessionHostList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SessionHost" + className: "SessionHostManagement" } } } @@ -1755,25 +1777,132 @@ export const SessionHostList: coreClient.CompositeMapper = { } }; -export const MsixPackageDependencies: coreClient.CompositeMapper = { +export const ValidateSessionHostUpdateRequestBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MsixPackageDependencies", + className: "ValidateSessionHostUpdateRequestBody", modelProperties: { - dependencyName: { - serializedName: "dependencyName", + sessionHostConfiguration: { + serializedName: "sessionHostConfiguration", + type: { + name: "Composite", + className: "SessionHostConfiguration" + } + }, + sessionHostManagement: { + serializedName: "sessionHostManagement", + type: { + name: "Composite", + className: "SessionHostManagement" + } + }, + scheduledDateTime: { + serializedName: "scheduledDateTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const NetworkInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkInfoProperties", + modelProperties: { + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + }, + securityGroupId: { + serializedName: "securityGroupId", + type: { + name: "String" + } + } + } + } +}; + +export const DiskInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskInfoProperties", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageInfoProperties", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + marketplaceInfo: { + serializedName: "marketplaceInfo", + type: { + name: "Composite", + className: "MarketplaceInfoProperties" + } + }, + customInfo: { + serializedName: "customInfo", + type: { + name: "Composite", + className: "CustomInfoProperties" + } + } + } + } +}; + +export const MarketplaceInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceInfoProperties", + modelProperties: { + offer: { + serializedName: "offer", + required: true, type: { name: "String" } }, publisher: { serializedName: "publisher", + required: true, type: { name: "String" } }, - minVersion: { - serializedName: "minVersion", + sku: { + serializedName: "sku", + required: true, + type: { + name: "String" + } + }, + exactVersion: { + serializedName: "exactVersion", + required: true, type: { name: "String" } @@ -1782,77 +1911,1533 @@ export const MsixPackageDependencies: coreClient.CompositeMapper = { } }; -export const MsixPackageApplications: coreClient.CompositeMapper = { +export const CustomInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MsixPackageApplications", + className: "CustomInfoProperties", modelProperties: { - appId: { - serializedName: "appId", + resourceId: { + serializedName: "resourceId", + required: true, type: { name: "String" } - }, - description: { - serializedName: "description", + } + } + } +}; + +export const DomainInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DomainInfoProperties", + modelProperties: { + joinType: { + serializedName: "joinType", + required: true, type: { name: "String" } }, - appUserModelID: { - serializedName: "appUserModelID", + activeDirectoryInfo: { + serializedName: "activeDirectoryInfo", + type: { + name: "Composite", + className: "ActiveDirectoryInfoProperties" + } + }, + azureActiveDirectoryInfo: { + serializedName: "azureActiveDirectoryInfo", + type: { + name: "Composite", + className: "AzureActiveDirectoryInfoProperties" + } + } + } + } +}; + +export const ActiveDirectoryInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActiveDirectoryInfoProperties", + modelProperties: { + domainCredentials: { + serializedName: "domainCredentials", + type: { + name: "Composite", + className: "KeyVaultCredentialsProperties" + } + }, + ouPath: { + serializedName: "ouPath", + required: true, type: { name: "String" } }, - friendlyName: { - serializedName: "friendlyName", + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + } + } + } +}; + +export const KeyVaultCredentialsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultCredentialsProperties", + modelProperties: { + usernameKeyVaultSecretUri: { + serializedName: "usernameKeyVaultSecretUri", + required: true, type: { name: "String" } }, - iconImageName: { - serializedName: "iconImageName", + passwordKeyVaultSecretUri: { + serializedName: "passwordKeyVaultSecretUri", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AzureActiveDirectoryInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryInfoProperties", + modelProperties: { + mdmProviderGuid: { + serializedName: "mdmProviderGuid", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SecurityInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityInfoProperties", + modelProperties: { + type: { + serializedName: "type", type: { name: "String" } }, - rawIcon: { - serializedName: "rawIcon", + secureBootEnabled: { + serializedName: "secureBootEnabled", type: { - name: "ByteArray" + name: "Boolean" } }, - rawPng: { - serializedName: "rawPng", + vTpmEnabled: { + serializedName: "vTpmEnabled", type: { - name: "ByteArray" + name: "Boolean" } } } } }; -export const MsixPackageList: coreClient.CompositeMapper = { +export const BootDiagnosticsInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MsixPackageList", + className: "BootDiagnosticsInfoProperties", modelProperties: { - value: { - serializedName: "value", + enabled: { + serializedName: "enabled", type: { - name: "Sequence", - element: { + name: "Boolean" + } + }, + storageUri: { + serializedName: "storageUri", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const UpdateSessionHostsRequestBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSessionHostsRequestBody", + modelProperties: { + scheduledDateTime: { + serializedName: "scheduledDateTime", + type: { + name: "DateTime" + } + }, + scheduledDateTimeZone: { + serializedName: "scheduledDateTimeZone", + type: { + name: "String" + } + }, + update: { + serializedName: "update", + type: { + name: "Composite", + className: "HostPoolUpdateConfigurationPatchProperties" + } + } + } + } +}; + +export const HostPoolControlParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostPoolControlParameter", + modelProperties: { + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + }, + cancelMessage: { + constraints: { + MaxLength: 260 + }, + serializedName: "cancelMessage", + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostManagementOperationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostManagementOperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostManagementOperationStatus" + } + } + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + }, + correlationId: { + serializedName: "properties.correlationId", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + action: { + serializedName: "properties.action", + readOnly: true, + type: { + name: "String" + } + }, + progress: { + serializedName: "properties.progress", + type: { + name: "Composite", + className: "SessionHostManagementOperationProgress" + } + }, + scheduledDateTime: { + serializedName: "properties.scheduledDateTime", + type: { + name: "DateTime" + } + }, + sessionHostManagement: { + serializedName: "properties.sessionHostManagement", + type: { + name: "Composite", + className: "SessionHostManagement" + } + }, + parentId: { + serializedName: "properties.parentId", + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostManagementOperationProgress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostManagementOperationProgress", + modelProperties: { + executionStartTime: { + serializedName: "executionStartTime", + type: { + name: "DateTime" + } + }, + totalSessionHosts: { + serializedName: "totalSessionHosts", + type: { + name: "Number" + } + }, + sessionHostsInProgress: { + serializedName: "sessionHostsInProgress", + type: { + name: "Number" + } + }, + sessionHostsCompleted: { + serializedName: "sessionHostsCompleted", + type: { + name: "Number" + } + }, + sessionHostsRollbackFailed: { + serializedName: "sessionHostsRollbackFailed", + type: { + name: "Number" + } + } + } + } +}; + +export const SessionHostManagementOperationStatusList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostManagementOperationStatusList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostManagementOperationStatus" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostConfigurationPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationPatch", + modelProperties: { + friendlyName: { + constraints: { + MaxLength: 260 + }, + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + vmTags: { + serializedName: "properties.vmTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + vmLocation: { + serializedName: "properties.vmLocation", + type: { + name: "String" + } + }, + vmResourceGroup: { + serializedName: "properties.vmResourceGroup", + type: { + name: "String" + } + }, + vmNamePrefix: { + constraints: { + MaxLength: 11 + }, + serializedName: "properties.vmNamePrefix", + type: { + name: "String" + } + }, + availabilityZones: { + serializedName: "properties.availabilityZones", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + networkInfo: { + serializedName: "properties.networkInfo", + type: { + name: "Composite", + className: "NetworkInfoProperties" + } + }, + vmSizeId: { + serializedName: "properties.vmSizeId", + type: { + name: "String" + } + }, + diskInfo: { + serializedName: "properties.diskInfo", + type: { + name: "Composite", + className: "DiskInfoPatchProperties" + } + }, + customConfigurationScriptUrl: { + constraints: { + MaxLength: 260 + }, + serializedName: "properties.customConfigurationScriptUrl", + type: { + name: "String" + } + }, + imageInfo: { + serializedName: "properties.imageInfo", + type: { + name: "Composite", + className: "ImageInfoPatchProperties" + } + }, + domainInfo: { + serializedName: "properties.domainInfo", + type: { + name: "Composite", + className: "DomainInfoPatchProperties" + } + }, + securityInfo: { + serializedName: "properties.securityInfo", + type: { + name: "Composite", + className: "SecurityInfoPatchProperties" + } + }, + vmAdminCredentials: { + serializedName: "properties.vmAdminCredentials", + type: { + name: "Composite", + className: "KeyVaultCredentialsPatchProperties" + } + }, + bootDiagnosticsInfo: { + serializedName: "properties.bootDiagnosticsInfo", + type: { + name: "Composite", + className: "BootDiagnosticsInfoPatchProperties" + } + } + } + } +}; + +export const DiskInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskInfoPatchProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ImageInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageInfoPatchProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + marketplaceInfo: { + serializedName: "marketplaceInfo", + type: { + name: "Composite", + className: "MarketplaceInfoPatchProperties" + } + }, + customInfo: { + serializedName: "customInfo", + type: { + name: "Composite", + className: "CustomInfoPatchProperties" + } + } + } + } +}; + +export const MarketplaceInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceInfoPatchProperties", + modelProperties: { + offer: { + serializedName: "offer", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + exactVersion: { + serializedName: "exactVersion", + type: { + name: "String" + } + } + } + } +}; + +export const CustomInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomInfoPatchProperties", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const DomainInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DomainInfoPatchProperties", + modelProperties: { + activeDirectoryInfo: { + serializedName: "activeDirectoryInfo", + type: { + name: "Composite", + className: "ActiveDirectoryInfoPatchProperties" + } + } + } + } +}; + +export const ActiveDirectoryInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActiveDirectoryInfoPatchProperties", + modelProperties: { + domainCredentials: { + serializedName: "domainCredentials", + type: { + name: "Composite", + className: "KeyVaultCredentialsPatchProperties" + } + } + } + } +}; + +export const KeyVaultCredentialsPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultCredentialsPatchProperties", + modelProperties: { + usernameKeyVaultSecretUri: { + serializedName: "usernameKeyVaultSecretUri", + type: { + name: "String" + } + }, + passwordKeyVaultSecretUri: { + serializedName: "passwordKeyVaultSecretUri", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecurityInfoPatchProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + secureBootEnabled: { + serializedName: "secureBootEnabled", + type: { + name: "Boolean" + } + }, + vTpmEnabled: { + serializedName: "vTpmEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const BootDiagnosticsInfoPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BootDiagnosticsInfoPatchProperties", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + storageUri: { + serializedName: "storageUri", + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostConfigurationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostConfiguration" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostConfigurationOperationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationOperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostConfigurationOperationStatus" + } + } + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const SessionHostConfigurationOperationStatusList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationOperationStatusList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHostConfigurationOperationStatus" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ActiveSessionHostConfigurationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActiveSessionHostConfigurationList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ActiveSessionHostConfiguration" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UserSessionList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserSessionList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserSession" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostHealthCheckReport: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostHealthCheckReport", + modelProperties: { + healthCheckName: { + serializedName: "healthCheckName", + readOnly: true, + type: { + name: "String" + } + }, + healthCheckResult: { + serializedName: "healthCheckResult", + readOnly: true, + type: { + name: "String" + } + }, + additionalFailureDetails: { + serializedName: "additionalFailureDetails", + type: { + name: "Composite", + className: "SessionHostHealthCheckFailureDetails" + } + } + } + } +}; + +export const SessionHostHealthCheckFailureDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostHealthCheckFailureDetails", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + errorCode: { + serializedName: "errorCode", + readOnly: true, + type: { + name: "Number" + } + }, + lastHealthCheckDateTime: { + serializedName: "lastHealthCheckDateTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const SessionHostList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionHost" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MsixPackageDependencies: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageDependencies", + modelProperties: { + dependencyName: { + serializedName: "dependencyName", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + minVersion: { + serializedName: "minVersion", + type: { + name: "String" + } + } + } + } +}; + +export const MsixPackageApplications: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageApplications", + modelProperties: { + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + appUserModelID: { + serializedName: "appUserModelID", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "friendlyName", + type: { + name: "String" + } + }, + iconImageName: { + serializedName: "iconImageName", + type: { + name: "String" + } + }, + rawIcon: { + serializedName: "rawIcon", + type: { + name: "ByteArray" + } + }, + rawPng: { + serializedName: "rawPng", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const MsixPackageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixPackageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImportPackageInfoRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportPackageInfoRequest", + modelProperties: { + path: { + serializedName: "path", + type: { + name: "String" + } + }, + packageArchitecture: { + serializedName: "packageArchitecture", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { type: { name: "Composite", - className: "MsixPackage" + className: "AppAttachPackage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + image: { + serializedName: "image", + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties" + } + }, + hostPoolReferences: { + serializedName: "hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + keyVaultURL: { + serializedName: "keyVaultURL", + type: { + name: "String" + } + }, + failHealthCheckOnStagingFailure: { + serializedName: "failHealthCheckOnStagingFailure", + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackageInfoProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties", + modelProperties: { + packageAlias: { + serializedName: "packageAlias", + type: { + name: "String" + } + }, + imagePath: { + serializedName: "imagePath", + type: { + name: "String" + } + }, + packageName: { + serializedName: "packageName", + type: { + name: "String" + } + }, + packageFamilyName: { + serializedName: "packageFamilyName", + type: { + name: "String" + } + }, + packageFullName: { + serializedName: "packageFullName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + nullable: true, + type: { + name: "String" + } + }, + packageRelativePath: { + serializedName: "packageRelativePath", + type: { + name: "String" + } + }, + isRegularRegistration: { + serializedName: "isRegularRegistration", + type: { + name: "Boolean" + } + }, + isActive: { + serializedName: "isActive", + type: { + name: "Boolean" + } + }, + packageDependencies: { + serializedName: "packageDependencies", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageDependencies" + } + } + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + }, + packageApplications: { + serializedName: "packageApplications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MsixPackageApplications" + } + } + } + }, + certificateName: { + serializedName: "certificateName", + nullable: true, + type: { + name: "String" + } + }, + certificateExpiry: { + serializedName: "certificateExpiry", + nullable: true, + type: { + name: "DateTime" + } + }, + isPackageTimestamped: { + serializedName: "isPackageTimestamped", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const MsixImageURI: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MsixImageURI", + modelProperties: { + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + +export const ExpandMsixImageList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpandMsixImageList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpandMsixImage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppAttachPackagePatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackagePatchProperties", + modelProperties: { + image: { + serializedName: "image", + type: { + name: "Composite", + className: "AppAttachPackageInfoProperties" + } + }, + hostPoolReferences: { + serializedName: "hostPoolReferences", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + keyVaultURL: { + serializedName: "keyVaultURL", + type: { + name: "String" + } + }, + failHealthCheckOnStagingFailure: { + serializedName: "failHealthCheckOnStagingFailure", + type: { + name: "String" + } + } + } + } +}; + +export const SendMessage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SendMessage", + modelProperties: { + messageTitle: { + serializedName: "messageTitle", + type: { + name: "String" + } + }, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + } + } + } +}; + +export const HostPoolUpdateFault: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostPoolUpdateFault", + modelProperties: { + faultType: { + serializedName: "faultType", + type: { + name: "String" + } + }, + faultCode: { + serializedName: "faultCode", + type: { + name: "String" + } + }, + faultText: { + serializedName: "faultText", + type: { + name: "String" + } + }, + faultContext: { + serializedName: "faultContext", type: { name: "String" } @@ -1861,41 +3446,31 @@ export const MsixPackageList: coreClient.CompositeMapper = { } }; -export const MsixImageURI: coreClient.CompositeMapper = { +export const SessionHostManagementProgressError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MsixImageURI", + className: "SessionHostManagementProgressError", modelProperties: { - uri: { - serializedName: "uri", + faultType: { + serializedName: "faultType", type: { name: "String" } - } - } - } -}; - -export const ExpandMsixImageList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExpandMsixImageList", - modelProperties: { - value: { - serializedName: "value", + }, + faultCode: { + serializedName: "faultCode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpandMsixImage" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + faultText: { + serializedName: "faultText", + type: { + name: "String" + } + }, + faultContext: { + serializedName: "faultContext", type: { name: "String" } @@ -1904,19 +3479,19 @@ export const ExpandMsixImageList: coreClient.CompositeMapper = { } }; -export const SendMessage: coreClient.CompositeMapper = { +export const NetworkInfoPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SendMessage", + className: "NetworkInfoPatchProperties", modelProperties: { - messageTitle: { - serializedName: "messageTitle", + subnetId: { + serializedName: "subnetId", type: { name: "String" } }, - messageBody: { - serializedName: "messageBody", + securityGroupId: { + serializedName: "securityGroupId", type: { name: "String" } @@ -2589,75 +4164,352 @@ export const HostPoolPatch: coreClient.CompositeMapper = { ring: { serializedName: "properties.ring", type: { - name: "Number" + name: "Number" + } + }, + validationEnvironment: { + serializedName: "properties.validationEnvironment", + type: { + name: "Boolean" + } + }, + registrationInfo: { + serializedName: "properties.registrationInfo", + type: { + name: "Composite", + className: "RegistrationInfoPatch" + } + }, + vmTemplate: { + serializedName: "properties.vmTemplate", + type: { + name: "String" + } + }, + ssoadfsAuthority: { + serializedName: "properties.ssoadfsAuthority", + type: { + name: "String" + } + }, + ssoClientId: { + serializedName: "properties.ssoClientId", + type: { + name: "String" + } + }, + ssoClientSecretKeyVaultPath: { + serializedName: "properties.ssoClientSecretKeyVaultPath", + type: { + name: "String" + } + }, + ssoSecretType: { + serializedName: "properties.ssoSecretType", + type: { + name: "String" + } + }, + preferredAppGroupType: { + serializedName: "properties.preferredAppGroupType", + type: { + name: "String" + } + }, + startVMOnConnect: { + serializedName: "properties.startVMOnConnect", + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + agentUpdate: { + serializedName: "properties.agentUpdate", + type: { + name: "Composite", + className: "AgentUpdatePatchProperties" + } + } + } + } +}; + +export const SessionHostConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfiguration", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "DateTime" + } + }, + friendlyName: { + constraints: { + MaxLength: 260 + }, + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + vmTags: { + serializedName: "properties.vmTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + vmLocation: { + serializedName: "properties.vmLocation", + type: { + name: "String" + } + }, + vmResourceGroup: { + serializedName: "properties.vmResourceGroup", + type: { + name: "String" + } + }, + vmNamePrefix: { + constraints: { + MaxLength: 11 + }, + serializedName: "properties.vmNamePrefix", + required: true, + type: { + name: "String" + } + }, + availabilityZones: { + serializedName: "properties.availabilityZones", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + networkInfo: { + serializedName: "properties.networkInfo", + type: { + name: "Composite", + className: "NetworkInfoProperties" + } + }, + vmSizeId: { + serializedName: "properties.vmSizeId", + required: true, + type: { + name: "String" + } + }, + diskInfo: { + serializedName: "properties.diskInfo", + type: { + name: "Composite", + className: "DiskInfoProperties" + } + }, + customConfigurationScriptUrl: { + serializedName: "properties.customConfigurationScriptUrl", + type: { + name: "String" + } + }, + imageInfo: { + serializedName: "properties.imageInfo", + type: { + name: "Composite", + className: "ImageInfoProperties" + } + }, + domainInfo: { + serializedName: "properties.domainInfo", + type: { + name: "Composite", + className: "DomainInfoProperties" + } + }, + securityInfo: { + serializedName: "properties.securityInfo", + type: { + name: "Composite", + className: "SecurityInfoProperties" + } + }, + vmAdminCredentials: { + serializedName: "properties.vmAdminCredentials", + type: { + name: "Composite", + className: "KeyVaultCredentialsProperties" + } + }, + bootDiagnosticsInfo: { + serializedName: "properties.bootDiagnosticsInfo", + type: { + name: "Composite", + className: "BootDiagnosticsInfoProperties" + } + } + } + } +}; + +export const ActiveSessionHostConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ActiveSessionHostConfiguration", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "DateTime" + } + }, + friendlyName: { + constraints: { + MaxLength: 260 + }, + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + vmTags: { + serializedName: "properties.vmTags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + vmLocation: { + serializedName: "properties.vmLocation", + type: { + name: "String" + } + }, + vmResourceGroup: { + serializedName: "properties.vmResourceGroup", + type: { + name: "String" } }, - validationEnvironment: { - serializedName: "properties.validationEnvironment", + vmNamePrefix: { + constraints: { + MaxLength: 11 + }, + serializedName: "properties.vmNamePrefix", + required: true, type: { - name: "Boolean" + name: "String" } }, - registrationInfo: { - serializedName: "properties.registrationInfo", + availabilityZones: { + serializedName: "properties.availabilityZones", type: { - name: "Composite", - className: "RegistrationInfoPatch" + name: "Sequence", + element: { + type: { + name: "Number" + } + } } }, - vmTemplate: { - serializedName: "properties.vmTemplate", + networkInfo: { + serializedName: "properties.networkInfo", type: { - name: "String" + name: "Composite", + className: "NetworkInfoProperties" } }, - ssoadfsAuthority: { - serializedName: "properties.ssoadfsAuthority", + vmSizeId: { + serializedName: "properties.vmSizeId", + required: true, type: { name: "String" } }, - ssoClientId: { - serializedName: "properties.ssoClientId", + diskInfo: { + serializedName: "properties.diskInfo", type: { - name: "String" + name: "Composite", + className: "DiskInfoProperties" } }, - ssoClientSecretKeyVaultPath: { - serializedName: "properties.ssoClientSecretKeyVaultPath", + customConfigurationScriptUrl: { + serializedName: "properties.customConfigurationScriptUrl", type: { name: "String" } }, - ssoSecretType: { - serializedName: "properties.ssoSecretType", + imageInfo: { + serializedName: "properties.imageInfo", type: { - name: "String" + name: "Composite", + className: "ImageInfoProperties" } }, - preferredAppGroupType: { - serializedName: "properties.preferredAppGroupType", + domainInfo: { + serializedName: "properties.domainInfo", type: { - name: "String" + name: "Composite", + className: "DomainInfoProperties" } }, - startVMOnConnect: { - serializedName: "properties.startVMOnConnect", + securityInfo: { + serializedName: "properties.securityInfo", type: { - name: "Boolean" + name: "Composite", + className: "SecurityInfoProperties" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + vmAdminCredentials: { + serializedName: "properties.vmAdminCredentials", type: { - name: "String" + name: "Composite", + className: "KeyVaultCredentialsProperties" } }, - agentUpdate: { - serializedName: "properties.agentUpdate", + bootDiagnosticsInfo: { + serializedName: "properties.bootDiagnosticsInfo", type: { name: "Composite", - className: "AgentUpdatePatchProperties" + className: "BootDiagnosticsInfoProperties" } } } @@ -2832,6 +4684,20 @@ export const SessionHost: coreClient.CompositeMapper = { name: "String" } }, + lastSessionHostUpdateTime: { + serializedName: "properties.lastSessionHostUpdateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + sessionHostConfiguration: { + serializedName: "properties.sessionHostConfiguration", + readOnly: true, + type: { + name: "String" + } + }, sessionHostHealthCheckResults: { serializedName: "properties.sessionHostHealthCheckResults", readOnly: true, @@ -3001,6 +4867,30 @@ export const MsixPackagePatch: coreClient.CompositeMapper = { } }; +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const ExpandMsixImage: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3098,6 +4988,44 @@ export const ExpandMsixImage: coreClient.CompositeMapper = { } } } + }, + certificateName: { + serializedName: "properties.certificateName", + nullable: true, + type: { + name: "String" + } + }, + certificateExpiry: { + serializedName: "properties.certificateExpiry", + nullable: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const AppAttachPackagePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackagePatch", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AppAttachPackagePatchProperties" + } } } } @@ -3415,6 +5343,12 @@ export const HostPool: coreClient.CompositeMapper = { name: "String" } }, + managementType: { + serializedName: "properties.managementType", + type: { + name: "String" + } + }, applicationGroupReferences: { serializedName: "properties.applicationGroupReferences", readOnly: true, @@ -3427,6 +5361,18 @@ export const HostPool: coreClient.CompositeMapper = { } } }, + appAttachPackageReferences: { + serializedName: "properties.appAttachPackageReferences", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, ssoadfsAuthority: { serializedName: "properties.ssoadfsAuthority", type: { @@ -3762,3 +5708,169 @@ export const ScalingPlanPersonalSchedule: coreClient.CompositeMapper = { } } }; + +export const SessionHostManagement: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostManagement", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + scheduledDateTimeZone: { + serializedName: "properties.scheduledDateTimeZone", + required: true, + type: { + name: "String" + } + }, + update: { + serializedName: "properties.update", + type: { + name: "Composite", + className: "HostPoolUpdateConfigurationProperties" + } + } + } + } +}; + +export const AppAttachPackage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppAttachPackage", + modelProperties: { + ...TrackedResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AppAttachPackageProperties" + } + } + } + } +}; + +export const ValidateSessionHostUpdatePostHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidateSessionHostUpdatePostHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const InitiateSessionHostUpdatePostHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InitiateSessionHostUpdatePostHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const ControlSessionHostUpdatePostHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ControlSessionHostUpdatePostHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const SessionHostConfigurationsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const SessionHostConfigurationsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionHostConfigurationsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts index 0b67d82f15f0..99331f38792f 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/models/parameters.ts @@ -28,11 +28,21 @@ import { DesktopPatch as DesktopPatchMapper, HostPool as HostPoolMapper, HostPoolPatch as HostPoolPatchMapper, + SessionHostManagement as SessionHostManagementMapper, + SessionHostManagementPatch as SessionHostManagementPatchMapper, + ValidateSessionHostUpdateRequestBody as ValidateSessionHostUpdateRequestBodyMapper, + UpdateSessionHostsRequestBody as UpdateSessionHostsRequestBodyMapper, + HostPoolControlParameter as HostPoolControlParameterMapper, + SessionHostConfiguration as SessionHostConfigurationMapper, + SessionHostConfigurationPatch as SessionHostConfigurationPatchMapper, SendMessage as SendMessageMapper, SessionHostPatch as SessionHostPatchMapper, MsixPackage as MsixPackageMapper, MsixPackagePatch as MsixPackagePatchMapper, - MsixImageURI as MsixImageURIMapper + ImportPackageInfoRequest as ImportPackageInfoRequestMapper, + MsixImageURI as MsixImageURIMapper, + AppAttachPackage as AppAttachPackageMapper, + AppAttachPackagePatch as AppAttachPackagePatchMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -62,7 +72,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-09-05", + defaultValue: "2023-11-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -370,6 +380,116 @@ export const hostPool1: OperationParameter = { mapper: HostPoolPatchMapper }; +export const sessionHostManagement: OperationParameter = { + parameterPath: "sessionHostManagement", + mapper: SessionHostManagementMapper +}; + +export const sessionHostManagement1: OperationParameter = { + parameterPath: ["options", "sessionHostManagement"], + mapper: SessionHostManagementPatchMapper +}; + +export const validateSessionHostUpdateRequestBody: OperationParameter = { + parameterPath: ["options", "validateSessionHostUpdateRequestBody"], + mapper: ValidateSessionHostUpdateRequestBodyMapper +}; + +export const updateSessionHostsRequestBody: OperationParameter = { + parameterPath: ["options", "updateSessionHostsRequestBody"], + mapper: UpdateSessionHostsRequestBodyMapper +}; + +export const hostPoolControlParameter: OperationParameter = { + parameterPath: "hostPoolControlParameter", + mapper: HostPoolControlParameterMapper +}; + +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + constraints: { + MaxLength: 36, + MinLength: 36 + }, + serializedName: "operationId", + required: true, + type: { + name: "String" + } + } +}; + +export const isLatest: OperationQueryParameter = { + parameterPath: ["options", "isLatest"], + mapper: { + serializedName: "isLatest", + type: { + name: "Boolean" + } + } +}; + +export const type: OperationQueryParameter = { + parameterPath: ["options", "type"], + mapper: { + serializedName: "type", + type: { + name: "String" + } + } +}; + +export const isNonTerminal: OperationQueryParameter = { + parameterPath: ["options", "isNonTerminal"], + mapper: { + serializedName: "isNonTerminal", + type: { + name: "Boolean" + } + } +}; + +export const correlationId: OperationQueryParameter = { + parameterPath: ["options", "correlationId"], + mapper: { + serializedName: "correlationId", + type: { + name: "String" + } + } +}; + +export const action: OperationQueryParameter = { + parameterPath: ["options", "action"], + mapper: { + serializedName: "action", + type: { + name: "String" + } + } +}; + +export const isInitiatingOperation: OperationQueryParameter = { + parameterPath: ["options", "isInitiatingOperation"], + mapper: { + serializedName: "isInitiatingOperation", + type: { + name: "Boolean" + } + } +}; + +export const sessionHostConfiguration: OperationParameter = { + parameterPath: "sessionHostConfiguration", + mapper: SessionHostConfigurationMapper +}; + +export const sessionHostConfiguration1: OperationParameter = { + parameterPath: ["options", "sessionHostConfiguration"], + mapper: SessionHostConfigurationPatchMapper +}; + export const sessionHostName: OperationURLParameter = { parameterPath: "sessionHostName", mapper: { @@ -435,7 +555,38 @@ export const msixPackage1: OperationParameter = { mapper: MsixPackagePatchMapper }; +export const importPackageInfoRequest: OperationParameter = { + parameterPath: "importPackageInfoRequest", + mapper: ImportPackageInfoRequestMapper +}; + export const msixImageURI: OperationParameter = { parameterPath: "msixImageURI", mapper: MsixImageURIMapper }; + +export const appAttachPackageName: OperationURLParameter = { + parameterPath: "appAttachPackageName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$"), + MaxLength: 100, + MinLength: 3 + }, + serializedName: "appAttachPackageName", + required: true, + type: { + name: "String" + } + } +}; + +export const appAttachPackage: OperationParameter = { + parameterPath: "appAttachPackage", + mapper: AppAttachPackageMapper +}; + +export const appAttachPackagePatch: OperationParameter = { + parameterPath: ["options", "appAttachPackagePatch"], + mapper: AppAttachPackagePatchMapper +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/activeSessionHostConfigurations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/activeSessionHostConfigurations.ts new file mode 100644 index 000000000000..79a3e902f3f2 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/activeSessionHostConfigurations.ts @@ -0,0 +1,245 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ActiveSessionHostConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + ActiveSessionHostConfiguration, + ActiveSessionHostConfigurationsListByHostPoolNextOptionalParams, + ActiveSessionHostConfigurationsListByHostPoolOptionalParams, + ActiveSessionHostConfigurationsListByHostPoolResponse, + ActiveSessionHostConfigurationsGetOptionalParams, + ActiveSessionHostConfigurationsGetResponse, + ActiveSessionHostConfigurationsListByHostPoolNextResponse +} from "../models"; + +/// +/** Class containing ActiveSessionHostConfigurations operations. */ +export class ActiveSessionHostConfigurationsImpl + implements ActiveSessionHostConfigurations { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class ActiveSessionHostConfigurations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * List activeSessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options, + settings + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ActiveSessionHostConfigurationsListByHostPoolResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get the ActiveSessionHostConfiguration for the hostPool that is currently being used for update + * operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + getOperationSpec + ); + } + + /** + * List activeSessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: ActiveSessionHostConfigurationsListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/activeSessionHostConfigurations/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActiveSessionHostConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/activeSessionHostConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActiveSessionHostConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ActiveSessionHostConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts new file mode 100644 index 000000000000..246b816037f4 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageInfo.ts @@ -0,0 +1,225 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AppAttachPackageInfo } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + AppAttachPackage, + ImportPackageInfoRequest, + AppAttachPackageInfoImportNextOptionalParams, + AppAttachPackageInfoImportOptionalParams, + AppAttachPackageInfoImportResponse, + AppAttachPackageInfoImportNextResponse +} from "../models"; + +/// +/** Class containing AppAttachPackageInfo operations. */ +export class AppAttachPackageInfoImpl implements AppAttachPackageInfo { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class AppAttachPackageInfo class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Gets information from a package given the path to the package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + public listImport( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.importPagingAll( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.importPagingPage( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options, + settings + ); + } + }; + } + + private async *importPagingPage( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageInfoImportResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._import( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._importNext( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *importPagingAll( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): AsyncIterableIterator { + for await (const page of this.importPagingPage( + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + options + )) { + yield* page; + } + } + + /** + * Gets information from a package given the path to the package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + private _import( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, importPackageInfoRequest, options }, + importOperationSpec + ); + } + + /** + * ImportNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param importPackageInfoRequest Object containing URI to package image and other optional properties + * @param nextLink The nextLink from the previous successful call to the Import method. + * @param options The options parameters. + */ + private _importNext( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + nextLink: string, + options?: AppAttachPackageInfoImportNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + hostPoolName, + importPackageInfoRequest, + nextLink, + options + }, + importNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const importOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.importPackageInfoRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const importNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts new file mode 100644 index 000000000000..0488e03fe4e0 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/appAttachPackageOperations.ts @@ -0,0 +1,475 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AppAttachPackageOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + AppAttachPackage, + AppAttachPackageListByResourceGroupNextOptionalParams, + AppAttachPackageListByResourceGroupOptionalParams, + AppAttachPackageListByResourceGroupResponse, + AppAttachPackageListBySubscriptionNextOptionalParams, + AppAttachPackageListBySubscriptionOptionalParams, + AppAttachPackageListBySubscriptionResponse, + AppAttachPackageGetOptionalParams, + AppAttachPackageGetResponse, + AppAttachPackageCreateOrUpdateOptionalParams, + AppAttachPackageCreateOrUpdateResponse, + AppAttachPackageDeleteOptionalParams, + AppAttachPackageUpdateOptionalParams, + AppAttachPackageUpdateResponse, + AppAttachPackageListByResourceGroupNextResponse, + AppAttachPackageListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing AppAttachPackageOperations operations. */ +export class AppAttachPackageOperationsImpl + implements AppAttachPackageOperations { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class AppAttachPackageOperations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AppAttachPackageListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AppAttachPackageListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get an app attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + getOperationSpec + ); + } + + /** + * Create or update an App Attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param appAttachPackage Object containing App Attach Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appAttachPackageName: string, + appAttachPackage: AppAttachPackage, + options?: AppAttachPackageCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, appAttachPackage, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Remove an App Attach Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + deleteOperationSpec + ); + } + + /** + * Update an App Attach Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appAttachPackageName, options }, + updateOperationSpec + ); + } + + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: AppAttachPackageListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: AppAttachPackageListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + 201: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.appAttachPackage, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.force], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackage + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.appAttachPackagePatch, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appAttachPackageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppAttachPackageList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/controlSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/controlSessionHostUpdate.ts new file mode 100644 index 000000000000..8f4b4d24dfaf --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/controlSessionHostUpdate.ts @@ -0,0 +1,174 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { ControlSessionHostUpdate } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + HostPoolControlParameter, + ControlSessionHostUpdatePostOptionalParams, + ControlSessionHostUpdatePostResponse +} from "../models"; + +/** Class containing ControlSessionHostUpdate operations. */ +export class ControlSessionHostUpdateImpl implements ControlSessionHostUpdate { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class ControlSessionHostUpdate class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Control update of a hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPoolControlParameter Object containing control action for hostpool update. + * @param options The options parameters. + */ + async beginPost( + resourceGroupName: string, + hostPoolName: string, + hostPoolControlParameter: HostPoolControlParameter, + options?: ControlSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ControlSessionHostUpdatePostResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + hostPoolName, + hostPoolControlParameter, + options + }, + spec: postOperationSpec + }); + const poller = await createHttpPoller< + ControlSessionHostUpdatePostResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Control update of a hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPoolControlParameter Object containing control action for hostpool update. + * @param options The options parameters. + */ + async beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + hostPoolControlParameter: HostPoolControlParameter, + options?: ControlSessionHostUpdatePostOptionalParams + ): Promise { + const poller = await this.beginPost( + resourceGroupName, + hostPoolName, + hostPoolControlParameter, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const postOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default/controlSessionHostUpdate", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ControlSessionHostUpdatePostHeaders + }, + 201: { + headersMapper: Mappers.ControlSessionHostUpdatePostHeaders + }, + 202: { + headersMapper: Mappers.ControlSessionHostUpdatePostHeaders + }, + 204: { + headersMapper: Mappers.ControlSessionHostUpdatePostHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.hostPoolControlParameter, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts index eac353c3b157..f733ec5d3aaa 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/index.ts @@ -18,7 +18,18 @@ export * from "./startMenuItems"; export * from "./applications"; export * from "./desktops"; export * from "./hostPools"; +export * from "./sessionHostManagements"; +export * from "./validateSessionHostUpdate"; +export * from "./initiateSessionHostUpdate"; +export * from "./controlSessionHostUpdate"; +export * from "./sessionHostManagementsOperationStatus"; +export * from "./sessionHostConfigurations"; +export * from "./sessionHostConfigurationsOperationStatus"; +export * from "./activeSessionHostConfigurations"; export * from "./userSessions"; export * from "./sessionHosts"; +export * from "./sessionHostOperations"; export * from "./msixPackages"; +export * from "./appAttachPackageInfo"; export * from "./msixImages"; +export * from "./appAttachPackageOperations"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/initiateSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/initiateSessionHostUpdate.ts new file mode 100644 index 000000000000..8f20785f9d21 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/initiateSessionHostUpdate.ts @@ -0,0 +1,164 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { InitiateSessionHostUpdate } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + InitiateSessionHostUpdatePostOptionalParams, + InitiateSessionHostUpdatePostResponse +} from "../models"; + +/** Class containing InitiateSessionHostUpdate operations. */ +export class InitiateSessionHostUpdateImpl + implements InitiateSessionHostUpdate { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class InitiateSessionHostUpdate class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Initiates a hostpool update or schedule an update for the future. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginPost( + resourceGroupName: string, + hostPoolName: string, + options?: InitiateSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InitiateSessionHostUpdatePostResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostPoolName, options }, + spec: postOperationSpec + }); + const poller = await createHttpPoller< + InitiateSessionHostUpdatePostResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Initiates a hostpool update or schedule an update for the future. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: InitiateSessionHostUpdatePostOptionalParams + ): Promise { + const poller = await this.beginPost( + resourceGroupName, + hostPoolName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const postOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default/initiateSessionHostUpdate", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.InitiateSessionHostUpdatePostHeaders + }, + 201: { + headersMapper: Mappers.InitiateSessionHostUpdatePostHeaders + }, + 202: { + headersMapper: Mappers.InitiateSessionHostUpdatePostHeaders + }, + 204: { + headersMapper: Mappers.InitiateSessionHostUpdatePostHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.updateSessionHostsRequestBody, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurations.ts new file mode 100644 index 000000000000..ba40bea10656 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurations.ts @@ -0,0 +1,520 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SessionHostConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + SessionHostConfiguration, + SessionHostConfigurationsListByHostPoolNextOptionalParams, + SessionHostConfigurationsListByHostPoolOptionalParams, + SessionHostConfigurationsListByHostPoolResponse, + SessionHostConfigurationsCreateOrUpdateOptionalParams, + SessionHostConfigurationsCreateOrUpdateResponse, + SessionHostConfigurationsUpdateOptionalParams, + SessionHostConfigurationsUpdateResponse, + SessionHostConfigurationsGetOptionalParams, + SessionHostConfigurationsGetResponse, + SessionHostConfigurationsListByHostPoolNextResponse +} from "../models"; + +/// +/** Class containing SessionHostConfigurations operations. */ +export class SessionHostConfigurationsImpl + implements SessionHostConfigurations { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class SessionHostConfigurations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * List sessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options, + settings + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsListByHostPoolOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SessionHostConfigurationsListByHostPoolResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Create or update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostConfiguration Object containing SessionHostConfiguration definitions. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + hostPoolName: string, + sessionHostConfiguration: SessionHostConfiguration, + options?: SessionHostConfigurationsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + SessionHostConfigurationsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + hostPoolName, + sessionHostConfiguration, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SessionHostConfigurationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostConfiguration Object containing SessionHostConfiguration definitions. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + hostPoolName: string, + sessionHostConfiguration: SessionHostConfiguration, + options?: SessionHostConfigurationsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + hostPoolName, + sessionHostConfiguration, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + SessionHostConfigurationsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostPoolName, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + SessionHostConfigurationsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + hostPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + getOperationSpec + ); + } + + /** + * List sessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: SessionHostConfigurationsListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sessionHostConfiguration, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsUpdateHeaders + }, + 201: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsUpdateHeaders + }, + 202: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsUpdateHeaders + }, + 204: { + bodyMapper: Mappers.SessionHostConfiguration, + headersMapper: Mappers.SessionHostConfigurationsUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sessionHostConfiguration1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurationsOperationStatus.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurationsOperationStatus.ts new file mode 100644 index 000000000000..1dac8c8a9b5f --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostConfigurationsOperationStatus.ts @@ -0,0 +1,243 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SessionHostConfigurationsOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SessionHostConfigurationOperationStatus, + SessionHostConfigurationsOperationStatusListNextOptionalParams, + SessionHostConfigurationsOperationStatusListOptionalParams, + SessionHostConfigurationsOperationStatusListResponse, + SessionHostConfigurationsOperationStatusGetOptionalParams, + SessionHostConfigurationsOperationStatusGetResponse, + SessionHostConfigurationsOperationStatusListNextResponse +} from "../models"; + +/// +/** Class containing SessionHostConfigurationsOperationStatus operations. */ +export class SessionHostConfigurationsOperationStatusImpl + implements SessionHostConfigurationsOperationStatus { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class SessionHostConfigurationsOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Get Operation status for SessionHostConfiguration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsOperationStatusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, hostPoolName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + hostPoolName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsOperationStatusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SessionHostConfigurationsOperationStatusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, hostPoolName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsOperationStatusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param operationId The Guid of the operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + operationId: string, + options?: SessionHostConfigurationsOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, operationId, options }, + getOperationSpec + ); + } + + /** + * Get Operation status for SessionHostConfiguration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsOperationStatusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: SessionHostConfigurationsOperationStatusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations/default/operationStatuses/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfigurationOperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostConfigurations/default/operationStatuses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfigurationOperationStatusList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.isLatest, + Parameters.isNonTerminal + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostConfigurationOperationStatusList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagements.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagements.ts new file mode 100644 index 000000000000..9b4538e6a645 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagements.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SessionHostManagements } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SessionHostManagement, + SessionHostManagementsListByHostPoolNextOptionalParams, + SessionHostManagementsListByHostPoolOptionalParams, + SessionHostManagementsListByHostPoolResponse, + SessionHostManagementsGetOptionalParams, + SessionHostManagementsGetResponse, + SessionHostManagementsCreateOrUpdateOptionalParams, + SessionHostManagementsCreateOrUpdateResponse, + SessionHostManagementsUpdateOptionalParams, + SessionHostManagementsUpdateResponse, + SessionHostManagementsListByHostPoolNextResponse +} from "../models"; + +/// +/** Class containing SessionHostManagements operations. */ +export class SessionHostManagementsImpl implements SessionHostManagements { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class SessionHostManagements class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * List SessionHostManagements by hostPool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostPoolPagingAll( + resourceGroupName, + hostPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options, + settings + ); + } + }; + } + + private async *listByHostPoolPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsListByHostPoolOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SessionHostManagementsListByHostPoolResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByHostPool( + resourceGroupName, + hostPoolName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByHostPoolNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByHostPoolPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsListByHostPoolOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostPoolPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + getOperationSpec + ); + } + + /** + * Create or update a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostManagement Object containing SessionHostManagement definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + sessionHostManagement: SessionHostManagement, + options?: SessionHostManagementsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostManagement, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Update a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + updateOperationSpec + ); + } + + /** + * List SessionHostManagements by hostPool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsListByHostPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listByHostPoolOperationSpec + ); + } + + /** + * ListByHostPoolNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the ListByHostPool method. + * @param options The options parameters. + */ + private _listByHostPoolNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: SessionHostManagementsListByHostPoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listByHostPoolNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagement + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagement + }, + 201: { + bodyMapper: Mappers.SessionHostManagement + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.sessionHostManagement, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagement + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.sessionHostManagement1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByHostPoolOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagementList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostPoolNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagementList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagementsOperationStatus.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagementsOperationStatus.ts new file mode 100644 index 000000000000..cd5706896c23 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostManagementsOperationStatus.ts @@ -0,0 +1,247 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SessionHostManagementsOperationStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SessionHostManagementOperationStatus, + SessionHostManagementsOperationStatusListNextOptionalParams, + SessionHostManagementsOperationStatusListOptionalParams, + SessionHostManagementsOperationStatusListResponse, + SessionHostManagementsOperationStatusGetOptionalParams, + SessionHostManagementsOperationStatusGetResponse, + SessionHostManagementsOperationStatusListNextResponse +} from "../models"; + +/// +/** Class containing SessionHostManagementsOperationStatus operations. */ +export class SessionHostManagementsOperationStatusImpl + implements SessionHostManagementsOperationStatus { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class SessionHostManagementsOperationStatus class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsOperationStatusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, hostPoolName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + hostPoolName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsOperationStatusListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SessionHostManagementsOperationStatusListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, hostPoolName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + hostPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsOperationStatusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + hostPoolName, + options + )) { + yield* page; + } + } + + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param operationId The Guid of the operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + operationId: string, + options?: SessionHostManagementsOperationStatusGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, operationId, options }, + getOperationSpec + ); + } + + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsOperationStatusListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + hostPoolName: string, + nextLink: string, + options?: SessionHostManagementsOperationStatusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default/operationStatuses/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagementOperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default/operationStatuses", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagementOperationStatusList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.isLatest, + Parameters.type, + Parameters.isNonTerminal, + Parameters.correlationId, + Parameters.action, + Parameters.isInitiatingOperation + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionHostManagementOperationStatusList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostOperations.ts new file mode 100644 index 000000000000..8b535857425c --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/sessionHostOperations.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SessionHostOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { SessionHostRetryProvisioningOptionalParams } from "../models"; + +/** Class containing SessionHostOperations operations. */ +export class SessionHostOperationsImpl implements SessionHostOperations { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class SessionHostOperations class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Retry provisioning on a SessionHost. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + retryProvisioning( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostRetryProvisioningOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostPoolName, sessionHostName, options }, + retryProvisioningOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const retryProvisioningOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/retryProvisioning", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName, + Parameters.sessionHostName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/validateSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/validateSessionHostUpdate.ts new file mode 100644 index 000000000000..f519ac12bcf7 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operations/validateSessionHostUpdate.ts @@ -0,0 +1,166 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { ValidateSessionHostUpdate } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DesktopVirtualizationAPIClient } from "../desktopVirtualizationAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ValidateSessionHostUpdatePostOptionalParams, + ValidateSessionHostUpdatePostResponse +} from "../models"; + +/** Class containing ValidateSessionHostUpdate operations. */ +export class ValidateSessionHostUpdateImpl + implements ValidateSessionHostUpdate { + private readonly client: DesktopVirtualizationAPIClient; + + /** + * Initialize a new instance of the class ValidateSessionHostUpdate class. + * @param client Reference to the service client + */ + constructor(client: DesktopVirtualizationAPIClient) { + this.client = client; + } + + /** + * Validates a session host update operation for validation errors. When Session Host Configuration and + * Session Host Management values are not provided the ones saved in the Host Pool will be used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginPost( + resourceGroupName: string, + hostPoolName: string, + options?: ValidateSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ValidateSessionHostUpdatePostResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, hostPoolName, options }, + spec: postOperationSpec + }); + const poller = await createHttpPoller< + ValidateSessionHostUpdatePostResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Validates a session host update operation for validation errors. When Session Host Configuration and + * Session Host Management values are not provided the ones saved in the Host Pool will be used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + async beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: ValidateSessionHostUpdatePostOptionalParams + ): Promise { + const poller = await this.beginPost( + resourceGroupName, + hostPoolName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const postOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHostManagements/default/validateSessionHostUpdate", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ValidateSessionHostUpdatePostHeaders + }, + 201: { + headersMapper: Mappers.ValidateSessionHostUpdatePostHeaders + }, + 202: { + headersMapper: Mappers.ValidateSessionHostUpdatePostHeaders + }, + 204: { + headersMapper: Mappers.ValidateSessionHostUpdatePostHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.validateSessionHostUpdateRequestBody, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.hostPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/activeSessionHostConfigurations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/activeSessionHostConfigurations.ts new file mode 100644 index 000000000000..1eb02bee7e6e --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/activeSessionHostConfigurations.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ActiveSessionHostConfiguration, + ActiveSessionHostConfigurationsListByHostPoolOptionalParams, + ActiveSessionHostConfigurationsGetOptionalParams, + ActiveSessionHostConfigurationsGetResponse +} from "../models"; + +/// +/** Interface representing a ActiveSessionHostConfigurations. */ +export interface ActiveSessionHostConfigurations { + /** + * List activeSessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the ActiveSessionHostConfiguration for the hostPool that is currently being used for update + * operations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: ActiveSessionHostConfigurationsGetOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts new file mode 100644 index 000000000000..c210f69e6760 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageInfo.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AppAttachPackage, + ImportPackageInfoRequest, + AppAttachPackageInfoImportOptionalParams +} from "../models"; + +/// +/** Interface representing a AppAttachPackageInfo. */ +export interface AppAttachPackageInfo { + /** + * Gets information from a package given the path to the package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param importPackageInfoRequest Object containing URI to package image and other optional properties + * @param options The options parameters. + */ + listImport( + resourceGroupName: string, + hostPoolName: string, + importPackageInfoRequest: ImportPackageInfoRequest, + options?: AppAttachPackageInfoImportOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts new file mode 100644 index 000000000000..83859ed92a93 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/appAttachPackageOperations.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AppAttachPackage, + AppAttachPackageListByResourceGroupOptionalParams, + AppAttachPackageListBySubscriptionOptionalParams, + AppAttachPackageGetOptionalParams, + AppAttachPackageGetResponse, + AppAttachPackageCreateOrUpdateOptionalParams, + AppAttachPackageCreateOrUpdateResponse, + AppAttachPackageDeleteOptionalParams, + AppAttachPackageUpdateOptionalParams, + AppAttachPackageUpdateResponse +} from "../models"; + +/// +/** Interface representing a AppAttachPackageOperations. */ +export interface AppAttachPackageOperations { + /** + * List App Attach packages in resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AppAttachPackageListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List App Attach packages in subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: AppAttachPackageListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get an app attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageGetOptionalParams + ): Promise; + /** + * Create or update an App Attach package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param appAttachPackage Object containing App Attach Package definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appAttachPackageName: string, + appAttachPackage: AppAttachPackage, + options?: AppAttachPackageCreateOrUpdateOptionalParams + ): Promise; + /** + * Remove an App Attach Package. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageDeleteOptionalParams + ): Promise; + /** + * Update an App Attach Package + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package arm object + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appAttachPackageName: string, + options?: AppAttachPackageUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/controlSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/controlSessionHostUpdate.ts new file mode 100644 index 000000000000..774f49dd9c0a --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/controlSessionHostUpdate.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + HostPoolControlParameter, + ControlSessionHostUpdatePostOptionalParams, + ControlSessionHostUpdatePostResponse +} from "../models"; + +/** Interface representing a ControlSessionHostUpdate. */ +export interface ControlSessionHostUpdate { + /** + * Control update of a hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPoolControlParameter Object containing control action for hostpool update. + * @param options The options parameters. + */ + beginPost( + resourceGroupName: string, + hostPoolName: string, + hostPoolControlParameter: HostPoolControlParameter, + options?: ControlSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ControlSessionHostUpdatePostResponse + > + >; + /** + * Control update of a hostpool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param hostPoolControlParameter Object containing control action for hostpool update. + * @param options The options parameters. + */ + beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + hostPoolControlParameter: HostPoolControlParameter, + options?: ControlSessionHostUpdatePostOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts index eac353c3b157..f733ec5d3aaa 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/index.ts @@ -18,7 +18,18 @@ export * from "./startMenuItems"; export * from "./applications"; export * from "./desktops"; export * from "./hostPools"; +export * from "./sessionHostManagements"; +export * from "./validateSessionHostUpdate"; +export * from "./initiateSessionHostUpdate"; +export * from "./controlSessionHostUpdate"; +export * from "./sessionHostManagementsOperationStatus"; +export * from "./sessionHostConfigurations"; +export * from "./sessionHostConfigurationsOperationStatus"; +export * from "./activeSessionHostConfigurations"; export * from "./userSessions"; export * from "./sessionHosts"; +export * from "./sessionHostOperations"; export * from "./msixPackages"; +export * from "./appAttachPackageInfo"; export * from "./msixImages"; +export * from "./appAttachPackageOperations"; diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/initiateSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/initiateSessionHostUpdate.ts new file mode 100644 index 000000000000..c530d3c99d54 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/initiateSessionHostUpdate.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + InitiateSessionHostUpdatePostOptionalParams, + InitiateSessionHostUpdatePostResponse +} from "../models"; + +/** Interface representing a InitiateSessionHostUpdate. */ +export interface InitiateSessionHostUpdate { + /** + * Initiates a hostpool update or schedule an update for the future. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginPost( + resourceGroupName: string, + hostPoolName: string, + options?: InitiateSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + InitiateSessionHostUpdatePostResponse + > + >; + /** + * Initiates a hostpool update or schedule an update for the future. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: InitiateSessionHostUpdatePostOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurations.ts new file mode 100644 index 000000000000..dcef4b316da2 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurations.ts @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + SessionHostConfiguration, + SessionHostConfigurationsListByHostPoolOptionalParams, + SessionHostConfigurationsCreateOrUpdateOptionalParams, + SessionHostConfigurationsCreateOrUpdateResponse, + SessionHostConfigurationsUpdateOptionalParams, + SessionHostConfigurationsUpdateResponse, + SessionHostConfigurationsGetOptionalParams, + SessionHostConfigurationsGetResponse +} from "../models"; + +/// +/** Interface representing a SessionHostConfigurations. */ +export interface SessionHostConfigurations { + /** + * List sessionHostConfigurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostConfiguration Object containing SessionHostConfiguration definitions. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + hostPoolName: string, + sessionHostConfiguration: SessionHostConfiguration, + options?: SessionHostConfigurationsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + SessionHostConfigurationsCreateOrUpdateResponse + > + >; + /** + * Create or update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostConfiguration Object containing SessionHostConfiguration definitions. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + hostPoolName: string, + sessionHostConfiguration: SessionHostConfiguration, + options?: SessionHostConfigurationsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + SessionHostConfigurationsUpdateResponse + > + >; + /** + * Update a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsUpdateOptionalParams + ): Promise; + /** + * Get a SessionHostConfiguration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsGetOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurationsOperationStatus.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurationsOperationStatus.ts new file mode 100644 index 000000000000..7b4d48008ca6 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostConfigurationsOperationStatus.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SessionHostConfigurationOperationStatus, + SessionHostConfigurationsOperationStatusListOptionalParams, + SessionHostConfigurationsOperationStatusGetOptionalParams, + SessionHostConfigurationsOperationStatusGetResponse +} from "../models"; + +/// +/** Interface representing a SessionHostConfigurationsOperationStatus. */ +export interface SessionHostConfigurationsOperationStatus { + /** + * Get Operation status for SessionHostConfiguration + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostConfigurationsOperationStatusListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param operationId The Guid of the operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + operationId: string, + options?: SessionHostConfigurationsOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagements.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagements.ts new file mode 100644 index 000000000000..25c9e6e1ef26 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagements.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SessionHostManagement, + SessionHostManagementsListByHostPoolOptionalParams, + SessionHostManagementsGetOptionalParams, + SessionHostManagementsGetResponse, + SessionHostManagementsCreateOrUpdateOptionalParams, + SessionHostManagementsCreateOrUpdateResponse, + SessionHostManagementsUpdateOptionalParams, + SessionHostManagementsUpdateResponse +} from "../models"; + +/// +/** Interface representing a SessionHostManagements. */ +export interface SessionHostManagements { + /** + * List SessionHostManagements by hostPool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + listByHostPool( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsListByHostPoolOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsGetOptionalParams + ): Promise; + /** + * Create or update a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostManagement Object containing SessionHostManagement definitions. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostPoolName: string, + sessionHostManagement: SessionHostManagement, + options?: SessionHostManagementsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a SessionHostManagement. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagementsOperationStatus.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagementsOperationStatus.ts new file mode 100644 index 000000000000..6b59b088f39f --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostManagementsOperationStatus.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SessionHostManagementOperationStatus, + SessionHostManagementsOperationStatusListOptionalParams, + SessionHostManagementsOperationStatusGetOptionalParams, + SessionHostManagementsOperationStatusGetResponse +} from "../models"; + +/// +/** Interface representing a SessionHostManagementsOperationStatus. */ +export interface SessionHostManagementsOperationStatus { + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + list( + resourceGroupName: string, + hostPoolName: string, + options?: SessionHostManagementsOperationStatusListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get Operation status for SessionHostManagement + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param operationId The Guid of the operation. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostPoolName: string, + operationId: string, + options?: SessionHostManagementsOperationStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostOperations.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostOperations.ts new file mode 100644 index 000000000000..ee4302b74f09 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/sessionHostOperations.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SessionHostRetryProvisioningOptionalParams } from "../models"; + +/** Interface representing a SessionHostOperations. */ +export interface SessionHostOperations { + /** + * Retry provisioning on a SessionHost. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param sessionHostName The name of the session host within the specified host pool + * @param options The options parameters. + */ + retryProvisioning( + resourceGroupName: string, + hostPoolName: string, + sessionHostName: string, + options?: SessionHostRetryProvisioningOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/validateSessionHostUpdate.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/validateSessionHostUpdate.ts new file mode 100644 index 000000000000..7fe06b98d362 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/src/operationsInterfaces/validateSessionHostUpdate.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ValidateSessionHostUpdatePostOptionalParams, + ValidateSessionHostUpdatePostResponse +} from "../models"; + +/** Interface representing a ValidateSessionHostUpdate. */ +export interface ValidateSessionHostUpdate { + /** + * Validates a session host update operation for validation errors. When Session Host Configuration and + * Session Host Management values are not provided the ones saved in the Host Pool will be used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginPost( + resourceGroupName: string, + hostPoolName: string, + options?: ValidateSessionHostUpdatePostOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ValidateSessionHostUpdatePostResponse + > + >; + /** + * Validates a session host update operation for validation errors. When Session Host Configuration and + * Session Host Management values are not provided the ones saved in the Host Pool will be used. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group + * @param options The options parameters. + */ + beginPostAndWait( + resourceGroupName: string, + hostPoolName: string, + options?: ValidateSessionHostUpdatePostOptionalParams + ): Promise; +} diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json b/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json index 02d427ad910e..3e6ae96443f3 100644 --- a/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json +++ b/sdk/desktopvirtualization/arm-desktopvirtualization/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-desktopvirtualization": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"