From ae89fadf131a9c989d4b231647f0cf84b1261c4f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 21 Jul 2023 07:26:49 +0000 Subject: [PATCH] CodeGen from PR 24926 in Azure/azure-rest-api-specs Merge 44a6ae771c79fb911cd999ea8b5cb1fe54498cc0 into 688a906172823628e75b19ea8964d998cb7560fd --- common/config/rush/pnpm-lock.yaml | 13 +- sdk/databoxedge/arm-databoxedge/CHANGELOG.md | 50 +- sdk/databoxedge/arm-databoxedge/LICENSE | 2 +- sdk/databoxedge/arm-databoxedge/_meta.json | 10 +- sdk/databoxedge/arm-databoxedge/package.json | 21 +- .../review/arm-databoxedge.api.md | 245 +++++-- .../src/dataBoxEdgeManagementClient.ts | 14 +- .../arm-databoxedge/src/lroImpl.ts | 54 +- .../arm-databoxedge/src/models/index.ts | 412 +++++++---- .../arm-databoxedge/src/models/mappers.ts | 666 +++++++++++++----- .../arm-databoxedge/src/models/parameters.ts | 18 +- .../arm-databoxedge/src/operations/addons.ts | 57 +- .../arm-databoxedge/src/operations/alerts.ts | 1 - .../src/operations/availableSkus.ts | 1 - .../src/operations/bandwidthSchedules.ts | 50 +- .../src/operations/containers.ts | 68 +- .../src/operations/deviceCapacityCheck.ts | 157 +++++ .../deviceCapacityInfoOperations.ts | 73 ++ .../arm-databoxedge/src/operations/devices.ts | 100 +-- .../src/operations/diagnosticSettings.ts | 58 +- .../arm-databoxedge/src/operations/index.ts | 2 + .../src/operations/monitoringConfig.ts | 50 +- .../arm-databoxedge/src/operations/nodes.ts | 1 - .../src/operations/operations.ts | 1 - .../arm-databoxedge/src/operations/orders.ts | 50 +- .../arm-databoxedge/src/operations/roles.ts | 50 +- .../arm-databoxedge/src/operations/shares.ts | 68 +- .../operations/storageAccountCredentials.ts | 50 +- .../src/operations/storageAccounts.ts | 50 +- .../src/operations/supportPackages.ts | 31 +- .../src/operations/triggers.ts | 50 +- .../arm-databoxedge/src/operations/users.ts | 50 +- .../src/operationsInterfaces/addons.ts | 8 +- .../bandwidthSchedules.ts | 8 +- .../src/operationsInterfaces/containers.ts | 10 +- .../deviceCapacityCheck.ts | 43 ++ .../deviceCapacityInfoOperations.ts | 27 + .../src/operationsInterfaces/devices.ts | 12 +- .../diagnosticSettings.ts | 10 +- .../src/operationsInterfaces/index.ts | 2 + .../operationsInterfaces/monitoringConfig.ts | 8 +- .../src/operationsInterfaces/orders.ts | 8 +- .../src/operationsInterfaces/roles.ts | 8 +- .../src/operationsInterfaces/shares.ts | 10 +- .../storageAccountCredentials.ts | 8 +- .../operationsInterfaces/storageAccounts.ts | 8 +- .../operationsInterfaces/supportPackages.ts | 4 +- .../src/operationsInterfaces/triggers.ts | 8 +- .../src/operationsInterfaces/users.ts | 8 +- .../arm-databoxedge/src/pagingHelper.ts | 8 +- sdk/databoxedge/arm-databoxedge/tsconfig.json | 10 +- 51 files changed, 1903 insertions(+), 828 deletions(-) create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a726c0b3e298..7b026275381c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4887,7 +4887,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230718 + typescript: 5.2.0-dev.20230721 dev: false /duplexer3/0.1.5: @@ -10399,8 +10399,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230718: - resolution: {integrity: sha512-ED1Vm+2UzdbtKui+0lVswEuAX94fQXeoghXyy/+aTNers8X/WB81r5sFg6nA4e43nVQ2MP/Qsa7/XJRFuHR+Cg==} + /typescript/5.2.0-dev.20230721: + resolution: {integrity: sha512-xBP6NmF/Sk+4H5OM4eYRqyv2pTFjOyIFjaPaVlxXdgqKrysoyB5HkbtHu7GOP9/v5qGG6bd57CVOB/xFpmjxkA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -13170,7 +13170,7 @@ packages: dev: false file:projects/arm-databoxedge.tgz: - resolution: {integrity: sha512-IB0n30m/Tq6XZ9EvwSR3qYsK4kwj8veM2LOOyzbwvgE9uD3GunBhSOQGrap2k4ivMmBm42fC/SdXmh9VKl23bA==, tarball: file:projects/arm-databoxedge.tgz} + resolution: {integrity: sha512-bU43i2BiSZP8QsW2NVV36TdBxhltqlCKQ1XPWkfhmOQ8TAlRbLSs0b9XNdFdmn1yG3q1j5IG8CUR/N8B8Qjrww==, tarball: file:projects/arm-databoxedge.tgz} name: '@rush-temp/arm-databoxedge' version: 0.0.0 dependencies: @@ -13184,7 +13184,8 @@ packages: '@types/node': 14.18.53 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -21545,7 +21546,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-RpThRihEhcpL4GBB9uvgjdYuHrsgy5h+I3kAfC3w5PKwJrFdwRHD/T6jj9lFU4XJMY7qWpXB9VTHZwYzBk5iDg==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-RBBA/3/edoGRXf3UXRKbIhEPsydPcNuzE4iAJwoCL+EmFayR37M44zG7/Fcj9k8JLUI9Os+GcPVGn9zuLNr9Yw==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md index 1e766f9c4a3e..46aca2c70206 100644 --- a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md @@ -1,15 +1,49 @@ # Release History + +## 3.0.0 (2023-07-21) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group DeviceCapacityCheck + - Added operation group DeviceCapacityInfoOperations + - Added Interface ClusterCapacityViewData + - Added Interface ClusterGpuCapacity + - Added Interface ClusterMemoryCapacity + - Added Interface ClusterStorageViewData + - Added Interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + - Added Interface DeviceCapacityInfo + - Added Interface DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + - Added Interface DeviceCapacityRequestInfo + - Added Interface HostCapacity + - Added Interface NumaNodeData + - Added Interface VmMemory + - Added Interface VmPlacementRequestResult + - Added Type Alias ClusterWitnessType + - Added Type Alias DeviceCapacityInfoGetDeviceCapacityInfoResponse + - Interface DataBoxEdgeDevice has a new optional parameter kubernetesWorkloadProfile + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter cloudWitnessContainerName + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter cloudWitnessStorageAccountName + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter cloudWitnessStorageEndpoint + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter clusterWitnessType + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter fileShareWitnessLocation + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter fileShareWitnessUsername + - Interface DataBoxEdgeDeviceExtendedInfo has a new optional parameter systemData + - Interface Order has a new optional parameter kind + - Interface Order has a new optional parameter orderId + - Added Enum KnownClusterWitnessType + - Enum KnownSkuName has a new value EdgeMRTCP + - Enum KnownSkuName has a new value EP2128GPU1Mx1W + - Enum KnownSkuName has a new value EP2256GPU2Mx1 + - Enum KnownSkuName has a new value EP264Mx1W -### Other Changes +**Breaking Changes** + - Interface DevicesListByResourceGroupNextOptionalParams no longer has parameter expand + - Interface DevicesListBySubscriptionNextOptionalParams no longer has parameter expand + - Interface TriggersListByDataBoxEdgeDeviceNextOptionalParams no longer has parameter filter + - Interface UsersListByDataBoxEdgeDeviceNextOptionalParams no longer has parameter filter + + ## 2.1.0 (2022-11-21) **Features** diff --git a/sdk/databoxedge/arm-databoxedge/LICENSE b/sdk/databoxedge/arm-databoxedge/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/databoxedge/arm-databoxedge/LICENSE +++ b/sdk/databoxedge/arm-databoxedge/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/databoxedge/arm-databoxedge/_meta.json b/sdk/databoxedge/arm-databoxedge/_meta.json index 6cb217e05972..c4dc56eb2521 100644 --- a/sdk/databoxedge/arm-databoxedge/_meta.json +++ b/sdk/databoxedge/arm-databoxedge/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247", - "readme": "specification\\databoxedge\\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\\databoxedge\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "38966fad6d736f0b84b02286d22c33ea36f9bd3c", + "readme": "specification/databoxedge/resource-manager/readme.md", + "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/databoxedge/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "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.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/package.json b/sdk/databoxedge/arm-databoxedge/package.json index f1811233529d..3e17ad353ea6 100644 --- a/sdk/databoxedge/arm-databoxedge/package.json +++ b/sdk/databoxedge/arm-databoxedge/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataBoxEdgeManagementClient.", - "version": "2.1.1", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.3", "@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": "~5.0.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/databoxedge/arm-databoxedge", "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-databoxedge?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoxedge/arm-databoxedge" +} \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md index e61d2e1a55b4..ac0869819250 100644 --- a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md +++ b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.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 AccessLevel = string; @@ -30,9 +30,9 @@ export interface AddonList { // @public export interface Addons { - beginCreateOrUpdate(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams): Promise, AddonsCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams): Promise, AddonsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams): Promise; get(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsGetOptionalParams): Promise; listByRole(deviceName: string, roleName: string, resourceGroupName: string, options?: AddonsListByRoleOptionalParams): PagedAsyncIterableIterator; @@ -226,9 +226,9 @@ export interface BandwidthSchedule extends ARMBaseModel { // @public export interface BandwidthSchedules { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams): Promise, BandwidthSchedulesCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams): Promise, BandwidthSchedulesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -305,6 +305,46 @@ export interface CloudErrorBody { message?: string; } +// @public +export interface ClusterCapacityViewData { + fqdn?: string; + gpuCapacity?: ClusterGpuCapacity; + lastRefreshedTime?: Date; + memoryCapacity?: ClusterMemoryCapacity; + totalProvisionedNonHpnCores?: number; +} + +// @public +export interface ClusterGpuCapacity { + gpuFreeUnitsCount?: number; + gpuReservedForFailoverUnitsCount?: number; + gpuTotalUnitsCount?: number; + gpuType?: string; + gpuUsedUnitsCount?: number; +} + +// @public +export interface ClusterMemoryCapacity { + clusterFailoverMemoryMb?: number; + clusterFragmentationMemoryMb?: number; + clusterFreeMemoryMb?: number; + clusterHypervReserveMemoryMb?: number; + clusterInfraVmMemoryMb?: number; + clusterMemoryUsedByVmsMb?: number; + clusterNonFailoverVmMb?: number; + clusterTotalMemoryMb?: number; + clusterUsedMemoryMb?: number; +} + +// @public +export interface ClusterStorageViewData { + clusterFreeStorageMb?: number; + clusterTotalStorageMb?: number; +} + +// @public +export type ClusterWitnessType = string; + // @public export interface CniConfig { readonly podSubnet?: string; @@ -344,11 +384,11 @@ export interface ContainerList { // @public export interface Containers { - beginCreateOrUpdate(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, container: Container, options?: ContainersCreateOrUpdateOptionalParams): Promise, ContainersCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, container: Container, options?: ContainersCreateOrUpdateOptionalParams): Promise, ContainersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, container: Container, options?: ContainersCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams): Promise; - beginRefresh(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams): Promise, void>>; + beginRefresh(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams): Promise, void>>; beginRefreshAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams): Promise; get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersGetOptionalParams): Promise; listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: ContainersListByStorageAccountOptionalParams): PagedAsyncIterableIterator; @@ -406,7 +446,7 @@ export type CreatedByType = string; export interface DataBoxEdgeDevice extends ARMBaseModel { readonly configuredRoleTypes?: RoleTypes[]; readonly culture?: string; - dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + readonly dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; dataResidency?: DataResidency; readonly description?: string; readonly deviceHcsVersion?: string; @@ -418,7 +458,8 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { etag?: string; readonly friendlyName?: string; identity?: ResourceIdentity; - kind?: DataBoxEdgeDeviceKind; + readonly kind?: DataBoxEdgeDeviceKind; + readonly kubernetesWorkloadProfile?: string; location: string; readonly modelDescription?: string; readonly nodeCount?: number; @@ -439,13 +480,20 @@ export interface DataBoxEdgeDeviceExtendedInfo extends ARMBaseModel { channelIntegrityKeyVersion?: string; clientSecretStoreId?: string; clientSecretStoreUrl?: string; + readonly cloudWitnessContainerName?: string; + readonly cloudWitnessStorageAccountName?: string; + readonly cloudWitnessStorageEndpoint?: string; + readonly clusterWitnessType?: ClusterWitnessType; readonly deviceSecrets?: { [propertyName: string]: Secret; }; encryptionKey?: string; encryptionKeyThumbprint?: string; + readonly fileShareWitnessLocation?: string; + readonly fileShareWitnessUsername?: string; keyVaultSyncStatus?: KeyVaultSyncStatus; readonly resourceKey?: string; + readonly systemData?: SystemData; } // @public @@ -496,6 +544,10 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { // (undocumented) containers: Containers; // (undocumented) + deviceCapacityCheck: DeviceCapacityCheck; + // (undocumented) + deviceCapacityInfoOperations: DeviceCapacityInfoOperations; + // (undocumented) devices: Devices; // (undocumented) diagnosticSettings: DiagnosticSettings; @@ -586,17 +638,59 @@ export interface DCAccessCode { authCode?: string; } +// @public +export interface DeviceCapacityCheck { + beginCheckResourceCreationFeasibility(resourceGroupName: string, deviceName: string, deviceCapacityRequestInfo: DeviceCapacityRequestInfo, options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams): Promise, void>>; + beginCheckResourceCreationFeasibilityAndWait(resourceGroupName: string, deviceName: string, deviceCapacityRequestInfo: DeviceCapacityRequestInfo, options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams): Promise; +} + +// @public +export interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams extends coreClient.OperationOptions { + capacityName?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DeviceCapacityInfo extends ARMBaseModel { + clusterComputeCapacityInfo?: ClusterCapacityViewData; + clusterStorageCapacityInfo?: ClusterStorageViewData; + nodeCapacityInfos?: { + [propertyName: string]: HostCapacity; + }; + readonly systemData?: SystemData; + timeStamp?: Date; +} + +// @public +export interface DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DeviceCapacityInfoGetDeviceCapacityInfoResponse = DeviceCapacityInfo; + +// @public +export interface DeviceCapacityInfoOperations { + getDeviceCapacityInfo(resourceGroupName: string, deviceName: string, options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams): Promise; +} + +// @public +export interface DeviceCapacityRequestInfo { + vmPlacementQuery: string[][]; + vmPlacementResults?: VmPlacementRequestResult[]; +} + // @public export interface Devices { - beginCreateOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise, void>>; + beginCreateOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise, void>>; beginCreateOrUpdateSecuritySettingsAndWait(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise; - beginDelete(deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams): Promise; - beginDownloadUpdates(deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams): Promise, void>>; + beginDownloadUpdates(deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams): Promise, void>>; beginDownloadUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams): Promise; - beginInstallUpdates(deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams): Promise, void>>; + beginInstallUpdates(deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams): Promise, void>>; beginInstallUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams): Promise; - beginScanForUpdates(deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams): Promise, void>>; + beginScanForUpdates(deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams): Promise, void>>; beginScanForUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams): Promise; createOrUpdate(deviceName: string, resourceGroupName: string, dataBoxEdgeDevice: DataBoxEdgeDevice, options?: DevicesCreateOrUpdateOptionalParams): Promise; generateCertificate(deviceName: string, resourceGroupName: string, options?: DevicesGenerateCertificateOptionalParams): Promise; @@ -679,7 +773,6 @@ export interface DevicesInstallUpdatesOptionalParams extends coreClient.Operatio // @public export interface DevicesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -695,7 +788,6 @@ export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList; // @public export interface DevicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -753,9 +845,9 @@ export interface DiagnosticRemoteSupportSettings extends ARMBaseModel { // @public export interface DiagnosticSettings { - beginUpdateDiagnosticProactiveLogCollectionSettings(deviceName: string, resourceGroupName: string, proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse>>; + beginUpdateDiagnosticProactiveLogCollectionSettings(deviceName: string, resourceGroupName: string, proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse>>; beginUpdateDiagnosticProactiveLogCollectionSettingsAndWait(deviceName: string, resourceGroupName: string, proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise; - beginUpdateDiagnosticRemoteSupportSettings(deviceName: string, resourceGroupName: string, diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse>>; + beginUpdateDiagnosticRemoteSupportSettings(deviceName: string, resourceGroupName: string, diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse>>; beginUpdateDiagnosticRemoteSupportSettingsAndWait(deviceName: string, resourceGroupName: string, diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams): Promise; getDiagnosticProactiveLogCollectionSettings(deviceName: string, resourceGroupName: string, options?: DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise; getDiagnosticRemoteSupportSettings(deviceName: string, resourceGroupName: string, options?: DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams): Promise; @@ -865,6 +957,18 @@ export interface GenerateCertResponse { // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface HostCapacity { + availableGpuCount?: number; + effectiveAvailableMemoryMbOnHost?: number; + gpuType?: string; + hostName?: string; + numaNodesData?: NumaNodeData[]; + vmUsedMemory?: { + [propertyName: string]: VmMemory; + }; +} + // @public export type HostPlatformType = string; @@ -1047,6 +1151,13 @@ export enum KnownClientPermissionType { ReadWrite = "ReadWrite" } +// @public +export enum KnownClusterWitnessType { + Cloud = "Cloud", + FileShare = "FileShare", + None = "None" +} + // @public export enum KnownContainerStatus { NeedsAttention = "NeedsAttention", @@ -1391,13 +1502,17 @@ export enum KnownSkuAvailability { export enum KnownSkuName { Edge = "Edge", EdgeMRMini = "EdgeMR_Mini", + EdgeMRTCP = "EdgeMR_TCP", EdgePBase = "EdgeP_Base", EdgePHigh = "EdgeP_High", EdgePRBase = "EdgePR_Base", EdgePRBaseUPS = "EdgePR_Base_UPS", EP21281T4Mx1W = "EP2_128_1T4_Mx1_W", + EP2128GPU1Mx1W = "EP2_128_GPU1_Mx1_W", EP22562T4W = "EP2_256_2T4_W", + EP2256GPU2Mx1 = "EP2_256_GPU2_Mx1", EP2641VPUW = "EP2_64_1VPU_W", + EP264Mx1W = "EP2_64_Mx1_W", Gateway = "Gateway", GPU = "GPU", Management = "Management", @@ -1665,9 +1780,9 @@ export type MetricUnit = string; // @public export interface MonitoringConfig { - beginCreateOrUpdate(deviceName: string, roleName: string, resourceGroupName: string, monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams): Promise, MonitoringConfigCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, roleName: string, resourceGroupName: string, monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams): Promise, MonitoringConfigCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, roleName: string, resourceGroupName: string, monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams): Promise; get(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigGetOptionalParams): Promise; list(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigListOptionalParams): PagedAsyncIterableIterator; @@ -1830,6 +1945,17 @@ export type NodesListByDataBoxEdgeDeviceResponse = NodeList_2; // @public export type NodeStatus = string; +// @public +export interface NumaNodeData { + effectiveAvailableMemoryInMb?: number; + freeVCpuIndexesForHpn?: number[]; + logicalCoreCountPerCore?: number; + numaNodeIndex?: number; + totalMemoryInMb?: number; + vCpuIndexesForHpn?: number[]; + vCpuIndexesForRoot?: number[]; +} + // @public export interface Operation { display?: OperationDisplay; @@ -1889,7 +2015,9 @@ export interface Order extends ARMBaseModel { contactInformation?: ContactDetails; readonly currentStatus?: OrderStatus; readonly deliveryTrackingInfo?: TrackingInfo[]; + readonly kind?: string; readonly orderHistory?: OrderStatus[]; + readonly orderId?: string; readonly returnTrackingInfo?: TrackingInfo[]; readonly serialNumber?: string; shipmentType?: ShipmentType; @@ -1905,9 +2033,9 @@ export interface OrderList { // @public export interface Orders { - beginCreateOrUpdate(deviceName: string, resourceGroupName: string, order: Order, options?: OrdersCreateOrUpdateOptionalParams): Promise, OrdersCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, resourceGroupName: string, order: Order, options?: OrdersCreateOrUpdateOptionalParams): Promise, OrdersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, resourceGroupName: string, order: Order, options?: OrdersCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams): Promise; get(deviceName: string, resourceGroupName: string, options?: OrdersGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: OrdersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2029,12 +2157,6 @@ export interface ResourceMoveDetails { // @public export type ResourceMoveStatus = string; -// @public -export interface ResourceTypeSku { - readonly resourceType?: string; - readonly skus?: SkuInformation[]; -} - // @public export interface Role extends ARMBaseModel { kind: RoleTypes; @@ -2049,9 +2171,9 @@ export interface RoleList { // @public export interface Roles { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams): Promise, RolesCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams): Promise, RolesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: RolesGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: RolesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2158,11 +2280,11 @@ export interface ShareList { // @public export interface Shares { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, share: Share, options?: SharesCreateOrUpdateOptionalParams): Promise, SharesCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, share: Share, options?: SharesCreateOrUpdateOptionalParams): Promise, SharesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, share: Share, options?: SharesCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams): Promise; - beginRefresh(deviceName: string, name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams): Promise, void>>; + beginRefresh(deviceName: string, name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams): Promise, void>>; beginRefreshAndWait(deviceName: string, name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: SharesGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: SharesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2238,25 +2360,6 @@ export interface SkuCost { readonly quantity?: number; } -// @public -export interface SkuInformation { - readonly costs?: SkuCost[]; - readonly family?: string; - readonly kind?: string; - readonly locationInfo?: SkuLocationInfo[]; - readonly locations?: string[]; - readonly name?: string; - readonly requiredFeatures?: string[]; - readonly requiredQuotaIds?: string[]; - readonly tier?: string; -} - -// @public -export interface SkuInformationList { - readonly nextLink?: string; - readonly value?: ResourceTypeSku[]; -} - // @public export interface SkuLocationInfo { readonly location?: string; @@ -2311,9 +2414,9 @@ export interface StorageAccountCredentialList { // @public export interface StorageAccountCredentials { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams): Promise, StorageAccountCredentialsCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams): Promise, StorageAccountCredentialsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2363,9 +2466,9 @@ export interface StorageAccountList { // @public export interface StorageAccounts { - beginCreateOrUpdate(deviceName: string, storageAccountName: string, resourceGroupName: string, storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams): Promise, StorageAccountsCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, storageAccountName: string, resourceGroupName: string, storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams): Promise, StorageAccountsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, storageAccountName: string, resourceGroupName: string, storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams): Promise; get(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2423,7 +2526,7 @@ export type SubscriptionState = string; // @public export interface SupportPackages { - beginTriggerSupportPackage(deviceName: string, resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams): Promise, void>>; + beginTriggerSupportPackage(deviceName: string, resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams): Promise, void>>; beginTriggerSupportPackageAndWait(deviceName: string, resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams): Promise; } @@ -2476,9 +2579,9 @@ export interface TriggerList { // @public export interface Triggers { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams): Promise, TriggersCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams): Promise, TriggersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: TriggersGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: TriggersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2508,7 +2611,6 @@ export type TriggersGetResponse = TriggerUnion; // @public export interface TriggersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2644,9 +2746,9 @@ export interface UserList { // @public export interface Users { - beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, user: User, options?: UsersCreateOrUpdateOptionalParams): Promise, UsersCreateOrUpdateResponse>>; + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, user: User, options?: UsersCreateOrUpdateOptionalParams): Promise, UsersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, user: User, options?: UsersCreateOrUpdateOptionalParams): Promise; - beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams): Promise, void>>; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams): Promise; get(deviceName: string, name: string, resourceGroupName: string, options?: UsersGetOptionalParams): Promise; listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: UsersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; @@ -2676,7 +2778,6 @@ export type UsersGetResponse = User; // @public export interface UsersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2693,6 +2794,20 @@ export type UsersListByDataBoxEdgeDeviceResponse = UserList; // @public export type UserType = string; +// @public +export interface VmMemory { + currentMemoryUsageMB?: number; + startupMemoryMB?: number; +} + +// @public +export interface VmPlacementRequestResult { + isFeasible?: boolean; + message?: string; + messageCode?: string; + vmSize?: string[]; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts index 351cd5fd80f5..0ec6316ba411 100644 --- a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts +++ b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts @@ -20,6 +20,8 @@ import { DevicesImpl, AlertsImpl, BandwidthSchedulesImpl, + DeviceCapacityCheckImpl, + DeviceCapacityInfoOperationsImpl, DiagnosticSettingsImpl, JobsImpl, NodesImpl, @@ -42,6 +44,8 @@ import { Devices, Alerts, BandwidthSchedules, + DeviceCapacityCheck, + DeviceCapacityInfoOperations, DiagnosticSettings, Jobs, Nodes, @@ -92,7 +96,7 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-databoxedge/2.1.1`; + const packageDetails = `azsdk-js-arm-databoxedge/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -145,12 +149,16 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2023-07-01"; this.operations = new OperationsImpl(this); this.availableSkus = new AvailableSkusImpl(this); this.devices = new DevicesImpl(this); this.alerts = new AlertsImpl(this); this.bandwidthSchedules = new BandwidthSchedulesImpl(this); + this.deviceCapacityCheck = new DeviceCapacityCheckImpl(this); + this.deviceCapacityInfoOperations = new DeviceCapacityInfoOperationsImpl( + this + ); this.diagnosticSettings = new DiagnosticSettingsImpl(this); this.jobs = new JobsImpl(this); this.nodes = new NodesImpl(this); @@ -202,6 +210,8 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { devices: Devices; alerts: Alerts; bandwidthSchedules: BandwidthSchedules; + deviceCapacityCheck: DeviceCapacityCheck; + deviceCapacityInfoOperations: DeviceCapacityInfoOperations; diagnosticSettings: DiagnosticSettings; jobs: Jobs; nodes: Nodes; diff --git a/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts b/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts +++ b/sdk/databoxedge/arm-databoxedge/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/databoxedge/arm-databoxedge/src/models/index.ts b/sdk/databoxedge/arm-databoxedge/src/models/index.ts index 25746ec5ac59..46779f560182 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/index.ts @@ -307,7 +307,7 @@ export interface SystemData { lastModifiedBy?: string; /** The type of identity that last modified the resource. */ lastModifiedByType?: CreatedByType; - /** The type of identity that last modified the resource. */ + /** The timestamp of resource last modification (UTC) */ lastModifiedAt?: Date; } @@ -440,6 +440,126 @@ export interface BandwidthSchedulesList { readonly nextLink?: string; } +/** Object for Capturing DeviceCapacityRequestInfo */ +export interface DeviceCapacityRequestInfo { + /** Array containing the sizes of the VMs for checking if its feasible to create them on the appliance. */ + vmPlacementQuery: string[][]; + /** Array of the VMs of the sizes in VmSizes can be provisioned on the appliance. */ + vmPlacementResults?: VmPlacementRequestResult[]; +} + +/** List of VM sizes being checked for creation on appliance along with corresponding result. */ +export interface VmPlacementRequestResult { + /** List of VM sizes being checked. */ + vmSize?: string[]; + /** Boolean value indicating if the VM(s) in VmSize can be created. */ + isFeasible?: boolean; + /** MessageCode indicating reason for success or failure. */ + messageCode?: string; + /** Localized message to be displayed to the user to explain the check result. */ + message?: string; +} + +/** Cluster Storage Data. */ +export interface ClusterStorageViewData { + /** Total storage on the cluster in MB. */ + clusterTotalStorageMb?: number; + /** The available or free storage on the cluster in MB. */ + clusterFreeStorageMb?: number; +} + +/** Cluster Compute Data. */ +export interface ClusterCapacityViewData { + /** The FQDN of the cluster. */ + fqdn?: string; + /** The cluster's GPU capacity. */ + gpuCapacity?: ClusterGpuCapacity; + /** The cluster's memory capacity. */ + memoryCapacity?: ClusterMemoryCapacity; + /** The last time at which the ClusterCapacityViewData was set. */ + lastRefreshedTime?: Date; + /** The total # of vCPUs provisioned by non-HPN VM per appliance. */ + totalProvisionedNonHpnCores?: number; +} + +/** Cluster GPU Data. */ +export interface ClusterGpuCapacity { + /** The cluster GPU Type. */ + gpuType?: string; + /** The used GPU units count in the cluster. */ + gpuUsedUnitsCount?: number; + /** The free GPU units count in the cluster. */ + gpuFreeUnitsCount?: number; + /** The GPU units count reserved for failover in the cluster. */ + gpuReservedForFailoverUnitsCount?: number; + /** The total GPU units count in the cluster. */ + gpuTotalUnitsCount?: number; +} + +/** NodeCapacityInfo defines the required information to determine the placement of a VM. */ +export interface ClusterMemoryCapacity { + /** The free memory in the cluster in MB. */ + clusterFreeMemoryMb?: number; + /** The used memory in the cluster in MB. */ + clusterUsedMemoryMb?: number; + /** The failover memory in the cluster in MB. */ + clusterFailoverMemoryMb?: number; + /** The fragmentation memory in the cluster in MB. */ + clusterFragmentationMemoryMb?: number; + /** The memory reserved for Hyper-V in the cluster in MB. */ + clusterHypervReserveMemoryMb?: number; + /** The memory of the Infra VM in the cluster in MB. */ + clusterInfraVmMemoryMb?: number; + /** The total memory in the cluster in MB. */ + clusterTotalMemoryMb?: number; + /** The non-failover memory in the cluster in MB. */ + clusterNonFailoverVmMb?: number; + /** The memory used by VMs in the cluster in MB. */ + clusterMemoryUsedByVmsMb?: number; +} + +/** Host Capacity Data. */ +export interface HostCapacity { + /** The name of the host. */ + hostName?: string; + /** The available memory on the host accounting for VM placement size and any host VM reservations. */ + effectiveAvailableMemoryMbOnHost?: number; + /** The available amount of GPUs on the host to use after accounting for GPUS used by reservations on the host. */ + availableGpuCount?: number; + /** The VM used memory per VmId. */ + vmUsedMemory?: { [propertyName: string]: VmMemory }; + /** The GPU type of the VM. */ + gpuType?: string; + /** The numa nodes information for Hpn VMs. */ + numaNodesData?: NumaNodeData[]; +} + +/** VmMemory Data. */ +export interface VmMemory { + /** The total amount of RAM in the virtual machine, as seen by the guest operating system. For a virtual machine with dynamic memory enabled, this represents the initial memory available at startup. */ + startupMemoryMB?: number; + /** The current memory used by the virtual machine. */ + currentMemoryUsageMB?: number; +} + +/** NUMA node data. */ +export interface NumaNodeData { + /** The NUMA node index. */ + numaNodeIndex?: number; + /** The total memory on the NUMA node. */ + totalMemoryInMb?: number; + /** The logical cores per core count. */ + logicalCoreCountPerCore?: number; + /** The effective available memory on the NUMA node in MB. */ + effectiveAvailableMemoryInMb?: number; + /** The free VCPU indices for the Hpn VMs. */ + freeVCpuIndexesForHpn?: number[]; + /** The VCPU indices for Hpn VMs */ + vCpuIndexesForHpn?: number[]; + /** The VCPU indices for the root. */ + vCpuIndexesForRoot?: number[]; +} + /** RemoteApplicationType for which remote support settings is being modified */ export interface RemoteSupportSettings { /** Remote application type */ @@ -1452,83 +1572,6 @@ export interface PeriodicTimerSourceInfo { topic?: string; } -/** Resource type Sku object */ -export interface ResourceTypeSku { - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The skus. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly skus?: SkuInformation[]; -} - -/** Sku information */ -export interface SkuInformation { - /** - * The sku name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The sku tier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; - /** - * The sku kind. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * The Sku family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly family?: string; - /** - * The pricing info of the Sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costs?: SkuCost[]; - /** - * The locations where Sku is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * The locations where Sku is available with zones and sites info - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationInfo?: SkuLocationInfo[]; - /** - * The required quotaIds for the sku to be available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredQuotaIds?: string[]; - /** - * The required features for the sku to be available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredFeatures?: string[]; -} - -/** List of SKU Information objects */ -export interface SkuInformationList { - /** - * List of ResourceTypeSku objects - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ResourceTypeSku[]; - /** - * Links to the next set of results - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - /** The Data Box Edge/Gateway device. */ export interface DataBoxEdgeDevice extends ARMBaseModel { /** The location of the device. This is a supported and registered Azure geographical region (for example, West US, East US, or Southeast Asia). The geographical region of a device cannot be changed once it is created, but if an identical geographical region is specified on update, the request will succeed. */ @@ -1541,8 +1584,11 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { etag?: string; /** Msi identity of the resource */ identity?: ResourceIdentity; - /** The kind of the device. */ - kind?: DataBoxEdgeDeviceKind; + /** + * The kind of the device. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: DataBoxEdgeDeviceKind; /** * DataBoxEdge Resource * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1553,8 +1599,11 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemDataPropertiesSystemData?: SystemData; - /** The status of the Data Box Edge/Gateway device. */ - dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + /** + * The status of the Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; /** * The Serial Number of Data Box Edge/Gateway device. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1632,12 +1681,17 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { readonly edgeProfile?: EdgeProfile; /** The details of data-residency related properties for this resource */ dataResidency?: DataResidency; + /** + * Kubernetes Workload Profile + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kubernetesWorkloadProfile?: string; } /** Alert on the data box edge/gateway device. */ export interface Alert extends ARMBaseModel { /** - * Alert generated in the resource + * Metadata pertaining to creation and last modification of Alert * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1681,7 +1735,7 @@ export interface Alert extends ARMBaseModel { /** The bandwidth schedule details. */ export interface BandwidthSchedule extends ARMBaseModel { /** - * Bandwidth object related to ASE resource + * Metadata pertaining to creation and last modification of BandwidthSchedule * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1695,10 +1749,27 @@ export interface BandwidthSchedule extends ARMBaseModel { days: DayOfWeek[]; } +/** Object for Capturing DeviceCapacityInfo */ +export interface DeviceCapacityInfo extends ARMBaseModel { + /** + * Metadata pertaining to device capacity info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Timestamp of request in UTC */ + timeStamp?: Date; + /** Cluster capacity data for storage resources (CSV). */ + clusterStorageCapacityInfo?: ClusterStorageViewData; + /** Cluster capacity data for compute resources (Memory and GPU). */ + clusterComputeCapacityInfo?: ClusterCapacityViewData; + /** The dictionary of individual node names and node capacities in the cluster. */ + nodeCapacityInfos?: { [propertyName: string]: HostCapacity }; +} + /** The diagnostic proactive log collection settings of a device. */ export interface DiagnosticProactiveLogCollectionSettings extends ARMBaseModel { /** - * DiagnosticProactiveLogCollectionSettings + * Metadata pertaining to creation and last modification of DiagnosticProactiveLogCollectionSettings * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1709,7 +1780,7 @@ export interface DiagnosticProactiveLogCollectionSettings extends ARMBaseModel { /** The remote support settings of a device. */ export interface DiagnosticRemoteSupportSettings extends ARMBaseModel { /** - * DiagnosticRemoteSupportSettings + * Represents resource creation and updation time * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1719,6 +1790,11 @@ export interface DiagnosticRemoteSupportSettings extends ARMBaseModel { /** The extended Info of the Data Box Edge/Gateway device. */ export interface DataBoxEdgeDeviceExtendedInfo extends ARMBaseModel { + /** + * Metadata pertaining to creation and last modification of DataBoxEdgeDevice + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; /** The digital signature of encrypted certificate. */ encryptionKeyThumbprint?: string; /** The public part of the encryption certificate. Client uses this to encrypt any secret. */ @@ -1743,12 +1819,42 @@ export interface DataBoxEdgeDeviceExtendedInfo extends ARMBaseModel { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly deviceSecrets?: { [propertyName: string]: Secret }; + /** + * Cluster Witness Type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clusterWitnessType?: ClusterWitnessType; + /** + * The witness location of file share. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareWitnessLocation?: string; + /** + * The username of file share. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareWitnessUsername?: string; + /** + * The Cloud Witness Storage account name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessStorageAccountName?: string; + /** + * The Container for cloud witness in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessContainerName?: string; + /** + * The Azure service endpoint of the cloud witness storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessStorageEndpoint?: string; } /** The network settings of a device. */ export interface NetworkSettings extends ARMBaseModel { /** - * NetworkSettings on ASE device + * Metadata pertaining to creation and last modification of NetworkSettings * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1805,10 +1911,20 @@ export interface Node extends ARMBaseModel { /** The order details. */ export interface Order extends ARMBaseModel { /** - * Order configured on ASE resource + * It specify the order api version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: string; + /** + * Metadata pertaining to creation and last modification of Order * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; + /** + * It specify the order resource id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly orderId?: string; /** The contact details. */ contactInformation?: ContactDetails; /** The shipping address. */ @@ -1847,7 +1963,7 @@ export interface Role extends ARMBaseModel { /** Role type. */ kind: RoleTypes; /** - * Role configured on ASE resource + * Metadata pertaining to creation and last modification of Role * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1858,7 +1974,7 @@ export interface Addon extends ARMBaseModel { /** Addon type. */ kind: AddonType; /** - * Addon type + * Metadata pertaining to creation and last modification of Addon * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1867,7 +1983,7 @@ export interface Addon extends ARMBaseModel { /** The metric setting details for the role */ export interface MonitoringMetricConfiguration extends ARMBaseModel { /** - * MonitoringConfiguration on ASE device + * Metadata pertaining to creation and last modification of MonitoringConfiguration * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1884,7 +2000,7 @@ export interface SecuritySettings extends ARMBaseModel { /** Represents a share on the Data Box Edge/Gateway device. */ export interface Share extends ARMBaseModel { /** - * Share on ASE device + * Metadata pertaining to creation and last modification of Share * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1916,7 +2032,7 @@ export interface Share extends ARMBaseModel { /** The storage account credential. */ export interface StorageAccountCredential extends ARMBaseModel { /** - * StorageAccountCredential object + * Metadata pertaining to creation and last modification of StorageAccountCredential * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1941,7 +2057,7 @@ export interface StorageAccountCredential extends ARMBaseModel { /** Represents a Storage Account on the Data Box Edge/Gateway device. */ export interface StorageAccount extends ARMBaseModel { /** - * StorageAccount object on ASE device + * Metadata pertaining to creation and last modification of StorageAccount * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1968,7 +2084,7 @@ export interface StorageAccount extends ARMBaseModel { /** Represents a container on the Data Box Edge/Gateway device. */ export interface Container extends ARMBaseModel { /** - * Container in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of Container * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1993,20 +2109,20 @@ export interface Container extends ARMBaseModel { /** Trigger details. */ export interface Trigger extends ARMBaseModel { + /** Trigger Kind. */ + kind: TriggerEventType; /** - * Trigger in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of Trigger * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - /** Trigger Kind. */ - kind: TriggerEventType; } /** The request object for trigger support package. */ export interface TriggerSupportPackageRequest extends ARMBaseModel { - /** Start of the timespan of the log collection */ + /** MinimumTimeStamp from where logs need to be collected */ minimumTimeStamp?: Date; - /** MaximumTimeStamp until where logs need to be collected */ + /** Start of the timespan of the log collection */ maximumTimeStamp?: Date; /** * Type of files, which need to be included in the logs @@ -2019,7 +2135,7 @@ export interface TriggerSupportPackageRequest extends ARMBaseModel { /** Details about ongoing updates and availability of updates on the device. */ export interface UpdateSummary extends ARMBaseModel { /** - * UpdateSummary Result + * Metadata pertaining to creation and last modification of UpdateSummary * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2135,7 +2251,7 @@ export interface UpdateSummary extends ARMBaseModel { /** Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. */ export interface User extends ARMBaseModel { /** - * User in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of User * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2150,7 +2266,11 @@ export interface User extends ARMBaseModel { userType: UserType; } -/** CloudEdgeManagementRole role. */ +/** + * The preview of Virtual Machine Cloud Management from the Azure supports deploying and managing VMs on your Azure Stack Edge device from Azure Portal. + * For more information, refer to: https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-gpu-virtual-machine-overview + * By using this feature, you agree to the preview legal terms. See the https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ for additional details. + */ export interface CloudEdgeManagementRole extends Role { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "CloudEdgeManagement"; @@ -2193,7 +2313,16 @@ export interface IoTRole extends Role { roleStatus?: RoleStatus; } -/** Kubernetes role. */ +/** + * The limited preview of Kubernetes Cluster Management from the Azure supports: + * 1. Using a simple turn-key option in Azure Portal, deploy a Kubernetes cluster on your Azure Stack Edge device. + * 2. Configure Kubernetes cluster running on your device with Arc enabled Kubernetes with a click of a button in the Azure Portal. + * Azure Arc enables organizations to view, manage, and govern their on-premises Kubernetes clusters using the Azure Portal, command line tools, and APIs. + * 3. Easily configure Persistent Volumes using SMB and NFS shares for storing container data. + * For more information, refer to the document here: https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8-Cloud-Management-20210323.pdf + * Or Demo: https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8S-Cloud-Management-20210323.mp4 + * By using this feature, you agree to the preview legal terms. See the https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ + */ export interface KubernetesRole extends Role { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "Kubernetes"; @@ -2493,7 +2622,15 @@ export enum KnownSkuName { /** RDC */ RDC = "RDC", /** Management */ - Management = "Management" + Management = "Management", + /** EP264Mx1W */ + EP264Mx1W = "EP2_64_Mx1_W", + /** EP2128GPU1Mx1W */ + EP2128GPU1Mx1W = "EP2_128_GPU1_Mx1_W", + /** EP2256GPU2Mx1 */ + EP2256GPU2Mx1 = "EP2_256_GPU2_Mx1", + /** EdgeMRTCP */ + EdgeMRTCP = "EdgeMR_TCP" } /** @@ -2525,7 +2662,11 @@ export enum KnownSkuName { * **RCA_Small** \ * **RCA_Large** \ * **RDC** \ - * **Management** + * **Management** \ + * **EP2_64_Mx1_W** \ + * **EP2_128_GPU1_Mx1_W** \ + * **EP2_256_GPU2_Mx1** \ + * **EdgeMR_TCP** */ export type SkuName = string; @@ -3006,6 +3147,27 @@ export enum KnownEncryptionAlgorithm { */ export type EncryptionAlgorithm = string; +/** Known values of {@link ClusterWitnessType} that the service accepts. */ +export enum KnownClusterWitnessType { + /** None */ + None = "None", + /** Cloud */ + Cloud = "Cloud", + /** FileShare */ + FileShare = "FileShare" +} + +/** + * Defines values for ClusterWitnessType. \ + * {@link KnownClusterWitnessType} can be used interchangeably with ClusterWitnessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Cloud** \ + * **FileShare** + */ +export type ClusterWitnessType = string; + /** Known values of {@link JobStatus} that the service accepts. */ export enum KnownJobStatus { /** Invalid */ @@ -4090,20 +4252,14 @@ export type DevicesUploadCertificateResponse = UploadCertificateResponse; /** Optional parameters. */ export interface DevicesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ - expand?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ export type DevicesListBySubscriptionNextResponse = DataBoxEdgeDeviceList; /** Optional parameters. */ export interface DevicesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { - /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ - expand?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type DevicesListByResourceGroupNextResponse = DataBoxEdgeDeviceList; @@ -4170,6 +4326,24 @@ export interface BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams /** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList; +/** Optional parameters. */ +export interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + extends coreClient.OperationOptions { + /** The capacity name. */ + capacityName?: string; + /** 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 DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDeviceCapacityInfo operation. */ +export type DeviceCapacityInfoGetDeviceCapacityInfoResponse = DeviceCapacityInfo; + /** Optional parameters. */ export interface DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams extends coreClient.OperationOptions {} @@ -4631,10 +4805,7 @@ export interface TriggersDeleteOptionalParams /** Optional parameters. */ export interface TriggersListByDataBoxEdgeDeviceNextOptionalParams - extends coreClient.OperationOptions { - /** Specify $filter='CustomContextTag eq ' to filter on custom context tag property */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ export type TriggersListByDataBoxEdgeDeviceNextResponse = TriggerList; @@ -4686,10 +4857,7 @@ export interface UsersDeleteOptionalParams extends coreClient.OperationOptions { /** Optional parameters. */ export interface UsersListByDataBoxEdgeDeviceNextOptionalParams - extends coreClient.OperationOptions { - /** Specify $filter='Type eq ' to filter on user type property */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ export type UsersListByDataBoxEdgeDeviceNextResponse = UserList; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts index 733e74069bc4..dcb640251098 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts @@ -1018,6 +1018,385 @@ export const BandwidthSchedulesList: coreClient.CompositeMapper = { } }; +export const DeviceCapacityRequestInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceCapacityRequestInfo", + modelProperties: { + vmPlacementQuery: { + serializedName: "properties.vmPlacementQuery", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + vmPlacementResults: { + serializedName: "properties.vmPlacementResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmPlacementRequestResult" + } + } + } + } + } + } +}; + +export const VmPlacementRequestResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmPlacementRequestResult", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isFeasible: { + serializedName: "isFeasible", + type: { + name: "Boolean" + } + }, + messageCode: { + serializedName: "messageCode", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterStorageViewData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterStorageViewData", + modelProperties: { + clusterTotalStorageMb: { + serializedName: "clusterTotalStorageMb", + type: { + name: "Number" + } + }, + clusterFreeStorageMb: { + serializedName: "clusterFreeStorageMb", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterCapacityViewData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterCapacityViewData", + modelProperties: { + fqdn: { + serializedName: "fqdn", + type: { + name: "String" + } + }, + gpuCapacity: { + serializedName: "gpuCapacity", + type: { + name: "Composite", + className: "ClusterGpuCapacity" + } + }, + memoryCapacity: { + serializedName: "memoryCapacity", + type: { + name: "Composite", + className: "ClusterMemoryCapacity" + } + }, + lastRefreshedTime: { + serializedName: "lastRefreshedTime", + type: { + name: "DateTime" + } + }, + totalProvisionedNonHpnCores: { + serializedName: "totalProvisionedNonHpnCores", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterGpuCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterGpuCapacity", + modelProperties: { + gpuType: { + serializedName: "gpuType", + type: { + name: "String" + } + }, + gpuUsedUnitsCount: { + serializedName: "gpuUsedUnitsCount", + type: { + name: "Number" + } + }, + gpuFreeUnitsCount: { + serializedName: "gpuFreeUnitsCount", + type: { + name: "Number" + } + }, + gpuReservedForFailoverUnitsCount: { + serializedName: "gpuReservedForFailoverUnitsCount", + type: { + name: "Number" + } + }, + gpuTotalUnitsCount: { + serializedName: "gpuTotalUnitsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterMemoryCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterMemoryCapacity", + modelProperties: { + clusterFreeMemoryMb: { + serializedName: "clusterFreeMemoryMb", + type: { + name: "Number" + } + }, + clusterUsedMemoryMb: { + serializedName: "clusterUsedMemoryMb", + type: { + name: "Number" + } + }, + clusterFailoverMemoryMb: { + serializedName: "clusterFailoverMemoryMb", + type: { + name: "Number" + } + }, + clusterFragmentationMemoryMb: { + serializedName: "clusterFragmentationMemoryMb", + type: { + name: "Number" + } + }, + clusterHypervReserveMemoryMb: { + serializedName: "clusterHypervReserveMemoryMb", + type: { + name: "Number" + } + }, + clusterInfraVmMemoryMb: { + serializedName: "clusterInfraVmMemoryMb", + type: { + name: "Number" + } + }, + clusterTotalMemoryMb: { + serializedName: "clusterTotalMemoryMb", + type: { + name: "Number" + } + }, + clusterNonFailoverVmMb: { + serializedName: "clusterNonFailoverVmMb", + type: { + name: "Number" + } + }, + clusterMemoryUsedByVmsMb: { + serializedName: "clusterMemoryUsedByVmsMb", + type: { + name: "Number" + } + } + } + } +}; + +export const HostCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostCapacity", + modelProperties: { + hostName: { + serializedName: "hostName", + type: { + name: "String" + } + }, + effectiveAvailableMemoryMbOnHost: { + serializedName: "effectiveAvailableMemoryMbOnHost", + type: { + name: "Number" + } + }, + availableGpuCount: { + serializedName: "availableGpuCount", + type: { + name: "Number" + } + }, + vmUsedMemory: { + serializedName: "vmUsedMemory", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "VmMemory" } } + } + }, + gpuType: { + serializedName: "gpuType", + type: { + name: "String" + } + }, + numaNodesData: { + serializedName: "numaNodesData", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NumaNodeData" + } + } + } + } + } + } +}; + +export const VmMemory: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmMemory", + modelProperties: { + startupMemoryMB: { + serializedName: "startupMemoryMB", + type: { + name: "Number" + } + }, + currentMemoryUsageMB: { + serializedName: "currentMemoryUsageMB", + type: { + name: "Number" + } + } + } + } +}; + +export const NumaNodeData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NumaNodeData", + modelProperties: { + numaNodeIndex: { + serializedName: "numaNodeIndex", + type: { + name: "Number" + } + }, + totalMemoryInMb: { + serializedName: "totalMemoryInMb", + type: { + name: "Number" + } + }, + logicalCoreCountPerCore: { + serializedName: "logicalCoreCountPerCore", + type: { + name: "Number" + } + }, + effectiveAvailableMemoryInMb: { + serializedName: "effectiveAvailableMemoryInMb", + type: { + name: "Number" + } + }, + freeVCpuIndexesForHpn: { + serializedName: "freeVCpuIndexesForHpn", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + vCpuIndexesForHpn: { + serializedName: "vCpuIndexesForHpn", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + vCpuIndexesForRoot: { + serializedName: "vCpuIndexesForRoot", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + } + } + } +}; + export const RemoteSupportSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3159,163 +3538,6 @@ export const PeriodicTimerSourceInfo: coreClient.CompositeMapper = { } }; -export const ResourceTypeSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceTypeSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - }, - skus: { - serializedName: "skus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuInformation" - } - } - } - } - } - } -}; - -export const SkuInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuInformation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - readOnly: true, - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String" - } - }, - family: { - serializedName: "family", - readOnly: true, - type: { - name: "String" - } - }, - costs: { - serializedName: "costs", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuCost" - } - } - } - }, - locations: { - serializedName: "locations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - locationInfo: { - serializedName: "locationInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuLocationInfo" - } - } - } - }, - requiredQuotaIds: { - serializedName: "requiredQuotaIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredFeatures: { - serializedName: "requiredFeatures", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const SkuInformationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuInformationList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceTypeSku" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const DataBoxEdgeDevice: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3358,6 +3580,7 @@ export const DataBoxEdgeDevice: coreClient.CompositeMapper = { }, kind: { serializedName: "kind", + readOnly: true, type: { name: "String" } @@ -3378,6 +3601,7 @@ export const DataBoxEdgeDevice: coreClient.CompositeMapper = { }, dataBoxEdgeDeviceStatus: { serializedName: "properties.dataBoxEdgeDeviceStatus", + readOnly: true, type: { name: "String" } @@ -3498,6 +3722,13 @@ export const DataBoxEdgeDevice: coreClient.CompositeMapper = { name: "Composite", className: "DataResidency" } + }, + kubernetesWorkloadProfile: { + serializedName: "properties.kubernetesWorkloadProfile", + readOnly: true, + type: { + name: "String" + } } } } @@ -3620,6 +3851,50 @@ export const BandwidthSchedule: coreClient.CompositeMapper = { } }; +export const DeviceCapacityInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceCapacityInfo", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + timeStamp: { + serializedName: "properties.timeStamp", + type: { + name: "DateTime" + } + }, + clusterStorageCapacityInfo: { + serializedName: "properties.clusterStorageCapacityInfo", + type: { + name: "Composite", + className: "ClusterStorageViewData" + } + }, + clusterComputeCapacityInfo: { + serializedName: "properties.clusterComputeCapacityInfo", + type: { + name: "Composite", + className: "ClusterCapacityViewData" + } + }, + nodeCapacityInfos: { + serializedName: "properties.nodeCapacityInfos", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "HostCapacity" } } + } + } + } + } +}; + export const DiagnosticProactiveLogCollectionSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3679,6 +3954,13 @@ export const DataBoxEdgeDeviceExtendedInfo: coreClient.CompositeMapper = { className: "DataBoxEdgeDeviceExtendedInfo", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, encryptionKeyThumbprint: { serializedName: "properties.encryptionKeyThumbprint", type: { @@ -3735,6 +4017,48 @@ export const DataBoxEdgeDeviceExtendedInfo: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "Composite", className: "Secret" } } } + }, + clusterWitnessType: { + serializedName: "properties.clusterWitnessType", + readOnly: true, + type: { + name: "String" + } + }, + fileShareWitnessLocation: { + serializedName: "properties.fileShareWitnessLocation", + readOnly: true, + type: { + name: "String" + } + }, + fileShareWitnessUsername: { + serializedName: "properties.fileShareWitnessUsername", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessStorageAccountName: { + serializedName: "properties.cloudWitnessStorageAccountName", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessContainerName: { + serializedName: "properties.cloudWitnessContainerName", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessStorageEndpoint: { + serializedName: "properties.cloudWitnessStorageEndpoint", + readOnly: true, + type: { + name: "String" + } } } } @@ -3835,6 +4159,13 @@ export const Order: coreClient.CompositeMapper = { className: "Order", modelProperties: { ...ARMBaseModel.type.modelProperties, + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, systemData: { serializedName: "systemData", type: { @@ -3842,6 +4173,13 @@ export const Order: coreClient.CompositeMapper = { className: "SystemData" } }, + orderId: { + serializedName: "properties.orderId", + readOnly: true, + type: { + name: "String" + } + }, contactInformation: { serializedName: "properties.contactInformation", type: { @@ -4309,19 +4647,19 @@ export const Trigger: coreClient.CompositeMapper = { }, modelProperties: { ...ARMBaseModel.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, kind: { serializedName: "kind", required: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } diff --git a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts index 582cea88c71f..8c08d6ef620e 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts @@ -18,6 +18,7 @@ import { DataBoxEdgeDeviceExtendedInfoPatch as DataBoxEdgeDeviceExtendedInfoPatchMapper, UploadCertificateRequest as UploadCertificateRequestMapper, BandwidthSchedule as BandwidthScheduleMapper, + DeviceCapacityRequestInfo as DeviceCapacityRequestInfoMapper, DiagnosticProactiveLogCollectionSettings as DiagnosticProactiveLogCollectionSettingsMapper, DiagnosticRemoteSupportSettings as DiagnosticRemoteSupportSettingsMapper, Order as OrderMapper, @@ -60,7 +61,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-01", + defaultValue: "2023-07-01", isConstant: true, serializedName: "api-version", type: { @@ -177,6 +178,21 @@ export const parameters3: OperationParameter = { mapper: BandwidthScheduleMapper }; +export const deviceCapacityRequestInfo: OperationParameter = { + parameterPath: "deviceCapacityRequestInfo", + mapper: DeviceCapacityRequestInfoMapper +}; + +export const capacityName: OperationQueryParameter = { + parameterPath: ["options", "capacityName"], + mapper: { + serializedName: "capacityName", + type: { + name: "String" + } + } +}; + export const proactiveLogCollectionSettings: OperationParameter = { parameterPath: "proactiveLogCollectionSettings", mapper: DiagnosticProactiveLogCollectionSettingsMapper diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts b/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts index acce95bf2df3..a26c00b1e8a0 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/addons.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { AddonUnion, AddonsListByRoleNextOptionalParams, @@ -191,8 +195,8 @@ export class AddonsImpl implements Addons { addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AddonsCreateOrUpdateResponse > > { @@ -202,7 +206,7 @@ export class AddonsImpl implements Addons { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -235,13 +239,23 @@ export class AddonsImpl implements Addons { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, roleName, addonName, resourceGroupName, addon, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + deviceName, + roleName, + addonName, + resourceGroupName, + addon, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AddonsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -290,14 +304,14 @@ export class AddonsImpl implements Addons { addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams - ): 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 ) => { @@ -330,13 +344,13 @@ export class AddonsImpl implements Addons { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, roleName, addonName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, roleName, addonName, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -510,7 +524,6 @@ const listByRoleNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts b/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts index 3220412a10cc..d05a78bfad81 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts @@ -235,7 +235,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts b/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts index f6b6bb37e508..a96a8b499ac7 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts @@ -144,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts b/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts index 9ade5066d544..60c486afe5b8 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { BandwidthSchedule, BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams, @@ -176,8 +180,8 @@ export class BandwidthSchedulesImpl implements BandwidthSchedules { parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BandwidthSchedulesCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class BandwidthSchedulesImpl implements BandwidthSchedules { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,13 +224,16 @@ export class BandwidthSchedulesImpl implements BandwidthSchedules { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BandwidthSchedulesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -270,14 +277,14 @@ export class BandwidthSchedulesImpl implements BandwidthSchedules { name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams - ): 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 ) => { @@ -310,13 +317,13 @@ export class BandwidthSchedulesImpl implements BandwidthSchedules { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -482,7 +489,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts b/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts index e5ad715ca2a4..1e0f08e95fc7 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/containers.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { Container, ContainersListByStorageAccountNextOptionalParams, @@ -198,8 +202,8 @@ export class ContainersImpl implements Containers { container: Container, options?: ContainersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainersCreateOrUpdateResponse > > { @@ -209,7 +213,7 @@ export class ContainersImpl implements Containers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -242,9 +246,9 @@ export class ContainersImpl implements Containers { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, storageAccountName, containerName, @@ -252,10 +256,13 @@ export class ContainersImpl implements Containers { container, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -304,14 +311,14 @@ export class ContainersImpl implements Containers { containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams - ): 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 ) => { @@ -344,19 +351,19 @@ export class ContainersImpl implements Containers { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, storageAccountName, containerName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -402,14 +409,14 @@ export class ContainersImpl implements Containers { containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams - ): 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 ) => { @@ -442,19 +449,19 @@ export class ContainersImpl implements Containers { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, storageAccountName, containerName, resourceGroupName, options }, - refreshOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: refreshOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -653,7 +660,6 @@ const listByStorageAccountNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts new file mode 100644 index 000000000000..10174b5cdbe8 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts @@ -0,0 +1,157 @@ +/* + * 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 { DeviceCapacityCheck } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DeviceCapacityRequestInfo, + DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams +} from "../models"; + +/** Class containing DeviceCapacityCheck operations. */ +export class DeviceCapacityCheckImpl implements DeviceCapacityCheck { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class DeviceCapacityCheck class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + async beginCheckResourceCreationFeasibility( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): 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, + deviceName, + deviceCapacityRequestInfo, + options + }, + spec: checkResourceCreationFeasibilityOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + async beginCheckResourceCreationFeasibilityAndWait( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise { + const poller = await this.beginCheckResourceCreationFeasibility( + resourceGroupName, + deviceName, + deviceCapacityRequestInfo, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkResourceCreationFeasibilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityCheck", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.deviceCapacityRequestInfo, + queryParameters: [Parameters.apiVersion, Parameters.capacityName], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts new file mode 100644 index 000000000000..de68906695ba --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts @@ -0,0 +1,73 @@ +/* + * 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 { DeviceCapacityInfoOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams, + DeviceCapacityInfoGetDeviceCapacityInfoResponse +} from "../models"; + +/** Class containing DeviceCapacityInfoOperations operations. */ +export class DeviceCapacityInfoOperationsImpl + implements DeviceCapacityInfoOperations { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class DeviceCapacityInfoOperations class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Gets the properties of the specified device capacity info. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param options The options parameters. + */ + getDeviceCapacityInfo( + resourceGroupName: string, + deviceName: string, + options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, deviceName, options }, + getDeviceCapacityInfoOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getDeviceCapacityInfoOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityInfo/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeviceCapacityInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts b/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts index 11f943602d1d..3dbfb5c4e90c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/devices.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { DataBoxEdgeDevice, DevicesListBySubscriptionNextOptionalParams, @@ -264,14 +268,14 @@ export class DevicesImpl implements Devices { deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams - ): 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 ) => { @@ -304,13 +308,13 @@ export class DevicesImpl implements Devices { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -365,14 +369,14 @@ export class DevicesImpl implements Devices { deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams - ): 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 ) => { @@ -405,13 +409,13 @@ export class DevicesImpl implements Devices { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, options }, - downloadUpdatesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, options }, + spec: downloadUpdatesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -481,14 +485,14 @@ export class DevicesImpl implements Devices { deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams - ): 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 ) => { @@ -521,13 +525,13 @@ export class DevicesImpl implements Devices { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, options }, - installUpdatesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, options }, + spec: installUpdatesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -580,14 +584,14 @@ export class DevicesImpl implements Devices { deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams - ): 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 ) => { @@ -620,13 +624,13 @@ export class DevicesImpl implements Devices { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, options }, - scanForUpdatesOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, options }, + spec: scanForUpdatesOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -664,14 +668,14 @@ export class DevicesImpl implements Devices { resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams - ): 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 ) => { @@ -704,13 +708,13 @@ export class DevicesImpl implements Devices { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, securitySettings, options }, - createOrUpdateSecuritySettingsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, securitySettings, options }, + spec: createOrUpdateSecuritySettingsOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1202,7 +1206,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.nextLink, @@ -1222,7 +1225,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts b/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts index b38d2254c88c..0e450bac7cfa 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams, DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, @@ -70,8 +74,8 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse >, DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse @@ -83,7 +87,7 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -116,18 +120,23 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, proactiveLogCollectionSettings, options }, - updateDiagnosticProactiveLogCollectionSettingsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateDiagnosticProactiveLogCollectionSettingsOperationSpec + }); + const poller = await createHttpPoller< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse, + OperationState< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -188,8 +197,8 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse >, DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse @@ -201,7 +210,7 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -234,18 +243,23 @@ export class DiagnosticSettingsImpl implements DiagnosticSettings { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, diagnosticRemoteSupportSettings, options }, - updateDiagnosticRemoteSupportSettingsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateDiagnosticRemoteSupportSettingsOperationSpec + }); + const poller = await createHttpPoller< + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse, + OperationState< + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts index 1d8cf8228116..d43d5a81a2a1 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts @@ -11,6 +11,8 @@ export * from "./availableSkus"; export * from "./devices"; export * from "./alerts"; export * from "./bandwidthSchedules"; +export * from "./deviceCapacityCheck"; +export * from "./deviceCapacityInfoOperations"; export * from "./diagnosticSettings"; export * from "./jobs"; export * from "./nodes"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts b/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts index 5f73fcdfda20..065fa5fb9fa0 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { MonitoringMetricConfiguration, MonitoringConfigListNextOptionalParams, @@ -187,8 +191,8 @@ export class MonitoringConfigImpl implements MonitoringConfig { monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringConfigCreateOrUpdateResponse > > { @@ -198,7 +202,7 @@ export class MonitoringConfigImpl implements MonitoringConfig { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -231,19 +235,22 @@ export class MonitoringConfigImpl implements MonitoringConfig { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + MonitoringConfigCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -287,14 +294,14 @@ export class MonitoringConfigImpl implements MonitoringConfig { roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams - ): 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 ) => { @@ -327,13 +334,13 @@ export class MonitoringConfigImpl implements MonitoringConfig { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, roleName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, roleName, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -501,7 +508,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts b/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts index 4f5c422d6cec..84cf14c0816c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts @@ -191,7 +191,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts b/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts index 8421a409318e..0e74c4ae7e2a 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts +++ b/sdk/databoxedge/arm-databoxedge/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/databoxedge/arm-databoxedge/src/operations/orders.ts b/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts index 87af0ff6440e..bac15194c73c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/orders.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { Order, OrdersListByDataBoxEdgeDeviceNextOptionalParams, @@ -174,8 +178,8 @@ export class OrdersImpl implements Orders { order: Order, options?: OrdersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OrdersCreateOrUpdateResponse > > { @@ -185,7 +189,7 @@ export class OrdersImpl implements Orders { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -218,13 +222,16 @@ export class OrdersImpl implements Orders { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, order, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, order, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + OrdersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -263,14 +270,14 @@ export class OrdersImpl implements Orders { deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams - ): 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 ) => { @@ -303,13 +310,13 @@ export class OrdersImpl implements Orders { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -508,7 +515,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts b/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts index bd180e177029..382deda52f7e 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/roles.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { RoleUnion, RolesListByDataBoxEdgeDeviceNextOptionalParams, @@ -176,8 +180,8 @@ export class RolesImpl implements Roles { role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RolesCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class RolesImpl implements Roles { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,13 +224,16 @@ export class RolesImpl implements Roles { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, role, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, role, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + RolesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -270,14 +277,14 @@ export class RolesImpl implements Roles { name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams - ): 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 ) => { @@ -310,13 +317,13 @@ export class RolesImpl implements Roles { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -482,7 +489,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts b/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts index a19c5a2b1cda..1c391af15018 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/shares.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { Share, SharesListByDataBoxEdgeDeviceNextOptionalParams, @@ -177,8 +181,8 @@ export class SharesImpl implements Shares { share: Share, options?: SharesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SharesCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class SharesImpl implements Shares { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,13 +225,16 @@ export class SharesImpl implements Shares { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, share, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, share, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SharesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -271,14 +278,14 @@ export class SharesImpl implements Shares { name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams - ): 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,13 +318,13 @@ export class SharesImpl implements Shares { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -358,14 +365,14 @@ export class SharesImpl implements Shares { name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams - ): 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 ) => { @@ -398,13 +405,13 @@ export class SharesImpl implements Shares { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - refreshOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: refreshOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -594,7 +601,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts index 560f3777d10e..ed667a24b462 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { StorageAccountCredential, StorageAccountCredentialsListByDataBoxEdgeDeviceNextOptionalParams, @@ -177,8 +181,8 @@ export class StorageAccountCredentialsImpl storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageAccountCredentialsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class StorageAccountCredentialsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,19 +225,22 @@ export class StorageAccountCredentialsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, storageAccountCredential, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + StorageAccountCredentialsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -277,14 +284,14 @@ export class StorageAccountCredentialsImpl name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams - ): 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 ) => { @@ -317,13 +324,13 @@ export class StorageAccountCredentialsImpl }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -489,7 +496,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts index d188833e47b7..8fd057e789dd 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { StorageAccount, StorageAccountsListByDataBoxEdgeDeviceNextOptionalParams, @@ -176,8 +180,8 @@ export class StorageAccountsImpl implements StorageAccounts { storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageAccountsCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class StorageAccountsImpl implements StorageAccounts { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,19 +224,22 @@ export class StorageAccountsImpl implements StorageAccounts { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, storageAccountName, resourceGroupName, storageAccount, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + StorageAccountsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -276,14 +283,14 @@ export class StorageAccountsImpl implements StorageAccounts { storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams - ): 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 ) => { @@ -316,13 +323,13 @@ export class StorageAccountsImpl implements StorageAccounts { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, storageAccountName, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, storageAccountName, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +495,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts b/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts index ddaba62d8fe7..fb283bcf3772 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { TriggerSupportPackageRequest, SupportPackagesTriggerSupportPackageOptionalParams @@ -42,14 +46,14 @@ export class SupportPackagesImpl implements SupportPackages { resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams - ): 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 ) => { @@ -82,13 +86,18 @@ export class SupportPackagesImpl implements SupportPackages { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, resourceGroupName, triggerSupportPackageRequest, options }, - triggerSupportPackageOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + deviceName, + resourceGroupName, + triggerSupportPackageRequest, + options + }, + spec: triggerSupportPackageOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts index e5ba529eaee7..1c819c39970f 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { TriggerUnion, TriggersListByDataBoxEdgeDeviceNextOptionalParams, @@ -176,8 +180,8 @@ export class TriggersImpl implements Triggers { trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TriggersCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class TriggersImpl implements Triggers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,13 +224,16 @@ export class TriggersImpl implements Triggers { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, trigger, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, trigger, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + TriggersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -270,14 +277,14 @@ export class TriggersImpl implements Triggers { name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams - ): 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 ) => { @@ -310,13 +317,13 @@ export class TriggersImpl implements Triggers { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -482,7 +489,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/users.ts b/sdk/databoxedge/arm-databoxedge/src/operations/users.ts index 2f1257bbaef2..62f274c19773 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/users.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/users.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 { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; -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 { User, UsersListByDataBoxEdgeDeviceNextOptionalParams, @@ -177,8 +181,8 @@ export class UsersImpl implements Users { user: User, options?: UsersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, UsersCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class UsersImpl implements Users { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,13 +225,16 @@ export class UsersImpl implements Users { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, user, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, user, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + UsersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -272,14 +279,14 @@ export class UsersImpl implements Users { name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams - ): 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 ) => { @@ -312,13 +319,13 @@ export class UsersImpl implements Users { }; }; - const lro = new LroImpl( - sendOperation, - { deviceName, name, resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { deviceName, name, resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -484,7 +491,6 @@ const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.nextLink, diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts index fa13c29bc96d..af7118d7672c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.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 { AddonUnion, AddonsListByRoleOptionalParams, @@ -66,8 +66,8 @@ export interface Addons { addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AddonsCreateOrUpdateResponse > >; @@ -102,7 +102,7 @@ export interface Addons { addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the addon on the device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts index 3af876d0745a..c64197cfafe6 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.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 { BandwidthSchedule, BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams, @@ -60,8 +60,8 @@ export interface BandwidthSchedules { parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BandwidthSchedulesCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface BandwidthSchedules { name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the specified bandwidth schedule. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts index 44b012cd9bbe..f1ee8a50e2eb 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.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 { Container, ContainersListByStorageAccountOptionalParams, @@ -67,8 +67,8 @@ export interface Containers { container: Container, options?: ContainersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainersCreateOrUpdateResponse > >; @@ -103,7 +103,7 @@ export interface Containers { containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the container on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -133,7 +133,7 @@ export interface Containers { containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Refreshes the container metadata with the data from the cloud. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts new file mode 100644 index 000000000000..3c14e7fd2631 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DeviceCapacityRequestInfo, + DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams +} from "../models"; + +/** Interface representing a DeviceCapacityCheck. */ +export interface DeviceCapacityCheck { + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + beginCheckResourceCreationFeasibility( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise, void>>; + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + beginCheckResourceCreationFeasibilityAndWait( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts new file mode 100644 index 000000000000..66567cfedf26 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts @@ -0,0 +1,27 @@ +/* + * 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 { + DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams, + DeviceCapacityInfoGetDeviceCapacityInfoResponse +} from "../models"; + +/** Interface representing a DeviceCapacityInfoOperations. */ +export interface DeviceCapacityInfoOperations { + /** + * Gets the properties of the specified device capacity info. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param options The options parameters. + */ + getDeviceCapacityInfo( + resourceGroupName: string, + deviceName: string, + options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts index 776da5a8a6b1..d1cf0ab40b65 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.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 { DataBoxEdgeDevice, DevicesListBySubscriptionOptionalParams, @@ -94,7 +94,7 @@ export interface Devices { deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -129,7 +129,7 @@ export interface Devices { deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Downloads the updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -173,7 +173,7 @@ export interface Devices { deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Installs the updates on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -206,7 +206,7 @@ export interface Devices { deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Scans for updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -230,7 +230,7 @@ export interface Devices { resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Updates the security settings on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts index 6337680f9d5a..52b0bf7ff820 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams, DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, @@ -48,8 +48,8 @@ export interface DiagnosticSettings { proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse >, DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse @@ -94,8 +94,8 @@ export interface DiagnosticSettings { diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse >, DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts index 1d8cf8228116..d43d5a81a2a1 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts @@ -11,6 +11,8 @@ export * from "./availableSkus"; export * from "./devices"; export * from "./alerts"; export * from "./bandwidthSchedules"; +export * from "./deviceCapacityCheck"; +export * from "./deviceCapacityInfoOperations"; export * from "./diagnosticSettings"; export * from "./jobs"; export * from "./nodes"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts index f18c2b99fda6..b06497aabe3f 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.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 { MonitoringMetricConfiguration, MonitoringConfigListOptionalParams, @@ -62,8 +62,8 @@ export interface MonitoringConfig { monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringConfigCreateOrUpdateResponse > >; @@ -94,7 +94,7 @@ export interface MonitoringConfig { roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * deletes a new metric configuration for a role. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts index eff6276ab14d..1f70af14fbac 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.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 { Order, OrdersListByDataBoxEdgeDeviceOptionalParams, @@ -58,8 +58,8 @@ export interface Orders { order: Order, options?: OrdersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, OrdersCreateOrUpdateResponse > >; @@ -86,7 +86,7 @@ export interface Orders { deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the order related to the device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts index 71a4698e81f9..7391428efe46 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.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 { RoleUnion, RolesListByDataBoxEdgeDeviceOptionalParams, @@ -60,8 +60,8 @@ export interface Roles { role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RolesCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface Roles { name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the role on the device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts index da6ff331ebc6..72b4426bd16b 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.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 { Share, SharesListByDataBoxEdgeDeviceOptionalParams, @@ -61,8 +61,8 @@ export interface Shares { share: Share, options?: SharesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SharesCreateOrUpdateResponse > >; @@ -93,7 +93,7 @@ export interface Shares { name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the share on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. @@ -119,7 +119,7 @@ export interface Shares { name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Refreshes the share metadata with the data from the cloud. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts index c5705ff6bc6a..035509da17b0 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.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 { StorageAccountCredential, StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams, @@ -60,8 +60,8 @@ export interface StorageAccountCredentials { storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageAccountCredentialsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface StorageAccountCredentials { name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the storage account credential. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts index 1ad5ec26c4ec..3b155215a182 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.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 { StorageAccount, StorageAccountsListByDataBoxEdgeDeviceOptionalParams, @@ -60,8 +60,8 @@ export interface StorageAccounts { storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageAccountsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface StorageAccounts { storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts index 5a7b1911d316..62fb645aa149 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { TriggerSupportPackageRequest, SupportPackagesTriggerSupportPackageOptionalParams @@ -26,7 +26,7 @@ export interface SupportPackages { resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Triggers support package on the device * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts index b7c138aabc8a..7e0f7cc5625f 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.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 { TriggerUnion, TriggersListByDataBoxEdgeDeviceOptionalParams, @@ -60,8 +60,8 @@ export interface Triggers { trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TriggersCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface Triggers { name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the trigger on the gateway device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts index 648d6e49d850..4ffc32d7a37b 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.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 { User, UsersListByDataBoxEdgeDeviceOptionalParams, @@ -61,8 +61,8 @@ export interface Users { user: User, options?: UsersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, UsersCreateOrUpdateResponse > >; @@ -94,7 +94,7 @@ export interface Users { name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes the user on a databox edge/gateway device. * @param deviceName The device name. diff --git a/sdk/databoxedge/arm-databoxedge/src/pagingHelper.ts b/sdk/databoxedge/arm-databoxedge/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/databoxedge/arm-databoxedge/src/pagingHelper.ts +++ b/sdk/databoxedge/arm-databoxedge/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/databoxedge/arm-databoxedge/tsconfig.json b/sdk/databoxedge/arm-databoxedge/tsconfig.json index c30ba030b1d5..3e6ae96443f3 100644 --- a/sdk/databoxedge/arm-databoxedge/tsconfig.json +++ b/sdk/databoxedge/arm-databoxedge/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-databoxedge": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"