From 9da7baa985fee2719484a8402bc07d4ab13a0197 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 21 Mar 2023 17:34:32 +0000 Subject: [PATCH] CodeGen from PR 23124 in Azure/azure-rest-api-specs Merge 0313b374f23eda4aae2a7d1e45c49abe0d4d8a13 into 543f1920ac96303cc244d60e1c12f0b56fc646db --- common/config/rush/pnpm-lock.yaml | 20 +- sdk/devcenter/arm-devcenter/CHANGELOG.md | 81 ++- sdk/devcenter/arm-devcenter/LICENSE | 2 +- sdk/devcenter/arm-devcenter/_meta.json | 8 +- sdk/devcenter/arm-devcenter/package.json | 19 +- .../arm-devcenter/review/arm-devcenter.api.md | 220 +++++--- .../arm-devcenter/src/devCenterClient.ts | 6 +- sdk/devcenter/arm-devcenter/src/lroImpl.ts | 54 +- .../arm-devcenter/src/models/index.ts | 486 +++++++++++------- .../arm-devcenter/src/models/mappers.ts | 434 ++++++++++++---- .../arm-devcenter/src/models/parameters.ts | 2 +- .../src/operations/attachedNetworks.ts | 55 +- .../arm-devcenter/src/operations/catalogs.ts | 99 ++-- .../src/operations/devBoxDefinitions.ts | 92 ++-- .../src/operations/devCenters.ts | 80 +-- .../src/operations/environmentTypes.ts | 1 - .../arm-devcenter/src/operations/galleries.ts | 54 +- .../src/operations/imageVersions.ts | 1 - .../arm-devcenter/src/operations/images.ts | 2 - .../arm-devcenter/src/operations/index.ts | 1 - .../src/operations/networkConnections.ts | 278 ++++++++-- .../src/operations/operations.ts | 1 - .../arm-devcenter/src/operations/pools.ts | 190 +++++-- .../projectAllowedEnvironmentTypes.ts | 1 - .../src/operations/projectEnvironmentTypes.ts | 1 - .../arm-devcenter/src/operations/projects.ts | 80 +-- .../arm-devcenter/src/operations/schedules.ts | 93 ++-- .../arm-devcenter/src/operations/skus.ts | 1 - .../arm-devcenter/src/operations/usages.ts | 175 ------- .../operationsInterfaces/attachedNetworks.ts | 8 +- .../src/operationsInterfaces/catalogs.ts | 14 +- .../operationsInterfaces/devBoxDefinitions.ts | 12 +- .../src/operationsInterfaces/devCenters.ts | 12 +- .../src/operationsInterfaces/galleries.ts | 8 +- .../src/operationsInterfaces/index.ts | 1 - .../networkConnections.ts | 28 +- .../src/operationsInterfaces/pools.ts | 39 +- .../src/operationsInterfaces/projects.ts | 12 +- .../src/operationsInterfaces/schedules.ts | 12 +- .../src/operationsInterfaces/usages.ts | 24 - .../arm-devcenter/src/pagingHelper.ts | 8 +- .../arm-devcenter/test/sampleTest.ts | 43 ++ sdk/devcenter/arm-devcenter/tsconfig.json | 10 +- 43 files changed, 1743 insertions(+), 1025 deletions(-) delete mode 100644 sdk/devcenter/arm-devcenter/src/operations/usages.ts delete mode 100644 sdk/devcenter/arm-devcenter/src/operationsInterfaces/usages.ts create mode 100644 sdk/devcenter/arm-devcenter/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 819babdbf5a2..9997aac79cbe 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3893,7 +3893,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230320 + typescript: 5.1.0-dev.20230321 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8749,8 +8749,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230320: - resolution: {integrity: sha512-UWob7IhN/k84vqndbUwXaUNuLfzpgaD3wYm2FAKCUjXE0sMn5rf0Z+A8N2glIfqQBnBObLzIitWepn3TRF9Sjg==} + /typescript/5.1.0-dev.20230321: + resolution: {integrity: sha512-GFq3xvjbJImoKgCDJEiB7Bsa1wQdu/9tlb8Qj475ydSraETbCLzy+Ao3cqQ+KWBM6Mqo+0b1rrpe2Gj0DZz2+w==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -11561,7 +11561,7 @@ packages: dev: false file:projects/arm-devcenter.tgz: - resolution: {integrity: sha512-X6q7QLSrfCe0AiVKfqDp2xJRgCtOqoH79A1lpXciTyjmlIDuJUsjLw6m84xqscyWTMbCvta7o59ksaZEaGcNJQ==, tarball: file:projects/arm-devcenter.tgz} + resolution: {integrity: sha512-+vKsqonIssQVyq/KSC+PZ/ZdxL2ZHihYZAcbqiXRxsNksBKVFitpBO5VhJHVwziPgs5m6WoyidZuc1WLfGx/gg==, tarball: file:projects/arm-devcenter.tgz} name: '@rush-temp/arm-devcenter' version: 0.0.0 dependencies: @@ -11575,7 +11575,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -12170,19 +12171,19 @@ packages: dev: false file:projects/arm-graphservices.tgz: - resolution: {integrity: sha512-FGMQq6BOIpb01GiMS1PDpo/y17Bb9bxNSMVtLJRoORxpGlTgbpDWB+1o65n5kZ4P2Sda2DScSr+Oml3uXoC3kg==, tarball: file:projects/arm-graphservices.tgz} + resolution: {integrity: sha512-W4Mpd/2C0oFq2ylu1h0QbdANHiy70H5DmfFjBxsY/9xE4X9IV9DlihvCO6i+VJNC0X7BTlvGmfa9JLVgFLjqxg==, tarball: file:projects/arm-graphservices.tgz} name: '@rush-temp/arm-graphservices' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 2.0.0 '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.34.4_@types+node@14.18.37 + '@microsoft/api-extractor': 7.34.4_@types+node@14.18.38 '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 '@rollup/plugin-json': 6.0.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 - '@types/node': 14.18.37 + '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 @@ -12190,12 +12191,11 @@ packages: mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_uvqxrz6xmh6o32kxhfeqlqrt5q + rollup-plugin-sourcemaps: 0.6.3_rrfo4ccoq6ga3fxzubpgdsawvq tslib: 2.5.0 typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - encoding - supports-color dev: false diff --git a/sdk/devcenter/arm-devcenter/CHANGELOG.md b/sdk/devcenter/arm-devcenter/CHANGELOG.md index 0be5732a1756..31d5315c675b 100644 --- a/sdk/devcenter/arm-devcenter/CHANGELOG.md +++ b/sdk/devcenter/arm-devcenter/CHANGELOG.md @@ -1,15 +1,80 @@ # Release History + +## 1.0.0-beta.5 (2023-03-21) + +**Features** -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation NetworkConnections.listOutboundNetworkDependenciesEndpoints + - Added operation Pools.beginRunHealthChecks + - Added operation Pools.beginRunHealthChecksAndWait + - Added Interface EndpointDependency + - Added Interface EndpointDetail + - Added Interface HealthStatusDetail + - Added Interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextOptionalParams + - Added Interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams + - Added Interface OutboundEnvironmentEndpoint + - Added Interface OutboundEnvironmentEndpointCollection + - Added Interface PoolsRunHealthChecksOptionalParams + - Added Interface StopOnDisconnectConfiguration + - Added Type Alias EnvironmentTypeEnableStatus + - Added Type Alias HealthStatus + - Added Type Alias NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextResponse + - Added Type Alias NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse + - Added Type Alias ScheduleEnableStatus + - Added Type Alias StopOnDisconnectEnableStatus + - Interface Image_2 has a new optional parameter hibernateSupport + - Interface Pool has a new optional parameter healthStatus + - Interface Pool has a new optional parameter healthStatusDetails + - Interface Pool has a new optional parameter stopOnDisconnect + - Interface PoolProperties has a new optional parameter healthStatus + - Interface PoolProperties has a new optional parameter healthStatusDetails + - Interface PoolUpdate has a new optional parameter stopOnDisconnect + - Interface PoolUpdateProperties has a new optional parameter stopOnDisconnect + - Interface Project has a new optional parameter maxDevBoxesPerUser + - Interface ProjectUpdate has a new optional parameter maxDevBoxesPerUser + - Interface ProjectUpdateProperties has a new optional parameter maxDevBoxesPerUser + - Added Enum KnownEnvironmentTypeEnableStatus + - Added Enum KnownHealthStatus + - Added Enum KnownScheduleEnableStatus + - Added Enum KnownStopOnDisconnectEnableStatus -### Other Changes +**Breaking Changes** + - Removed operation group Usages + - Interface AttachedNetworksListByDevCenterNextOptionalParams no longer has parameter top + - Interface AttachedNetworksListByProjectNextOptionalParams no longer has parameter top + - Interface CatalogsListByDevCenterNextOptionalParams no longer has parameter top + - Interface DevBoxDefinitionsListByDevCenterNextOptionalParams no longer has parameter top + - Interface DevBoxDefinitionsListByProjectNextOptionalParams no longer has parameter top + - Interface DevCentersListByResourceGroupNextOptionalParams no longer has parameter top + - Interface DevCentersListBySubscriptionNextOptionalParams no longer has parameter top + - Interface EnvironmentTypesListByDevCenterNextOptionalParams no longer has parameter top + - Interface GalleriesListByDevCenterNextOptionalParams no longer has parameter top + - Interface ImageReference no longer has parameter offer + - Interface ImageReference no longer has parameter publisher + - Interface ImageReference no longer has parameter sku + - Interface ImagesListByDevCenterNextOptionalParams no longer has parameter top + - Interface ImagesListByGalleryNextOptionalParams no longer has parameter top + - Interface NetworkConnectionsListByResourceGroupNextOptionalParams no longer has parameter top + - Interface NetworkConnectionsListBySubscriptionNextOptionalParams no longer has parameter top + - Interface NetworkConnectionsListHealthDetailsNextOptionalParams no longer has parameter top + - Interface PoolsListByProjectNextOptionalParams no longer has parameter top + - Interface ProjectAllowedEnvironmentTypesListNextOptionalParams no longer has parameter top + - Interface ProjectEnvironmentTypesListNextOptionalParams no longer has parameter top + - Interface ProjectsListByResourceGroupNextOptionalParams no longer has parameter top + - Interface ProjectsListBySubscriptionNextOptionalParams no longer has parameter top + - Interface SchedulesListByPoolNextOptionalParams no longer has parameter top + - Interface SkusListBySubscriptionNextOptionalParams no longer has parameter top + - Type of parameter status of interface ProjectEnvironmentType is changed from EnableStatus to EnvironmentTypeEnableStatus + - Type of parameter status of interface ProjectEnvironmentTypeUpdate is changed from EnableStatus to EnvironmentTypeEnableStatus + - Type of parameter status of interface ProjectEnvironmentTypeUpdateProperties is changed from EnableStatus to EnvironmentTypeEnableStatus + - Type of parameter state of interface Schedule is changed from EnableStatus to ScheduleEnableStatus + - Type of parameter state of interface ScheduleUpdate is changed from EnableStatus to ScheduleEnableStatus + - Type of parameter state of interface ScheduleUpdateProperties is changed from EnableStatus to ScheduleEnableStatus + - Class DevCenterClient no longer has parameter usages + - Removed Enum KnownEnableStatus + + ## 1.0.0-beta.4 (2022-11-23) **Features** diff --git a/sdk/devcenter/arm-devcenter/LICENSE b/sdk/devcenter/arm-devcenter/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/devcenter/arm-devcenter/LICENSE +++ b/sdk/devcenter/arm-devcenter/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/devcenter/arm-devcenter/_meta.json b/sdk/devcenter/arm-devcenter/_meta.json index ead7f7d65990..5ff82c835a6c 100644 --- a/sdk/devcenter/arm-devcenter/_meta.json +++ b/sdk/devcenter/arm-devcenter/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7a54c1a83d14da431c0ae48c4315cba143084bce", + "commit": "80ccc75121d107ef8a567843895121caf1aef95a", "readme": "specification/devcenter/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --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\\specification\\devcenter\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --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/devcenter/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/devcenter/arm-devcenter/package.json b/sdk/devcenter/arm-devcenter/package.json index 58158fc906af..4163b6cea656 100644 --- a/sdk/devcenter/arm-devcenter/package.json +++ b/sdk/devcenter/arm-devcenter/package.json @@ -8,10 +8,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devcenter/arm-devcenter", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-devcenter?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devcenter/arm-devcenter" +} \ No newline at end of file diff --git a/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md b/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md index 9f98e0dbd0e0..ea6e4d340d40 100644 --- a/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md +++ b/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md @@ -6,9 +6,9 @@ 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 { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; @@ -41,9 +41,9 @@ export interface AttachedNetworkListResult { // @public export interface AttachedNetworks { - beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, body: AttachedNetworkConnection, options?: AttachedNetworksCreateOrUpdateOptionalParams): Promise, AttachedNetworksCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, body: AttachedNetworkConnection, options?: AttachedNetworksCreateOrUpdateOptionalParams): Promise, AttachedNetworksCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, body: AttachedNetworkConnection, options?: AttachedNetworksCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksDeleteOptionalParams): Promise; getByDevCenter(resourceGroupName: string, devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksGetByDevCenterOptionalParams): Promise; getByProject(resourceGroupName: string, projectName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksGetByProjectOptionalParams): Promise; @@ -82,7 +82,6 @@ export type AttachedNetworksGetByProjectResponse = AttachedNetworkConnection; // @public export interface AttachedNetworksListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -98,7 +97,6 @@ export type AttachedNetworksListByDevCenterResponse = AttachedNetworkListResult; // @public export interface AttachedNetworksListByProjectNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -142,13 +140,13 @@ export interface CatalogProperties extends CatalogUpdateProperties { // @public export interface Catalogs { - beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, catalogName: string, body: Catalog, options?: CatalogsCreateOrUpdateOptionalParams): Promise, CatalogsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, catalogName: string, body: Catalog, options?: CatalogsCreateOrUpdateOptionalParams): Promise, CatalogsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, devCenterName: string, catalogName: string, body: Catalog, options?: CatalogsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsDeleteOptionalParams): Promise; - beginSync(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsSyncOptionalParams): Promise, void>>; + beginSync(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsSyncOptionalParams): Promise, void>>; beginSyncAndWait(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsSyncOptionalParams): Promise; - beginUpdate(resourceGroupName: string, devCenterName: string, catalogName: string, body: CatalogUpdate, options?: CatalogsUpdateOptionalParams): Promise, CatalogsUpdateResponse>>; + beginUpdate(resourceGroupName: string, devCenterName: string, catalogName: string, body: CatalogUpdate, options?: CatalogsUpdateOptionalParams): Promise, CatalogsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, devCenterName: string, catalogName: string, body: CatalogUpdate, options?: CatalogsUpdateOptionalParams): Promise; get(resourceGroupName: string, devCenterName: string, catalogName: string, options?: CatalogsGetOptionalParams): Promise; listByDevCenter(resourceGroupName: string, devCenterName: string, options?: CatalogsListByDevCenterOptionalParams): PagedAsyncIterableIterator; @@ -178,7 +176,6 @@ export type CatalogsGetResponse = Catalog; // @public export interface CatalogsListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -297,11 +294,11 @@ export interface DevBoxDefinitionProperties extends DevBoxDefinitionUpdateProper // @public export interface DevBoxDefinitions { - beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinition, options?: DevBoxDefinitionsCreateOrUpdateOptionalParams): Promise, DevBoxDefinitionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinition, options?: DevBoxDefinitionsCreateOrUpdateOptionalParams): Promise, DevBoxDefinitionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinition, options?: DevBoxDefinitionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinitionUpdate, options?: DevBoxDefinitionsUpdateOptionalParams): Promise, DevBoxDefinitionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinitionUpdate, options?: DevBoxDefinitionsUpdateOptionalParams): Promise, DevBoxDefinitionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, body: DevBoxDefinitionUpdate, options?: DevBoxDefinitionsUpdateOptionalParams): Promise; get(resourceGroupName: string, devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsGetOptionalParams): Promise; getByProject(resourceGroupName: string, projectName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsGetByProjectOptionalParams): Promise; @@ -340,7 +337,6 @@ export type DevBoxDefinitionsGetResponse = DevBoxDefinition; // @public export interface DevBoxDefinitionsListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -356,7 +352,6 @@ export type DevBoxDefinitionsListByDevCenterResponse = DevBoxDefinitionListResul // @public export interface DevBoxDefinitionsListByProjectNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -447,8 +442,6 @@ export class DevCenterClient extends coreClient.ServiceClient { skus: Skus; // (undocumented) subscriptionId: string; - // (undocumented) - usages: Usages; } // @public @@ -466,11 +459,11 @@ export interface DevCenterListResult { // @public export interface DevCenters { - beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, body: DevCenter, options?: DevCentersCreateOrUpdateOptionalParams): Promise, DevCentersCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, body: DevCenter, options?: DevCentersCreateOrUpdateOptionalParams): Promise, DevCentersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, devCenterName: string, body: DevCenter, options?: DevCentersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, devCenterName: string, options?: DevCentersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, devCenterName: string, options?: DevCentersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, devCenterName: string, options?: DevCentersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, devCenterName: string, body: DevCenterUpdate, options?: DevCentersUpdateOptionalParams): Promise, DevCentersUpdateResponse>>; + beginUpdate(resourceGroupName: string, devCenterName: string, body: DevCenterUpdate, options?: DevCentersUpdateOptionalParams): Promise, DevCentersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, devCenterName: string, body: DevCenterUpdate, options?: DevCentersUpdateOptionalParams): Promise; get(resourceGroupName: string, devCenterName: string, options?: DevCentersGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: DevCentersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -508,7 +501,6 @@ export interface DevCenterSku extends Sku { // @public export interface DevCentersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -524,7 +516,6 @@ export type DevCentersListByResourceGroupResponse = DevCenterListResult; // @public export interface DevCentersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -556,7 +547,16 @@ export interface DevCenterUpdate extends TrackedResourceUpdate { export type DomainJoinType = string; // @public -export type EnableStatus = string; +export interface EndpointDependency { + readonly description?: string; + readonly domainName?: string; + readonly endpointDetails?: EndpointDetail[]; +} + +// @public +export interface EndpointDetail { + readonly port?: number; +} // @public export interface EnvironmentRole { @@ -572,6 +572,9 @@ export interface EnvironmentType extends Resource { }; } +// @public +export type EnvironmentTypeEnableStatus = string; + // @public export interface EnvironmentTypeListResult { readonly nextLink?: string; @@ -607,7 +610,6 @@ export type EnvironmentTypesGetResponse = EnvironmentType; // @public export interface EnvironmentTypesListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -657,9 +659,9 @@ export interface ErrorResponse { // @public export interface Galleries { - beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, galleryName: string, body: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise, GalleriesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, devCenterName: string, galleryName: string, body: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise, GalleriesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, devCenterName: string, galleryName: string, body: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, devCenterName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, devCenterName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, devCenterName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise; get(resourceGroupName: string, devCenterName: string, galleryName: string, options?: GalleriesGetOptionalParams): Promise; listByDevCenter(resourceGroupName: string, devCenterName: string, options?: GalleriesListByDevCenterOptionalParams): PagedAsyncIterableIterator; @@ -689,7 +691,6 @@ export type GalleriesGetResponse = Gallery; // @public export interface GalleriesListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -753,12 +754,22 @@ export interface HealthCheckStatusDetailsListResult { readonly value?: HealthCheckStatusDetails[]; } +// @public +export type HealthStatus = string; + +// @public +export interface HealthStatusDetail { + readonly code?: string; + readonly message?: string; +} + // @public export type HibernateSupport = string; // @public interface Image_2 extends ProxyResource { readonly description?: string; + readonly hibernateSupport?: HibernateSupport; readonly offer?: string; readonly provisioningState?: ProvisioningState; readonly publisher?: string; @@ -777,9 +788,6 @@ export interface ImageListResult { export interface ImageReference { readonly exactVersion?: string; id?: string; - offer?: string; - publisher?: string; - sku?: string; } // @public @@ -798,7 +806,6 @@ export type ImagesGetResponse = Image_2; // @public export interface ImagesListByDevCenterNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -814,7 +821,6 @@ export type ImagesListByDevCenterResponse = ImageListResult; // @public export interface ImagesListByGalleryNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -913,7 +919,7 @@ export enum KnownDomainJoinType { } // @public -export enum KnownEnableStatus { +export enum KnownEnvironmentTypeEnableStatus { Disabled = "Disabled", Enabled = "Enabled" } @@ -928,6 +934,15 @@ export enum KnownHealthCheckStatus { Warning = "Warning" } +// @public +export enum KnownHealthStatus { + Healthy = "Healthy", + Pending = "Pending", + Unhealthy = "Unhealthy", + Unknown = "Unknown", + Warning = "Warning" +} + // @public export enum KnownHibernateSupport { Disabled = "Disabled", @@ -999,6 +1014,18 @@ export enum KnownScheduledType { StopDevBox = "StopDevBox" } +// @public +export enum KnownScheduleEnableStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownStopOnDisconnectEnableStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownUsageUnit { Count = "Count" @@ -1050,19 +1077,20 @@ export interface NetworkConnectionListResult { // @public export interface NetworkConnections { - beginCreateOrUpdate(resourceGroupName: string, networkConnectionName: string, body: NetworkConnection, options?: NetworkConnectionsCreateOrUpdateOptionalParams): Promise, NetworkConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, networkConnectionName: string, body: NetworkConnection, options?: NetworkConnectionsCreateOrUpdateOptionalParams): Promise, NetworkConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, networkConnectionName: string, body: NetworkConnection, options?: NetworkConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsDeleteOptionalParams): Promise; - beginRunHealthChecks(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsRunHealthChecksOptionalParams): Promise, void>>; + beginRunHealthChecks(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsRunHealthChecksOptionalParams): Promise, void>>; beginRunHealthChecksAndWait(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsRunHealthChecksOptionalParams): Promise; - beginUpdate(resourceGroupName: string, networkConnectionName: string, body: NetworkConnectionUpdate, options?: NetworkConnectionsUpdateOptionalParams): Promise, NetworkConnectionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, networkConnectionName: string, body: NetworkConnectionUpdate, options?: NetworkConnectionsUpdateOptionalParams): Promise, NetworkConnectionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, networkConnectionName: string, body: NetworkConnectionUpdate, options?: NetworkConnectionsUpdateOptionalParams): Promise; get(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsGetOptionalParams): Promise; getHealthDetails(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsGetHealthDetailsOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: NetworkConnectionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: NetworkConnectionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; listHealthDetails(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsListHealthDetailsOptionalParams): PagedAsyncIterableIterator; + listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1096,7 +1124,6 @@ export type NetworkConnectionsGetResponse = NetworkConnection; // @public export interface NetworkConnectionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1112,7 +1139,6 @@ export type NetworkConnectionsListByResourceGroupResponse = NetworkConnectionLis // @public export interface NetworkConnectionsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1128,7 +1154,6 @@ export type NetworkConnectionsListBySubscriptionResponse = NetworkConnectionList // @public export interface NetworkConnectionsListHealthDetailsNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1142,6 +1167,21 @@ export interface NetworkConnectionsListHealthDetailsOptionalParams extends coreC // @public export type NetworkConnectionsListHealthDetailsResponse = HealthCheckStatusDetailsListResult; +// @public +export interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection; + +// @public +export interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams extends coreClient.OperationOptions { + top?: number; +} + +// @public +export type NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection; + // @public export interface NetworkConnectionsRunHealthChecksOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1258,13 +1298,28 @@ export interface OperationStatusResult { // @public export type Origin = string; +// @public +export interface OutboundEnvironmentEndpoint { + readonly category?: string; + readonly endpoints?: EndpointDependency[]; +} + +// @public +export interface OutboundEnvironmentEndpointCollection { + nextLink?: string; + readonly value?: OutboundEnvironmentEndpoint[]; +} + // @public export interface Pool extends TrackedResource { devBoxDefinitionName?: string; + readonly healthStatus?: HealthStatus; + readonly healthStatusDetails?: HealthStatusDetail[]; licenseType?: LicenseType; localAdministrator?: LocalAdminStatus; networkConnectionName?: string; readonly provisioningState?: ProvisioningState; + stopOnDisconnect?: StopOnDisconnectConfiguration; } // @public @@ -1275,16 +1330,20 @@ export interface PoolListResult { // @public export interface PoolProperties extends PoolUpdateProperties { + readonly healthStatus?: HealthStatus; + readonly healthStatusDetails?: HealthStatusDetail[]; readonly provisioningState?: ProvisioningState; } // @public export interface Pools { - beginCreateOrUpdate(resourceGroupName: string, projectName: string, poolName: string, body: Pool, options?: PoolsCreateOrUpdateOptionalParams): Promise, PoolsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, projectName: string, poolName: string, body: Pool, options?: PoolsCreateOrUpdateOptionalParams): Promise, PoolsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, projectName: string, poolName: string, body: Pool, options?: PoolsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, projectName: string, poolName: string, body: PoolUpdate, options?: PoolsUpdateOptionalParams): Promise, PoolsUpdateResponse>>; + beginRunHealthChecks(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsRunHealthChecksOptionalParams): Promise, void>>; + beginRunHealthChecksAndWait(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsRunHealthChecksOptionalParams): Promise; + beginUpdate(resourceGroupName: string, projectName: string, poolName: string, body: PoolUpdate, options?: PoolsUpdateOptionalParams): Promise, PoolsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, projectName: string, poolName: string, body: PoolUpdate, options?: PoolsUpdateOptionalParams): Promise; get(resourceGroupName: string, projectName: string, poolName: string, options?: PoolsGetOptionalParams): Promise; listByProject(resourceGroupName: string, projectName: string, options?: PoolsListByProjectOptionalParams): PagedAsyncIterableIterator; @@ -1314,7 +1373,6 @@ export type PoolsGetResponse = Pool; // @public export interface PoolsListByProjectNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1328,6 +1386,12 @@ export interface PoolsListByProjectOptionalParams extends coreClient.OperationOp // @public export type PoolsListByProjectResponse = PoolListResult; +// @public +export interface PoolsRunHealthChecksOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface PoolsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1343,6 +1407,7 @@ export interface PoolUpdate extends TrackedResourceUpdate { licenseType?: LicenseType; localAdministrator?: LocalAdminStatus; networkConnectionName?: string; + stopOnDisconnect?: StopOnDisconnectConfiguration; } // @public @@ -1351,6 +1416,7 @@ export interface PoolUpdateProperties { licenseType?: LicenseType; localAdministrator?: LocalAdminStatus; networkConnectionName?: string; + stopOnDisconnect?: StopOnDisconnectConfiguration; } // @public @@ -1358,6 +1424,7 @@ export interface Project extends TrackedResource { description?: string; devCenterId?: string; readonly devCenterUri?: string; + maxDevBoxesPerUser?: number; readonly provisioningState?: ProvisioningState; } @@ -1376,7 +1443,6 @@ export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType; // @public export interface ProjectAllowedEnvironmentTypesListNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1397,7 +1463,7 @@ export interface ProjectEnvironmentType extends Resource { identity?: ManagedServiceIdentity; location?: string; readonly provisioningState?: ProvisioningState; - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; tags?: { [propertyName: string]: string; }; @@ -1446,7 +1512,6 @@ export type ProjectEnvironmentTypesGetResponse = ProjectEnvironmentType; // @public export interface ProjectEnvironmentTypesListNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1472,7 +1537,7 @@ export interface ProjectEnvironmentTypeUpdate { creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; deploymentTargetId?: string; identity?: ManagedServiceIdentity; - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; tags?: { [propertyName: string]: string; }; @@ -1485,7 +1550,7 @@ export interface ProjectEnvironmentTypeUpdate { export interface ProjectEnvironmentTypeUpdateProperties { creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; deploymentTargetId?: string; - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; userRoleAssignments?: { [propertyName: string]: UserRoleAssignmentValue; }; @@ -1512,11 +1577,11 @@ export interface ProjectProperties extends ProjectUpdateProperties { // @public export interface Projects { - beginCreateOrUpdate(resourceGroupName: string, projectName: string, body: Project, options?: ProjectsCreateOrUpdateOptionalParams): Promise, ProjectsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, projectName: string, body: Project, options?: ProjectsCreateOrUpdateOptionalParams): Promise, ProjectsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, projectName: string, body: Project, options?: ProjectsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, projectName: string, body: ProjectUpdate, options?: ProjectsUpdateOptionalParams): Promise, ProjectsUpdateResponse>>; + beginUpdate(resourceGroupName: string, projectName: string, body: ProjectUpdate, options?: ProjectsUpdateOptionalParams): Promise, ProjectsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, projectName: string, body: ProjectUpdate, options?: ProjectsUpdateOptionalParams): Promise; get(resourceGroupName: string, projectName: string, options?: ProjectsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ProjectsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1547,7 +1612,6 @@ export type ProjectsGetResponse = Project; // @public export interface ProjectsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1563,7 +1627,6 @@ export type ProjectsListByResourceGroupResponse = ProjectListResult; // @public export interface ProjectsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1590,12 +1653,14 @@ export type ProjectsUpdateResponse = Project; export interface ProjectUpdate extends TrackedResourceUpdate { description?: string; devCenterId?: string; + maxDevBoxesPerUser?: number; } // @public export interface ProjectUpdateProperties { description?: string; devCenterId?: string; + maxDevBoxesPerUser?: number; } // @public @@ -1629,7 +1694,7 @@ export interface ResourceRange { export interface Schedule extends Resource { frequency?: ScheduledFrequency; readonly provisioningState?: ProvisioningState; - state?: EnableStatus; + state?: ScheduleEnableStatus; time?: string; timeZone?: string; typePropertiesType?: ScheduledType; @@ -1641,6 +1706,9 @@ export type ScheduledFrequency = string; // @public export type ScheduledType = string; +// @public +export type ScheduleEnableStatus = string; + // @public export interface ScheduleListResult { readonly nextLink?: string; @@ -1654,11 +1722,11 @@ export interface ScheduleProperties extends ScheduleUpdateProperties { // @public export interface Schedules { - beginCreateOrUpdate(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: Schedule, options?: SchedulesCreateOrUpdateOptionalParams): Promise, SchedulesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: Schedule, options?: SchedulesCreateOrUpdateOptionalParams): Promise, SchedulesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: Schedule, options?: SchedulesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, options?: SchedulesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, options?: SchedulesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, options?: SchedulesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: ScheduleUpdate, options?: SchedulesUpdateOptionalParams): Promise, SchedulesUpdateResponse>>; + beginUpdate(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: ScheduleUpdate, options?: SchedulesUpdateOptionalParams): Promise, SchedulesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, body: ScheduleUpdate, options?: SchedulesUpdateOptionalParams): Promise; get(resourceGroupName: string, projectName: string, poolName: string, scheduleName: string, options?: SchedulesGetOptionalParams): Promise; listByPool(resourceGroupName: string, projectName: string, poolName: string, options?: SchedulesListByPoolOptionalParams): PagedAsyncIterableIterator; @@ -1691,7 +1759,6 @@ export type SchedulesGetResponse = Schedule; // @public export interface SchedulesListByPoolNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1718,7 +1785,7 @@ export type SchedulesUpdateResponse = Schedule; // @public export interface ScheduleUpdate extends TrackedResourceUpdate { frequency?: ScheduledFrequency; - state?: EnableStatus; + state?: ScheduleEnableStatus; time?: string; timeZone?: string; type?: ScheduledType; @@ -1727,7 +1794,7 @@ export interface ScheduleUpdate extends TrackedResourceUpdate { // @public export interface ScheduleUpdateProperties { frequency?: ScheduledFrequency; - state?: EnableStatus; + state?: ScheduleEnableStatus; time?: string; timeZone?: string; type?: ScheduledType; @@ -1755,7 +1822,6 @@ export interface Skus { // @public export interface SkusListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - top?: number; } // @public @@ -1772,6 +1838,15 @@ export type SkusListBySubscriptionResponse = SkuListResult; // @public export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; +// @public +export interface StopOnDisconnectConfiguration { + gracePeriodMinutes?: number; + status?: StopOnDisconnectEnableStatus; +} + +// @public +export type StopOnDisconnectEnableStatus = string; + // @public export interface SystemData { createdAt?: Date; @@ -1812,25 +1887,6 @@ export interface UsageName { value?: string; } -// @public -export interface Usages { - listByLocation(location: string, options?: UsagesListByLocationOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface UsagesListByLocationNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type UsagesListByLocationNextResponse = ListUsagesResult; - -// @public -export interface UsagesListByLocationOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type UsagesListByLocationResponse = ListUsagesResult; - // @public export type UsageUnit = string; diff --git a/sdk/devcenter/arm-devcenter/src/devCenterClient.ts b/sdk/devcenter/arm-devcenter/src/devCenterClient.ts index c4da33603127..36a6557e6f2c 100644 --- a/sdk/devcenter/arm-devcenter/src/devCenterClient.ts +++ b/sdk/devcenter/arm-devcenter/src/devCenterClient.ts @@ -28,7 +28,6 @@ import { DevBoxDefinitionsImpl, OperationsImpl, OperationStatusesImpl, - UsagesImpl, CheckNameAvailabilityImpl, SkusImpl, PoolsImpl, @@ -49,7 +48,6 @@ import { DevBoxDefinitions, Operations, OperationStatuses, - Usages, CheckNameAvailability, Skus, Pools, @@ -143,7 +141,7 @@ export class DevCenterClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-11-preview"; + this.apiVersion = options.apiVersion || "2023-01-01-preview"; this.devCenters = new DevCentersImpl(this); this.projects = new ProjectsImpl(this); this.attachedNetworks = new AttachedNetworksImpl(this); @@ -159,7 +157,6 @@ export class DevCenterClient extends coreClient.ServiceClient { this.devBoxDefinitions = new DevBoxDefinitionsImpl(this); this.operations = new OperationsImpl(this); this.operationStatuses = new OperationStatusesImpl(this); - this.usages = new UsagesImpl(this); this.checkNameAvailability = new CheckNameAvailabilityImpl(this); this.skus = new SkusImpl(this); this.pools = new PoolsImpl(this); @@ -209,7 +206,6 @@ export class DevCenterClient extends coreClient.ServiceClient { devBoxDefinitions: DevBoxDefinitions; operations: Operations; operationStatuses: OperationStatuses; - usages: Usages; checkNameAvailability: CheckNameAvailability; skus: Skus; pools: Pools; diff --git a/sdk/devcenter/arm-devcenter/src/lroImpl.ts b/sdk/devcenter/arm-devcenter/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/devcenter/arm-devcenter/src/lroImpl.ts +++ b/sdk/devcenter/arm-devcenter/src/lroImpl.ts @@ -6,29 +6,37 @@ * 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 class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +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/devcenter/arm-devcenter/src/models/index.ts b/sdk/devcenter/arm-devcenter/src/models/index.ts index f7b4d26dcce2..01c75aae41ab 100644 --- a/sdk/devcenter/arm-devcenter/src/models/index.ts +++ b/sdk/devcenter/arm-devcenter/src/models/index.ts @@ -140,6 +140,8 @@ export interface ProjectUpdateProperties { devCenterId?: string; /** Description of the project. */ description?: string; + /** When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. */ + maxDevBoxesPerUser?: number; } /** Results of the Attached Networks list operation. */ @@ -323,7 +325,7 @@ export interface ProjectEnvironmentTypeUpdateProperties { /** Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. */ deploymentTargetId?: string; /** Defines whether this Environment Type can be used in this Project. */ - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; /** The role definition assigned to the environment creator on backing resources. */ creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; /** Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. */ @@ -365,7 +367,7 @@ export interface ProjectEnvironmentTypeUpdate { /** Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. */ deploymentTargetId?: string; /** Defines whether this Environment Type can be used in this Project. */ - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; /** The role definition assigned to the environment creator on backing resources. */ creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; /** Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. */ @@ -403,12 +405,6 @@ export interface ImageReference { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly exactVersion?: string; - /** The image publisher. */ - publisher?: string; - /** The image offer. */ - offer?: string; - /** The image sku. */ - sku?: string; } /** Properties of a Dev Box definition. These properties can be updated after the resource has been created. */ @@ -564,40 +560,6 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** List of Core Usages. */ -export interface ListUsagesResult { - /** - * The array page of Usages. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Usage[]; - /** - * The link to get the next page of Usage result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The core usage details. */ -export interface Usage { - /** The current usage. */ - currentValue?: number; - /** The limit integer. */ - limit?: number; - /** The unit details. */ - unit?: UsageUnit; - /** The name. */ - name?: UsageName; -} - -/** The Usage Names. */ -export interface UsageName { - /** The localized name of the resource. */ - localizedValue?: string; - /** The name of the resource. */ - value?: string; -} - /** The check availability request body. */ export interface CheckNameAvailabilityRequest { /** The name of the resource for which availability needs to be checked. */ @@ -664,6 +626,20 @@ export interface PoolListResult { readonly nextLink?: string; } +/** Pool health status detail. */ +export interface HealthStatusDetail { + /** + * An identifier for the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * A message describing the issue, intended to be suitable for display in a user interface + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + /** Properties of a Pool. These properties can be updated after the resource has been created. */ export interface PoolUpdateProperties { /** Name of a Dev Box definition in parent Project of this Pool */ @@ -674,6 +650,16 @@ export interface PoolUpdateProperties { licenseType?: LicenseType; /** Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. */ localAdministrator?: LocalAdminStatus; + /** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ + stopOnDisconnect?: StopOnDisconnectConfiguration; +} + +/** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ +export interface StopOnDisconnectConfiguration { + /** Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. */ + status?: StopOnDisconnectEnableStatus; + /** The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. */ + gracePeriodMinutes?: number; } /** Result of the schedule list operation. */ @@ -701,7 +687,7 @@ export interface ScheduleUpdateProperties { /** The IANA timezone id at which the schedule should execute. */ timeZone?: string; /** Indicates whether or not this scheduled task is enabled. */ - state?: EnableStatus; + state?: ScheduleEnableStatus; } /** Result of the network connection list operation. */ @@ -785,6 +771,93 @@ export interface HealthCheck { readonly additionalDetails?: string; } +/** Values returned by the List operation. */ +export interface OutboundEnvironmentEndpointCollection { + /** + * The collection of outbound network dependency endpoints returned by the listing operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: OutboundEnvironmentEndpoint[]; + /** The continuation token. */ + nextLink?: string; +} + +/** A collection of related endpoints from the same service for which the agent requires outbound access. */ +export interface OutboundEnvironmentEndpoint { + /** + * The type of service that the agent connects to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** + * The endpoints for this service for which the agent requires outbound access. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endpoints?: EndpointDependency[]; +} + +/** A domain name and connection details used to access a dependency. */ +export interface EndpointDependency { + /** + * The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly domainName?: string; + /** + * Human-readable supplemental information about the dependency and when it is applicable. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * The list of connection details for this endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endpointDetails?: EndpointDetail[]; +} + +/** Details about the connection between the Batch service and the endpoint. */ +export interface EndpointDetail { + /** + * The port an endpoint is connected to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly port?: number; +} + +/** List of Core Usages. */ +export interface ListUsagesResult { + /** + * The array page of Usages. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Usage[]; + /** + * The link to get the next page of Usage result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The core usage details. */ +export interface Usage { + /** The current usage. */ + currentValue?: number; + /** The limit integer. */ + limit?: number; + /** The unit details. */ + unit?: UsageUnit; + /** The name. */ + name?: UsageName; +} + +/** The Usage Names. */ +export interface UsageName { + /** The localized name of the resource. */ + localizedValue?: string; + /** The name of the resource. */ + value?: 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. */ @@ -887,7 +960,7 @@ export interface ProjectEnvironmentType extends Resource { /** Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this subscription. */ deploymentTargetId?: string; /** Defines whether this Environment Type can be used in this Project. */ - status?: EnableStatus; + status?: EnvironmentTypeEnableStatus; /** The role definition assigned to the environment creator on backing resources. */ creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; /** Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs. */ @@ -910,7 +983,7 @@ export interface Schedule extends Resource { /** The IANA timezone id at which the schedule should execute. */ timeZone?: string; /** Indicates whether or not this scheduled task is enabled. */ - state?: EnableStatus; + state?: ScheduleEnableStatus; /** * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -949,6 +1022,8 @@ export interface ProjectUpdate extends TrackedResourceUpdate { devCenterId?: string; /** Description of the project. */ description?: string; + /** When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. */ + maxDevBoxesPerUser?: number; } /** Partial update of a Dev Box definition resource. */ @@ -973,6 +1048,8 @@ export interface PoolUpdate extends TrackedResourceUpdate { licenseType?: LicenseType; /** Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. */ localAdministrator?: LocalAdminStatus; + /** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ + stopOnDisconnect?: StopOnDisconnectConfiguration; } /** The schedule properties for partial update. Properties not provided in the update request will not be changed. */ @@ -986,7 +1063,7 @@ export interface ScheduleUpdate extends TrackedResourceUpdate { /** The IANA timezone id at which the schedule should execute. */ timeZone?: string; /** Indicates whether or not this scheduled task is enabled. */ - state?: EnableStatus; + state?: ScheduleEnableStatus; } /** The network connection properties for partial update. Properties not provided in the update request will not be changed. */ @@ -1106,6 +1183,16 @@ export interface OperationStatus extends OperationStatusResult { /** Properties of a Pool */ export interface PoolProperties extends PoolUpdateProperties { + /** + * Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatus?: HealthStatus; + /** + * Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatusDetails?: HealthStatusDetail[]; /** * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1162,6 +1249,8 @@ export interface Project extends TrackedResource { devCenterId?: string; /** Description of the project. */ description?: string; + /** When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. */ + maxDevBoxesPerUser?: number; /** * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1216,6 +1305,18 @@ export interface Pool extends TrackedResource { licenseType?: LicenseType; /** Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. */ localAdministrator?: LocalAdminStatus; + /** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ + stopOnDisconnect?: StopOnDisconnectConfiguration; + /** + * Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatus?: HealthStatus; + /** + * Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatusDetails?: HealthStatusDetail[]; /** * The provisioning state of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1283,6 +1384,11 @@ export interface Image extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; + /** + * Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hibernateSupport?: HibernateSupport; } /** Represents an image version. */ @@ -1424,18 +1530,18 @@ export type CreatedByType = string; /** Known values of {@link HealthCheckStatus} that the service accepts. */ export enum KnownHealthCheckStatus { + /** Unknown */ + Unknown = "Unknown", /** Pending */ Pending = "Pending", /** Running */ Running = "Running", /** Passed */ Passed = "Passed", - /** Failed */ - Failed = "Failed", /** Warning */ Warning = "Warning", - /** Unknown */ - Unknown = "Unknown" + /** Failed */ + Failed = "Failed" } /** @@ -1443,12 +1549,12 @@ export enum KnownHealthCheckStatus { * {@link KnownHealthCheckStatus} can be used interchangeably with HealthCheckStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **Unknown** \ * **Pending** \ * **Running** \ * **Passed** \ - * **Failed** \ * **Warning** \ - * **Unknown** + * **Failed** */ export type HealthCheckStatus = string; @@ -1470,6 +1576,24 @@ export enum KnownDomainJoinType { */ export type DomainJoinType = string; +/** Known values of {@link HibernateSupport} that the service accepts. */ +export enum KnownHibernateSupport { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled" +} + +/** + * Defines values for HibernateSupport. \ + * {@link KnownHibernateSupport} can be used interchangeably with HibernateSupport, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type HibernateSupport = string; + /** Known values of {@link CatalogSyncState} that the service accepts. */ export enum KnownCatalogSyncState { /** Succeeded */ @@ -1494,8 +1618,8 @@ export enum KnownCatalogSyncState { */ export type CatalogSyncState = string; -/** Known values of {@link EnableStatus} that the service accepts. */ -export enum KnownEnableStatus { +/** Known values of {@link EnvironmentTypeEnableStatus} that the service accepts. */ +export enum KnownEnvironmentTypeEnableStatus { /** Enabled */ Enabled = "Enabled", /** Disabled */ @@ -1503,14 +1627,14 @@ export enum KnownEnableStatus { } /** - * Defines values for EnableStatus. \ - * {@link KnownEnableStatus} can be used interchangeably with EnableStatus, + * Defines values for EnvironmentTypeEnableStatus. \ + * {@link KnownEnvironmentTypeEnableStatus} can be used interchangeably with EnvironmentTypeEnableStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Enabled** \ * **Disabled** */ -export type EnableStatus = string; +export type EnvironmentTypeEnableStatus = string; /** Known values of {@link ImageValidationStatus} that the service accepts. */ export enum KnownImageValidationStatus { @@ -1539,24 +1663,6 @@ export enum KnownImageValidationStatus { */ export type ImageValidationStatus = string; -/** Known values of {@link HibernateSupport} that the service accepts. */ -export enum KnownHibernateSupport { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" -} - -/** - * Defines values for HibernateSupport. \ - * {@link KnownHibernateSupport} can be used interchangeably with HibernateSupport, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type HibernateSupport = string; - /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** User */ @@ -1593,21 +1699,6 @@ export enum KnownActionType { */ export type ActionType = string; -/** Known values of {@link UsageUnit} that the service accepts. */ -export enum KnownUsageUnit { - /** Count */ - Count = "Count" -} - -/** - * Defines values for UsageUnit. \ - * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Count** - */ -export type UsageUnit = string; - /** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ export enum KnownCheckNameAvailabilityReason { /** Invalid */ @@ -1626,6 +1717,33 @@ export enum KnownCheckNameAvailabilityReason { */ export type CheckNameAvailabilityReason = string; +/** Known values of {@link HealthStatus} that the service accepts. */ +export enum KnownHealthStatus { + /** Unknown */ + Unknown = "Unknown", + /** Pending */ + Pending = "Pending", + /** Healthy */ + Healthy = "Healthy", + /** Warning */ + Warning = "Warning", + /** Unhealthy */ + Unhealthy = "Unhealthy" +} + +/** + * Defines values for HealthStatus. \ + * {@link KnownHealthStatus} can be used interchangeably with HealthStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Pending** \ + * **Healthy** \ + * **Warning** \ + * **Unhealthy** + */ +export type HealthStatus = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** WindowsClient */ @@ -1659,6 +1777,24 @@ export enum KnownLocalAdminStatus { */ export type LocalAdminStatus = string; +/** Known values of {@link StopOnDisconnectEnableStatus} that the service accepts. */ +export enum KnownStopOnDisconnectEnableStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for StopOnDisconnectEnableStatus. \ + * {@link KnownStopOnDisconnectEnableStatus} can be used interchangeably with StopOnDisconnectEnableStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type StopOnDisconnectEnableStatus = string; + /** Known values of {@link ScheduledType} that the service accepts. */ export enum KnownScheduledType { /** StopDevBox */ @@ -1688,6 +1824,39 @@ export enum KnownScheduledFrequency { * **Daily** */ export type ScheduledFrequency = string; + +/** Known values of {@link ScheduleEnableStatus} that the service accepts. */ +export enum KnownScheduleEnableStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for ScheduleEnableStatus. \ + * {@link KnownScheduleEnableStatus} can be used interchangeably with ScheduleEnableStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type ScheduleEnableStatus = string; + +/** Known values of {@link UsageUnit} that the service accepts. */ +export enum KnownUsageUnit { + /** Count */ + Count = "Count" +} + +/** + * Defines values for UsageUnit. \ + * {@link KnownUsageUnit} can be used interchangeably with UsageUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Count** + */ +export type UsageUnit = string; /** Defines values for SkuTier. */ export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; @@ -1753,20 +1922,14 @@ export interface DevCentersDeleteOptionalParams /** Optional parameters. */ export interface DevCentersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type DevCentersListBySubscriptionNextResponse = DevCenterListResult; /** Optional parameters. */ export interface DevCentersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type DevCentersListByResourceGroupNextResponse = DevCenterListResult; @@ -1833,20 +1996,14 @@ export interface ProjectsDeleteOptionalParams /** Optional parameters. */ export interface ProjectsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type ProjectsListBySubscriptionNextResponse = ProjectListResult; /** Optional parameters. */ export interface ProjectsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type ProjectsListByResourceGroupNextResponse = ProjectListResult; @@ -1908,20 +2065,14 @@ export interface AttachedNetworksDeleteOptionalParams /** Optional parameters. */ export interface AttachedNetworksListByProjectNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByProjectNext operation. */ export type AttachedNetworksListByProjectNextResponse = AttachedNetworkListResult; /** Optional parameters. */ export interface AttachedNetworksListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type AttachedNetworksListByDevCenterNextResponse = AttachedNetworkListResult; @@ -1966,10 +2117,7 @@ export interface GalleriesDeleteOptionalParams /** Optional parameters. */ export interface GalleriesListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type GalleriesListByDevCenterNextResponse = GalleryListResult; @@ -2002,20 +2150,14 @@ export type ImagesGetResponse = Image; /** Optional parameters. */ export interface ImagesListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type ImagesListByDevCenterNextResponse = ImageListResult; /** Optional parameters. */ export interface ImagesListByGalleryNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByGalleryNext operation. */ export type ImagesListByGalleryNextResponse = ImageListResult; @@ -2102,10 +2244,7 @@ export interface CatalogsSyncOptionalParams /** Optional parameters. */ export interface CatalogsListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type CatalogsListByDevCenterNextResponse = CatalogListResult; @@ -2147,10 +2286,7 @@ export interface EnvironmentTypesDeleteOptionalParams /** Optional parameters. */ export interface EnvironmentTypesListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type EnvironmentTypesListByDevCenterNextResponse = EnvironmentTypeListResult; @@ -2174,10 +2310,7 @@ export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType; /** Optional parameters. */ export interface ProjectAllowedEnvironmentTypesListNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ProjectAllowedEnvironmentTypesListNextResponse = AllowedEnvironmentTypeListResult; @@ -2219,10 +2352,7 @@ export interface ProjectEnvironmentTypesDeleteOptionalParams /** Optional parameters. */ export interface ProjectEnvironmentTypesListNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ProjectEnvironmentTypesListNextResponse = ProjectEnvironmentTypeListResult; @@ -2296,20 +2426,14 @@ export type DevBoxDefinitionsGetByProjectResponse = DevBoxDefinition; /** Optional parameters. */ export interface DevBoxDefinitionsListByDevCenterNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDevCenterNext operation. */ export type DevBoxDefinitionsListByDevCenterNextResponse = DevBoxDefinitionListResult; /** Optional parameters. */ export interface DevBoxDefinitionsListByProjectNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByProjectNext operation. */ export type DevBoxDefinitionsListByProjectNextResponse = DevBoxDefinitionListResult; @@ -2335,20 +2459,6 @@ export interface OperationStatusesGetOptionalParams /** Contains response data for the get operation. */ export type OperationStatusesGetResponse = OperationStatus; -/** Optional parameters. */ -export interface UsagesListByLocationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByLocation operation. */ -export type UsagesListByLocationResponse = ListUsagesResult; - -/** Optional parameters. */ -export interface UsagesListByLocationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByLocationNext operation. */ -export type UsagesListByLocationNextResponse = ListUsagesResult; - /** Optional parameters. */ export interface CheckNameAvailabilityExecuteOptionalParams extends coreClient.OperationOptions {} @@ -2368,10 +2478,7 @@ export type SkusListBySubscriptionResponse = SkuListResult; /** Optional parameters. */ export interface SkusListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type SkusListBySubscriptionNextResponse = SkuListResult; @@ -2424,12 +2531,18 @@ export interface PoolsDeleteOptionalParams extends coreClient.OperationOptions { } /** Optional parameters. */ -export interface PoolsListByProjectNextOptionalParams +export interface PoolsRunHealthChecksOptionalParams extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; + /** 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; } +/** Optional parameters. */ +export interface PoolsListByProjectNextOptionalParams + extends coreClient.OperationOptions {} + /** Contains response data for the listByProjectNext operation. */ export type PoolsListByProjectNextResponse = PoolListResult; @@ -2494,10 +2607,7 @@ export interface SchedulesDeleteOptionalParams /** Optional parameters. */ export interface SchedulesListByPoolNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByPoolNext operation. */ export type SchedulesListByPoolNextResponse = ScheduleListResult; @@ -2589,35 +2699,43 @@ export interface NetworkConnectionsRunHealthChecksOptionalParams } /** Optional parameters. */ -export interface NetworkConnectionsListBySubscriptionNextOptionalParams +export interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams extends coreClient.OperationOptions { /** The maximum number of resources to return from the operation. Example: '$top=10'. */ top?: number; } +/** Contains response data for the listOutboundNetworkDependenciesEndpoints operation. */ +export type NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse = OutboundEnvironmentEndpointCollection; + +/** Optional parameters. */ +export interface NetworkConnectionsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + /** Contains response data for the listBySubscriptionNext operation. */ export type NetworkConnectionsListBySubscriptionNextResponse = NetworkConnectionListResult; /** Optional parameters. */ export interface NetworkConnectionsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type NetworkConnectionsListByResourceGroupNextResponse = NetworkConnectionListResult; /** Optional parameters. */ export interface NetworkConnectionsListHealthDetailsNextOptionalParams - extends coreClient.OperationOptions { - /** The maximum number of resources to return from the operation. Example: '$top=10'. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listHealthDetailsNext operation. */ export type NetworkConnectionsListHealthDetailsNextResponse = HealthCheckStatusDetailsListResult; +/** Optional parameters. */ +export interface NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOutboundNetworkDependenciesEndpointsNext operation. */ +export type NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextResponse = OutboundEnvironmentEndpointCollection; + /** Optional parameters. */ export interface DevCenterClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/devcenter/arm-devcenter/src/models/mappers.ts b/sdk/devcenter/arm-devcenter/src/models/mappers.ts index 75e9a69d6a45..f1321b4020ed 100644 --- a/sdk/devcenter/arm-devcenter/src/models/mappers.ts +++ b/sdk/devcenter/arm-devcenter/src/models/mappers.ts @@ -305,6 +305,15 @@ export const ProjectUpdateProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + maxDevBoxesPerUser: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "maxDevBoxesPerUser", + type: { + name: "Number" + } } } } @@ -902,24 +911,6 @@ export const ImageReference: coreClient.CompositeMapper = { type: { name: "String" } - }, - publisher: { - serializedName: "publisher", - type: { - name: "String" - } - }, - offer: { - serializedName: "offer", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "String" - } } } } @@ -1260,90 +1251,6 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const ListUsagesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListUsagesResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Usage" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Usage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Usage", - modelProperties: { - currentValue: { - serializedName: "currentValue", - type: { - name: "Number" - } - }, - limit: { - serializedName: "limit", - type: { - name: "Number" - } - }, - unit: { - serializedName: "unit", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "UsageName" - } - } - } - } -}; - -export const UsageName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UsageName", - modelProperties: { - localizedValue: { - serializedName: "localizedValue", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1489,6 +1396,29 @@ export const PoolListResult: coreClient.CompositeMapper = { } }; +export const HealthStatusDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HealthStatusDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const PoolUpdateProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1517,6 +1447,34 @@ export const PoolUpdateProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + stopOnDisconnect: { + serializedName: "stopOnDisconnect", + type: { + name: "Composite", + className: "StopOnDisconnectConfiguration" + } + } + } + } +}; + +export const StopOnDisconnectConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StopOnDisconnectConfiguration", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + gracePeriodMinutes: { + serializedName: "gracePeriodMinutes", + type: { + name: "Number" + } } } } @@ -1745,6 +1703,199 @@ export const HealthCheck: coreClient.CompositeMapper = { } }; +export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpointCollection", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OutboundEnvironmentEndpoint", + modelProperties: { + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDependency" + } + } + } + } + } + } +}; + +export const EndpointDependency: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDependency", + modelProperties: { + domainName: { + serializedName: "domainName", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointDetail" + } + } + } + } + } + } +}; + +export const EndpointDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointDetail", + modelProperties: { + port: { + serializedName: "port", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ListUsagesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListUsagesResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Usage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Usage", + modelProperties: { + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "Composite", + className: "UsageName" + } + } + } + } +}; + +export const UsageName: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UsageName", + modelProperties: { + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2116,6 +2267,15 @@ export const ProjectUpdate: coreClient.CompositeMapper = { type: { name: "String" } + }, + maxDevBoxesPerUser: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.maxDevBoxesPerUser", + type: { + name: "Number" + } } } } @@ -2186,6 +2346,13 @@ export const PoolUpdate: coreClient.CompositeMapper = { type: { name: "String" } + }, + stopOnDisconnect: { + serializedName: "properties.stopOnDisconnect", + type: { + name: "Composite", + className: "StopOnDisconnectConfiguration" + } } } } @@ -2454,6 +2621,26 @@ export const PoolProperties: coreClient.CompositeMapper = { className: "PoolProperties", modelProperties: { ...PoolUpdateProperties.type.modelProperties, + healthStatus: { + serializedName: "healthStatus", + readOnly: true, + type: { + name: "String" + } + }, + healthStatusDetails: { + serializedName: "healthStatusDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthStatusDetail" + } + } + } + }, provisioningState: { serializedName: "provisioningState", readOnly: true, @@ -2568,6 +2755,15 @@ export const Project: coreClient.CompositeMapper = { name: "String" } }, + maxDevBoxesPerUser: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.maxDevBoxesPerUser", + type: { + name: "Number" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -2680,6 +2876,33 @@ export const Pool: coreClient.CompositeMapper = { name: "String" } }, + stopOnDisconnect: { + serializedName: "properties.stopOnDisconnect", + type: { + name: "Composite", + className: "StopOnDisconnectConfiguration" + } + }, + healthStatus: { + serializedName: "properties.healthStatus", + readOnly: true, + type: { + name: "String" + } + }, + healthStatusDetails: { + serializedName: "properties.healthStatusDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HealthStatusDetail" + } + } + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -2804,6 +3027,13 @@ export const Image: coreClient.CompositeMapper = { type: { name: "String" } + }, + hibernateSupport: { + serializedName: "properties.hibernateSupport", + readOnly: true, + type: { + name: "String" + } } } } diff --git a/sdk/devcenter/arm-devcenter/src/models/parameters.ts b/sdk/devcenter/arm-devcenter/src/models/parameters.ts index 461826f64ba7..c5b3cba8cea9 100644 --- a/sdk/devcenter/arm-devcenter/src/models/parameters.ts +++ b/sdk/devcenter/arm-devcenter/src/models/parameters.ts @@ -62,7 +62,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-11-preview", + defaultValue: "2023-01-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/devcenter/arm-devcenter/src/operations/attachedNetworks.ts b/sdk/devcenter/arm-devcenter/src/operations/attachedNetworks.ts index a07ac3a18561..61de4bc15a5f 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/attachedNetworks.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/attachedNetworks.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AttachedNetworkConnection, AttachedNetworksListByProjectNextOptionalParams, @@ -312,8 +316,8 @@ export class AttachedNetworksImpl implements AttachedNetworks { body: AttachedNetworkConnection, options?: AttachedNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedNetworksCreateOrUpdateResponse > > { @@ -323,7 +327,7 @@ export class AttachedNetworksImpl implements AttachedNetworks { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -356,21 +360,24 @@ export class AttachedNetworksImpl implements AttachedNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, attachedNetworkConnectionName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AttachedNetworksCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -413,14 +420,14 @@ export class AttachedNetworksImpl implements AttachedNetworks { devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -453,20 +460,20 @@ export class AttachedNetworksImpl implements AttachedNetworks { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, attachedNetworkConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -694,7 +701,6 @@ const listByProjectNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -716,7 +722,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/catalogs.ts b/sdk/devcenter/arm-devcenter/src/operations/catalogs.ts index 64d02fa84d02..596678da2bdd 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/catalogs.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/catalogs.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Catalog, CatalogsListByDevCenterNextOptionalParams, @@ -180,8 +184,8 @@ export class CatalogsImpl implements Catalogs { body: Catalog, options?: CatalogsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CatalogsCreateOrUpdateResponse > > { @@ -191,7 +195,7 @@ export class CatalogsImpl implements Catalogs { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -224,15 +228,18 @@ export class CatalogsImpl implements Catalogs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, catalogName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, catalogName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CatalogsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -278,8 +285,8 @@ export class CatalogsImpl implements Catalogs { body: CatalogUpdate, options?: CatalogsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CatalogsUpdateResponse > > { @@ -289,7 +296,7 @@ export class CatalogsImpl implements Catalogs { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -322,15 +329,18 @@ export class CatalogsImpl implements Catalogs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, catalogName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, catalogName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CatalogsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -373,14 +383,14 @@ export class CatalogsImpl implements Catalogs { devCenterName: string, catalogName: string, options?: CatalogsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -413,15 +423,15 @@ export class CatalogsImpl implements Catalogs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, catalogName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, catalogName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -461,14 +471,14 @@ export class CatalogsImpl implements Catalogs { devCenterName: string, catalogName: string, options?: CatalogsSyncOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -501,15 +511,15 @@ export class CatalogsImpl implements Catalogs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, catalogName, options }, - syncOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, catalogName, options }, + spec: syncOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -731,7 +741,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/devBoxDefinitions.ts b/sdk/devcenter/arm-devcenter/src/operations/devBoxDefinitions.ts index 91c29685dc29..4252aab6ab38 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/devBoxDefinitions.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/devBoxDefinitions.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DevBoxDefinition, DevBoxDefinitionsListByDevCenterNextOptionalParams, @@ -269,8 +273,8 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { body: DevBoxDefinition, options?: DevBoxDefinitionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevBoxDefinitionsCreateOrUpdateResponse > > { @@ -280,7 +284,7 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -313,15 +317,24 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, devBoxDefinitionName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + devCenterName, + devBoxDefinitionName, + body, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DevBoxDefinitionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -367,8 +380,8 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { body: DevBoxDefinitionUpdate, options?: DevBoxDefinitionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevBoxDefinitionsUpdateResponse > > { @@ -378,7 +391,7 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -411,15 +424,24 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, devBoxDefinitionName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + devCenterName, + devBoxDefinitionName, + body, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DevBoxDefinitionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -462,14 +484,14 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -502,15 +524,15 @@ export class DevBoxDefinitionsImpl implements DevBoxDefinitions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, devBoxDefinitionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, devBoxDefinitionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -808,7 +830,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -830,7 +851,6 @@ const listByProjectNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/devCenters.ts b/sdk/devcenter/arm-devcenter/src/operations/devCenters.ts index c570ae1b88c7..91962b2accfd 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/devCenters.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/devCenters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DevCenter, DevCentersListBySubscriptionNextOptionalParams, @@ -229,8 +233,8 @@ export class DevCentersImpl implements DevCenters { body: DevCenter, options?: DevCentersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevCentersCreateOrUpdateResponse > > { @@ -240,7 +244,7 @@ export class DevCentersImpl implements DevCenters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -273,15 +277,18 @@ export class DevCentersImpl implements DevCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DevCentersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -322,8 +329,8 @@ export class DevCentersImpl implements DevCenters { body: DevCenterUpdate, options?: DevCentersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevCentersUpdateResponse > > { @@ -333,7 +340,7 @@ export class DevCentersImpl implements DevCenters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -366,15 +373,18 @@ export class DevCentersImpl implements DevCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DevCentersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -412,14 +422,14 @@ export class DevCentersImpl implements DevCenters { resourceGroupName: string, devCenterName: string, options?: DevCentersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -452,15 +462,15 @@ export class DevCentersImpl implements DevCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -680,7 +690,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -700,7 +709,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/environmentTypes.ts b/sdk/devcenter/arm-devcenter/src/operations/environmentTypes.ts index f440152d3698..d850bdac04ab 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/environmentTypes.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/environmentTypes.ts @@ -373,7 +373,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/galleries.ts b/sdk/devcenter/arm-devcenter/src/operations/galleries.ts index c59b5c4bb833..32237b440e9b 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/galleries.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/galleries.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Gallery, GalleriesListByDevCenterNextOptionalParams, @@ -176,8 +180,8 @@ export class GalleriesImpl implements Galleries { body: Gallery, options?: GalleriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class GalleriesImpl implements Galleries { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,15 +224,18 @@ export class GalleriesImpl implements Galleries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, galleryName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, galleryName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GalleriesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -271,14 +278,14 @@ export class GalleriesImpl implements Galleries { devCenterName: string, galleryName: string, options?: GalleriesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -311,15 +318,15 @@ export class GalleriesImpl implements Galleries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, devCenterName, galleryName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, devCenterName, galleryName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -483,7 +490,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/imageVersions.ts b/sdk/devcenter/arm-devcenter/src/operations/imageVersions.ts index 8d7faf0ee5ac..60f48aab8c78 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/imageVersions.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/imageVersions.ts @@ -282,7 +282,6 @@ const listByImageNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/images.ts b/sdk/devcenter/arm-devcenter/src/operations/images.ts index 904439229654..e2b60da74d13 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/images.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/images.ts @@ -397,7 +397,6 @@ const listByDevCenterNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -419,7 +418,6 @@ const listByGalleryNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/index.ts b/sdk/devcenter/arm-devcenter/src/operations/index.ts index b711094305f1..f009380e677a 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/index.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/index.ts @@ -19,7 +19,6 @@ export * from "./projectEnvironmentTypes"; export * from "./devBoxDefinitions"; export * from "./operations"; export * from "./operationStatuses"; -export * from "./usages"; export * from "./checkNameAvailability"; export * from "./skus"; export * from "./pools"; diff --git a/sdk/devcenter/arm-devcenter/src/operations/networkConnections.ts b/sdk/devcenter/arm-devcenter/src/operations/networkConnections.ts index 1928891c0ed8..af8a043f1fe8 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/networkConnections.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/networkConnections.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { NetworkConnection, NetworkConnectionsListBySubscriptionNextOptionalParams, @@ -27,6 +31,10 @@ import { NetworkConnectionsListHealthDetailsNextOptionalParams, NetworkConnectionsListHealthDetailsOptionalParams, NetworkConnectionsListHealthDetailsResponse, + OutboundEnvironmentEndpoint, + NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextOptionalParams, + NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams, + NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse, NetworkConnectionsGetOptionalParams, NetworkConnectionsGetResponse, NetworkConnectionsCreateOrUpdateOptionalParams, @@ -40,7 +48,8 @@ import { NetworkConnectionsRunHealthChecksOptionalParams, NetworkConnectionsListBySubscriptionNextResponse, NetworkConnectionsListByResourceGroupNextResponse, - NetworkConnectionsListHealthDetailsNextResponse + NetworkConnectionsListHealthDetailsNextResponse, + NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextResponse } from "../models"; /// @@ -263,6 +272,91 @@ export class NetworkConnectionsImpl implements NetworkConnections { } } + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs + * should be allowed for outbound access in order for the Dev Box service to function. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param options The options parameters. + */ + public listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + networkConnectionName: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listOutboundNetworkDependenciesEndpointsPagingAll( + resourceGroupName, + networkConnectionName, + 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.listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName, + networkConnectionName, + options, + settings + ); + } + }; + } + + private async *listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName: string, + networkConnectionName: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listOutboundNetworkDependenciesEndpoints( + resourceGroupName, + networkConnectionName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listOutboundNetworkDependenciesEndpointsNext( + resourceGroupName, + networkConnectionName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listOutboundNetworkDependenciesEndpointsPagingAll( + resourceGroupName: string, + networkConnectionName: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listOutboundNetworkDependenciesEndpointsPagingPage( + resourceGroupName, + networkConnectionName, + options + )) { + yield* page; + } + } + /** * Lists network connections in a subscription * @param options The options parameters. @@ -321,8 +415,8 @@ export class NetworkConnectionsImpl implements NetworkConnections { body: NetworkConnection, options?: NetworkConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NetworkConnectionsCreateOrUpdateResponse > > { @@ -332,7 +426,7 @@ export class NetworkConnectionsImpl implements NetworkConnections { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -365,15 +459,18 @@ export class NetworkConnectionsImpl implements NetworkConnections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, networkConnectionName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkConnectionName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + NetworkConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -414,8 +511,8 @@ export class NetworkConnectionsImpl implements NetworkConnections { body: NetworkConnectionUpdate, options?: NetworkConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NetworkConnectionsUpdateResponse > > { @@ -425,7 +522,7 @@ export class NetworkConnectionsImpl implements NetworkConnections { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -458,15 +555,18 @@ export class NetworkConnectionsImpl implements NetworkConnections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, networkConnectionName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkConnectionName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + NetworkConnectionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -504,14 +604,14 @@ export class NetworkConnectionsImpl implements NetworkConnections { resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -544,15 +644,15 @@ export class NetworkConnectionsImpl implements NetworkConnections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, networkConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkConnectionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -622,14 +722,14 @@ export class NetworkConnectionsImpl implements NetworkConnections { resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsRunHealthChecksOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -662,15 +762,15 @@ export class NetworkConnectionsImpl implements NetworkConnections { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, networkConnectionName, options }, - runHealthChecksOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, networkConnectionName, options }, + spec: runHealthChecksOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -696,6 +796,26 @@ export class NetworkConnectionsImpl implements NetworkConnections { return poller.pollUntilDone(); } + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs + * should be allowed for outbound access in order for the Dev Box service to function. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param options The options parameters. + */ + private _listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + networkConnectionName: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams + ): Promise< + NetworkConnectionsListOutboundNetworkDependenciesEndpointsResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, networkConnectionName, options }, + listOutboundNetworkDependenciesEndpointsOperationSpec + ); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -746,6 +866,28 @@ export class NetworkConnectionsImpl implements NetworkConnections { listHealthDetailsNextOperationSpec ); } + + /** + * ListOutboundNetworkDependenciesEndpointsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param nextLink The nextLink from the previous successful call to the + * ListOutboundNetworkDependenciesEndpoints method. + * @param options The options parameters. + */ + private _listOutboundNetworkDependenciesEndpointsNext( + resourceGroupName: string, + networkConnectionName: string, + nextLink: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextOptionalParams + ): Promise< + NetworkConnectionsListOutboundNetworkDependenciesEndpointsNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, networkConnectionName, nextLink, options }, + listOutboundNetworkDependenciesEndpointsNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -966,6 +1108,28 @@ const runHealthChecksOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.networkConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -977,7 +1141,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -997,7 +1160,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1018,7 +1180,27 @@ const listHealthDetailsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.networkConnectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/operations.ts b/sdk/devcenter/arm-devcenter/src/operations/operations.ts index 5792c505557a..c021f18c32aa 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/operations.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/devcenter/arm-devcenter/src/operations/pools.ts b/sdk/devcenter/arm-devcenter/src/operations/pools.ts index 332cbffc1270..3758c986417c 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/pools.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/pools.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Pool, PoolsListByProjectNextOptionalParams, @@ -28,6 +32,7 @@ import { PoolsUpdateOptionalParams, PoolsUpdateResponse, PoolsDeleteOptionalParams, + PoolsRunHealthChecksOptionalParams, PoolsListByProjectNextResponse } from "../models"; @@ -179,8 +184,8 @@ export class PoolsImpl implements Pools { body: Pool, options?: PoolsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoolsCreateOrUpdateResponse > > { @@ -190,7 +195,7 @@ export class PoolsImpl implements Pools { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -223,15 +228,18 @@ export class PoolsImpl implements Pools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, poolName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PoolsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -277,7 +285,7 @@ export class PoolsImpl implements Pools { body: PoolUpdate, options?: PoolsUpdateOptionalParams ): Promise< - PollerLike, PoolsUpdateResponse> + SimplePollerLike, PoolsUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -285,7 +293,7 @@ export class PoolsImpl implements Pools { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -318,15 +326,18 @@ export class PoolsImpl implements Pools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, poolName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PoolsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -369,14 +380,14 @@ export class PoolsImpl implements Pools { projectName: string, poolName: string, options?: PoolsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -409,15 +420,15 @@ export class PoolsImpl implements Pools { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, poolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -445,6 +456,94 @@ export class PoolsImpl implements Pools { return poller.pollUntilDone(); } + /** + * Triggers a refresh of the pool status. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the pool. + * @param options The options parameters. + */ + async beginRunHealthChecks( + resourceGroupName: string, + projectName: string, + poolName: string, + options?: PoolsRunHealthChecksOptionalParams + ): Promise, void>> { + 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, projectName, poolName, options }, + spec: runHealthChecksOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Triggers a refresh of the pool status. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the pool. + * @param options The options parameters. + */ + async beginRunHealthChecksAndWait( + resourceGroupName: string, + projectName: string, + poolName: string, + options?: PoolsRunHealthChecksOptionalParams + ): Promise { + const poller = await this.beginRunHealthChecks( + resourceGroupName, + projectName, + poolName, + options + ); + return poller.pollUntilDone(); + } + /** * ListByProjectNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -604,6 +703,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const runHealthChecksOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.projectName, + Parameters.poolName + ], + headerParameters: [Parameters.accept], + serializer +}; const listByProjectNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -615,7 +738,6 @@ const listByProjectNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts b/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts index e6e71790f491..cd61d966e5c3 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts @@ -227,7 +227,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/projectEnvironmentTypes.ts b/sdk/devcenter/arm-devcenter/src/operations/projectEnvironmentTypes.ts index 6f64069dc0ff..c9d37c8262ea 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/projectEnvironmentTypes.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/projectEnvironmentTypes.ts @@ -365,7 +365,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/projects.ts b/sdk/devcenter/arm-devcenter/src/operations/projects.ts index 9311391a2cdd..3f4c1d64bb28 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/projects.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/projects.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Project, ProjectsListBySubscriptionNextOptionalParams, @@ -229,8 +233,8 @@ export class ProjectsImpl implements Projects { body: Project, options?: ProjectsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProjectsCreateOrUpdateResponse > > { @@ -240,7 +244,7 @@ export class ProjectsImpl implements Projects { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -273,15 +277,18 @@ export class ProjectsImpl implements Projects { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, body, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ProjectsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -322,8 +329,8 @@ export class ProjectsImpl implements Projects { body: ProjectUpdate, options?: ProjectsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProjectsUpdateResponse > > { @@ -333,7 +340,7 @@ export class ProjectsImpl implements Projects { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -366,15 +373,18 @@ export class ProjectsImpl implements Projects { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, body, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ProjectsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -412,14 +422,14 @@ export class ProjectsImpl implements Projects { resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -452,15 +462,15 @@ export class ProjectsImpl implements Projects { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -680,7 +690,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -700,7 +709,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/schedules.ts b/sdk/devcenter/arm-devcenter/src/operations/schedules.ts index 0f1a33ec5604..fececd548b00 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/schedules.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/schedules.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DevCenterClient } from "../devCenterClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Schedule, SchedulesListByPoolNextOptionalParams, @@ -194,8 +198,8 @@ export class SchedulesImpl implements Schedules { body: Schedule, options?: SchedulesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SchedulesCreateOrUpdateResponse > > { @@ -205,7 +209,7 @@ export class SchedulesImpl implements Schedules { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -238,15 +242,25 @@ export class SchedulesImpl implements Schedules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, scheduleName, body, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + projectName, + poolName, + scheduleName, + body, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SchedulesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -297,8 +311,8 @@ export class SchedulesImpl implements Schedules { body: ScheduleUpdate, options?: SchedulesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SchedulesUpdateResponse > > { @@ -308,7 +322,7 @@ export class SchedulesImpl implements Schedules { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -341,15 +355,25 @@ export class SchedulesImpl implements Schedules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, scheduleName, body, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + projectName, + poolName, + scheduleName, + body, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + SchedulesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -397,14 +421,14 @@ export class SchedulesImpl implements Schedules { poolName: string, scheduleName: string, options?: SchedulesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -437,15 +461,15 @@ export class SchedulesImpl implements Schedules { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, projectName, poolName, scheduleName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, projectName, poolName, scheduleName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -653,7 +677,6 @@ const listByPoolNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/skus.ts b/sdk/devcenter/arm-devcenter/src/operations/skus.ts index 1e4112a65109..f242c0caf8ca 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/skus.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/skus.ts @@ -146,7 +146,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/devcenter/arm-devcenter/src/operations/usages.ts b/sdk/devcenter/arm-devcenter/src/operations/usages.ts deleted file mode 100644 index 90cee9eecde9..000000000000 --- a/sdk/devcenter/arm-devcenter/src/operations/usages.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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 { Usages } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DevCenterClient } from "../devCenterClient"; -import { - Usage, - UsagesListByLocationNextOptionalParams, - UsagesListByLocationOptionalParams, - UsagesListByLocationResponse, - UsagesListByLocationNextResponse -} from "../models"; - -/// -/** Class containing Usages operations. */ -export class UsagesImpl implements Usages { - private readonly client: DevCenterClient; - - /** - * Initialize a new instance of the class Usages class. - * @param client Reference to the service client - */ - constructor(client: DevCenterClient) { - this.client = client; - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * @param location The Azure region - * @param options The options parameters. - */ - public listByLocation( - location: string, - options?: UsagesListByLocationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByLocationPagingAll(location, 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.listByLocationPagingPage(location, options, settings); - } - }; - } - - private async *listByLocationPagingPage( - location: string, - options?: UsagesListByLocationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: UsagesListByLocationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByLocation(location, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByLocationNext( - location, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByLocationPagingAll( - location: string, - options?: UsagesListByLocationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByLocationPagingPage(location, options)) { - yield* page; - } - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * @param location The Azure region - * @param options The options parameters. - */ - private _listByLocation( - location: string, - options?: UsagesListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listByLocationOperationSpec - ); - } - - /** - * ListByLocationNext - * @param location The Azure region - * @param nextLink The nextLink from the previous successful call to the ListByLocation method. - * @param options The options parameters. - */ - private _listByLocationNext( - location: string, - nextLink: string, - options?: UsagesListByLocationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, nextLink, options }, - listByLocationNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/usages", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByLocationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/attachedNetworks.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/attachedNetworks.ts index 6653d2f63bb9..ccb24a0b0bf2 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/attachedNetworks.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/attachedNetworks.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AttachedNetworkConnection, AttachedNetworksListByProjectOptionalParams, @@ -87,8 +87,8 @@ export interface AttachedNetworks { body: AttachedNetworkConnection, options?: AttachedNetworksCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AttachedNetworksCreateOrUpdateResponse > >; @@ -119,7 +119,7 @@ export interface AttachedNetworks { devCenterName: string, attachedNetworkConnectionName: string, options?: AttachedNetworksDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Un-attach a NetworkConnection. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/catalogs.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/catalogs.ts index 305cd72baa51..bab5fb25c174 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/catalogs.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/catalogs.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Catalog, CatalogsListByDevCenterOptionalParams, @@ -64,8 +64,8 @@ export interface Catalogs { body: Catalog, options?: CatalogsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CatalogsCreateOrUpdateResponse > >; @@ -99,8 +99,8 @@ export interface Catalogs { body: CatalogUpdate, options?: CatalogsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CatalogsUpdateResponse > >; @@ -131,7 +131,7 @@ export interface Catalogs { devCenterName: string, catalogName: string, options?: CatalogsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a catalog resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -157,7 +157,7 @@ export interface Catalogs { devCenterName: string, catalogName: string, options?: CatalogsSyncOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Syncs templates for a template source. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devBoxDefinitions.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devBoxDefinitions.ts index 812c5a75f57e..8724b27d2ae5 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devBoxDefinitions.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devBoxDefinitions.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DevBoxDefinition, DevBoxDefinitionsListByDevCenterOptionalParams, @@ -77,8 +77,8 @@ export interface DevBoxDefinitions { body: DevBoxDefinition, options?: DevBoxDefinitionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevBoxDefinitionsCreateOrUpdateResponse > >; @@ -112,8 +112,8 @@ export interface DevBoxDefinitions { body: DevBoxDefinitionUpdate, options?: DevBoxDefinitionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevBoxDefinitionsUpdateResponse > >; @@ -144,7 +144,7 @@ export interface DevBoxDefinitions { devCenterName: string, devBoxDefinitionName: string, options?: DevBoxDefinitionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Dev Box definition * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devCenters.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devCenters.ts index 586f38b47798..8d0492d50189 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devCenters.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/devCenters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DevCenter, DevCentersListBySubscriptionOptionalParams, @@ -65,8 +65,8 @@ export interface DevCenters { body: DevCenter, options?: DevCentersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevCentersCreateOrUpdateResponse > >; @@ -96,8 +96,8 @@ export interface DevCenters { body: DevCenterUpdate, options?: DevCentersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevCentersUpdateResponse > >; @@ -124,7 +124,7 @@ export interface DevCenters { resourceGroupName: string, devCenterName: string, options?: DevCentersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a devcenter * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/galleries.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/galleries.ts index 1f5ed64213a8..58b0d089a6c4 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/galleries.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/galleries.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Gallery, GalleriesListByDevCenterOptionalParams, @@ -60,8 +60,8 @@ export interface Galleries { body: Gallery, options?: GalleriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GalleriesCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface Galleries { devCenterName: string, galleryName: string, options?: GalleriesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a gallery resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts index b711094305f1..f009380e677a 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts @@ -19,7 +19,6 @@ export * from "./projectEnvironmentTypes"; export * from "./devBoxDefinitions"; export * from "./operations"; export * from "./operationStatuses"; -export * from "./usages"; export * from "./checkNameAvailability"; export * from "./skus"; export * from "./pools"; diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/networkConnections.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/networkConnections.ts index 3d230b6098c0..693523287f2c 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/networkConnections.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/networkConnections.ts @@ -7,13 +7,15 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { NetworkConnection, NetworkConnectionsListBySubscriptionOptionalParams, NetworkConnectionsListByResourceGroupOptionalParams, HealthCheckStatusDetails, NetworkConnectionsListHealthDetailsOptionalParams, + OutboundEnvironmentEndpoint, + NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams, NetworkConnectionsGetOptionalParams, NetworkConnectionsGetResponse, NetworkConnectionsCreateOrUpdateOptionalParams, @@ -57,6 +59,18 @@ export interface NetworkConnections { networkConnectionName: string, options?: NetworkConnectionsListHealthDetailsOptionalParams ): PagedAsyncIterableIterator; + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs + * should be allowed for outbound access in order for the Dev Box service to function. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param options The options parameters. + */ + listOutboundNetworkDependenciesEndpoints( + resourceGroupName: string, + networkConnectionName: string, + options?: NetworkConnectionsListOutboundNetworkDependenciesEndpointsOptionalParams + ): PagedAsyncIterableIterator; /** * Gets a network connection resource * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,8 +95,8 @@ export interface NetworkConnections { body: NetworkConnection, options?: NetworkConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NetworkConnectionsCreateOrUpdateResponse > >; @@ -112,8 +126,8 @@ export interface NetworkConnections { body: NetworkConnectionUpdate, options?: NetworkConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NetworkConnectionsUpdateResponse > >; @@ -140,7 +154,7 @@ export interface NetworkConnections { resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Network Connections resource * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -174,7 +188,7 @@ export interface NetworkConnections { resourceGroupName: string, networkConnectionName: string, options?: NetworkConnectionsRunHealthChecksOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Triggers a new health check run. The execution and health check result can be tracked via the * network Connection health check details diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/pools.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/pools.ts index e2b15481ff34..b9c9c9995b73 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/pools.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/pools.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Pool, PoolsListByProjectOptionalParams, @@ -18,7 +18,8 @@ import { PoolUpdate, PoolsUpdateOptionalParams, PoolsUpdateResponse, - PoolsDeleteOptionalParams + PoolsDeleteOptionalParams, + PoolsRunHealthChecksOptionalParams } from "../models"; /// @@ -63,8 +64,8 @@ export interface Pools { body: Pool, options?: PoolsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PoolsCreateOrUpdateResponse > >; @@ -98,7 +99,7 @@ export interface Pools { body: PoolUpdate, options?: PoolsUpdateOptionalParams ): Promise< - PollerLike, PoolsUpdateResponse> + SimplePollerLike, PoolsUpdateResponse> >; /** * Partially updates a machine pool @@ -127,7 +128,7 @@ export interface Pools { projectName: string, poolName: string, options?: PoolsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a machine pool * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -141,4 +142,30 @@ export interface Pools { poolName: string, options?: PoolsDeleteOptionalParams ): Promise; + /** + * Triggers a refresh of the pool status. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the pool. + * @param options The options parameters. + */ + beginRunHealthChecks( + resourceGroupName: string, + projectName: string, + poolName: string, + options?: PoolsRunHealthChecksOptionalParams + ): Promise, void>>; + /** + * Triggers a refresh of the pool status. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the pool. + * @param options The options parameters. + */ + beginRunHealthChecksAndWait( + resourceGroupName: string, + projectName: string, + poolName: string, + options?: PoolsRunHealthChecksOptionalParams + ): Promise; } diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projects.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projects.ts index 57a3b429c9b0..ebd72ecd3715 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projects.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projects.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Project, ProjectsListBySubscriptionOptionalParams, @@ -65,8 +65,8 @@ export interface Projects { body: Project, options?: ProjectsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProjectsCreateOrUpdateResponse > >; @@ -96,8 +96,8 @@ export interface Projects { body: ProjectUpdate, options?: ProjectsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ProjectsUpdateResponse > >; @@ -124,7 +124,7 @@ export interface Projects { resourceGroupName: string, projectName: string, options?: ProjectsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a project resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/schedules.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/schedules.ts index f656151fec83..c61a364222ca 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/schedules.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/schedules.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Schedule, SchedulesListByPoolOptionalParams, @@ -69,8 +69,8 @@ export interface Schedules { body: Schedule, options?: SchedulesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SchedulesCreateOrUpdateResponse > >; @@ -108,8 +108,8 @@ export interface Schedules { body: ScheduleUpdate, options?: SchedulesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SchedulesUpdateResponse > >; @@ -144,7 +144,7 @@ export interface Schedules { poolName: string, scheduleName: string, options?: SchedulesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a Scheduled. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/usages.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/usages.ts deleted file mode 100644 index 3a3153fa79d2..000000000000 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/usages.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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 { Usage, UsagesListByLocationOptionalParams } from "../models"; - -/// -/** Interface representing a Usages. */ -export interface Usages { - /** - * Lists the current usages and limits in this location for the provided subscription. - * @param location The Azure region - * @param options The options parameters. - */ - listByLocation( - location: string, - options?: UsagesListByLocationOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/devcenter/arm-devcenter/src/pagingHelper.ts b/sdk/devcenter/arm-devcenter/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/devcenter/arm-devcenter/src/pagingHelper.ts +++ b/sdk/devcenter/arm-devcenter/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/devcenter/arm-devcenter/test/sampleTest.ts b/sdk/devcenter/arm-devcenter/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/devcenter/arm-devcenter/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/devcenter/arm-devcenter/tsconfig.json b/sdk/devcenter/arm-devcenter/tsconfig.json index 4840dfd287a6..3e6ae96443f3 100644 --- a/sdk/devcenter/arm-devcenter/tsconfig.json +++ b/sdk/devcenter/arm-devcenter/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-devcenter": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"