diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 61cec91a5106..efe3c57b879b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3928,7 +3928,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20230210 + typescript: 5.0.0-dev.20230213 dev: false /downlevel-dts/0.7.0: @@ -8712,8 +8712,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20230210: - resolution: {integrity: sha512-FjXPw8PFeIuT1cxouvP4LRu8J1G+FsWVEGwlJ9GcVywRNDfD3Hh6flQFUympS+3QnAIiG/+CHs9ZS2EQIT733g==} + /typescript/5.0.0-dev.20230213: + resolution: {integrity: sha512-6winpoAguZ2b0juVOseKRELa6eIx8st5j42fHikEhzBb2NcuG7tSGMAjIo748WNXVija2L8T5D7vyaDGYftaDQ==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11287,15 +11287,15 @@ packages: dev: false file:projects/arm-databoxedge.tgz: - resolution: {integrity: sha512-dVpArvlg55ct2N/5xWc9Zh7LPvF4bEwLcWUwef/A3T92CxEQK3vsODp8DZSMD5enWApmgpdrxx0rGAiu99M1+Q==, tarball: file:projects/arm-databoxedge.tgz} + resolution: {integrity: sha512-UBKlNpxhramA35am0dG1qQNF0QldjmBJj2jH11tvJ8LQogEXGXEUAD/rd+88K44LldMp8vLZ+YH5PwhEGU9Bzg==, tarball: file:projects/arm-databoxedge.tgz} name: '@rush-temp/arm-databoxedge' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.3_@types+node@14.18.36 - '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 - '@rollup/plugin-json': 6.0.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.36 diff --git a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md index 1e766f9c4a3e..39c60c89b7be 100644 --- a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md @@ -1,15 +1,48 @@ # Release History + +## 3.0.0 (2023-02-13) + +**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 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..21d713926369 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": "7628df586f53463e7182758c00b670ffde26077c", + "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.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/package.json b/sdk/databoxedge/arm-databoxedge/package.json index 45282fe40af8..7dcddfd0f14d 100644 --- a/sdk/databoxedge/arm-databoxedge/package.json +++ b/sdk/databoxedge/arm-databoxedge/package.json @@ -3,7 +3,7 @@ "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" }, @@ -29,9 +29,9 @@ "types": "./types/arm-databoxedge.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^1.0.4", "rollup": "^2.66.1", @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databoxedge?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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..128c8dd8334b 100644 --- a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md +++ b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md @@ -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; @@ -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,7 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { etag?: string; readonly friendlyName?: string; identity?: ResourceIdentity; - kind?: DataBoxEdgeDeviceKind; + readonly kind?: DataBoxEdgeDeviceKind; location: string; readonly modelDescription?: string; readonly nodeCount?: number; @@ -439,13 +479,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 +543,10 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { // (undocumented) containers: Containers; // (undocumented) + deviceCapacityCheck: DeviceCapacityCheck; + // (undocumented) + deviceCapacityInfoOperations: DeviceCapacityInfoOperations; + // (undocumented) devices: Devices; // (undocumented) diagnosticSettings: DiagnosticSettings; @@ -586,6 +637,48 @@ 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>>; @@ -679,7 +772,6 @@ export interface DevicesInstallUpdatesOptionalParams extends coreClient.Operatio // @public export interface DevicesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -695,7 +787,6 @@ export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList; // @public export interface DevicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { - expand?: string; } // @public @@ -865,6 +956,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 +1150,13 @@ export enum KnownClientPermissionType { ReadWrite = "ReadWrite" } +// @public +export enum KnownClusterWitnessType { + Cloud = "Cloud", + FileShare = "FileShare", + None = "None" +} + // @public export enum KnownContainerStatus { NeedsAttention = "NeedsAttention", @@ -1391,13 +1501,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", @@ -1830,6 +1944,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 +2014,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; @@ -2029,12 +2156,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; @@ -2238,25 +2359,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; @@ -2508,7 +2610,6 @@ export type TriggersGetResponse = TriggerUnion; // @public export interface TriggersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2676,7 +2777,6 @@ export type UsersGetResponse = User; // @public export interface UsersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -2693,6 +2793,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..5747fa85cfae 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 || "2022-03-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/models/index.ts b/sdk/databoxedge/arm-databoxedge/src/models/index.ts index 25746ec5ac59..3e0c4e8671fe 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. @@ -1637,7 +1686,7 @@ export interface DataBoxEdgeDevice extends ARMBaseModel { /** 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 +1730,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 +1744,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 +1775,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 +1785,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 +1814,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 +1906,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 +1958,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 +1969,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 +1978,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 +1995,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 +2027,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 +2052,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 +2079,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 +2104,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 +2130,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 +2246,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 +2261,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 +2308,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 +2617,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 +2657,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 +3142,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 +4247,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 +4321,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 +4800,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 +4852,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..4b809355dd00 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" } @@ -3620,6 +3844,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 +3947,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 +4010,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 +4152,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 +4166,13 @@ export const Order: coreClient.CompositeMapper = { className: "SystemData" } }, + orderId: { + serializedName: "properties.orderId", + readOnly: true, + type: { + name: "String" + } + }, contactInformation: { serializedName: "properties.contactInformation", type: { @@ -4309,19 +4640,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..0d3df186d347 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: "2022-03-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..101d451cfd15 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts @@ -510,7 +510,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..b55d6b1e6f2a 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts @@ -482,7 +482,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..23bc4a171e3c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts @@ -653,7 +653,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..0d0bedf32ef5 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts @@ -0,0 +1,148 @@ +/* + * 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } 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 sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, deviceName, deviceCapacityRequestInfo, options }, + checkResourceCreationFeasibilityOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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..574ef849445b 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts @@ -1202,7 +1202,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, Parameters.nextLink, @@ -1222,7 +1221,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/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..fa714d577666 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts @@ -501,7 +501,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..922c9316afc6 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts @@ -508,7 +508,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..3309a4fb692b 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts @@ -482,7 +482,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..de55e9c9bf1d 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts @@ -594,7 +594,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..feaf865d923e 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts @@ -489,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/storageAccounts.ts b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts index d188833e47b7..59697035f9f4 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts @@ -488,7 +488,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/triggers.ts b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts index e5ba529eaee7..ea2dda795514 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts @@ -482,7 +482,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..b447a64de7ba 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/users.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/users.ts @@ -484,7 +484,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/deviceCapacityCheck.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts new file mode 100644 index 000000000000..451dbd5d5d19 --- /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 { PollerLike, PollOperationState } 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/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/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"